/* ==========================================================================
   DETAIL BERITA (ARTICLE PAGE) STYLES
   ========================================================================== */

/* --- Progress Bar --- */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 2000;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
    width: 0%;
    transition: width 0.1s ease;
}

/* --- Layout --- */
.article-layout {
    max-width: 1200px;
    margin: 110px auto 4rem; /* accounts for fixed navbar height */
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    position: relative;
}

/* --- Lenis Smooth Scroll --- */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* --- Floating Actions Bar (Glassmorphism) --- */
.floating-actions-bar {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.floating-actions-bar:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.floating-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid var(--color-neutral-light);
    box-shadow: var(--shadow-sm);
    font-size: 1rem;
}
.floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--color-neutral-white);
    color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.15);
}

/* --- Article Main Content --- */
.article-main {
    background: var(--color-neutral-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-neutral-light);
    padding: 2.5rem;
}

.article-breadcrumb {
    font-size: var(--text-sm);
    color: var(--color-neutral-gray);
    margin-bottom: 1.5rem;
}
.article-breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.article-breadcrumb a:hover {
    color: var(--color-primary);
}

.article-header {
    margin-bottom: 2rem;
}
.article-header__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: var(--text-sm);
    color: var(--color-neutral-gray);
    border-bottom: 1px solid var(--color-neutral-light);
    padding-bottom: 1.5rem;
}
.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.article-meta i {
    color: var(--color-secondary);
}

.article-cover {
    width: 100%;
    margin-bottom: 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}
.article-cover img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.article-cover:hover img {
    transform: scale(1.02);
}

/* --- Typography & Reading Experience --- */
.article-body {
    max-width: 750px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: #334155;
    letter-spacing: 0.01em;
}
.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}
/* Dropcap for first paragraph */
.article-body > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 3.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.15em;
    margin-top: 0.05em;
    font-weight: 700;
    color: var(--color-primary);
}
.article-body h2, 
.article-body h3, 
.article-body h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.article-body h2 {
    font-size: var(--text-2xl);
    border-left: 4px solid var(--color-secondary);
    padding-left: 1rem;
}
.article-body h3 {
    font-size: var(--text-xl);
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}
.article-body blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--pastel-sky);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-primary);
    font-size: 1.1em;
}
.article-body ul, 
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}
.article-body li {
    margin-bottom: 0.5rem;
}

/* --- Attachments --- */
.article-attachment {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--pastel-lavender);
    border-radius: var(--radius-md);
    border-left: 4px solid #8b5cf6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.article-attachment h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 0;
    font-size: var(--text-md);
}
.article-attachment a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6d28d9;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}
.article-attachment a:hover {
    color: var(--color-primary);
}

/* --- Social Share Inline --- */
.share-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--color-neutral-light);
    border-radius: var(--radius-sm);
}
.share-inline span {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--color-neutral-gray);
}
.share-inline__buttons {
    display: flex;
    gap: 0.5rem;
}
.share-inline__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--color-neutral-white);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.share-inline__btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.share-inline__btn--wa { background: #25D366; }
.share-inline__btn--tw { background: #1DA1F2; }
.share-inline__btn--fb { background: #4267B2; }
.share-inline__btn--copy { background: var(--color-neutral-gray); border: none; cursor: pointer; font-size: 1rem; }

/* --- Sidebar --- */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.sidebar-widget {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}
.widget-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    border-left: 4px solid var(--color-secondary);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}
.recent-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.recent-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.recent-item__img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.recent-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.recent-item__title {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.4;
}
.recent-item__title a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recent-item__title a:hover {
    color: var(--color-accent);
}
.recent-item__meta {
    font-size: var(--text-xs);
    color: var(--color-neutral-gray);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* --- Related Articles --- */
.related-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-neutral-light);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* --- Comments Section --- */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-neutral-light);
}
.comments-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.comment-form {
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
}
.comment-form h4 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.form-input, 
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-neutral-light);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background: var(--color-neutral-white);
}
.form-input:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.btn-submit {
    background: var(--color-primary);
    color: var(--color-neutral-white);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    font-size: var(--text-sm);
}
.btn-submit:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.comment-list {
    list-style: none;
}
.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.comment-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--pastel-lavender), var(--pastel-pink));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.comment-content {
    flex: 1;
    background: var(--color-neutral-white);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-neutral-light);
    box-shadow: var(--shadow-sm);
}
.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: center;
}
.comment-name {
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-heading);
}
.comment-date {
    font-size: var(--text-xs);
    color: var(--color-neutral-gray);
}
.comment-text {
    font-size: var(--text-sm);
    color: var(--color-neutral-dark);
    line-height: 1.6;
}

/* --- Alerts --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
}
.alert-success {
    background: var(--pastel-mint);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.alert-error {
    background: var(--pastel-pink);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        max-width: 800px;
    }
    .sidebar-widget {
        position: relative;
        top: 0;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .floating-actions-bar {
        top: auto;
        bottom: 1.25rem;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        border-radius: 50px;
        padding: 0.4rem 0.75rem;
        gap: 0.6rem;
    }
    .floating-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}
@media (max-width: 768px) {
    .article-layout {
        margin-top: 90px;
        margin-bottom: 6rem;
    }
    .article-main {
        padding: 1.5rem;
    }
    .article-header__title {
        font-size: 1.75rem;
    }
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .comment-form {
        padding: 1.5rem;
    }
    .article-cover {
        margin: 0 -1.5rem 1.5rem;
        width: calc(100% + 3rem);
        border-radius: 0;
    }
    .floating-actions-bar {
        width: auto;
        justify-content: center;
        bottom: 1rem;
        padding: 0.4rem 0.75rem;
    }
    .floating-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}
