/* Rabab Tradition Section */
.rabab-tradition {
    padding: 6rem 0;
    /* background: linear-gradient(135deg, #1a0f08 0%, #2d1810 100%); */
    position: relative;
    overflow: hidden;
}

.tradition-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tradition-narrative {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.narrative-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #faf6f0;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.pull-quote {
    position: relative;
    padding: 2rem;
    margin: 3rem auto;
    max-width: 700px;
    text-align: center;
    font-size: 1.4rem;
    font-style: italic;
    color: #d4af37;
    border-left: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.quote-mark {
    font-size: 3rem;
    color: #d4af37;
    opacity: 0.3;
    position: absolute;
}

.quote-mark:first-child {
    top: -10px;
    left: 20px;
}

.quote-mark:last-child {
    bottom: -30px;
    right: 20px;
}

.tradition-image-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.tradition-image-wrapper img {
    width: 100%;
    height: auto;
    transition: transform 0.6s ease;
}

.tradition-image-wrapper:hover img {
    transform: scale(1.05);
}

.image-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.tradition-image-wrapper:hover .image-caption-overlay {
    transform: translateY(0);
}

.image-caption-overlay p {
    color: #faf6f0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* About Section Tabs */
.about-tabs {
    margin-top: 3rem;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.tab-btn {
    background: none;
    border: none;
    color: #faf6f0;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-btn:hover {
    color: #d4af37;
}

.tab-btn.active {
    color: #d4af37;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #d4af37;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Sections */
.dropdown-section {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(212, 175, 55, 0.02);
}

.dropdown-header {
    width: 100%;
    background: none;
    border: none;
    color: #faf6f0;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.dropdown-header:hover {
    background: rgba(212, 175, 55, 0.05);
    color: #d4af37;
}

.dropdown-header.active {
    background: rgba(212, 175, 55, 0.08);
    color: #d4af37;
}

.dropdown-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.dropdown-header.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.dropdown-content.show {

    max-height: 1000px;
    padding: 1.5rem;
}

.dropdown-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Story Tab Styles */
.story-intro {
    margin-bottom: 3rem;
}

.story-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.founders-note {
    background: rgba(212, 175, 55, 0.05);
    border-left: 4px solid #d4af37;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 10px;
}

.founders-note h3 {
    color: #d4af37;
    margin-bottom: 1rem;
}

.founders-note blockquote {
    margin: 0;
    font-style: italic;
}

.founders-note cite {
    display: block;
    margin-top: 1rem;
    text-align: right;
    color: #d4af37;
    font-style: normal;
    font-weight: 600;
}

/* Milestones Carousel */
.milestones-carousel {
    margin-top: 4rem;
}

.milestones-carousel h3 {
    color: #d4af37;
    margin-bottom: 2rem;
    text-align: center;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
    padding: 0 3rem;
}

.milestone-card {
    flex: 0 0 350px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.milestone-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.milestone-year {
    color: #d4af37;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.milestone-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #faf6f0;
}

.milestone-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 15, 8, 0.9);
    border: 2px solid #d4af37;
    color: #d4af37;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: #d4af37;
    color: #1a0f08;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

/* Heritage Timeline */
.heritage-header {
    text-align: center;
    margin-bottom: 4rem;
}

.heritage-quote {
    font-size: 1.4rem;
    font-style: italic;
    color: #d4af37;
    margin: 2rem auto;
    max-width: 700px;
    text-align: center;
}

.heritage-intro {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
}

.timeline-navigation {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.timeline-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: #faf6f0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.timeline-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    color: #d4af37;
}

.timeline-btn.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #1a0f08;
}

.period-content {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.period-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.period-content h3 {
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.period-content h4 {
    color: #f4e5bc;
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}

.scripture-quote {
    background: rgba(212, 175, 55, 0.05);
    border-left: 4px solid #d4af37;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 10px;
}

.gurmukhi {
    font-family: 'Noto Sans Gurmukhi', sans-serif;
    font-size: 1.3rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.romanized {
    font-style: italic;
    color: #f4e5bc;
    margin-bottom: 0.5rem;
}

.translation {
    color: #faf6f0;
    line-height: 1.6;
}

.instruments-note,
.century-section,
.milestones-section,
.revival-section,
.contemporary-section {
    background: rgba(212, 175, 55, 0.02);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.milestone-list {
    list-style: none;
    padding: 0;
}

.milestone-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.milestone-list li:last-child {
    border-bottom: none;
}

/* Heritage River Timeline */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.heritage-select-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem auto 2rem;
}

.heritage-select {
    background: rgba(212, 175, 55, 0.08);
    color: #ffffff;
    /* keep selected (closed) value white */
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.05) inset;
    /* custom arrow */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 16px 16px;
    padding-right: 2.2rem;
}

.heritage-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.heritage-select:hover {
    border-color: #d4af37;
}

/* Dropdown list styling (browser support varies) */
.heritage-select option {
    color: #111111;
    /* make options black for readability */
    background: #ffffff;
}

.heritage-select option:hover {
    background: #f4e5bc;
}

.heritage-select option:checked {
    color: #ffffff;
    /* selected option in the list stays white */
    background: #d4af37;
}

.river-timeline {
    position: relative;
    padding: 2rem 0 1rem;
}

.river-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.25), rgba(244, 229, 188, 0.5), rgba(212, 175, 55, 0.25));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25));
}

/* Traveling glow down the river */
.river-line {
    overflow: hidden;
}

.river-line::before,
.river-line::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(244, 229, 188, 0), rgba(244, 229, 188, 0.9), rgba(244, 229, 188, 0));
    filter: blur(2px);
    border-radius: 999px;
    animation: riverFlow 5s linear infinite;
}

.river-line::after {
    height: 20%;
    animation-duration: 7s;
    animation-delay: 1.2s;
    opacity: 0.7;
}

@keyframes riverFlow {
    0% {
        top: -35%;
    }

    100% {
        top: 120%;
    }
}

.river-item {
    position: relative;
    width: 46%;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Float-up reveal */
.river-item {
    opacity: 0;
    transform: translateY(32px);
}

.river-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: transform 600ms cubic-bezier(.2, .65, .2, 1), opacity 600ms ease;
}

.river-item.left {
    margin-right: auto;
}

.river-item.right {
    margin-left: auto;
}

.river-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.15);
    border-color: #d4af37;
}

.river-item-header h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.river-meta {
    font-size: 0.95rem;
    opacity: 0.9;
}

.river-list {
    padding-left: 1.1rem;
}

.river-list li {
    margin: 0.4rem 0;
}

.river-dot {
    position: absolute;
    top: 18px;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #f4e5bc, #d4af37);
    border: 2px solid #1a0f08;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.18);
}

.river-item.left .river-dot {
    right: -31px;
}

.river-item.right .river-dot {
    left: -31px;
}

.river-item.left::after,
.river-item.right::after {
    content: '';
    position: absolute;
    top: 24px;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.8), rgba(212, 175, 55, 0.2));
}

.river-item.left::after {
    right: -28px;
}

.river-item.right::after {
    left: -28px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.8));
}

.scripture-quote.small {
    padding: 1rem;
    margin: 1rem 0;
}

.scripture-quote.small .gurmukhi {
    font-size: 1.05rem;
}

.river-more {
    display: inline-block;
    margin-top: 0.25rem;
    color: #d4af37;
    text-decoration: none;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.6);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.river-more:hover {
    color: #f4e5bc;
    border-color: #f4e5bc;
}

.river-item.highlight {
    border-color: #f4e5bc;
    box-shadow: 0 12px 36px rgba(244, 229, 188, 0.25);
    animation: pulseGlow 1.5s ease-in-out 2;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 12px 36px rgba(244, 229, 188, 0.25);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.25);
    }
}

/* Clickable card + accessibility focus */
.river-item {
    cursor: pointer;
}

.river-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 229, 188, 0.35), 0 10px 28px rgba(212, 175, 55, 0.15);
}

/* Improve card header and content layout */
.river-item-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
}

.river-item-header h3 {
    line-height: 1.35;
}

.river-item p {
    margin: 0.35rem 0;
}

/* Heritage modal premium styling */
.modal-content.heritage {
    max-width: 960px;
    background: linear-gradient(160deg, rgba(26, 15, 8, 0.98), rgba(45, 24, 16, 0.96));
    border-width: 2px;
    border-image: linear-gradient(90deg, #caa53a, #f4e5bc, #caa53a) 1;
    border-radius: 14px;
    overflow: hidden;
    padding: 1.25rem 1.25rem 1.25rem;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content.heritage .modal-close {
    color: #f4e5bc;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.9;
}

.modal-content.heritage .modal-close:hover {
    transform: scale(1.08);
    opacity: 1;
}

.modal-content.heritage .modal-close:focus-visible {
    outline: 2px solid #f4e5bc;
    outline-offset: 2px;
    border-radius: 6px;
}

.modal-content.heritage .modal-body>h2:first-child {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    line-height: 1.2;
    color: #f4e5bc;
    position: relative;
}

.modal-content.heritage .modal-body>h2:first-child::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, transparent);
    border-radius: 3px;
}

.modal-content.heritage .modal-body {
    line-height: 1.85;
    padding: 1.25rem 1.25rem 1.5rem;
    font-size: 1.05rem;
}

/* Subtle custom scrollbar for heritage modal */
.modal-content.heritage::-webkit-scrollbar {
    width: 10px;
}

.modal-content.heritage::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 6px;
}

.modal-content.heritage::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .modal-content.heritage {
        padding: 0.75rem;
    }

    .modal-content.heritage .modal-body {
        padding: 0.75rem;
    }
}

.modal-content.heritage .modal-body p {
    margin: 0.75rem 0;
}

.modal-content.heritage .modal-body ul {
    padding-left: 1.2rem;
    margin: 0.75rem 0 0.75rem;
}

.modal-content.heritage .modal-body li {
    margin: 0.35rem 0;
}

.modal-content.heritage .modal-body li::marker {
    color: #d4af37;
}

.modal-content.heritage .scripture-quote {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(244, 229, 188, 0.05));
    border-left-color: #f4e5bc;
}

.modal-content.heritage img {
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Headings inside heritage modal */
.modal-content.heritage h4 {
    color: #f1dfb0;
    margin: 0.75rem 0 0.5rem;
    font-size: 1.2rem;
}

.modal-content.heritage h5 {
    color: #dec47a;
    margin: 0.75rem 0 0.35rem;
    font-size: 1.05rem;
    text-transform: none;
}

/* Section divider with title */
.modal-content.heritage .section-divider {
    position: relative;
    margin: 1.25rem 0 0.75rem;
    text-align: center;
}

.modal-content.heritage .section-divider span {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    color: #1a0f08;
    background: linear-gradient(90deg, #f4e5bc, #d4af37, #f4e5bc);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .02em;
}

.modal-content.heritage .section-divider::before,
.modal-content.heritage .section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .6));
}

.modal-content.heritage .section-divider::before {
    left: 0;
}

.modal-content.heritage .section-divider::after {
    right: 0;
    background: linear-gradient(90deg, rgba(212, 175, 55, .6), transparent);
}

/* Date badges and timeline block */
.modal-content.heritage .date-badge {
    display: inline-block;
    background: rgba(244, 229, 188, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #f4e5bc;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-right: 0.5rem;
}

.modal-content.heritage .timeline-block {
    margin: 1rem 0 0;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content.heritage .timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 0.75rem;
    background: rgba(244, 229, 188, 0.02);
    border-radius: 8px;
    border-left: 3px solid rgba(212, 175, 55, 0.4);
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content.heritage .timeline-item::before {
    display: none;
}

.modal-content.heritage .timeline-item .date-badge {
    grid-column: 1;
    margin: 0;
    align-self: start;
    justify-self: start;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content.heritage .timeline-item-content {
    grid-column: 2;
    line-height: 1.65;
    color: #f4e5bc;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left;
}

.modal-content.heritage .timeline-item-content strong {
    color: #f1dfb0;
    display: block;
    margin-bottom: 0;
    font-size: 1.05rem;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 768px) {
    .modal-content.heritage .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-content.heritage .timeline-item .date-badge,
    .modal-content.heritage .timeline-item-content {
        grid-column: 1;
    }
}

/* Heritage card badges and chips */
.era-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(244, 229, 188, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #f4e5bc;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.badge-year {
    font-weight: 700;
    color: #d4af37;
}

.badge-title {
    opacity: 0.9;
}

.river-highlights {
    margin: 0.5rem 0 0.25rem;
    padding-left: 1rem;
}

.river-highlights li {
    margin: 0.25rem 0;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    align-items: flex-start;
    align-content: flex-start;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.8rem;
    line-height: 1.1;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #f4e5bc;
    height: auto;
}

/* Override main timeline styles for Heritage modal */
.modal-content.heritage .timeline-item {
    position: static !important;
    margin-bottom: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    text-align: left !important;
}

/* Heritage modal content layout */
.modal-content.heritage .modal-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.modal-content.heritage .modal-section.has-media {
    grid-template-columns: 1.2fr 0.8fr;
    grid-auto-flow: row dense;
    align-items: start;
}

.modal-content.heritage .modal-section .col-text {
    grid-column: 1;
}

.modal-content.heritage .modal-section .col-media {
    grid-column: 2;
    align-self: start;
}

/* For two-column sections, center the media vertically against col-text */
.modal-content.heritage .modal-section.has-media .col-media {
    align-self: center;
}

.modal-content.heritage .modal-section .col-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Magnify effect card for heritage modal images */
.modal-content.heritage .magnify-card {
    margin: 0;
}

.modal-content.heritage .magnify-wrap {
    --magnify-scale: 2.2;
    /* heavy zoom factor */
    --magnify-origin-x: 60%;
    /* zoom focus X (0% left ... 100% right) */
    --magnify-origin-y: 50%;
    /* zoom focus Y (0% top ... 100% bottom) */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    display: block;
    cursor: zoom-in;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.modal-content.heritage .magnify-wrap img {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: var(--magnify-origin-x, 50%) var(--magnify-origin-y, 50%);
    transition: transform 0.6s cubic-bezier(.2, .65, .2, 1), filter 0.6s ease;
    will-change: transform;
}

.modal-content.heritage .magnify-wrap:hover img,
.modal-content.heritage .magnify-wrap:focus-within img {
    transform: scale(var(--magnify-scale, 2.6));
    filter: contrast(1.02) saturate(1.05);
}

/* Subtle edge vignette during zoom for focus */
.modal-content.heritage .magnify-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at var(--magnify-origin-x, 50%) var(--magnify-origin-y, 50%), rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.25) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.modal-content.heritage .magnify-wrap:hover::after,
.modal-content.heritage .magnify-wrap:focus-within::after {
    opacity: 1;
}

/* Figcaption styling to match theme */
.modal-content.heritage .img-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #f4e5bc;
    opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {

    .modal-content.heritage .magnify-wrap img,
    .modal-content.heritage .magnify-wrap::after {
        transition: none;
    }
}

@media (max-width: 900px) {
    .modal-content.heritage .modal-section {
        grid-template-columns: 1fr;
    }

    .modal-content.heritage .modal-section .col-media {
        grid-column: 1;
    }
}

.modal-content.heritage .modal-section .scripture-quote {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .modal-content.heritage .modal-section {
        display: block;
    }
}

/* Programme Section */
.programme-header {
    text-align: center;
    margin-bottom: 4rem;
}

.programme-title {
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.programme-subtitle {
    font-size: 1.3rem;
    color: #f4e5bc;
    font-style: italic;
}

.programme-hero {
    max-width: 900px;
    margin: 3rem auto;
    text-align: center;
}

.hero-statement {
    font-size: 1.4rem;
    color: #d4af37;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.programme-description,
.programme-philosophy {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.programme-quote {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(244, 229, 188, 0.03));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem auto;
    max-width: 700px;
    text-align: center;
}

.programme-quote .gurmukhi {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.programme-quote cite {
    display: block;
    margin-top: 1rem;
    color: #d4af37;
    font-style: normal;
    font-size: 0.9rem;
}

.programme-features {
    margin-top: 4rem;
}

.programme-features h3 {
    text-align: center;
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.08);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: #d4af37;
}

.feature-item h4 {
    color: #f4e5bc;
    margin-bottom: 1rem;
}

.course-formats {
    margin: 4rem 0;
}

.course-formats h3 {
    text-align: center;
    color: #d4af37;
    margin-bottom: 2rem;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.format-card {
    background: rgba(212, 175, 55, 0.08);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.format-card:hover {
    border-color: #d4af37;
    transform: scale(1.05);
}

.format-card h4 {
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.programme-cta {
    text-align: center;
    margin-top: 4rem;
}

.programme-cta h3 {
    color: #d4af37;
    margin-bottom: 2rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 2rem auto 3rem;
    text-align: left;
}

.benefits-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.benefits-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: #d4af37;
    font-size: 1.2rem;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a0f08;
    border: 2px solid #d4af37;
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #d4af37;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

/* Footnote Styles */
.footnote-trigger {
    color: #d4af37;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8em;
    vertical-align: super;
    margin-left: 2px;
    transition: color 0.3s ease;
}

.footnote-trigger:hover {
    color: #f4e5bc;
    text-decoration: underline;
}

/* Scrolling Animations */
.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Scroll Enhancement */
html {
    scroll-behavior: smooth;
}

/* Parallax Effects */
.parallax-element {
    transition: transform 0.6s ease-out;
    will-change: transform;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

/* Responsive Design */
/* Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        align-items: stretch;
        /* Change from center to stretch for full width buttons */
        gap: 0.5rem;
        border-bottom: none;
        /* Remove the bottom border on mobile */
    }

    .tab-btn {
        width: 100%;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        padding: 1rem;
        text-align: center;
    }

    .tab-btn.active::after {
        display: none;
        /* Remove the underline accent */
    }

    .tab-btn.active {
        color: #d4af37;
        background: rgba(212, 175, 55, 0.1);
        border-left: 3px solid #d4af37;
        /* Add left border accent instead */
    }

    .timeline-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .timeline-btn {
        width: 100%;
        text-align: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .formats-grid {
        grid-template-columns: 1fr;
    }

    .carousel-track {
        padding: 0 1rem;
    }

    .milestone-card {
        flex: 0 0 280px;
    }

    .programme-title {
        font-size: 2rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .tradition-image-wrapper {
        margin: 0 -1rem;
        /* Negative margin to let image go full width */
        border-radius: 0;
        max-width: none;
        width: calc(100% + 2rem);
    }


    .pull-quote {
        font-size: 1.2rem;
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    /* Improved Mobile Timeline */
    .river-timeline {
        padding: 1rem 0;
    }

    .river-line {
        left: 20px;
        transform: none;
    }

    .river-item {
        width: calc(100% - 40px);
        margin-left: 40px !important;
        /* Force left margin */
        margin-right: 0 !important;
        margin-bottom: 2rem;
    }

    .river-item::after {
        display: none;
        /* Hide connecting lines on mobile */
    }

    .river-dot {
        left: -38px !important;
        /* Fixed position relative to card */
        right: auto !important;
        top: 20px;
    }

    /* Fix dropdown header alignment on mobile */
    .dropdown-header {
        align-items: flex-start;
        text-align: left;
    }

    .dropdown-header span {
        flex: 1;
        padding-right: 1rem;
    }

    .dropdown-icon {
        flex-shrink: 0;
        margin-top: 4px;
        /* Align icon with first line of text */
    }
}