:root {
    /* Color Palette - Extracted from Reference Images */
    --primary-blue: #0A1C3E; 
    --secondary-blue: #0F2D5A;
    --accent-orange: #FF8800;
    --accent-orange-hover: #E67A00;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --gradient-hero: linear-gradient(90deg, #0A1C3E 0%, rgba(10, 28, 62, 0.8) 100%);
    
    /* Spacing */
    --container-padding: 8%;
    --section-spacing: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--primary-blue);
    color: var(--text-white);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   Anti-FOUC — Solo oculta los CAMPOS DE TEXTO dinámicos.
   Las imágenes, fondos y layout son siempre visibles.
   [data-field-attr] = campos que solo cambian un atributo
   (src, href...) — esos NO se ocultan.
   El body recibe data-cms-ready="true" cuando la API
   termina de responder (home.js bloque finally).
═══════════════════════════════════════════ */
[data-field]:not([data-field-attr]) {
    opacity: 0;
    transition: opacity 0.2s ease;
}

body[data-cms-ready="true"] [data-field]:not([data-field-attr]) {
    opacity: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Containers */
.container {
    padding: 0 var(--container-padding);
    max-width: 1400px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 136, 0, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.6s;
    z-index: -1;
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 136, 0, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid rgba(42, 74, 128, 0.5);
    color: white;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: rgba(42, 74, 128, 0.3);
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Header / Navbar */
header {
    background-color: var(--primary-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--accent-orange);
    color: black;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 0;
    text-align: center;
    /* Scroll-away: se oculta suavemente con JS al hacer scroll */
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    max-height: 40px;
    overflow: hidden;
    will-change: max-height, opacity;
}

.top-bar.hidden-by-scroll {
    max-height: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.top-bar .btn-white {
    background: white;
    color: black;
    padding: 3px 12px;
    border-radius: 20px;
    margin-left: 12px;
    font-size: 11px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;          /* logo + botones SIEMPRE en una sola fila */
    padding: 14px var(--container-padding);
    background-color: rgba(10, 28, 62, 0.95);
    backdrop-filter: blur(10px);
    gap: 12px;                  /* separación mínima entre columnas */
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: row;    /* garantiza fila horizontal */
    align-items: center;
    gap: 10px;
    white-space: nowrap;    /* impide salto de línea entre logo e texto */
}

.logo-img {
    height: 44px;
    width: 44px;
    flex-shrink: 0;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: #E0E0E0;
}

.nav-links a:hover {
    color: white;
}

.user-actions {
    display: flex;
    gap: 15px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
}

/* Gradiente oscuro de base a arriba para resaltar el texto blanco + Fondo de marca solicitado */
.hero-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 28, 62, 0.95) 0%, rgba(10, 28, 62, 0.4) 60%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    margin-left: var(--container-padding);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.hero-content .btn {
    margin-top: 32px;
    display: inline-block;
}

/* Events Section */
.events-section {
    padding: var(--section-spacing) 0;
    background: var(--primary-blue);
    overflow: hidden; /* Evita scroll horizontal por el overflow:visible del swiper */
}

.events-section .container {
    text-align: left;
}

/* Swiper carrusel - Estilos Generales */
.swiper {
    width: 100%;
    padding: 40px var(--container-padding) 80px; /* Más padding arriba y abajo */
    overflow: visible;
}

/* Flechas de navegación — Estilo Bithon */
.swiper-button-prev,
.swiper-button-next {
    color: var(--accent-orange) !important;
    background: rgba(10, 28, 62, 0.8);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 136, 0, 0.3);
    transition: all 0.3s ease;
    top: 50% !important;
    transform: translateY(-50%);
}

/* Ocultar flechas en móvil si estorban, o dejarlas solo en tablet/desktop */
@media (max-width: 640px) {
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important; /* En móvil preferimos el swipe táctil */
    }
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--accent-orange);
    color: white !important;
    transform: translateY(-50%) scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 16px !important;
    font-weight: 700;
}

/* Paginación (puntos) */
.swiper-pagination {
    bottom: 25px !important;
}

/* 📱 MÓVIL: Mostramos puntos, ocultamos flechas */
@media (max-width: 1023px) {
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
}

/* 💻 DESKTOP: Mostramos flechas, ocultamos puntos (según pedido del usuario) */
@media (min-width: 1024px) {
    .swiper-pagination {
        display: none !important;
    }
    .swiper-button-prev,
    .swiper-button-next {
        display: flex !important;
    }
}

html {
    scroll-behavior: smooth;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.35) !important;
    opacity: 1 !important;
    width: 8px;
    height: 8px;
}

.swiper-pagination-bullet-active {
    background: var(--accent-orange) !important;
    width: 24px !important;
    border-radius: 4px;
    transition: width 0.3s ease;
}


.event-card {
    background: #0F2847;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column; /* permite que el botón se "pegue" al fondo */
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(255, 136, 0, 0.1);
}

/* ── Wrapper de imagen con overlay degradado ── */
.event-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4.2;   /* Formato Vertical (Portrait) estilo Bithon */
    overflow: hidden;
    flex-shrink: 0;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.event-card:hover .event-image {
    transform: scale(1.04);
}

/* Degradado oscuro inferior para legibilidad del texto */
.event-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(10, 20, 45, 0.4) 60%,
        rgba(10, 20, 45, 0.85) 90%,
        rgba(10, 20, 45, 0.95) 100%
    );
    pointer-events: none;
}

/* ── Badges de estado ── */
.event-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Colores semánticos por tipo de badge */
.event-badge.badge-regular   { background: rgba(34, 197, 94, 0.9);  }  /* verde vibrante */
.event-badge.badge-preventa  { background: rgba(249, 115, 22, 0.9); }  /* naranja vibrante */
.event-badge.badge-agotado   { background: rgba(107, 114, 128, 0.9); } /* gris */
.event-badge.badge-default   { background: var(--accent-orange);  }

/* ── Contenido de la tarjeta ── */
.event-content {
    padding: 18px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;  /* ocupa el espacio restante */
}

.event-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: white;
    line-height: 1.25;
}

/* ── Meta: ubicación y fecha con iconos ── */
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 12px;
    color: #A1A1AA;
    font-size: 0.8rem;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-meta i {
    color: var(--accent-orange);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ── Descripción con line-clamp ── */
.event-description {
    font-size: 0.85rem;
    color: #D1D5DB;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* Shared Swiper styles for any carousel in the site */
.swiper-navigation-custom {
    color: var(--accent-orange);
    background: rgba(10, 28, 62, 0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 136, 0, 0.3);
}

/* ── Descripción: máx 3 líneas con line-clamp ── */
.event-description {
    color: #CBD5E1;
    line-height: 1.6;
    font-size: 0.875rem;
    flex: 1;              /* empuja el botón al fondo */
    /* line-clamp: vendor + estándar para máxima compatibilidad */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;        /* propiedad estándar CSS */
    overflow: hidden;
    margin-bottom: 20px;
}


/* ── Botón CTA full-width al fondo ── */
.event-card .btn-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--accent-orange);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 136, 0, 0.15);
}

.event-card .btn-cta:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 136, 0, 0.3);
}

.event-card .btn-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.event-card .btn-cta:hover::after {
    opacity: 1;
}

.event-card .btn-cta:hover {
    background: #e07000;
    transform: translateY(-1px);
}

/* Community Section */
.community-section {
    padding: var(--section-spacing) 0;
    background: linear-gradient(180deg, var(--primary-blue) 0%, #050d1c 100%);
}

.community-swiper {
    width: 100%;
    padding: 40px var(--container-padding) 60px;
    overflow: visible;
}

.community-card {
    background: rgba(15, 40, 71, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.community-card:hover {
    transform: translateY(-10px);
    background: rgba(15, 40, 71, 0.7);
    border-color: rgba(255, 136, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.community-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 3.8;
    overflow: hidden;
}

.community-card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(5, 13, 28, 0.8) 100%);
    pointer-events: none;
}

.community-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.community-card:hover img {
    transform: scale(1.08);
}

.community-card-content {
    padding: 24px;
    text-align: center;
}

.community-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: white;
    font-weight: 700;
}

.community-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* CTA Section / Manifesto */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: 
        linear-gradient(rgba(10, 28, 62, 0.9), rgba(10, 28, 62, 0.9)),
        url('../assets/cta-background.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 136, 0, 0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.manifesto-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 400; /* Regular, muy ligero */
    line-height: 1.25;
    letter-spacing: -0.01em; /* Menos apretado */
    margin-bottom: 0;
    color: white;
    background: none; /* Quitamos gradientes complejos para mayor claridad */
    -webkit-text-fill-color: initial;
    max-width: 1000px;
    margin-inline: auto;
}

.manifesto-title strong {
    font-weight: 700; /* Negrita estándar, menos pesada que la anterior */
    color: white;
}


/* CTA Section Enhanced */
.cta-section-enhanced {
    position: relative;
    padding: var(--section-spacing) 0;
    background-image: url('../assets/cta-background.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.cta-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(10, 28, 62, 0.92) 0%, rgba(15, 45, 90, 0.85) 100%),
        url('../assets/cta-background.png') center/cover no-repeat;
    z-index: 0;
}

.cta-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cta-text-content {
    text-align: left;
}

.cta-text-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: left;
}

.cta-text-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.cta-image-content {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.polaroid-frame {
    background: white;
    padding: 15px 15px 45px 15px;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5),
                0 10px 25px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
    transition: all 0.4s ease;
    max-width: 500px;
    display: inline-block;
}

.polaroid-frame:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                0 15px 30px rgba(0, 0, 0, 0.4);
}

.cta-team-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Remove old ::after rule */

/* Footer */
footer {
    background: #050D1C;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--accent-orange);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-orange);
    transform: translateY(-3px);
}

/* ═══════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
        line-height: 1.2;    /* ← más compacto que el 1.1 de desktop */
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .navbar {
        flex-wrap: nowrap;   /* logo + botones en una sola fila */
        padding: 10px var(--container-padding);
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        height: 70vh;
        min-height: unset;   /* sin min-height forzado en móvil */
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cta-text-content {
        text-align: center;
    }
    
    .cta-text-content h2 {
        font-size: 2rem;
        text-align: center;
    }
    
    .cta-image-content {
        display: flex;
        justify-content: center;
    }
    
    .polaroid-frame {
        max-width: 90%;
        transform: rotate(2deg);
    }
    
    .polaroid-frame:hover {
        transform: rotate(0deg) scale(1.02);
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE — iPhone 14 Pro (≤ 430px)
═══════════════════════════════════════ */
@media (max-width: 430px) {
    h1 {
        font-size: 1.85rem;
        line-height: 1.18;   /* interlineado cómodo sin exceso */
    }

    /* Navbar compactísimo para ganar espacio vertical */
    .navbar {
        padding: 8px 5%;     /* ← menos padding lateral + vertical */
    }

    /* Logo e imagen en la misma fila, tamaño reducido */
    .logo-img {
        height: 36px;
        width: 36px;
    }

    .logo {
        font-size: 0.95rem;
        gap: 8px;
        flex: 1;             /* ocupa el espacio sobrante → empuja botones al borde */
    }

    /* Botones más pequeños para ahorrar espacio */
    .user-actions .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* Hero ajustado: que el título sea visible sin scroll */
    .hero {
        height: 88svh;       /* svh respeta la barra de Safari/Chrome */
        align-items: flex-end;
        padding-bottom: 40px;
    }

    .hero-content {
        margin-left: 5%;
        margin-right: 5%;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin-bottom: 12px;
    }

    .hero-content .btn {
        margin-top: 20px;
    }
}
