/* Fuente moderna y limpia */
body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f7f7f7;
    color: #222;
}

/* HEADER */
.header {
    background: #0d0d0d;
    padding: 25px 0;
    border-bottom: 4px solid #e63946;
}

.header-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 0 20px;
}

.logo { 
    width: 220px; 
    height: auto; 
    border-radius: 12px;
}

.brand h1 {
    margin: 0;
    font-size: 2.4rem;
    color: white;
    letter-spacing: 1px;
}

.brand p {
    margin: 5px 0 0;
    color: #ccc;
    font-size: 1.1rem;
}

/* HERO */
.hero { position: relative; height: 420px; overflow: hidden; } /* Vídeo de fondo */ 
.hero-video { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; object-fit: cover; transform: translate(-50%, -50%); z-index: 1; } /* Capa oscura para mejorar la lectura */ 
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); z-index: 2; } 
.hero-inner { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; text-align: center; padding: 0 20px; }

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0,0,0,0.65), rgba(0,0,0,0.35));
}


.hero-inner h2 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.hero-inner p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* SERVICES */
.services {
    padding: 60px 20px;
    text-align: center;
}

.service-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border-top: 4px solid #e63946;
    transition: transform 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* ABOUT & CONTACT */
.about, .contact {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    text-align: center;
}

/* FOOTER */
footer {
    background: #0d0d0d;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    font-size: 0.95rem;
}

/* FORMULARIO */
/* --- Contenedor general del formulario --- */
.form-section {
    max-width: 600px; /* ancho máximo para que no ocupe toda la pantalla */
    margin: 40px auto; /* centrado */
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    font-family: 'Arial', sans-serif;
}

/* --- Selector de tipo de usuario --- */
.user-type-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

/* --- Botones compactos --- */
.user-type-selector button {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #1976d2;
    border-radius: 6px;
    background-color: white;
    color: #1976d2;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

/* Hover */
.user-type-selector button:hover {
    background-color: #1976d2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* Activo */
.user-type-selector button.active {
    background-color: #1976d2;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Formularios --- */
.user-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Ocultar formularios con la clase hidden */
.hidden {
    display: none;
}

/* --- Inputs y selects --- */
.user-form input,
.user-form select {
    padding: 10px 12px;
    font-size: 14px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.user-form input:focus,
.user-form select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 6px rgba(25, 118, 210, 0.3);
    outline: none;
}

/* --- Botón de enviar --- */
.user-form button[type="submit"] {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background-color: #1976d2;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.user-form button[type="submit"]:hover {
    background-color: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Error box --- */
#formErrorBox {
    margin-top: 10px;
    color: #c62828;
    font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .user-type-selector {
        flex-direction: column;
        gap: 10px;
    }
    .user-type-selector button {
        width: 100%;
    }
    .form-section {
        padding: 20px;
        margin: 20px 15px;
    }
}


/* POPUP */
#popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px; /* evita que toque los bordes en móvil */;
    transition: opacity 0.3s ease;
}

.popup-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.popup-content {
    background: #e8f5e9;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #4caf50;
    color: #2e7d32;
    max-width: 400px;
    width: 100%; /* permite márgenes laterales */
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.popup-content button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}



/* --- VERSIÓN MÓVIL --- */ 
@media (max-width: 768px) { 
    /* Ocultar el texto de la marca */ 
    .brand { display: none; } /* Centrar el logo */ 
    .header-content { justify-content: center; } /* LOGO AÚN MÁS GRANDE EN MÓVIL */ 
    .logo { width: 260px; /* antes 180px */ } 
}

.hidden {
    display: none;
}

.user-type-selector button {
    margin-right: 10px;
    padding: 8px 16px;
    cursor: pointer;
}

.user-type-selector button.active {
    background-color: #1976d2;
    color: white;
    border: none;
}

/* Contenedor de los botones */
.user-type-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* Estilo base de los botones */
.user-type-selector button {
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid #1976d2; /* color azul profesional */
    border-radius: 8px;
    background-color: white;
    color: #1976d2;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1; /* que los botones tengan el mismo tamaño */
}

/* Efecto al pasar el mouse */
.user-type-selector button:hover {
    background-color: #1976d2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Botón activo */
.user-type-selector button.active {
    background-color: #1976d2;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* Para pantallas pequeñas */
@media (max-width: 480px) {
    .user-type-selector {
        flex-direction: column;
    }
    .user-type-selector button {
        flex: unset;
        width: 100%;
    }
}

.footer {
    background-color: #1e1e1e; /* fondo oscuro */
    color: #f1f1f1;           /* texto claro */
    padding: 30px 20px;
    font-family: 'Arial', sans-serif;
    text-align: center;        /* todo centrado */
}

.footer a {
    color: #1976d2;            /* enlaces en azul */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer .footer-content p {
    margin: 8px 0;
    font-size: 15px;
}

.footer .footer-content strong {
    color: #ffffff;
}

/* Emojis más grandes y alineados con texto */
.footer .footer-content p::before {
    margin-right: 6px;
}

/* Responsive */
@media (max-width: 600px) {
    .footer {
        padding: 20px 10px;
        font-size: 14px;
    }
}

/* Modal */
/* Fondo del modal */
#legalModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Oculto por defecto */
.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Visible */
.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Contenido del modal */
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

/* Animación */
@keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Botón de cierre */
.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    transition: 0.2s;
}

.close-btn:hover {
    color: #000;
}

/* Estilos del texto */
#modalText h2 {
    margin-top: 0;
}

.legal-link {
    cursor: pointer;
    color: #0077cc;
}

.legal-link:hover {
    text-decoration: underline;
}
