* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7fa;
    height: 100vh;
    overflow: hidden;
}

/* --- CONTENEDOR PRINCIPAL --- */
.main-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: all 0.8s ease-in-out;
}

/* --- SECCIÓN DE LA IMAGEN (Izquierda) --- */
.image-section {
    width: 0;
    opacity: 0;
    background-image: url('../img/Slider_Impuestos_Principal.png');
    background-size: cover;
    background-position: center;
    transition: all 0.8s ease-in-out;
    position: relative;
}

.image-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
}

.form-section {
    width: 100%;
    /* Inicialmente ocupa todo el ancho */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.8s ease-in-out;
    padding: 20px;
}

/* Efecto para cambiar al 2/3 de la pagina -> la imagen*/
body:hover .image-section {
    width: 66.66%;
    opacity: 1;
}

body:hover .form-section {
    width: 33.33%;
    /* Se reduce al 1/3 derecho */
    background-color: #f4f7fa;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 250px;
    height: auto;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
    transition: max-width 0.5s;
}

h2 {
    margin-bottom: 25px;
    color: #000;
    font-weight: 600;
}

.input-group-search {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"],

select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: #4285F4;
}

.btn-search {
    background-color: #4285F4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: #3367d6;
}

/* --- CAMPOS OCULTOS --- */
.hidden-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.6s ease;
    text-align: left;
}

.hidden-fields.active {
    max-height: 480px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
}

.login-link {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

.login-link a {
    color: #4285F4;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* --- FONDO OSCURO DEL MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    padding: 20px; /* Para evitar que se pegue a los bordes en móviles */
}

/* --- CONTENEDOR DEL MODAL --- */
.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 600px; /* Más ancho como tu ejemplo */
    border-radius: 14px;
    padding: 25px 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    text-align: justify;
    position: relative;
    max-height: 85vh; /* IMPORTANTE: para scroll interno */
    overflow-y: auto; /* Scroll elegante */
}

/* --- TÍTULO --- */
.modal-content h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

/* --- BOTÓN CERRAR --- */
.btn-cerrar {
    width: 100%;
    display: block;
    margin-top: 25px;
    background-color: #0069ff;
    color: #fff;
    font-size: 16px;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.btn-cerrar:hover {
    background-color: #0052cc;
}

/* === MÓVILES === */
@media (max-width: 768px) {

    /* Eliminamos el hover que nunca funcionará en móviles */
    body:hover .image-section,
    body:hover .form-section {
        width: 100%;
        opacity: 1;
    }

    /* Imagen no se usa en móviles */
    .image-section {
        display: none;
    }

    /* Formulario ocupa todo el ancho */
    .form-section {
        width: 100% !important;
        padding: 15px;
    }

    .card {
        max-width: 100%;
        padding: 25px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
        padding: 20px;
    }

    .logo-container img {
        max-width: 180px;
    }
}
