/* =========================================
   Fuentes Personalizadas
   ========================================= */
@font-face {
    font-family: 'OCR A Ext';
    src: url('../fonts/OCRAEXT.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('../fonts/SchibstedGrotesk-Medium.ttf') format('truetype');
    font-weight: 500; /* Medium suele ser 500 */
    font-style: normal;
}

@font-face {
    font-family: 'TT Autonomous';
    src: url('../fonts/TT Autonomous Trial Variable.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


* {
    box-sizing: border-box;
    transition: all 0.25s ease;
}

body {
    /* Agregamos la imagen de fondo */
    background-color: #0b0c10; /* Color de respaldo por si la imagen tarda en cargar */
    background-image: url('../imgs/img1.jpeg'); /* Ruta a tu imagen */
    background-size: cover; /* Hace que la imagen cubra toda la pantalla */
    background-position: center; /* Centra la imagen */
    background-attachment: fixed; /* La imagen se queda fija si haces scroll */
    background-repeat: no-repeat;
    
    color: #f5f5f7;
    font-family: 'Schibsted Grotesk', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Contenedor moderno del formulario */
/* Contenedor moderno del formulario (Efecto Cristal) */
form {
    background-color: rgba(20, 22, 29, 0.75); /* Gris oscuro al 75% de opacidad */
    backdrop-filter: blur(12px); /* Desenfoque tipo cristal (Glassmorphism) */
    -webkit-backdrop-filter: blur(12px); /* Soporte para navegadores Safari */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil casi transparente */
    
    padding: 40px 30px;
    border-radius: 16px; 
    width: 100%;
    max-width: 840px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
/* Contenedor del Icono Superior */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-icon {
    width: 100%;
    height: 74px;
    object-fit: contain;
    filter: drop-shadow(0px 4px 10px rgba(255, 255, 255, 0.1));
}

form div {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #989aa6; /* Texto secundario elegante */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'TT Autonomous', sans-serif;
}

/* Inputs minimalistas y estilizados */
input, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #2c3040;
    border-radius: 8px;
    background-color: #1a1d26;
    color: #ffffff;
    font-size: 15px;
    /* font-family: 'OCR A Ext', sans-serif; */

    font-family: 'Schibsted Grotesk', sans-serif;
}

/* Efecto de enfoque (Focus) moderno */
input:focus, textarea:focus {
    outline: none;
    border-color: #ffffff;
    background-color: #1f2330;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* =========================================
   Corrección para el Autocompletado del Navegador
   ========================================= */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    /* Forzamos el fondo al color de tus inputs usando una sombra interior */
    -webkit-box-shadow: 0 0 0 30px #1a1d26 inset !important;
    /* Forzamos el color del texto a blanco */
    -webkit-text-fill-color: #ffffff !important;
    /* Mantenemos los bordes del diseño original */
    border: 1px solid #2c3040 !important;
    /* Evitamos parpadeos al autocompletar */
    transition: background-color 5000s ease-in-out 0s;
}

textarea {
    resize: vertical;
}

/* Botón de acción principal */
button {
    width: 100%;
    padding: 15px;
    background-color: #ffffff;
    color: #0b0c10;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 10px;

    /* font-family: 'Schibsted Grotesk', monospace; */

    font-family: 'TT Autonomous', monospace;

    text-transform: uppercase;
    letter-spacing: 2px;
}

button:hover {
    background-color: #e4e4e7;
    transform: translateY(-1px); /* Sutil efecto de elevación */
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #2c3040;
    cursor: not-allowed;
    color: #56596e;
    transform: none;
}

/* Estilos del Popup (Modal Moderno) */
/* Estilos del Popup (Modal Moderno) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    
    /* Mejoras para móviles */
    height: 100vh; /* Respaldo para navegadores viejos */
    height: 100dvh; /* Altura dinámica que se adapta al teclado del celular */
    
    background: rgba(5, 5, 8, 0.85);
    
    /* Efecto cristal compatible con todos (incluyendo iPhone) */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 9999; /* Aumentamos el nivel para asegurarnos que quede encima de todo */
}

.popup-content {
    background: #14161d;
    border: 1px solid #222531;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    transform: scale(0.9); /* Efecto de animación */
}

/* Animación de apertura del Popup */
.popup-overlay.activo {
    opacity: 1;
    visibility: visible;
}

.popup-overlay.activo .popup-content {
    transform: scale(1);
}

#popup-titulo {
    margin-top: 0;
    font-size: 22px;
    font-weight: 600;
    font-family: 'TT Autonomous', sans-serif;
}

#popup-texto {
    font-size: 16px;
    line-height: 1.6;
    color: #989aa6;
    margin-bottom: 20px;
}

.btn-cerrar {
    margin-top: 10px;
    background-color: #1a1d26;
    border: 1px solid #2c3040;
    color: #ffffff;
    width: auto;
    padding: 10px 24px;
}

.btn-cerrar:hover {
    background-color: #2c3040;
    border-color: #40455c;
}

.form-description {
    text-align: left;
    font-size: 16px;
    color: #989aa6; /* Mismo tono gris elegante de las etiquetas */
    line-height: 1.6;
    margin-top: -10px; /* Acerca sutilmente el texto al icono superior */
    margin-bottom: 30px; /* Deja una separación limpia antes del primer input */
}


/* =========================================
   Estilos para el botón de Adjuntar Archivo
   ========================================= */
input[type="file"] {
    padding: 10px;
    background-color: #1a1d26;
    color: #989aa6;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Schibsted Grotesk', sans-serif;
}

/* Modificamos el botón interno que genera el navegador */
input[type="file"]::file-selector-button {
    background-color: #2c3040;
    color: #ffffff;
    border: 1px solid #40455c;
    border-radius: 6px;
    padding: 8px 16px;
    margin-right: 15px;
    cursor: pointer;
    font-family: 'TT Autonomous', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #40455c;
}

/* =========================================
Indicador de Carga (Spinner Animado)
   ========================================= */
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1); /* Anillo base semi-transparente */
    border-top-color: #ffffff; /* Color de la parte que gira */
    border-radius: 50%;
    animation: girar 1s linear infinite; /* Hace que gire infinitamente */
    margin: 0 auto; /* Centra el spinner */
}

@keyframes girar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   Diseño Adaptable (Responsive para Móviles)
   ========================================= */
@media (max-width: 480px) {
    /* Reducimos el espacio exterior del body para aprovechar la pantalla */
    body {
        padding: 15px; 
    }

    /* Ajustamos el contenedor del formulario */
    form {
        padding: 30px 20px; /* Menos relleno interno para dar espacio a los inputs */
        border-radius: 12px; /* Bordes ligeramente menos redondeados en móvil */
    }

    /* Achicamos un poco el logo y los márgenes superiores */
    .form-icon {
        width: 150px;
        height: 80px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    /* Hacemos el texto explicativo un poco más compacto */
    .form-description {
        font-size: 15px;
        margin-bottom: 20px;
        line-height: 1.5;
    }

    /* Ajustamos los campos de texto y el botón */
    input, textarea, button {
        font-size: 14px; 
        padding: 12px 14px;
    }

    /* Ajustes finos para el Popup en celulares */
    .popup-content {
        padding: 25px 20px;
    }

    #popup-titulo {
        font-size: 19px;
    }

    #popup-texto {
        font-size: 14px;
    }
}