/*
 * Netzerd — Inicio (index.php): cabecera + contenido PC adaptado a móvil.
 */

/* ── Cabecera index ── */

@media (min-width: 768px) {
    .nz-index-header .nz-index-header__desktop-nav {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    .nz-index-header .nz-index-header__desktop-nav {
        display: none !important;
    }

    .nz-index-header .nz-index-header__top {
        min-height: 3.5rem;
        height: 3.5rem;
    }

    .nz-index-header .nz-index-header__top img {
        height: 2rem;
        max-width: 7.5rem;
        object-fit: contain;
        object-position: left center;
    }

    .nz-index-header #notifBtn {
        padding: 0.4rem;
    }

    .nz-index-header #profileBtn {
        width: 2.25rem;
        height: 2.25rem;
    }

    .nz-index-header .header-popover {
        top: 3rem;
        right: -0.25rem;
        width: min(92vw, 340px);
        max-height: min(70vh, 400px);
    }

    /* ── Index: mismo HTML que PC, layout móvil ── */
    body.page-index.nz-user-portal #nzIndexMain {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Hero + buscador */
    body.page-index #nzIndexMain > section.relative.h-\[640px\] {
        height: auto !important;
        min-height: clamp(400px, 65vh, 520px);
        padding: 1rem 1rem 1.25rem !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
    }

    body.page-index #nzIndexMain > section.relative .max-w-6xl {
        width: 100%;
        max-width: 100%;
    }

    body.page-index #nzIndexMain > section.relative h1 {
        font-size: clamp(1.375rem, 5.5vw, 1.75rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }

    body.page-index #searchForm.glass-panel {
        border-radius: 18px !important;
        padding: 0 !important;
        background: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16) !important;
        overflow: hidden;
        gap: 0 !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.page-index #searchForm > .flex-1.grid {
        gap: 0 !important;
    }

    body.page-index #searchForm .flex-1.grid > div {
        border-radius: 0 !important;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 0.75rem 1rem !important;
        background: #fff !important;
    }

    body.page-index #searchForm .flex-1.grid > div:last-child {
        border-bottom: none;
    }

    body.page-index #searchForm label {
        font-size: 0.625rem !important;
        letter-spacing: 0.06em !important;
        margin-bottom: 0.25rem !important;
        color: #94a3b8 !important;
    }

    body.page-index #searchForm #search_term,
    body.page-index #searchForm #dateBtn,
    body.page-index #searchForm #guestBtn {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    body.page-index #searchForm #guestBtn {
        display: block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.page-index #searchForm > button[type="submit"] {
        border-radius: 0 !important;
        width: 100%;
        min-width: 0 !important;
        height: 3rem !important;
        margin: 0;
        background: #2563eb !important;
        font-size: 1rem !important;
    }

    body.page-index #searchForm .search-popover {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
        margin-top: 0;
        max-height: min(70vh, 420px);
        overflow-y: auto;
        z-index: 10001;
    }

    /* Bienvenido + resumen cuenta */
    body.page-index #nzIndexMain .max-w-7xl.mx-auto.px-8.mt-10 {
        margin-top: 1.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    body.page-index #nzIndexMain .lg\:col-span-8 {
        padding: 1.25rem !important;
    }

    body.page-index #nzIndexMain .lg\:col-span-8 h2 {
        font-size: 1.375rem !important;
        line-height: 1.2 !important;
    }

    body.page-index #nzIndexMain .lg\:col-span-4 {
        padding: 1.25rem !important;
        margin-top: 0.75rem;
    }

    body.page-index #nzIndexMain .lg\:col-span-4 h3 {
        font-size: 1rem !important;
    }

    /* Destinos populares */
    body.page-index #nzIndexMain section.max-w-7xl.mt-\[80px\] {
        margin-top: 2.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    body.page-index #nzIndexMain section.max-w-7xl.mt-\[80px\] .flex.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem !important;
    }

    body.page-index #nzIndexMain section.max-w-7xl.mt-\[80px\] h2 {
        font-size: clamp(1.5rem, 6vw, 1.875rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 0.25rem !important;
    }

    body.page-index #nzIndexMain .grid.grid-cols-1.md\:grid-cols-4 {
        min-height: 0 !important;
        height: auto !important;
        gap: 0.875rem !important;
    }

    body.page-index #nzIndexMain .grid.grid-cols-1.md\:grid-cols-4 > a {
        min-height: 200px;
        height: auto;
    }

    body.page-index #nzIndexMain .grid.grid-cols-1.md\:grid-cols-4 img {
        min-height: 200px;
        height: 200px;
        object-fit: cover;
    }

    body.page-index #nzIndexMain .grid.grid-cols-1.md\:grid-cols-4 h3 {
        font-size: 1.25rem !important;
    }

    body.page-index #nzIndexMain .grid.grid-cols-1.md\:grid-cols-4 .bottom-8 {
        bottom: 1rem;
        left: 1rem;
    }

    /* Actividades especiales */
    body.page-index #nzIndexMain section.bg-surface-container-low {
        margin-top: 2.5rem !important;
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low h2 {
        font-size: clamp(1.5rem, 6vw, 1.875rem) !important;
        line-height: 1.15 !important;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low .flex.items-center.justify-between {
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1.5rem !important;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low .flex.gap-4 {
        display: none;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low .grid.grid-cols-1.md\:grid-cols-3 {
        gap: 1rem !important;
    }

    body.page-index #nzIndexMain section.bg-surface-container-low .grid h3 {
        font-size: 1.125rem !important;
    }

    /* Trust + membresía */
    body.page-index #nzIndexMain section.max-w-7xl.py-section-gap {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    body.page-index #nzIndexMain section.max-w-7xl.py-section-gap .md\:col-span-4 {
        padding: 1.5rem !important;
        border-radius: 1.25rem !important;
    }

    body.page-index #nzIndexMain section.max-w-7xl.py-section-gap .md\:col-span-4 h3,
    body.page-index #nzIndexMain section.max-w-7xl.py-section-gap .text-headline-md {
        font-size: 1.25rem !important;
        line-height: 1.25 !important;
    }

    body.page-index #nzIndexMain .nz-elite-card {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }

    body.page-index #nzIndexMain .nz-elite-card__head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }

    body.page-index #nzIndexMain .nz-elite-badge {
        align-self: flex-start;
    }

    body.page-index #nzIndexMain .nz-elite-card__stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        font-size: 0.6875rem;
    }

    body.page-index #nzIndexMain section.max-w-7xl.py-section-gap .grid.grid-cols-1.md\:grid-cols-2 a {
        padding: 1.25rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    body.page-index #nzIndexMain > section.relative h1 {
        font-size: 2.25rem !important;
        margin-bottom: 2rem !important;
    }

    body.page-index #searchForm {
        border-radius: 1rem !important;
    }

    body.page-index #searchForm .flex-1.grid > div {
        border-radius: 0.75rem !important;
    }
}

/* ── Membresía Elite (index) ── */
.nz-elite-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.nz-elite-card__intro {
    flex: 1;
    min-width: 0;
}

.nz-elite-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.nz-elite-badge__icon {
    font-size: 1.375rem !important;
    color: #d97706;
    line-height: 1;
}

.nz-elite-badge__label {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b45309;
    white-space: nowrap;
}

.nz-elite-card__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

@media (min-width: 768px) {
    body.page-index #nzIndexMain .nz-elite-card__head {
        align-items: center;
    }

    .nz-elite-badge {
        padding: 0.625rem 1rem;
    }

    .nz-elite-badge__icon {
        font-size: 1.5rem !important;
    }

    .nz-elite-badge__label {
        font-size: 0.75rem;
    }
}
