/* ===================================
   ESTILOS GENERALES
   =================================== */

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0e1a;
    color: #f1f5f9;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.02em;
    margin: 0;
}

/* Layout base: sin hacks; el index usa los bloques vacíos del base.html */

/* ===================================
   HERO SECTION
   =================================== */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fondo plano para evitar el panel/halo */
    background: #0a0e1a;
    position: relative;
    overflow: hidden;
    /* Compensación del navbar fijo, calibrada para el original */
    padding: 90px 20px 56px;
}

#hero::before {
    /* Desactivar halo/radial */
    content: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 40px;
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-synthesis-weight: none;
}

.title-line-1 {
    font-size: clamp(2.5rem, 6.2vw, 5.6rem);
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    line-height: 1;
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.title-line-2 {
    font-size: clamp(2.5rem, 6.2vw, 5.6rem);
    font-weight: 400;
    /* Gradiente más amplio y sutil similar a la referencia */
    background: linear-gradient(90deg, #8b5cf6 0%, #5b7df6 35%, #22d3ee 70%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    line-height: 1;
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: inline-block;
    will-change: opacity, transform;
    transition: opacity 1200ms cubic-bezier(.22,.61,.36,1), transform 1200ms cubic-bezier(.22,.61,.36,1);
}

/* Estado normal del texto rotatorio */
#title-rotating {
    opacity: 1;
    transform: translateY(0) !important;
}

/* ENTRADA: texto empieza ABAJO (positivo = hacia abajo) y sube a 0 */
#title-rotating.is-initial {
    opacity: 0 !important;
    transform: translateY(60px) !important;
}

/* SALIDA: texto sube y desaparece (negativo = hacia arriba) desde 0 */
#title-rotating.is-out {
    opacity: 0 !important;
    transform: translateY(-60px) !important;
}

.hero-tagline {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #7c3aed;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-features {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.25rem;
    color: #38bdf8;
}

.feature-item span {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 500;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #6366f1, #38bdf8);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

/* ===================================
   CALCULATOR SECTION
   =================================== */

#calculator {
    padding: 80px 20px;
    background: #0f1420;
}

.calculator-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #38bdf8;
}

.calculator-container {
    background: rgba(15, 20, 32, 0.8);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Formulario de calculadora */
.calculadora-form {
    padding: 0;
}

.operation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.calculadora-form .form-group {
    margin-bottom: 15px;
}

.calculadora-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-weight: 500;
    font-size: var(--font-size-sm);
}

/* Contenedor para los selectores de moneda en PLATEA */
.calculadora-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.calculadora-form .form-column {
    flex: 1;
    min-width: 0; /* Evita que los selectores se desborden */
}

.calculadora-form .form-column label {
    display: block;
    color: #94a3b8;
    margin-bottom: 8px;
    font-size: var(--font-size-sm);
}

.calculadora-form input[type="number"],
.calculadora-form select {
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.calculadora-form input[type="number"]:focus,
.calculadora-form select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Botones de tipo de operación */
.btn-outline-primary,
.btn-outline-secondary {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
}

.btn-outline-primary {
    color: #38bdf8;
    border-color: #38bdf8;
}

.btn-outline-secondary {
    color: #94a3b8;
    border-color: #94a3b8;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #38bdf8;
    color: #0f172a;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #94a3b8;
    color: #0f172a;
}

/* Resultado */
.resultado-box {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
}

.resultado-flex {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resultado-content {
    text-align: center;
}

.resultado-box h3 {
    color: #38bdf8;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.resultado-box p {
    font-size: 0.95rem;
    margin: 8px 0;
}

.tasa-detalle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Botón de realizar cambio */
.btn-realizar-cambio {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-align: center;
    border: none;
}

.btn-realizar-cambio:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

/* Text danger */
.text-danger {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ===================================
   TASAS ACTUALES SECTION
   =================================== */

#tasas {
    padding: 80px 20px;
    background: #0a0e1a;
}

.tasas-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tasas-container h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: #38bdf8;
}

.tasas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.tasa-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.tasa-item:hover {
    transform: translateY(-5px);
}

.tasa-par {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #f1f5f9;
    font-weight: 500;
}

.tasa-valores {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tasa-compra, 
.tasa-venta {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ===================================
   TICKER SECTION
   =================================== */

#ticker {
    padding: 40px 20px;
    background: #0f1420;
}

/* ===================================
   PROCESS SECTION
   =================================== */

#process {
    padding: 80px 20px;
    background: #0a0e1a;
}

.process-container {
    max-width: 1200px;
    margin: 0 auto;
}

.process-container h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #38bdf8;
    margin-bottom: 60px;
}

.process-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.process-item {
    background: rgba(15, 20, 32, 0.6);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.process-item:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.2);
}

.process-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
}

.process-item h3 {
    font-size: 1.25rem;
    color: #38bdf8;
    margin: 15px 0 20px;
}

.process-item p {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.7;
}

/* WhatsApp flotante */
#whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#whatsapp img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

#whatsapp img:hover {
    transform: scale(1.1);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .hero-features {
        gap: 20px;
    }

    .feature-item {
        padding: 10px 20px;
    }

    .feature-item span {
        font-size: 0.85rem;
    }

    .calculator-container {
        padding: 30px 20px;
    }

    .operation-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-outline-primary,
    .btn-outline-secondary {
        width: 100%;
    }

    .process-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .calculadora-form .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .calculadora-form .form-column {
        width: 100%;
    }

    .hero-features {
        gap: 15px;
    }

    .feature-item {
        padding: 8px 16px;
        gap: 8px;
    }

    .btn-primary {
        padding: 14px 32px;
        font-size: 1rem;
    }
}

/* ===================================
   RESPONSIVE TASAS Y PROCESS
   =================================== */

@media (max-width: 1200px) {
    .tasas-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .tasas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tasas-grid {
        grid-template-columns: 1fr;
    }
    
    #tasas,
    #process {
        padding: 60px 20px;
    }

    .operation-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-outline-primary,
    .btn-outline-secondary {
        width: 100%;
        max-width: 300px;
    }
}