/* =============================================================
   Modern Detail Styles
   Shared CSS for news detail, page detail, and other content pages
   ============================================================= */

/* ===== Reading Progress Bar ===== */
.modern-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ===== Content Wrapper ===== */
.modern-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Modern Breadcrumb ===== */
.modern-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 0 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #94a3b8;
}
.modern-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.modern-breadcrumb a:hover {
    color: #2563eb;
}
.modern-breadcrumb .breadcrumb-sep {
    color: #cbd5e1;
    font-size: 10px;
}
.modern-breadcrumb .breadcrumb-current {
    color: #334155;
    font-weight: 500;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Hero Section ===== */
.modern-hero {
    position: relative;
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.modern-hero-image {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}
.modern-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 48px 44px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    border-radius: 0 0 20px 20px;
}
.modern-hero-overlay .modern-title {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.modern-hero-overlay .modern-meta {
    color: rgba(255,255,255,0.85);
}
.modern-hero-overlay .modern-meta-item svg {
    color: rgba(255,255,255,0.7);
}
.modern-hero-overlay .modern-meta-author {
    color: #fff;
}
.modern-hero-overlay .modern-meta-divider {
    background: rgba(255,255,255,0.4);
}

/* ===== Category Badge ===== */
.modern-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #2563eb;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}
.modern-category-badge:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===== Title ===== */
.modern-title {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    margin: 0 0 24px 0;
    letter-spacing: -0.5px;
}

/* ===== Simple Header (no hero image) ===== */
.modern-header-simple {
    padding: 16px 0 40px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 40px;
}
.modern-header-simple .modern-title-accent {
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 2px;
    margin-top: 20px;
}

/* ===== Article Header (news-style) ===== */
.modern-header {
    margin-bottom: 32px;
}

/* ===== Meta Info ===== */
.modern-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #64748b;
}
.modern-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.modern-meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.modern-meta-author {
    font-weight: 600;
    color: #334155;
}
.modern-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* ===== Content Layout (two-column with sidebar) ===== */
.modern-content-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

/* ===== Article Content Styling ===== */
.modern-article-content {
    font-family: 'Lora', 'Georgia', serif;
    font-size: 17px;
    line-height: 1.85;
    color: #1e293b;
}
.modern-article-content p {
    margin-bottom: 1.5em;
}
.modern-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 28px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.modern-article-content blockquote {
    border-left: 4px solid #2563eb;
    margin: 32px 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #334155;
}
.modern-article-content h1,
.modern-article-content h2,
.modern-article-content h3,
.modern-article-content h4 {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    margin-top: 2em;
    margin-bottom: 0.7em;
    line-height: 1.3;
}
.modern-article-content h1 { font-size: 30px; font-weight: 800; }
.modern-article-content h2 { font-size: 26px; font-weight: 700; }
.modern-article-content h3 { font-size: 22px; font-weight: 600; }
.modern-article-content h4 { font-size: 18px; font-weight: 600; }
.modern-article-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
.modern-article-content a:hover {
    text-decoration-color: #2563eb;
}
.modern-article-content ul,
.modern-article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.8em;
}
.modern-article-content li {
    margin-bottom: 0.6em;
}
.modern-article-content ol li {
    padding-left: 4px;
}
.modern-article-content strong,
.modern-article-content b {
    font-weight: 700;
    color: #0f172a;
}
.modern-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.modern-article-content table th,
.modern-article-content table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
.modern-article-content table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
}
.modern-article-content table tr:hover td {
    background: #f8fafc;
}

/* News-specific: drop cap first letter */
.modern-article-content.has-dropcap p:first-of-type::first-letter {
    font-size: 3.2em;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin-right: 8px;
    margin-top: 4px;
    color: #2563eb;
    font-family: 'Lora', serif;
}

/* ===== Social Share Buttons ===== */
.modern-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.modern-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: #fff;
}
.modern-share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.modern-share-btn.facebook { background: #1877f2; }
.modern-share-btn.facebook:hover { background: #0d65d9; }
.modern-share-btn.twitter { background: #0f1419; }
.modern-share-btn.twitter:hover { background: #333; }
.modern-share-btn.whatsapp { background: #25d366; }
.modern-share-btn.whatsapp:hover { background: #1da851; }
.modern-share-btn.copy-link { background: #64748b; }
.modern-share-btn.copy-link:hover { background: #475569; }
.modern-share-btn.copy-link.copied { background: #10b981; }

/* ===== Sidebar Share ===== */
.modern-sidebar-wrapper {
    order: 2;
}
.modern-share-sidebar {
    position: sticky;
    top: 100px;
}
.modern-share-sidebar-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 16px;
}
.modern-share-sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Article Footer / Bottom Share ===== */
.modern-article-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}
.modern-share-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.modern-share-inline-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* ===== Previous / Next Navigation ===== */
.modern-nav-section {
    margin-top: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.modern-nav-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}
.modern-nav-card:hover {
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}
.modern-nav-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2563eb;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.modern-nav-card.next .modern-nav-label {
    justify-content: flex-end;
}
.modern-nav-card.next {
    text-align: right;
}
.modern-nav-title {
    font-family: 'Lora', serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    transition: color 0.2s;
}
.modern-nav-card:hover .modern-nav-title {
    color: #2563eb;
}

/* ===== Tags ===== */
.modern-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}
.modern-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f5f9;
    color: #475569;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.modern-tag:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ===== Video Container ===== */
.modern-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.modern-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.modern-video-fallback {
    display: none;
}
.modern-video-fallback a {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}
.modern-video-fallback img {
    width: 100%;
    border-radius: 16px;
}
.modern-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(255,0,0,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.modern-video-fallback a:hover .modern-video-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255,0,0,1);
}

/* ===== Gallery Slideshow ===== */
.modern-gallery-container {
    margin-bottom: 32px;
}
.modern-gallery-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.modern-gallery-slide {
    display: none;
}
.modern-gallery-slide.active-slide {
    display: block;
}
.modern-gallery-slide img {
    width: 100%;
    display: block;
    cursor: pointer;
}
.modern-gallery-slide .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
.modern-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.modern-gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.modern-gallery-dot.active-dot {
    background: #2563eb;
    transform: scale(1.2);
}

/* ===== Majalah / Flipbook ===== */
.modern-majalah-container {
    width: 100%;
    height: 75vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); /* Clean minimalist shadow */
    margin-bottom: 40px;
    position: relative;
    background: #ffffff; /* pure white for contrast without gray border */
    border: 1px solid #e2e8f0; /* subtle outline */
    display: flex;
    justify-content: center;
    align-items: center;
}
#reader-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modern-majalah-instructions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* ===== Short Description (video/majalah) ===== */
.modern-short-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
    max-width: 680px;
    margin-top: 16px;
}

/* ===== Schema Meta (hidden) ===== */
.modern-schema-meta {
    display: none;
}


/* =============================================================
   Responsive Styles
   ============================================================= */

@media (max-width: 1024px) {
    .modern-content-layout {
        grid-template-columns: 1fr;
    }
    .modern-share-sidebar {
        position: static;
    }
    .modern-share-sidebar-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .modern-title {
        font-size: 28px;
    }
    .modern-hero-image {
        height: 280px;
    }
    .modern-hero-overlay {
        padding: 60px 24px 28px;
    }
    .modern-hero {
        border-radius: 12px;
    }
    .modern-hero-overlay {
        border-radius: 0 0 12px 12px;
    }
    .modern-article-content {
        font-size: 16px;
    }
    .modern-article-content.has-dropcap p:first-of-type::first-letter {
        font-size: 2.8em;
    }
    .modern-nav-section {
        grid-template-columns: 1fr;
    }
    .modern-meta {
        font-size: 13px;
        gap: 12px;
    }
    .modern-detail-wrapper {
        padding: 0 16px;
    }
    .modern-header-simple {
        padding: 12px 0 28px;
        margin-bottom: 28px;
    }
}
