/* ==========================================================================
   Akil Ashraful — Main Stylesheet
   Merged from articles-list.html and article-detail.html
   ========================================================================== */

/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
    background-color: #ffffff;
    color: #0F0F0F;
}

/* ── Custom Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 8px; }
::-webkit-scrollbar-track  { background: #ffffff; }
::-webkit-scrollbar-thumb  { background: #cbd5e1; border-radius: 4px; }

/* ── Layout Container ────────────────────────────────────────────────────── */
.layout-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 80rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px)  { .layout-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .layout-container { padding-left: 2rem;   padding-right: 2rem;   } }
@media (min-width: 1440px) { .layout-container { max-width: 100%; padding-left: 110px; padding-right: 110px; } }
@media (min-width: 1920px) { .layout-container { padding-left: 15%;   padding-right: 15%; } }

/* ── Mega Menu ───────────────────────────────────────────────────────────── */
.mega-menu-trigger:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
@media (min-width: 1440px) {
    .mega-menu {
        left: calc((100vw - 900px) * 0.7143) !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ── Mobile Menu ─────────────────────────────────────────────────────────── */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: top;
}
#mobile-menu.hidden        { display: none;  opacity: 0; transform: translateY(-10px); }
#mobile-menu:not(.hidden)  { display: block; opacity: 1; transform: translateY(0); }

/* ── Reveal Animation ────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Article Card Hover (list page) ─────────────────────────────────────── */
.article-card > a {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e2e8f0;
}
.article-card:hover > a            { transform: translateY(-6px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12); border-color: #FFCC01; }
.article-card:hover .card-title    { color: #e6b800; }
.article-card:hover .card-img      { transform: scale(1.05); }

/* ── Skeleton Loading (list page) ────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Bento Card (sidebar CTA on detail page) ─────────────────────────────── */
.bento-card {
    background: #0a0a0a;
    border: 1px solid #27272a;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.bento-card:hover {
    border-color: #FFCC01;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(255, 204, 1, 0.15);
}

/* ── Article Typography (detail page) ───────────────────────────────────── */
.article-content h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2rem;    margin-top: 3rem;   margin-bottom: 1.5rem; color: #0F0F0F; letter-spacing: -0.02em; }
.article-content h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem;  margin-top: 2.5rem; margin-bottom: 1rem;   color: #0F0F0F; }
.article-content h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.25rem; margin-top: 2rem;   margin-bottom: 1rem;   color: #0F0F0F; }
.article-content h5 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.125rem;margin-top: 1.5rem; margin-bottom: 0.75rem;color: #0F0F0F; }
.article-content h6 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem;    margin-top: 1.5rem; margin-bottom: 0.5rem; color: #0F0F0F; text-transform: uppercase; letter-spacing: 0.05em; }

.article-content p  { margin-bottom: 1.5rem; line-height: 1.8; color: #475569; font-size: 1.125rem; }

.article-content br {
    display: block !important;
    content: " " !important;
    margin-bottom: 0.85rem !important;
    line-height: 0 !important;
}

/* Lists */
.article-content ul,
.article-content ol           { list-style: none; margin-bottom: 1.25rem; padding-left: 1rem; }
.article-content p + ul,
.article-content p + ol       { margin-top: -0.75rem; }
.article-content li           { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; color: #475569; }

/* Unordered */
.article-content ul > li::before { content: '•'; color: #0F0F0F; font-weight: bold; position: absolute; left: 0; font-size: 1.5rem; line-height: 1rem; top: 0.2rem; }

/* Ordered */
.article-content ol                    { counter-reset: custom-counter; }
.article-content ol > li               { counter-increment: custom-counter; }
.article-content ol > li::before       { content: counter(custom-counter) "."; color: #0F0F0F; font-weight: bold; font-family: 'Space Grotesk', sans-serif; position: absolute; left: 0; top: 0; font-size: 1.05rem; line-height: 1.6rem; }

/* Nested lists */
.article-content li > ul,
.article-content li > ol              { margin-top: 0.5rem; margin-bottom: 0; padding-left: 0.25rem; }
.article-content li > ul > li::before { content: '○'; font-size: 0.7rem; line-height: 1.2rem; top: 0.25rem; font-weight: bold; }

/* Blockquote / Image / Links */
.article-content blockquote { border-left: 4px solid #FFCC01; padding-left: 1.5rem; margin: 2rem 0; font-style: italic; color: #0F0F0F; font-size: 1.25rem; font-family: 'Space Grotesk', sans-serif; }
.article-content figure     { margin: 2.5rem 0; }
.article-content img        { border-radius: 1rem; width: 100%; height: auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.article-content a          { color: #0F0F0F; text-decoration: underline; text-decoration-color: #FFCC01; text-decoration-thickness: 2px; text-underline-offset: 4px; font-weight: 600; transition: all 0.2s; }
.article-content a:hover    { background-color: #FFCC01; text-decoration: none; color: black; padding: 0 4px; border-radius: 4px; }

/* WordPress block buttons inside article content */
.article-content .wp-block-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin: 2rem 0; }
.article-content .wp-block-button  { display: flex; justify-content: center; }
.article-content .wp-block-button__link,
.article-content a.wp-block-button__link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: #000000 !important;
    color: #FFCC01 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    padding: 0.625rem 1.5rem !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.15) !important;
    border: 1px solid transparent !important;
}
.article-content .wp-block-button__link:hover,
.article-content a.wp-block-button__link:hover {
    background-color: #FFCC01 !important;
    color: #000000 !important;
}

/* ── Reading Progress Bar (detail page) ──────────────────────────────────── */
#progress-bar {
    width: 0%;
    height: 4px;
    background: #FFCC01;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width 0.1s;
}

/* ── TTS Speaking Highlight (detail page) ────────────────────────────────── */
.speaking-active {
    background-color: rgba(255, 204, 1, 0.3);
    border-radius: 4px;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 0 2px rgba(255, 204, 1, 0.1);
}

/* ── Waveform Animation (TTS player) ─────────────────────────────────────── */
@keyframes wave {
    0%, 100% { height: 40%; }
    50%       { height: 100%; }
}
.animate-wave {
    animation: wave 1s ease-in-out infinite;
}
