/* ===== 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;
    padding-bottom: 0;
}

/* Background Element Set by JS */
.hero-bg-solid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Back Button */
.hero-back-btn {
    position: absolute;
    top: 50px;
    right: 30px;
    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 */
.hero-decorative-rect {
    position: absolute;
    width: 58%;
    height: 48%;
    background: rgba(255, 255, 255, 0.25);
    mix-blend-mode: overlay;
    left: 0;
    top: 50%;
    transform: translateY(calc(-50% - 28px));
    z-index: 1;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    backdrop-filter: blur(5px);
}

/* Content Card */
.hero-content-card {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: 2rem;
    background: #FFFFFF;
    padding: 1.5rem 4rem;
    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(22px);
}

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

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

#subjectTagline {
    color: #555;
    transform: translateY(15%);
}

.sub-line {
    display: block;
    margin-top: 0.3rem;
}

.sub-grey {
    font-size: 0.95rem;
    color: #666;
    font-weight: 400;
    transform: translateY(5%);
}

.sub-red {
    font-size: 0.95rem;
    color: #D32F2F;
    font-weight: 500;
    transform: translateY(5%);
}

/* Responsive layout moved to bottom of file */

/* Notes List Section */
.notes-list-section {
    padding: 0 0 6rem;
    /* Removed top padding to pull list up */
    background: white;
    position: relative;
    min-height: 600px;
    z-index: 10;
    /* Bring above hero if needed */
}

.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 20px 50px rgba(0, 0, 0, 0.1);
    /* Stronger shadow for floating effect */
    transform: translateY(10px);
    /* Moved downward by another 40px as requested */
}

/* 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 (Inherited from Subject Pages) */
@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;
        /* JS sets background dynamically, this provides fallback structure */
    }

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

    /* Decorative Layer - Light 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;
        transform: none;
        /* remove floating on mobile */
    }

    .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;
}