/* --- Global Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
:root { 
    --brand-primary: #2D7186; 
    --player-bg: #0f0f0f;
     --primary-color: #2D7186 !important;
    --bg-body: #f1f4f6;            
}

body { 
    background-color: #f8fafc; 
    font-family: 'Inter','Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg-body);          
    color: #2c3e50;
}

/* --- THE PLAYER SHELL (Your CSS Specifications) --- */
.player-container {
    position: relative;
    background: var(--player-bg);
    border: 1px solid rgba(45, 113, 134, 0.1);
    /*margin-bottom: 15px;
    padding: 10px 10px 0px 10px;*/
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(45, 113, 134, 0.1);            
}

/* Player Stage (The Preview Area) */
.player-stage {
    position: relative;
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

/* Play Button Overlay on Image */
.play-btn-overlay {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(45, 113, 134, 0.6);
    transition: transform 0.3s ease;
}
.play-btn-overlay:hover { transform: scale(1.1); }
/* Article Wrapper */
/*.article-container {
    /*background: var(--player-bg);* /
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(45, 113, 134, 0.1);
    overflow: hidden;
    border: 1px solid rgba(45, 113, 134, 0.1);
}*/
.heading-xlarge {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--primary-color);
}

/* Article Header/Toolbar */
.article-toolbar {
    background: #fdfdfd;
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Article Screen (Transcript Area) */
.article-screen {
    padding: 40px;
    position: relative;
}

/* Responsive Text Cleaning & Logic */
.ppt-article {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-size: 1rem;
    color: #1e293b;    
    word-wrap: break-word;
}

/* Fluid Typography using clamp:
   clamp(MIN_SIZE, VIEWPORT_WIDTH_PERCENTAGE, MAX_SIZE)
*/

/* Large Heading (e.g. Slide Titles) */
.ppt-article .heading-large {
    /*font-size: clamp(2rem, 8vw, 3.75rem); /* Scales from 32px to 60px */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--primary-color);
}

/* Medium Heading */
.ppt-article .heading-medium {
    /*font-size: clamp(1.5rem, 5vw, 2.5rem); /* Scales from 24px to 40px */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

/* Smaller Heading */
.ppt-article .heading-small {
    /*font-size: clamp(1.25rem, 4vw, 1.875rem); /* Scales from 20px to 30px */
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--primary-color);
}

/* Normal Body Text */
.ppt-article .text-normal {
    font-size: clamp(0.95rem, 2.5vw, 1rem); /* Scales slightly for readability */
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Small Text (Metadata/Labels) */
.ppt-article .text-small {
    font-size: clamp(0.8rem, 2vw, 0.875rem); /* Scales from 12.8px to 14px */
    font-weight: 500;
    color: #64748b;
    display: inline-block;
}

/* Thin Text (Footnotes) */
.ppt-article .text-thin {
    font-size: 0.75rem; /* Fixed 12px for technical info */
    font-weight: 300;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

/* --- Mobile Specific Fixes --- */
@media (max-width: 576px) {
    .ppt-article {
        padding: 0 10px; /* Prevents text from hitting screen edges */
    }
    
    .ppt-article .heading-large {
        margin-bottom: 1rem;
    }

    /* Force long PDF strings to break so they don't break the layout */
    .ppt-article span, 
    .ppt-article p {
        white-space: normal !important;
        height: auto !important;
        position: static !important;
    }
}

/* SLIDE ARTICLES */
.slide-article {
    margin-bottom: 60px;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.slide-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: block;
}

/* READ MORE PLAYER LOGIC */
.read-more-state { display: none; }
.read-more-wrap { 
    /*max-height: 550px; /* Player Window Height */
    max-height: 100vh; /* Player Window Height */
    overflow: hidden; 
    position: relative; 
    transition: max-height 0.8s ease; 
}

/* The Player "Fade" overlay */
.read-more-wrap::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 120px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

/* When the player is "Played" (Expanded) */
.read-more-state:checked + .read-more-wrap { 
    max-height: 50000px; 
}
.read-more-state:checked + .read-more-wrap::after { 
    opacity: 0; 
}

/* Player Button Styles */
.player-btn {
    background-color: var(--primary-color);
    color: #fff !important;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.player-btn:hover {
    opacity: 0.9;
    transform: scale(1.03);
    box-shadow: 0 8px 15px rgba(45, 113, 134, 0.2);
}

/* Toggle Text */
.read-more-state:checked ~ .article-controls .player-btn::before { content: "SHOW LESS -"; }
.read-more-state:not(:checked) ~ .article-controls .player-btn::before { content: "READ FULL ARTICLE +"; }

.article-controls {
    padding: 20px;
    /*background: #fafafa;*/
    text-align: center;
    border-top: 1px solid #eee;
}

/* Sidebar Ads & Info */
.sidebar-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}
/* --- THE MODERN DOC CARD --- */
.doc-recommend-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: start;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.doc-recommend-card:hover {
    transform: translateX(5px) translateY(-3px);
    box-shadow: 0 10px 25px rgba(45, 113, 134, 0.08);
    border-color: var(--brand-primary);
}

/* Thumbnail Image Area */
.doc-thumb-wrapper {
    width: 90px;
    flex-shrink: 0;
    position: relative;
}
.doc-thumb-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    aspect-ratio: 4 / 3; /* Fixed professional aspect ratio */
    object-fit: cover;
    border: 1px solid #eee;
}

/* Doc Details */
.doc-details { flex-grow: 1; min-width: 0; }

.doc-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    display: block;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate text professionally */
    transition: 0.2s;
}
.doc-recommend-card:hover .doc-title { color: var(--brand-primary); }

.doc-excerpt {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

/* Metadata & Views */
.doc-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.doc-meta i { font-size: 0.8rem; margin-right: 4px; }
.meta-divider { color: #cbd5e0; }

@media (max-width: 576px) {
    .doc-thumb-wrapper { width: 70px; }
    .doc-excerpt { display: none; } /* Simplify on small screens */
}