/* DR. BAFNA CLINICAL KNOWLEDGE HUB - CORE STYLESHEET 
    Final Refinement: Two-line Clamping & Increased Internal Spacing
*/

/* --- 1. GLOBAL LAYOUT & VIEWPORT --- */
.blog-fixed-viewport {
    height: 100vh;
    width: 100%;
    background: #e7e8e8; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 40px 30px 40px; 
    box-sizing: border-box;
    overflow: hidden;
}

.blog-outer-frame {
    display: flex; /* CRITICAL: Maintains side-by-side alignment */
    width: 100%;
    height: 100%;
    background: #0c1c35;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(12, 28, 53, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

/* --- 2. LEFT PANEL: BRANDING & IDENTITY --- */
.blog-branding-panel {
    flex: 0 0 35%; /* Fixed 35% width - prevents shifting */
    background: linear-gradient(135deg, #0c1c35 0%, #061021 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.section-tag-gold {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: #d4af37;
    margin-bottom: 20px;
}

.dot-gold {
    width: 8px;
    height: 8px;
    background-color: #d4af37;
    border-radius: 50%;
}

.blog-title-main {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #fff;
    line-height: 1.1;
    margin: 20px 0;
}

.gold-italic { 
    color: #d4af37; 
    font-style: italic; 
    font-weight: 400; 
}

.blog-description {
    font-family: 'Lato', sans-serif;
    color: #ffffff;
    font-size: 16px;
    max-width: 300px;
    line-height: 1.6;
    opacity: 0.9;
}

/* --- 3. RIGHT PANEL: CLINICAL LEDGER --- */
.blog-ledger-panel {
    flex: 1; /* Takes exactly 65% of the remaining width */
    background: rgba(255, 255, 255, 0.02);
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.ledger-content-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pins pagination to absolute bottom */
}

.ledger-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

/* FIXED LEDGER BOXES: 
    Spacious internal padding (35px vertical) to remove congestion.
*/
.ledger-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 35px 30px; /* INCREASED VERTICAL PADDING */
    display: flex;
    align-items: center;
    height: 135px; /* LOCKED HEIGHT FOR PRECISION */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    overflow: hidden;
}

.ledger-box:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: #d4af37;
    transform: translateX(10px);
}

.ledger-number { 
    font-family: 'Playfair Display', serif; 
    font-size: 20px; 
    color: #d4af37; 
    margin-right: 35px; 
}

.ledger-tag { 
    font-size: 10px; 
    color: #d4af37; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.ledger-details h4 { 
    color: #fff; 
    font-size: 1.2rem; 
    margin: 2px 0 6px 0; 
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* TEXT CLAMPING: STRICTLY 2 LINES FOR A CLEANER LOOK */
.ledger-details p { 
    color: rgba(255, 255, 255, 0.5); 
    font-size: 14px; 
    line-height: 1.5;
    max-width: 520px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* UPDATED: REDUCED TO 2 LINES */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ledger-link-circle {
    margin-left: auto; 
    width: 44px; 
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff;
    transition: 0.3s;
}

.ledger-box:hover .ledger-link-circle {
    background: #d4af37;
    border-color: #d4af37;
    color: #0c1c35;
}

/* --- 4. DYNAMIC PAGINATION --- */
.blog-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    margin-top: auto; /* Locks to bottom */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-info {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pag-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pag-btn:hover:not(:disabled) {
    border-color: #d4af37;
    color: #d4af37;
}

.pag-btn:disabled {
    opacity: 0.15;
    cursor: not-allowed;
}

.pag-dots {
    display: flex;
    gap: 8px;
}

.pag-dots .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pag-dots .dot.active {
    background: #d4af37;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* --- 5. CLINICAL MODAL STYLING --- */
.clinical-modal-content {
    background: #ffffff; /* White background */
    border: 1px solid rgba(12, 28, 53, 0.1);
    border-radius: 20px;
    padding: 30px;
    color: #0c1c35; /* Dark blue text */
}

.modal-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #d4af37;
    text-transform: uppercase;
}

.modal-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #0c1c35; /* Dark blue */
    margin: 10px 0;
    line-height: 1.2;
}

/* Meta */
.modal-meta {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    color: rgba(12, 28, 53, 0.6);
    margin-bottom: 25px;
}

/* ASPECT RATIO PRESERVATION */
.media-gallery-grid.single-media {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    width: 100%;
}

.single-media .media-gallery-item img {
    max-height: 350px; 
    width: auto;
    max-width: 100%;
    object-fit: contain; /* Preserves panda proportions accurately */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* GRID: Handling Multiple Featured Media */
.media-gallery-grid:not(.single-media) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.media-gallery-item {
    border-radius: 5px;
    overflow: hidden;
    height: 380px;
}

.media-gallery-item img, .media-gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RICH TEXT CONTENT (QUILL) */
.clinical-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #0c1c35; /* Dark blue */
}

/* Images inside article content */
.clinical-text img {
    max-height: 280px; /* Reduced */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 25px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(12, 28, 53, 0.12);
}

/* Headings inside content */
.clinical-text h1,
.clinical-text h2,
.clinical-text h3 { 
    color: #0c1c35; 
    margin: 35px 0 15px 0; 
    font-family: 'Playfair Display', serif;
}
.btn-modal-close {
    background: transparent;
    border: 1px solid #0c1c35;
    color: #0c1c35;
    padding: 10px 35px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
    margin-top: 20px;
}

.btn-modal-close:hover {
    background: #0c1c35;
    color: #ffffff;
}

/* ========================================= */
/* MOBILE RESPONSIVE - BLOG SECTION          */
/* ========================================= */

@media (max-width: 991px) {

    .blog-fixed-viewport {
        height: auto;
        min-height: auto;
        padding: 90px 15px 30px;
        overflow: visible;
    }

    .blog-outer-frame {
        flex-direction: column;
        height: auto;
        border-radius: 18px;
    }

    /* Branding panel */
    .blog-branding-panel {
        flex: none;
        width: 100%;
        padding: 40px 25px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        text-align: center;
    }

    .blog-title-main {
        font-size: 2rem;
        line-height: 1.2;
    }

    .blog-description {
        max-width: 100%;
        font-size: 14px;
    }

    /* Ledger panel */
    .blog-ledger-panel {
        padding: 25px 20px;
        overflow: visible;
    }

    .ledger-scroll-area {
        gap: 18px;
    }

    /* Remove locked height */
    .ledger-box {
        height: auto;
        min-height: auto;
        padding: 25px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ledger-number {
        margin-bottom: 10px;
        margin-right: 0;
    }

    .ledger-details h4 {
        white-space: normal;
        font-size: 1rem;
    }

    .ledger-details p {
        max-width: 100%;
        font-size: 13px;
    }

    .ledger-link-circle {
        margin-top: 15px;
        margin-left: 0;
    }

    /* Pagination */
    .blog-pagination-wrapper {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
        padding-top: 20px;
    }

    .pagination-controls {
        gap: 15px;
    }

    /* Modal */
    .modal-main-title {
        font-size: 1.6rem;
    }

    .clinical-text {
        font-size: 14px;
        line-height: 1.7;
    }

    .clinical-text img {
        max-height: 250px;
    }

}
