﻿/* ========================================
   Indexes Page Styles
   ======================================== */

/* Page Layout */
.indexes-page {
    overflow-x: hidden;
    width: 100%;
}

.indexes-main {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Header Transparent Variant */
.header--transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(20, 73, 124, 0.9);
    backdrop-filter: blur(10px);
}

    .header--transparent .header__top-bar {
        background: rgba(0, 0, 0, 0.3);
    }

/* ========================================
   Hero Section with Video Background
   ======================================== */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0 120px 0;
    overflow: hidden;
    background: #000;
}

.hero-section__video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-section__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.hero-section__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-section__content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    padding: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
}

.hero-section__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    color: #ffffff;
}

.hero-section__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Hero Top Right Actions (Login/Register)
   ======================================== */

.hero-top-right-actions {
    position: absolute;
    /* Desktop: place buttons 2x lower than header height */
    top: calc(var(--header-height) * 2.5 + 1rem);
    right: clamp(1rem, 5vw, 3rem);
    z-index: 1100;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: auto;
    margin: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.4rem 0.65rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(8, 19, 38, 0.85);
    backdrop-filter: blur(16px) saturate(140%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    box-shadow: 0 20px 45px rgba(2, 8, 20, 0.45);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

    .btn-icon i {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .btn-icon span {
        padding-right: 0.35rem;
        letter-spacing: 0.01em;
    }

    .btn-icon:hover {
        background: linear-gradient(135deg, rgba(24, 72, 134, 0.92), rgba(7, 21, 42, 0.95));
        border-color: rgba(141, 205, 255, 0.75);
        transform: translateY(-3px);
        box-shadow: 0 25px 55px rgba(2, 8, 20, 0.5);
    }

.indexes-about-card__hero-title {
    display: none; /* Hide on desktop */
    color: #16324f;
}

.btn-icon:hover i {
    background: rgba(255, 255, 255, 0.18);
}

.btn-icon:active {
    transform: translateY(-1px) scale(0.99);
}

.btn-login,
.btn-register {
    border-color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1024px) {
    .hero-top-right-actions {
        position: static;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-top: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-top-right-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .btn-icon {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   About Indexes Section - Compact
   ======================================== */

.about-indexes {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
    margin-top: -80px;
    position: relative;
    z-index: 5;
}

.about-indexes__card {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(240,248,255,0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.25), 0 10px 30px rgba(45,80,22,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.5);
    max-width: 1000px;
    margin: 50px auto 0 auto;
    position: relative;
    overflow: hidden;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .about-indexes__card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #2d5016, #4a7c59, #0891b2);
        opacity: 0.8;
    }

    .about-indexes__card:hover {
        transform: translateY(-8px) scale(1.01);
        box-shadow: 0 30px 80px rgba(0,0,0,0.3), 0 15px 40px rgba(45,80,22,0.2), inset 0 1px 0 rgba(255,255,255,1);
    }

.about-indexes__icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 50%, #5a9c6f 100%);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(45,80,22,0.4), inset 0 -2px 10px rgba(0,0,0,0.2), inset 0 2px 10px rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

    .about-indexes__icon::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
        transform: rotate(45deg);
        animation: shine 3s infinite;
    }

@keyframes shine {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.about-indexes__content {
    flex: 1;
}

.about-indexes__title {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.about-indexes__subtitle {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.about-indexes__description {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
}

/* ========================================
   Indices Sections - Compact Layout
   ======================================== */

.indices-section {
    padding: clamp(2rem, 6vw, 3.5rem) 0;
    background: #ffffff;
    position: relative;
}

/* Collapsible Sections (alias markup) */
.content-section {
    padding: clamp(3rem, 7vw, 5rem) 0;
    background: #f7f9ff;
    position: relative;
}

    .content-section.bg-light {
        background: #f7f9ff;
    }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.5rem, 3.5vw, 2.5rem);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(17, 40, 85, 0.12);
    border: 1px solid rgba(12, 47, 104, 0.08);
    cursor: pointer;
    user-select: none;
}

    .section-header h2 {
        margin: 0 0 6px 0;
        font-size: clamp(1.4rem, 3vw, 1.85rem);
        font-weight: var(--font-weight-bold);
        color: #113161;
        display: flex;
        align-items: center;
        gap: 0.65rem;
    }

        .section-header h2 i {
            font-size: 1.25em;
            color: #2f8de0;
        }

.section-subtitle {
    margin: 0;
    color: #47608d;
    font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    opacity: 0.9;
}

.section-header .expand-indicator {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #f0f4ff;
    color: #1d4f91;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid rgba(30, 73, 144, 0.2);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.section-header.expanded .expand-indicator {
    transform: rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

    .collapsible-content.closed {
        max-height: 0;
        opacity: 0;
    }

.indices-section::before {
    display: none;
}

.indices-section > .container {
    position: relative;
    z-index: 1;
}

.indices-section--hydromorphological {
    background: #ffffff;
}


.indices-section__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: clamp(1rem, 3vw, 1.75rem);
    text-align: center;
    user-select: none;
    position: relative;
    padding-right: 0;
    flex-direction: column;
}

.indices-section.is-accordion .indices-section__header {
    display: flex;
    cursor: default;
    text-align: center;
}

    .indices-section.is-accordion .indices-section__header::before,
    .indices-section.is-accordion .indices-section__header::after {
        display: none;
    }

.indices-section__toggle {
    width: min(100%, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    padding: clamp(1rem, 3vw, 1.4rem) clamp(1.35rem, 3.2vw, 2.1rem);
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(12, 47, 104, 0.08);
    box-shadow: 0 22px 55px rgba(17, 40, 85, 0.12);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

    .indices-section__toggle:hover {
        transform: translateY(-2px);
        box-shadow: 0 28px 65px rgba(17, 40, 85, 0.15);
        border-color: rgba(12, 47, 104, 0.16);
    }

    .indices-section__toggle:focus-visible {
        outline: 3px solid rgba(47, 141, 224, 0.45);
        outline-offset: 3px;
    }

.indices-section__text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.indices-section__indicator {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: #f0f4ff;
    color: #1d4f91;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(30, 73, 144, 0.18);
    transition: transform 0.3s ease, background 0.25s ease, color 0.25s ease;
}

    .indices-section__indicator i {
        transition: transform 0.3s ease;
    }

.indices-section__title {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: #113161;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    line-height: 1.25;
    text-align: center;
}

.indices-section__subtitle {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #47608d;
    margin: 0;
    line-height: 1.5;
    text-align: justify;
    max-width: 720px;
    margin-inline: auto;
}

.indices-section__toggle[aria-expanded="false"] .indices-section__indicator i {
    transform: rotate(180deg);
}

.indices-section__toggle[aria-expanded="false"] .indices-section__indicator {
    background: #eaefff;
    color: #2e5f9a;
}

.indices-section__toggle:active {
    transform: translateY(0);
}


/* ========================================
   Indices Grid - Optimized for No Scroll
   ======================================== */

.indices-grid,
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(0.9rem, 2.4vw, 1.35rem);
    width: min(100%, 1200px);
    margin: clamp(0.9rem, 2.6vw, 1.35rem) auto 0;
    overflow: visible;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 1;
}

/* Force two-column layout for hydromorphological index cards on wider screens */
.indices-section--hydro .indices-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.index-grid--one-last-centered {
    justify-items: center;
}

    .index-grid--one-last-centered > * {
        width: 100%;
    }

.indices-section.collapsed .indices-grid,
.indices-section.collapsed .index-grid {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

.indices-section:not(.collapsed) .indices-grid,
.indices-section:not(.collapsed) .index-grid {
    max-height: 9999px;
}

/* ========================================
   Index Card - Compact Design
   ======================================== */

.index-card {
    background: #ffffff;
    border-radius: 22px;
    padding: clamp(0.9rem, 2.4vw, 1.35rem);
    box-shadow: 0 18px 45px rgba(17, 40, 85, 0.12);
    border: 1px solid rgba(14, 44, 94, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--font-primary);
}

    .index-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 40px 80px rgba(17, 40, 85, 0.16);
    }

.index-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b7ad5, #29b18f);
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 16px 28px rgba(15, 46, 108, 0.22);
}

.index-card h3,
.index-card__title {
    color: #0f2b5c;
    font-size: clamp(0.9rem, 1.7vw, 1.05rem);
    margin: 0;
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
    font-family: var(--font-primary);
}

.index-card p,
.index-card__description {
    color: #4b5c77;
    line-height: 1.52;
    margin: 0;
    font-size: clamp(0.82rem, 1.8vw, 0.9rem);
    opacity: 0.9;
    flex-grow: 1;
    font-family: var(--font-primary);
    text-align: center;
}

.index-card .btn,
.index-card__button,
.index-card .btn-outline {
    align-self: center;
}

/* Status pill for "Yakında Aktif" */
.index-card__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

    .index-card__status svg {
        width: 18px;
        height: 18px;
        color: #9ca3af;
    }

.index-card__button {
    display: none;
}

    .index-card__button:hover {
        background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
        transform: scale(1.05);
    }

    .index-card__button:focus-visible {
        outline: 2px solid var(--color-accent);
        outline-offset: 2px;
    }

/* ========================================
   Buttons (for "Yakında Aktif")
   ======================================== */
.btn-outline {
    background: #eef2ff;
    border: 1px solid rgba(47, 77, 158, 0.25);
    color: #1f3f93;
    padding: 0.45rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 999px;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
}

    .btn-outline i {
        font-size: 0.85rem;
    }

/* ========================================
   Legacy/alias classes to support provided markup
   ======================================== */
/* Hero aliases */
.indexes-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(680px, 90vh, 950px);
    padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 5vw, 2.5rem) clamp(6rem, 12vw, 9rem);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--color-white);
    isolation: isolate;
}

    .indexes-hero::before {
        content: none;
    }

    .indexes-hero .container {
        position: relative;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: clamp(2.5rem, 5vw, 3.75rem);
        width: 100%;
        margin-top: clamp(4rem, 15vh, 8rem);
    }

.hero-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: none;
}

    .hero-video-wrapper::after {
        content: none;
    }

.hero-video-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120vw;
    height: 120vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
}

.hero-video-wrapper iframe,
.hero-video-wrapper video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120vw;
    height: 120vh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
    border: none;
}

.hero-content {
    color: #fff;
    text-align: center;
    max-width: var(--hero-text-max-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--hero-gap);
}

.indexes-hero h1 {
    font-size: var(--hero-title-size);
    margin-bottom: 0;
    font-weight: var(--hero-title-weight);
    line-height: var(--hero-title-line-height);
    color: #fff;
    letter-spacing: var(--hero-letter-spacing);
    text-transform: uppercase;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.indexes-hero .lead {
    font-size: var(--hero-subtitle-size);
    font-weight: var(--hero-subtitle-weight);
    line-height: var(--hero-subtitle-line-height);
    max-width: var(--hero-text-max-width);
    margin: 0 auto;
    color: #e7eefc;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* About card aliases */
.indexes-about-card {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow: 0 35px 80px rgba(4, 9, 24, 0.25);
    border: 1px solid rgba(12, 35, 63, 0.08);
    display: flex;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    justify-content: center;
    margin: clamp(2rem, 4vw, 3rem) auto 0;
    max-width: 900px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .indexes-about-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        border-radius: 32px 32px 0 0;
        background: linear-gradient(90deg, #0f5ea2 0%, #16a085 50%, #4caf50 100%);
    }

    .indexes-about-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 45px 90px rgba(4, 9, 24, 0.3);
    }

.about-icon {
    width: clamp(64px, 10vw, 88px);
    height: clamp(64px, 10vw, 88px);
    background: radial-gradient(circle at 30% 30%, #7fe9c5 0%, #3da770 45%, #1d6a4f 100%);
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), inset 0 2px 10px rgba(255, 255, 255, 0.18);
    color: #fff;
}

    .about-icon i {
        font-size: clamp(1.6rem, 4vw, 2.1rem);
    }

.about-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #16324f;
    margin-bottom: 0.35rem;
}

.about-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #3b556f;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.about-text {
    color: #4c5c70;
    font-size: clamp(0.95rem, 1.8vw, 1rem);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .indexes-hero {
        position: relative;
        z-index: 1;
        /* reduce bottom padding on mobile so about card sits at section bottom */
        padding: 1.5rem var(--spacing-md);
        min-height: 100vh;
        padding-bottom: 0;
    }

    .header__nav.active {
        z-index: 1000;
    }

    /* Buttons: place at the top-right of the section, 2x lower */
    .hero-top-right-actions {
        position: absolute;
        top: calc(var(--header-height-mobile) * 2 + 0.5rem);
        right: 1.2rem;
        z-index: 1100;
        display: flex;
        gap: 0.5rem;
        align-items: center;
        justify-content: flex-end;
        flex-direction: column;
    }

    .btn-icon {
        padding: 0.45rem 0.6rem;
        width: auto;
        height: auto;
        border-radius: 12px;
        margin-left: auto;
    }

        /* Hide button text on small screens, show icon only */
        .btn-icon span {
            display: none;
        }

        .btn-icon i {
            width: 26px;
            height: 26px;
            margin: 0;
            font-size: 1rem;
        }

    /* Make the about card cover the bottom area of the hero video on mobile */
    .indexes-about-card {
        position: absolute;
        /* place the about card starting 10% down from top of viewport on mobile */
        left: 2%;
        right: 2%;
        bottom: 2%;
        width: auto;
        margin: 0 auto;
        max-width: 96%;
        height: 50vh; /* make height half of viewport */
        border-radius: 18px;
        padding: 1rem 1.25rem; /* reduce vertical padding to shrink height */
        z-index: 50; /* above video */
        background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.98));
        box-shadow: 0 -8px 30px rgba(4,9,24,0.12);
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        overflow: auto;
    }

    /* Nudge login/register icons slightly up and right on small screens */
    .hero-top-right-actions .btn-login,
    .hero-top-right-actions .btn-register {
        transform: translate(20px, -12px);
        will-change: transform;
        transition: transform 140ms ease;
    }

    .about-icon {
        margin: 0 auto;
    }

    .about-content h2 {
        text-align: center;
        /* slightly smaller on mobile */
        font-size: clamp(1.25rem, 3vw, 1.6rem);
    }

    .about-subtitle,
    .about-text {
        text-align: center;
        /* slightly smaller on mobile */
        font-size: clamp(0.82rem, 2vw, 0.92rem);
    }

    /* reduce subtitle size specifically */
    .about-subtitle {
        font-size: clamp(0.88rem, 2.2vw, 0.98rem);
    }

    .indexes-hero .container {
        align-items: center;
        margin-top: clamp(1rem, 60vh, 50rem);
    }

    /* Mobile-only: cloned hero title/subtitle inside the about card */
    .indexes-about-card__hero-title {
        display: block !important;
        visibility: visible !important;
        font-size: clamp(1.25rem, 5vw, 1.6rem);
        font-weight: var(--font-weight-bold);
        color: #16324f;
        margin: clamp(0.75rem, 8vh, 2rem) 0 0.25rem 0;
        text-align: center;
        position: relative;
        z-index: 10;
        transform: translateY(calc(-1 * (100% + 0.9rem) * 3));
    }

    .indexes-about-card__hero-subtitle {
        display: block !important;
        visibility: visible !important;
        color: #4c5c70;
        margin: 0 0 0.75rem 0;
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        text-align: center;
        position: relative;
        z-index: 10;
        transform: translateY(calc(-1 * (100% + 2.1rem) * 3));
    }

    /* hide the original hero title/subtitle so only cloned versions show */
    .hero-content > h1,
    .hero-content > .lead {
        display: none !important;
    }

    /* Nudge login/register icons slightly up and right on mobile only */
    .hero-top-right-actions .btn-login,
    .hero-top-right-actions .btn-register {
        transform: translate(20px, -12px);
        will-change: transform;
        transition: transform 140ms ease;
    }

    /* On very small screens reduce the nudge so icons don't overflow */
    @media (max-width: 480px) {
        .hero-top-right-actions .btn-login,
        .hero-top-right-actions .btn-register {
            transform: translate(10px, -6px);
        }
    }
}



/* Grid/card aliases preserved via primary definitions above */
/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .hero-section {
        min-height: 100vh;
    }

    .hero-section__title {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .hero-section__subtitle {
        font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    }

    .about-indexes {
        padding: var(--spacing-lg) 0;
    }

    .about-indexes__card {
        flex-direction: row;
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }

    .about-indexes__icon {
        width: 48px;
        height: 48px;
    }

    .indices-section {
        padding: var(--spacing-lg) 0;
    }

    .indices-section__header {
        flex-direction: row;
        align-items: center;
        margin-bottom: var(--spacing-md);
    }

    .indices-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .index-card {
        padding: var(--spacing-md);
    }

    .index-card__icon {
        width: 44px;
        height: 44px;
    }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
    .hero-section {
        min-height: 100vh;
        height: 100vh;
    }

    .hero-section__content {
        padding: var(--spacing-md);
    }

    .hero-section__title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        margin-bottom: var(--spacing-sm);
    }

    .hero-section__subtitle {
        font-size: clamp(0.85rem, 3.5vw, 1.05rem);
    }

    .about-indexes {
        padding: var(--spacing-md) 0;
    }

    .about-indexes__card {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
        flex-direction: column;
    }

    .about-indexes__icon {
        width: 40px;
        height: 40px;
    }

    .indices-section {
        padding: var(--spacing-md) 0;
    }

    .indices-section__header {
        margin-bottom: var(--spacing-sm);
        gap: var(--spacing-sm);
        flex-direction: column;
        align-items: flex-start;
    }

    .indices-section__icon {
        width: 40px;
        height: 40px;
    }

    .indices-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .indices-section--hydro .indices-grid {
        grid-template-columns: 1fr;
    }

    .index-card {
        padding: var(--spacing-sm);
    }

    .index-card__icon {
        width: 40px;
        height: 40px;
        margin-bottom: var(--spacing-sm);
    }

    .index-card__title {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        min-height: auto;
        margin-bottom: 4px;
    }

    .index-card__description {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
        margin-bottom: var(--spacing-sm);
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .index-card__button {
        padding: 6px var(--spacing-md);
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);
        max-width: 150px;
    }
}

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    .hero-section__title {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }

    .hero-section__subtitle {
        font-size: clamp(0.75rem, 3vw, 0.95rem);
    }

    .about-indexes__card {
        padding: 10px;
    }

    .about-indexes__icon {
        width: 36px;
        height: 36px;
    }

    .indices-section__header {
        gap: 6px;
    }

    .indices-section__icon {
        width: 36px;
        height: 36px;
    }

    .index-card {
        padding: 10px;
    }

    .index-card__icon {
        width: 36px;
        height: 36px;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .hero-section {
        min-height: 100vh;
    }

    .indices-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    .index-card {
        padding: var(--spacing-lg);
    }
}

/* 4K and Ultra-wide (2560px+) */
@media (min-width: 2560px) {
    .hero-section {
        min-height: 100vh;
    }

    .about-indexes__card {
        max-width: 1200px;
    }

    .indices-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero-section__video {
        animation: none;
    }

    .index-card,
    .index-card__button {
        transition: none;
    }

        .index-card:hover {
            transform: none;
        }
}

/* GPU Acceleration */
.hero-section__video,
.hero-section__overlay,
.index-card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.auth-modal,
.iframe-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 20, 0.75);
    padding: 1rem;
}

.auth-modal.auth-modal--open,
.iframe-overlay.auth-modal--open {
    display: flex;
}

.auth-modal__panel {
    width: min(480px, 100%);
    max-width: 520px;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.auth-modal__panel h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-modal__description {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: #4c5667;
}

.auth-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.auth-modal label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #1e2d3b;
    font-weight: 600;
}

.auth-modal input {
    border-radius: 10px;
    border: 1px solid rgba(16, 28, 57, 0.2);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    background: #f9fbff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-modal input:focus {
    outline: none;
    border-color: #1d78ff;
    box-shadow: 0 0 0 3px rgba(29, 120, 255, 0.25);
}

.auth-modal__feedback {
    min-height: 24px;
    margin: 0.5rem 0 0.75rem;
    color: #0f5132;
}

.auth-modal__feedback--error {
    color: #b91c1c;
}

.auth-modal__feedback--success {
    color: #0f5132;
}

.auth-modal__close,
.iframe-overlay__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: #2d384e;
    cursor: pointer;
}

.iframe-overlay__panel {
    width: min(1000px, 90vw);
    height: min(600px, 80vh);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.iframe-overlay__panel iframe {
    width: 100%;
    height: 100%;
    border: none;
}

body.modal-open {
    overflow: hidden;
}
