/*
 * article-single.css
 * Ekstrak dari inline <style> di artikel/*.html
 * Digunakan oleh: single.php, template-parts/
 */

/* ===================================================
   FOUC PREVENTION
   =================================================== */
body {
    visibility: hidden;
}
body.loaded {
    visibility: visible;
}

/* ===================================================
   ARTICLE PAGE LAYOUT
   =================================================== */
.article-page {
    padding-top: 5.5rem;
    background: var(--body-color, #f5f5f5);
    min-height: 100vh;
}

.article-container {
    max-width: clamp(320px, 90vw, 1200px);
    margin: 0 auto;
    background-color: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(8, 15, 52, 0.08);
    min-height: 500px;
    margin-bottom: 4rem;
}

/* ===================================================
   ARTICLE HEADER
   =================================================== */
.article-header {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-bottom: 1px solid rgba(18, 43, 64, 0.08);
    background: linear-gradient(180deg, rgba(33, 87, 97, 0.08), rgba(255,255,255,0));
    min-height: 150px;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #215761;
    color: #fff;
    padding: 0.45rem 1.15rem;
    font-size: 0.78rem;
    letter-spacing: 0.7px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    line-height: 1.3;
    color: #0b1c26;
    margin: 1rem 0 0.75rem;
    font-family: var(--title-font);
}

.article-subtitle {
    color: #45545f;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ===================================================
   ARTICLE META (author, date, share)
   =================================================== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: #5c6b75;
    border-top: 1px solid rgba(18, 43, 64, 0.08);
    padding-top: 1rem;
    align-items: center;
}

.article-meta > div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-share {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

/* Share Buttons */
.share-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.share-button:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-wa    { background-color: #25D366; }
.share-fb    { background-color: #1877F2; }
.share-ig    { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.share-tiktok{ background-color: #000; }
.share-copy  { background-color: #ff6b35; }

/* ===================================================
   ARTICLE FEATURED IMAGE
   =================================================== */
.article-image-wrapper {
    width: 100%;
    min-height: 220px;
    background: #f0f0f0;
    display: block;
}

.article-featured-image {
    width: 100%;
    height: auto;
    max-height: 520px;
    min-height: 220px;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

.article-image-caption {
    padding: 0.85rem clamp(1.25rem, 3vw, 2rem);
    font-size: 0.95rem;
    color: #5c6b75;
    background: #f7f9fa;
    border-bottom: 1px solid rgba(18, 43, 64, 0.06);
}

/* ===================================================
   ARTICLE CONTENT
   =================================================== */
.article-content {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    color: #1f2d3a;
    line-height: 1.85;
}

.article-content p {
    margin-bottom: 1.4rem;
    font-size: 1.03rem;
    text-align: justify;
}

.article-content h2 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    color: #102029;
    margin: 2.5rem 0 1rem;
    border-bottom: 2px solid #215761;
    padding-bottom: 0.35rem;
}

.article-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #102029;
    margin: 1.8rem 0 0.75rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.4rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content a.inline-link {
    color: #0a66c2;
    font-weight: 600;
    text-decoration: none;
}

.article-content a.inline-link:hover {
    text-decoration: underline;
}

.article-content strong {
    color: #102029;
}

/* Figure inside content */
.article-content figure {
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f9fa;
    width: 100%;
    min-height: 200px;
}

.article-content figure img {
    width: 100%;
    height: auto;
    min-height: 200px;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.article-content figure figcaption {
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
    color: #55636d;
}

/* Article Note / Blockquote */
.article-note {
    background: #f0f7f8;
    border-left: 4px solid #215761;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    color: #2d4a52;
    font-size: 0.98rem;
}

/* CTA List inline */
.article-cta-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.article-cta-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(18, 43, 64, 0.06);
}

.article-cta-list li::before {
    content: '\2713';
    color: #215761;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===================================================
   TABLE (biaya-umroh)
   =================================================== */
.article-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(18, 43, 64, 0.06);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.article-table th {
    background: #215761;
    color: #fff;
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
}

.article-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(18, 43, 64, 0.06);
    vertical-align: top;
}

.article-table tr:nth-child(even) td {
    background: #f7f9fa;
}

.article-table tr:hover td {
    background: #eef4f5;
}

/* ===================================================
   TOC BOX (syarat-cara-apply-visa-mesir)
   =================================================== */
.toc-box {
    background: #f7f9fa;
    border: 1px solid rgba(33, 87, 97, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-box h3 {
    font-size: 1rem;
    color: #215761;
    margin: 0 0 1rem;
    font-weight: 700;
}

.toc-box ol {
    margin: 0;
    padding-left: 1.2rem;
}

.toc-box li {
    margin-bottom: 0.5rem;
}

.toc-box a {
    color: #215761;
    text-decoration: none;
    font-size: 0.92rem;
}

.toc-box a:hover {
    text-decoration: underline;
}

/* ===================================================
   FAQ ACCORDION (syarat-cara-apply-visa-mesir)
   =================================================== */
.faq-item {
    border: 1px solid rgba(18, 43, 64, 0.1);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: #f7f9fa;
    border: none;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #102029;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #eef4f5;
}

.faq-question .faq-icon {
    font-size: 1.2rem;
    color: #215761;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.active .faq-question .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.2s;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1rem 1.25rem;
}

/* ===================================================
   CONSULTATION CTA
   =================================================== */
.consultation-section {
    background-color: #215761;
    color: #ffffff;
    padding: 3rem 2rem;
    margin-top: 3rem;
    text-align: center;
    border-radius: 18px;
    min-height: 200px;
}

.consultation-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.consultation-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.consultation-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 14px 32px;
    border-radius: 12px;
    background: #ffffff;
    color: #215761;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(15, 80, 80, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.consultation-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 80, 80, 0.3);
}

/* ===================================================
   ARTICLE LISTING (artikel.html)
   =================================================== */
.artikel-hero {
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.artikel-hero__description {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 680px;
    margin-top: 1rem;
}

.artikel-page-section {
    padding-top: 0;
    padding-bottom: 4rem;
}

.artikel-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media screen and (min-width: 640px) {
    .artikel-page__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1024px) {
    .artikel-page__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.artikel-page__card {
    background: var(--container-color, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(8, 15, 52, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.artikel-page__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(8, 15, 52, 0.12);
}

.artikel-page__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.artikel-page__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.artikel-page__card:hover .artikel-page__img {
    transform: scale(1.05);
}

.artikel-page__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
}

.artikel-page__category {
    background: #215761;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.artikel-page__content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.artikel-page__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--title-color, #102029);
    margin: 0 0 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artikel-page__excerpt {
    font-size: 0.9rem;
    color: var(--text-color, #5c6b75);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.artikel-page__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-color-light, #8a9baa);
    margin-bottom: 1rem;
}

.artikel-page__date,
.artikel-page__author {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.artikel-page__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #215761;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}

.artikel-page__link:hover {
    gap: 0.5rem;
}

/* ===================================================
   PREVENT ICON FLASH
   =================================================== */
[class*="ri-"] {
    display: inline-block;
    min-width: 1em;
    min-height: 1em;
}

/* ===================================================
   HEADER SCROLL-HEADER (artikel pages)
   =================================================== */
body.artikel-page .header,
body.single .header,
body.category .header,
body.tag .header,
body.search .header {
    background-color: var(--body-color);
    box-shadow: 0 0 4px rgba(14, 60, 156, 0.15);
}

body.artikel-page .header .nav__link,
body.single .header .nav__link,
body.category .header .nav__link {
    color: var(--text-color);
}

/* ===================================================
   DARK MODE SUPPORT
   =================================================== */
body.dark-theme .article-container {
    background-color: var(--container-color);
}

body.dark-theme .article-header {
    background: linear-gradient(180deg, rgba(33, 87, 97, 0.15), transparent);
}

body.dark-theme .article-title {
    color: var(--title-color);
}

body.dark-theme .article-content {
    color: var(--text-color);
}

body.dark-theme .article-content h2,
body.dark-theme .article-content h3 {
    color: var(--title-color);
}

body.dark-theme .artikel-page__card {
    background: var(--container-color);
}

body.dark-theme .artikel-page__title {
    color: var(--title-color);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
    .article-share {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .consultation-section {
        padding: 2rem 1.5rem;
    }

    .consultation-title {
        font-size: 1.4rem;
    }

    .consultation-description {
        font-size: 0.98rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
