/* =================================== */
/* ====== ESTILOS GENERALES Y FONDO ===== */
/* =================================== */
body {
    font-family:'Roboto-Black', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #000; /* Fondo de respaldo si el video falla */
}

video.background {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: -1;
}

/* Capa oscura que cubre toda la página */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Oscurecido ligeramente */
    z-index: 0;
}

/* Contenedor principal de la vista de login */
.main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 50px 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Asegura que esté sobre la capa oscura */
}

/* Contenedor de la tarjeta (Login/Overlay) */
.container {
    background: #fff; /* Fondo blanco sólido para la tarjeta */
    border-radius: 14px; /* Borde más pronunciado */
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    width: 800px;
    max-width: 90%;
    display: flex;
    position: relative;
    overflow: hidden;
    color: #333;
}

/* =================================== */
/* ====== SECCIÓN FORMULARIO (IZQUIERDA) ===== */
/* =================================== */
.container-group {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.form-container {
    max-width: 300px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Alineamos los elementos del formulario al centro */
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header img {
    width: 100px;
    height: auto;
    margin: 0 0 20px 0;
}

/* Contenedores de íconos e input */
.icon-contener {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 25px; /* Más espacio entre campos */
}

.img {
    width: auto;
    height: 24px;
    margin-right: 15px; /* Espacio entre el ícono y el campo */
    flex-shrink: 0; /* Evita que el ícono se encoja */
}

.form-group {
    position: relative;
    flex-grow: 1;
}

/* Estilo del input */
.input {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.input:focus {
    border-color: #4285f4;
}

/* La etiqueta flotante */
.form-group label {
    position: absolute;
    left: 15px;
    top: 13px;
    color: #777;
    font-size: 16px;
    pointer-events: none;
    transition: 0.3s ease all;
}

/* Animación cuando el input está en foco o tiene texto */
.input:focus ~ label,
.input:not(:placeholder-shown) ~ label {
    top: -10px; /* Sube la etiqueta */
    left: 10px;
    font-size: 12px;
    color: #4285f4;
    background: #fff;
    padding: 0 5px;
}

/* Botón Iniciar Sesión */
.button {
    border: none;
    padding: 12px 45px;
    background-color: #4285f4;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 25px;
    margin: 25px 0 15px 0;
    transition: background-color 0.3s ease;
    width: 100%;
}

.button:hover {
    background-color: #3367d6;
}

/* Texto de registro */
.text{
    text-align: center;
    color: #555;
    font-size: 14px;
}

.text p{
    margin: 4px 0;
}

.link-registro {
    font-weight: bold;
    color: #4285f4;
    text-decoration: none;
    transition: color 0.3s;
}

.link-registro:hover {
    color: #3367d6;
    text-decoration: underline;
}

/* Mostrar/Ocultar contraseña */
.buttonshowpassword {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 0;
    height: 20px;
    width: 20px;
    z-index: 2;
}

.buttonshowpassword img {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.buttonshowpassword:hover img {
    opacity: 1;
}

/* Estilos de mensajes de error */
.form-group h:message {
    font-size: 12px;
    margin-top: 5px;
}

/* =================================== */
/* ====== SECCIÓN OVERLAY (DERECHA) ===== */
/* =================================== */
.overlay-container {
    flex: 1;
    background: #2068bc;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 36px;
    position: relative; /* Necesario para posicionar el selector de país */
}
.overlay-panel {
    padding: 0 20px;
    text-align: center;
}
.overlay-panel h1 {
    font-weight: 800;
}

/* =================================== */
/* ====== SELECTOR PAÍS ===== */
/* =================================== */
.country-selector {
    position: absolute;
    top: 20px;
    left: 20px; /* **CAMBIO:** Mover a la izquierda en desktop */
    z-index: 10;
}
.country-dropdown {
    display: flex;
    align-items: center;
    cursor: default;
    background-color: #fff;
    color: #000;
    border-radius: 20px;
    padding: 6px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 14px;
}
.country-dropdown img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}
.dropdown-content {
    display: none;
    position: absolute;
    left: 0; /* **CAMBIO:** Alinear a la izquierda del botón */
    background-color: #fff;
    color: #333;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 20;
    border-radius: 8px;
    margin-top: 5px;
}
.dropdown-content div {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.dropdown-content div:hover {
    background-color: #f0f0f0;
}
.dropdown-content img {
    width: 24px;
    height: auto;
    border-radius: 50%;
    margin-right: 10px;
}

/* =================================== */
/* ====== MEDIA QUERY PARA MÓVILES ====== */
/* =================================== */

@media (max-width: 900px) {

    .main-content {
        align-items: flex-start;
        padding: 50px 0;
    }

    /* Contenedor principal: apilamiento vertical */
    .container {
        flex-direction: column;
        min-height: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    /* 1. Panel azul (Overlay) va arriba */
    .overlay-container {
        order: -1;
        padding: 30px 20px;
        border-radius: 14px 14px 0 0;
        max-height: 200px;
        min-height: 120px;
        flex-shrink: 0;
    }

    .overlay-panel h1 {
        font-size: 24px;
        padding: 0;
    }

    /* 2. Formulario va abajo */
    .container-group {
        order: 1;
        padding: 30px 20px;
    }

    .form-container {
        max-width: 100%;
        align-items: center; /* **CAMBIO:** Centrar los elementos del formulario */
        text-align: center; /* Centrar textos */
    }

    .login-header {
        align-items: center; /* **CAMBIO:** Centrar el logo en móvil */
        width: 100%;
    }

    /* Ocultamos el logo de la nube que está dentro del form en móvil */
    .login-header h:form {
        display: none;
    }
    .login-header img {
        margin: 10px 0 20px 0;
    }

    .icon-contener {
        margin-bottom: 20px;
        justify-content: center; /* **CAMBIO:** Centrar los íconos y campos */
    }

    .img {
        height: 20px;
    }

    .button {
        margin: 20px 0 10px 0;
    }

    /* Reajuste del selector de país en móvil */
    .country-selector {
        top: 10px;
        right: auto; /* Desactivar la posición derecha */
        left: 10px;  /* **CAMBIO:** Mover a la izquierda en móvil */
    }
    .country-dropdown {
        box-shadow: none; /* Quitar sombra para que se integre mejor con el color azul */
    }
    .dropdown-content {
        left: 0; /* **CAMBIO:** Asegurar que el dropdown se alinee a la izquierda */
        right: auto; /* Desactivar la posición derecha */
    }
}