/* ===== STRUCTURED HERO LAYOUT (Specific Dimensions) ===== */
.layered-hero-section {
    position: relative;
    width: 100%;
    height: 280px;
    /* Compact height: 280px */
    margin-bottom: 0px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: visible is default, but ensuring it for overlap */
    overflow: visible;
    padding-bottom: 0;
}

/* Full Width Solid Background */
.hero-bg-solid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1e3a8a;
    /* Deep Blue (bg-blue-800) */
    z-index: 0;
}

/* Main Container (Grid Context) */
.hero-grid-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    /* Vertically center content */
    z-index: 1;
    transform: translateY(-25px);
    /* Visual Centering Adjustment */
}

/* Back Button */
.hero-back-btn {
    position: absolute;
    top: 50px;
    right: 30px;
    /* Top Right Layout - Shifted down by 20px */
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.4rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.hero-back-btn:hover {
    background: #000;
    border-color: #000;
}

/* Decorative Horizontal Rectangle */
/* "65% width, 40% height, slightly left, vertically centered" */
/* Decorative Horizontal Rectangle (Middle Layer) */
.hero-decorative-rect {
    position: absolute;
    width: 58%;
    /* ~55-60% */
    height: 48%;
    /* ~45-50% */
    background: rgba(255, 255, 255, 0.25);
    /* Clearly lighter/softer */
    mix-blend-mode: overlay;
    /* Soft blend with blue */
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    backdrop-filter: blur(5px);
}

/* Content Card */
/* Compact horizontal card with reduced vertical padding */
/* Content Card (Top Layer) */
.hero-content-card {
    position: relative;
    width: 70%;
    /* Final slight adjustment (+2%) */
    max-width: 895px;
    margin-left: auto;
    /* Flex alignment */
    margin-right: 2rem;
    /* Shifted towards the right edge */
    background: #FFFFFF;
    padding: 1.5rem 4rem;
    /* Reduced top, bottom, and side padding */
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 2px;
    transform: translateY(50px);
    /* Continuity with timeline */
}

/* Typography */
.subject-title-large {
    font-family: 'Playfair Display', serif;
    /* Professional Serif */
    font-size: 56px;
    /* Keep size */
    font-weight: 700;
    /* Bold */
    font-style: italic;
    /* Italicized as requested */
    color: #111;
    margin-bottom: 0.2rem;
    /* Tight spacing */
    line-height: 1;
}

.subject-divider {
    display: none;
}

.subject-tagline-text {
    font-family: 'Inter', sans-serif;
    /* Professional Sans-serif */
    font-size: 16px;
    /* Smaller, specific size */
    font-weight: 400;
    /* Normal weight (was 500) */
    color: #555;
    margin-bottom: 0.2rem;
    /* Tighter spacing */
    line-height: 1.4;
    text-transform: uppercase;
    /* Optional: adds to the "Notes" label feel */
    letter-spacing: 0.5px;
}

.subject-subtext-text {
    font-size: 0.95rem;
    color: #D32F2F;
    /* Accent red */
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    transform: translateY(5%);
}

#subjectTagline {
    color: #555;
    /* Dark grey for first subheading */
    transform: translateY(15%);
    /* Move first line down further by another 5% (Total 15%) */
}

/* Clean spacing for timeline below */
.notes-list-section {
    padding-top: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .layered-hero-section {
        height: auto;
        min-height: 400px;
        padding: 5rem 0 3rem;
        flex-direction: column;
    }

    .hero-decorative-rect {
        width: 90%;
        left: 5%;
        height: 200px;
        top: 40%;
    }

    .hero-content-card {
        width: 90%;
        margin: 0 auto;
        padding: 2.5rem;
    }
}

/* Notes List Section */
.notes-list-section {
    padding: 2.5rem 0 6rem;
    /* Reduced top padding (was 4rem) */
    background: white;
    position: relative;
    min-height: 600px;
    /* Ensure z-index is lower than hero content if needed, 
       but standard flow puts it below. 
       Hero overflow: visible allows card to overlap this. */
    z-index: 5;
}

.notes-timeline {
    position: relative;
    max-width: 1015px;
    /* Broadened by 15px as requested */
    margin: 0 auto;
    background: white;
    border: 1px solid #f0f1f3;
    /* Softer border */
    border-radius: 12px;
    /* Slightly more rounded */
    padding: 1.5rem 2rem;
    /* Reduced padding (was 2rem 3rem) */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    /* More subtle, deeper shadow */
}

/* Remove old dashed line */
.notes-timeline::before {
    display: none;
}

/* Note Item Row */
.note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1.4rem 1rem;
    /* Increased to show ~5.5 topics per view */
    border-bottom: 1px solid #f5f6f8;
    background: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-item:hover {
    background-color: #fafbfc;
    /* Removed horizontal shift on hover per request */
}

.note-item:last-child {
    border-bottom: none;
}

/* Left Column: Index + Ribbon */
.note-left-col {
    display: flex;
    align-items: center;
    position: relative;
    width: 80px;
    flex-shrink: 0;
}

/* Number */
.note-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    /* Reduced slightly for vertical space */
    font-weight: 700;
    color: #000;
    z-index: 1;
    line-height: 1;
}

/* Free-Flowing Ribbon Sticker */
.free-ribbon {
    position: absolute;
    top: -15px;
    left: -70px;
    /* Extreme left overhang */
    background: #dc2626;
    /* Red-600 */
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    /* Extra bold for sticker look */
    padding: 3px 12px;
    /* Balanced for swallow tail */
    transform: rotate(-15deg);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.8px;

    /* Organic & Swallow-tail shape */
    clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%);
    border-radius: 4px 12px 4px 12px;

    /* Depth effect */
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1), 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.lock-icon {
    position: absolute;
    top: -12px;
    left: -66px;
    /* Extreme left overhang */
    width: 32px;
    height: 32px;
    background: #f59e0b;
    /* Amber/Gold to match Premium theme */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    /* Sticker effect */
    z-index: 2;
    transform: rotate(-15deg);
    /* Slanted to match free ribbon */
}

/* Lock icon internal styling handled by container width/height */

/* Continuous Jello Animation */
@keyframes jello-scale {

    0%,
    100% {
        transform: scale(1, 1);
    }

    25% {
        transform: scale(0.9, 1.1);
    }

    50% {
        transform: scale(1.1, 0.9);
    }

    75% {
        transform: scale(0.95, 1.05);
    }
}

@keyframes jello-rotate {

    0%,
    100% {
        transform: scale(1, 1) rotate(-15deg) translateY(0);
    }

    25% {
        transform: scale(0.9, 1.1) rotate(-15deg) translateY(-2px);
    }

    50% {
        transform: scale(1.1, 0.9) rotate(-15deg) translateY(1px);
    }

    75% {
        transform: scale(0.95, 1.05) rotate(-15deg) translateY(-1px);
    }
}

/* Jello specifically for the indicator - both share slanted rotation */
.free-ribbon.jello-anim,
.lock-icon.jello-anim {
    animation: jello-rotate 2.5s infinite ease-in-out;
}

.status-icon-lock {
    display: none;
    /* Removed based on new design request */
}


/* Center Column: Title */
.note-content {
    flex: 1;
    padding: 0 2rem;
}

.note-row-title {
    font-family: 'Avenir', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 400;
    /* Normal weight */
    color: #1f2937;
    line-height: 1.3;
}

/* Right Column: Actions */
.note-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-btn-consistent {
    min-width: 105px;
    /* Reduced from 120px */
    height: 36px;
    /* Reduced from 40px */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    /* Sligthly smaller text for balance */
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.view-btn {
    background: #1f2937;
    color: white;
}

.view-btn:hover {
    background: #111;
    transform: scale(1.03);
}

.premium-btn-small {
    background: #f59e0b;
    color: white;
    font-weight: 600;
}

.premium-btn-small:hover {
    background: #d97706;
    transform: scale(1.03);
}

/* Removed download-icon based on new request */

/* Mobile Optimization for Strict Full-Width Layout */
@media (max-width: 768px) {

    /* Top Header Section */
    .layered-hero-section {
        padding: 0;
        height: 250px;
        /* Fixed height for consistent mobile header */
        min-height: auto;
        justify-content: center;
        background-color: #1e3a8a;
    }

    .hero-grid-container {
        padding: 0;
        transform: none;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Decorative Layer - Light blue strip */
    .hero-decorative-rect {
        display: block;
        width: 100%;
        height: 70%;
        /* Peeks top and bottom over white card */
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 0;
        z-index: 1;
    }

    /* Subject Title Section - White Strip across screen */
    .hero-content-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 2.5rem 1rem;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(0);
        align-items: center;
        text-align: center;
        z-index: 2;
    }

    /* Hide excess text to match screenshot */
    .subject-subtext-text,
    #subjectTagline,
    #subjectSubtext {
        display: none;
    }

    .subject-title-large {
        font-size: 34px;
        line-height: 1.2;
    }

    /* Back Button */
    .hero-back-btn {
        top: 15px;
        right: 15px;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        background: rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Topic List Section */
    .notes-list-section {
        padding-top: 0;
        background: #f8f9fa;
        /* Keeps the page clean */
    }

    .notes-timeline {
        padding: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .note-item {
        padding: 1.25rem 1rem;
        flex-wrap: nowrap;
        /* Prevent horizontal wrap */
        gap: 0.75rem;
    }

    .note-left-col {
        width: auto;
        min-width: 35px;
    }

    .note-number {
        font-size: 1.5rem;
    }

    /* Free/Premium Ribbons relative to narrower UI */
    .free-ribbon {
        top: -10px;
        left: -18px;
        /* Moved further left to increase overhang */
        font-size: 0.5rem;
        padding: 2px 6px;
    }

    .lock-icon {
        top: -8px;
        left: -18px;
        /* Moved further left to increase overhang */
        width: 20px;
        height: 20px;
    }

    .lock-icon svg {
        width: 10px;
        height: 10px;
    }

    .note-content {
        padding: 0 0.5rem;
    }

    .note-row-title {
        font-size: 13.5px;
        font-weight: 500;
        line-height: 1.3;
    }

    .note-actions {
        gap: 0.5rem;
    }

    /* Action Buttons matched to screenshot */
    .action-btn-consistent {
        min-width: 70px;
        height: 28px;
        font-size: 0.65rem;
        padding: 0 0.5rem;
        border-radius: 4px;
    }
}

/* Conditional Height for Long Titles */
.hero-tall {
    height: 380px !important;
}