/* ==========================================
   ESTILOS PARA REGISTRO - Museo HSF
   Archivo: estilosRegistrarse.css
   ========================================== */

/* Variables de colores del museo */
:root {
    --color-marron: #7a322e;
    --color-marron-oscuro: #5a241f;
    --color-celeste: #3498db;
    --color-celeste-oscuro: #2980b9;
    --color-verde: #27ae60;
    --color-verde-oscuro: #1e8449;
    --color-gris-claro: #ecf0f1;
    --color-gris-medio: #95a5a6;
    --color-gris-oscuro: #34495e;
    --color-error: #e74c3c;
    --color-success: #27ae60;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../imagenes/fondoBuscadoroficial.webp') no-repeat center center fixed !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* ==========================================
   HEADER - Botones de Acceso
   ========================================== */
.encabezado-registro {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.contenedor-botones-acceso {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-acceso {
    background: linear-gradient(135deg, var(--color-celeste) 0%, var(--color-celeste-oscuro) 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-acceso:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    color: white;
    text-decoration: none;
}

.btn-acceso i {
    font-size: 16px;
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */
.contenedor-registro {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
}

.tarjeta-registro {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 650px;
    animation: fadeInUp 0.5s ease-out;
}

/* ==========================================
   ICONO Y TÍTULOS
   ========================================== */
.icono-registro {
    text-align: center;
    margin-bottom: 20px;
}

.icono-registro i {
    font-size: 60px;
    color: var(--color-marron);
    animation: pulse 2s infinite;
}

.titulo-registro {
    text-align: center;
    color: var(--color-marron);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitulo-registro {
    text-align: center;
    color: var(--color-gris-medio);
    font-size: 15px;
    margin-bottom: 30px;
}

/* ==========================================
   SECCIONES DEL FORMULARIO
   ========================================== */
.seccion-formulario {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-gris-claro);
}

.seccion-formulario:last-of-type {
    border-bottom: none;
}

.titulo-seccion {
    color: var(--color-marron);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--color-marron);
}

/* ==========================================
   CAMPOS DEL FORMULARIO
   ========================================== */
.campo-formulario {
    margin-bottom: 20px;
}

.campo-formulario label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-gris-oscuro);
    font-weight: 500;
    font-size: 14px;
}

.campo-formulario label i {
    color: var(--color-marron);
    margin-right: 5px;
    width: 18px;
    text-align: center;
}

.campo-formulario input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.campo-formulario input:focus {
    outline: none;
    border-color: var(--color-marron);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(122, 50, 46, 0.1);
}

.campo-formulario input::placeholder {
    color: #bbb;
}

.texto-ayuda {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--color-gris-medio);
}

/* Grupos de campos (dos columnas) */
.grupo-campos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ==========================================
   CONTENEDOR DE PASSWORD CON TOGGLE
   ========================================== */
.contenedor-password {
    position: relative;
    display: flex;
    align-items: center;
}

.contenedor-password input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-gris-medio);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--color-marron);
}

/* ==========================================
   INDICADOR DE FUERZA DE CONTRASEÑA
   ========================================== */
.indicador-fuerza {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.barra-fuerza {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.texto-fuerza {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================
   CHECKBOX DE TÉRMINOS
   ========================================== */
.contenedor-terminos {
    margin: 25px 0;
}

.checkbox-terminos {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 35px;
}

.checkbox-terminos input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-terminos:hover .checkmark {
    background-color: #e8e8e8;
    border-color: var(--color-marron);
}

.checkbox-terminos input:checked ~ .checkmark {
    background-color: var(--color-marron);
    border-color: var(--color-marron);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-terminos input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-terminos .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.texto-terminos {
    font-size: 14px;
    color: var(--color-gris-oscuro);
    line-height: 1.5;
}

.enlace-terminos {
    color: var(--color-marron);
    text-decoration: none;
    font-weight: 500;
}

.enlace-terminos:hover {
    text-decoration: underline;
}

/* ==========================================
   BOTÓN DE REGISTRO
   ========================================== */
.boton-registro {
    width: 100%;
    background: linear-gradient(135deg, var(--color-marron) 0%, var(--color-marron-oscuro) 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(122, 50, 46, 0.3);
    margin-top: 10px;
}

.boton-registro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 50, 46, 0.4);
}

.boton-registro:active {
    transform: translateY(0);
}

.boton-registro:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================
   LINK A LOGIN
   ========================================== */
.texto-login {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--color-gris-oscuro);
}

.enlace-login {
    color: var(--color-marron);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.enlace-login:hover {
    color: var(--color-marron-oscuro);
    text-decoration: underline;
}

/* ==========================================
   MENSAJES DE ALERTA
   ========================================== */
.mensaje-alerta {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.mensaje-alerta.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-alerta.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje-alerta.success::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
}

.mensaje-alerta.error::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
}

/* ==========================================
   FOOTER
   ========================================== */
.pie-registro {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    color: var(--color-gris-medio);
    font-size: 13px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   ANIMACIONES
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 15px;
    }
    to {
        opacity: 1;
        max-height: 100px;
        padding: 12px 15px;
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .tarjeta-registro {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .titulo-registro {
        font-size: 24px;
    }
    
    .grupo-campos {
        grid-template-columns: 1fr;
    }
    
    .contenedor-botones-acceso {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .contenedor-registro {
        padding: 20px 10px;
    }
    
    .tarjeta-registro {
        padding: 25px 20px;
    }
    
    .icono-registro i {
        font-size: 50px;
    }
    
    .titulo-registro {
        font-size: 22px;
    }
    
    .subtitulo-registro {
        font-size: 13px;
    }
    
    .btn-acceso {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ==========================================
   ESTADOS DE VALIDACIÓN
   ========================================== */
.campo-formulario input:invalid:not(:placeholder-shown) {
    border-color: var(--color-error);
}

.campo-formulario input:valid:not(:placeholder-shown) {
    border-color: var(--color-success);
}

/* ==========================================
   ESTILOS PARA IMPRESIÓN
   ========================================== */
@media print {
    body {
        background: white;
    }
    
    .encabezado-registro,
    .pie-registro {
        display: none;
    }
    
    .tarjeta-registro {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
