/* Core Variable Color Scheme */
    :root {
        --primary-white: #ffffff;
        --accent-red: #ff4d4d;   
        --text-light: #f1f1f1;    
        --bg-forest: #273e06;    
        --font-serif: 'Playfair Display', Georgia, serif;
        --font-sans: 'Inter', Helvetica, Arial, sans-serif;
    }

    * { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

    body {
        margin: 0;
        font-family: var(--font-sans);
        background-color: var(--bg-forest);
        color: var(--text-light);
        padding-bottom: 100px;
    }

::selection {
    background-color: #ccd5ae; /* Soft sage green tint */
    color: #273e06;            /* Your dark forest green text */
}

/* Also add this variant for older Safari support */
::-webkit-selection {
    background-color: #ccd5ae;
    color: #273e06;
}

a {
    color: #ccd5ae; /* Your elegant sage green for links */
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: #ffffff; /* Turns pure white when a user hovers over it */
    text-decoration-thickness: 2px;
}

    /* --- HEADER SECTION --- */
    .hero-header {
        max-width: 1250px;
        margin: 0 auto;
        padding: 60px 20px 40px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 40px;
    }

    .header-text-group { flex-grow: 1; }

    .category-tag {
        color: var(--accent-red);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.12em;
    }

    .hero-header h1 {
        font-family: var(--font-serif);
        font-size: 3.5rem;
        color: var(--primary-white);
        margin: 12px 0;
        line-height: 1.1;
    }

    .subtitle {
        font-family: var(--font-serif);
        font-size: 1.25rem;
        color: #ccd5ae; 
        max-width: 800px;
        line-height: 1.5;
        margin: 0;
    }

    .header-portrait {
        width: 130px;
        height: 160px;
        object-fit: cover;
        border-radius: 4px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        flex-shrink: 0;
    }

    /* --- LIST LAYOUT --- */
    .layout-container {
        display: grid;
        grid-template-columns: 1fr 340px;
        max-width: 1250px;
        margin: 0 auto;
        gap: 50px;
        padding: 40px 20px;
    }

    .list-wrapper { display: flex; flex-direction: column; gap: 16px; }

    /* Base Book Card Block */
    .book-card {
        color: #1a1a1a; 
        display: flex;
        padding: 24px;
        gap: 24px;
        border-radius: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .book-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    }

    /* Modern Pastel Block Variations */
    .pastel-pink { background-color: #FFF0F5; border: 1px solid #FADADD; }
    .pastel-yellow { background-color: #FFFDD0; border: 1px solid #F3E5AB; }
    .pastel-mint { background-color: #F0FDF4; border: 1px solid #DCFCE7; }
    .pastel-blue { background-color: #EFF6FF; border: 1px solid #DBEAFE; }
    .pastel-purple { background-color: #FAFAFA; border: 1px solid #E5E7EB; }

    .rank-number {
        font-family: var(--font-serif);
        font-size: 2.75rem;
        font-weight: 700;
        color: var(--accent-red);
        min-width: 65px;
        line-height: 1;
    }

    .book-details { flex-grow: 1; }

    /* Flex Header for pushing checkbox to the right */
    .book-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
    }

    .title-author-group { cursor: pointer; flex-grow: 1; }

    .title-author-group h2 {
        font-family: var(--font-serif);
        font-size: 1.65rem;
        margin: 0 0 6px 0;
        color: #1a1a1a;
    }

    .title-author-group h2 span {
        font-family: var(--font-serif);
        font-style: italic;
        font-weight: 400;
        font-size: 1.2rem;
        color: #555;
    }

    .book-author {
        font-size: 1.05rem;
        font-weight: 500;
        color: #4a4a4a;
        margin: 0;
    }

    /* --- UI COMPONENTS --- */
    .checkbox-container {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        padding: 10px 18px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.6);
        cursor: pointer;
        color: #333;
        flex-shrink: 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .checkbox-container:hover {
    background: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.checkbox-container:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.accordion-arrow {
    font-size: 0.8rem;
    opacity: 0.3;
    transition: transform 0.3s ease;
    margin-left: 10px;
}
.book-card.active .accordion-arrow {
    transform: rotate(180deg);
    opacity: 0.7;
}

    .expandable-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px); /* Slid slightly up while hidden */
    transition: 
        max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
        opacity 0.2s ease-in-out;
font-family: var(--font-sans);
font-size: 0.95rem;
line-height: 1.6;
color: #2b2b2b;
letter-spacing: 0.01em;
}

.expandable-content p {
    margin: 0;
}

.book-card.active .expandable-content {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0); /* Smoothly settles down into position */
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

    /* --- SIDEBAR DASHBOARD --- */
    .sticky-dashboard {
    position: sticky;
    top: 30px;
    height: fit-content;
    background-color: rgba(255, 255, 255, 0.05); /* Translucent depth */
    border-top: 4px solid #ffffff;
    padding: 28px 24px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle glowing edge border */
}

.sticky-dashboard h3 {
    margin: 0 0 6px 0;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.sticky-dashboard p {
    margin: 0 0 24px 0;
    font-family: var(--font-sans);
    color: #ccd5ae; /* Sage text */
    font-size: 0.88rem; /* Slightly smaller for an app-like feel */
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: 0.01em;
}

    .tracker-score { 
    font-size: 3rem; /* Made it larger and bolder for maximum satisfying visual weight */
    font-weight: 700; 
    font-family: var(--font-sans);
    color: #ffffff;
    line-height: 1;
    margin-top: 10px;
    letter-spacing: -0.02em;
}

#list-total {
    opacity: 0.4; /* Fades out the total slightly so your earned score pops forward */
    font-weight: 500;
}

    /* --- MOBILE ADJUSTMENTS --- */
    @media (max-width: 750px) {
        .hero-header { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
        .hero-header h1 { font-size: 2.5rem; }
        .layout-container { grid-template-columns: 1fr; }
        .sticky-dashboard { 
            position: fixed; bottom: 0; left: 0; right: 0; width: 100%; 
            display: flex; justify-content: space-between; align-items: center; 
            z-index: 1000; border-radius: 0; background-color: rgba(39, 62, 6, 0.95);
        }
    }
/* --- BIBLIOGRAPHY FOOTER SECTIONS --- */
.resource-footer {
    max-width: 1250px;       
    margin: 30px auto 0 auto; 
    padding: 60px 20px 80px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-container {
    width: 100%;
}

.resource-footer h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.footer-subtitle {
    font-family: var(--font-sans);
    color: #ccd5ae; /* Your custom sage tint */
    font-size: 0.95rem;
    margin: 0 0 48px 0;
    font-weight: 400;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.resource-card {
    background-color: rgba(255, 255, 255, 0.04); /* Matching glass container layout style */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.resource-card h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: #ffffff;
    margin: 0 0 20px 0;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 8px;
    display: inline-block;
}

.resource-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.resource-card li {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f1f1f1;
}

.resource-card strong {
    color: #ffffff;
    font-weight: 600;
    display: block;
    font-size: 0.95rem;
}

.resource-card em {
    font-family: var(--font-serif);
    color: #ccd5ae; /* Sage highlighting for book titles */
    font-style: italic;
    font-size: 1rem;
    display: block;
    margin: 2px 0 6px 0;
}

.resource-card span {
    display: block;
    color: rgba(241, 241, 241, 0.7); /* Muted off-white body copy descriptions */
    font-weight: 400;
}

/* Responsive optimization for mobile tablets */
@media (max-width: 750px) {
    .resource-footer { padding: 50px 20px 120px 20px; } /* Extends lower padding safely over sticky progress bar */
    .resource-footer h2 { font-size: 1.8rem; }
    .resource-grid { grid-template-columns: 1fr; }
}

/* --- FOOTER DOUBLE PANELS --- */
.footer-panels-wrapper {
    max-width: 1250px;
    margin: 5px auto 0 auto; /* Leaves a elegant gap below the bibliography */
    padding: 0 20px 100px 20px; /* Deep bottom padding for mobile sticky tracker safety */
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Forces two perfectly equal columns */
    gap: 30px; /* Keeps consistent spacing with the grid above */
}

.info-panel {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.info-panel h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.info-panel p {
    font-family: var(--font-sans);
    color: #ccd5ae;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0; /* Let the content wrapper margins handle spacing */
}

/* --- HORIZONTAL LAYOUT RULES (NEW) --- */
.promo-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.promo-text-group {
    flex: 1;
}

/* PERFECT SQUARE SIDE-IMAGE STYLING (REPLACES OLD IMAGE RULE) */
.promo-square-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0; /* Prevents text from squishing the image width */
}

/* Contact List Layout styling */
.info-list {
    list-style: none;
    padding: 0;
    margin: auto 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-list li {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.info-label {
    width: 90px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* Promo Tag Accent badge */
.panel-tag {
    align-self: flex-start;
    color: var(--accent-red);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(255, 77, 77, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
    display: inline-block;
}

/* Accent Call To Action Link Button */
.panel-link-btn {
    align-self: flex-start;
    margin-top: auto;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    text-decoration: none !important;
    border-bottom: 2px solid var(--accent-red);
    padding-bottom: 4px;
}

.panel-link-btn span {
    transition: transform 0.2s ease;
    display: inline-block;
}

.panel-link-btn:hover {
    color: var(--accent-red);
}

.panel-link-btn:hover span {
    transform: translateX(4px);
}

/* Responsive Optimization across devices */
@media (max-width: 750px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }
    .footer-panels-wrapper {
        padding-bottom: 140px;
    }
}

@media (max-width: 500px) {
    .promo-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .panel-tag {
        align-self: center;
    }
    .promo-square-img {
        width: 100%;
        max-width: 180px;
        height: 180px;
    }
}

/* --- COPYRIGHT TEXT STYLE --- */
.copyright-line {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3); /* Soft, muted treatment so it sits quietly in the background */
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 10px 0 10px 0; /* Creates an elegant space between your panels and the edge of the window */
    padding: 0 20px;
    width: 100%;
}