/* ==========================================================================
   VíaListo - Hoja de Estilos Actualizada (Contadores y Botones Avanzados)
   ========================================================================== */

:root {
    --bg-main: #320139;
    --bg-secondary: #331b3b;
    --color-slate: #333e50;
    --color-steel: #5c6e6e;
    --color-gold: #f1debd;
    --pure-white: #ffffff;
    --font-heading: 'Inter', system-ui, sans-serif;
    --font-body: 'Open Sans', system-ui, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--color-gold);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

body.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* --- Precargador Circular (0.5s) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(241, 222, 189, 0.2);
    border-top: 5px solid var(--color-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Disclaimer Superior --- */
.disclaimer-banner {
    background-color: var(--bg-secondary);
    color: var(--color-gold);
    font-size: 0.85rem;
    text-align: center;
    padding: 12px 20px;
    border-bottom: 2px solid var(--color-gold);
    font-weight: 500;
    position: relative;
    z-index: 1000;
}

.disclaimer-banner strong {
    color: var(--pure-white);
    text-transform: uppercase;
}

/* --- Navigation Bar --- */
.main-header {
    background-color: rgba(51, 27, 59, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(241, 222, 189, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--pure-white);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.brand-logo span {
    color: var(--color-gold);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu li {
    opacity: 0;
    transform: translateY(-15px);
    animation: slideDownNav 0.5s forwards;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.nav-menu li:nth-child(4) { animation-delay: 0.4s; }
.nav-menu li:nth-child(5) { animation-delay: 0.5s; }

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

.nav-menu a {
    text-decoration: none;
    color: var(--color-gold);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--pure-white);
    transform: translateY(-5px) scale(1.05);
}

.nav-cta {
    background-color: var(--color-gold) !important;
    color: var(--bg-main) !important;
    padding: 0.65rem 1.4rem;
    border-radius: 30px;
    font-weight: 700;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(50, 1, 57, 0.85), rgba(51, 62, 80, 0.85)), url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--pure-white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    overflow: hidden;
    border-right: 4px solid var(--color-gold);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-gold); }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-gold);
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.9;
}

/* ==========================================================================
   SISTEMA DE BOTONES AVANZADOS (Inspirado en referencia provista)
   ========================================================================== */

.btn-custom {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    padding: 0 2.5rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 4px;
}

/* Botón Uno */
.btn-one {
    color: var(--pure-white);
    background-color: var(--color-steel);
    transition: all 0.3s;
    position: relative;
}
.btn-one span {
    transition: all 0.3s;
    z-index: 2;
    position: relative;
}
.btn-one::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: all 0.3s;
    border-top: 1px solid rgba(241, 222, 189, 0.5);
    border-bottom: 1px solid rgba(241, 222, 189, 0.5);
    transform: scale(0.1, 1);
}
.btn-one:hover span {
    letter-spacing: 2px;
}
.btn-one:hover::before {
    opacity: 1; 
    transform: scale(1, 1); 
}
.btn-one::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all 0.3s;
    background-color: rgba(241, 222, 189, 0.15);
}
.btn-one:hover::after {
    opacity: 0; 
    transform: scale(0.1, 1);
}

/* Botón Dos */
.btn-two {
    color: var(--bg-main);
    background-color: var(--color-gold);
    transition: all 0.5s;
    position: relative; 
}
.btn-two span {
    z-index: 2; 
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.btn-two::before, .btn-two::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all 0.5s;
    border: 1px solid rgba(50, 1, 57, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}
.btn-two:hover::before {
    transform: rotate(-15deg);
    background-color: rgba(255, 255, 255, 0);
}
.btn-two:hover::after {
    transform: rotate(15deg);
    background-color: rgba(255, 255, 255, 0);
}

/* Botón Tres */
.btn-three {
    color: var(--pure-white);
    background-color: var(--color-slate);
    transition: all 0.5s;
    position: relative;
}
.btn-three::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: rgba(241, 222, 189, 0.15);
    transition: all 0.3s;
}
.btn-three:hover::before {
    opacity: 0;
    transform: scale(0.5, 0.5);
}
.btn-three::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: all 0.3s;
    border: 1px solid var(--color-gold);
    transform: scale(1.2, 1.2);
}
.btn-three:hover::after {
    opacity: 1;
    transform: scale(1, 1);
}

/* --- Secciones Dinámicas Asimétricas --- */
.section-asymmetric-1 {
    padding: 7rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.asymmetric-text h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--pure-white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.asymmetric-text p {
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.asymmetric-image-box img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border: 2px solid var(--color-steel);
    transition: var(--transition-smooth);
}

.section-glass-grid {
    padding: 6rem 2rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(241, 222, 189, 0.1);
    border-bottom: 1px solid rgba(241, 222, 189, 0.1);
}

.glass-container {
    max-width: 1300px;
    margin: 0 auto;
}

.glass-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.glass-card {
    background: rgba(51, 62, 80, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(241, 222, 189, 0.15);
    border-radius: 16px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(241,222,189,0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.glass-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--pure-white);
    margin-bottom: 1rem;
}

.glass-card p {
    color: var(--color-gold);
    font-size: 0.95rem;
}

.section-parallax-split {
    padding: 8rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.parallax-img-wrap img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* --- Banner de Indicadores Técnicos con Contadores --- */
.section-metrics {
    padding: 5rem 2rem;
    background: linear-gradient(90deg, var(--color-slate), var(--bg-secondary));
    border-top: 1px solid rgba(241,222,189,0.1);
    border-bottom: 1px solid rgba(241,222,189,0.1);
}

.metrics-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.metric-item h3 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.metric-item p {
    color: var(--pure-white);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-horizontal-cards {
    padding: 7rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.horizontal-card-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid rgba(241,222,189,0.1);
    align-items: center;
}

.horizontal-card-item:nth-child(even) {
    direction: rtl;
}

.horizontal-card-item:nth-child(even) > * {
    direction: ltr;
}

.horizontal-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 300px;
}

.horizontal-card-content {
    padding: 3rem;
}

.horizontal-card-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--pure-white);
    margin-bottom: 1rem;
}

.horizontal-card-content p {
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}

.section-photo-mosaic {
    padding: 6rem 2rem;
    background-color: var(--color-slate);
}

.mosaic-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.mosaic-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.mosaic-item:nth-child(1) { grid-column: span 2; }
.mosaic-item:nth-child(4) { grid-column: span 2; }

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mosaic-item:hover img {
    transform: scale(1.08);
}

.section-cta-immersive {
    padding: 8rem 2rem;
    text-align: center;
    background: radial-gradient(circle, var(--bg-secondary) 0%, var(--bg-main) 100%);
}

.section-cta-immersive h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--pure-white);
    margin-bottom: 1.5rem;
}

.section-cta-immersive p {
    color: var(--color-gold);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--bg-secondary);
    color: var(--color-steel);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(241, 222, 189, 0.1);
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    color: var(--pure-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-col p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: var(--color-gold);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col ul a {
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-col ul a:hover {
    color: var(--pure-white);
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(241, 222, 189, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-steel);
}

@media (max-width: 968px) {
    .section-asymmetric-1, .section-parallax-split, .glass-grid-layout, .metrics-grid, .footer-container, .horizontal-card-item {
        grid-template-columns: 1fr !important;
    }
    .hero-title {
        font-size: 2.2rem;
        white-space: normal;
        animation: none;
        border: none;
        max-width: 100%;
    }
}