/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ================= HTML / BODY ================= */
html, body {
    width: 100%;
    height: auto;
    overflow-x: hidden;
}

/* ================= BODY ================= */
body {
    background-color: #f4f7fa;
}

/* ================= CONTENEDOR PRINCIPAL ================= */
.main-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ================= SECCIÓN IMAGEN ================= */
.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;
    inset: 0;
    background: rgba(0, 0, 0, 0);
}

/* ================= SECCIÓN FORMULARIO ================= */
.form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Desktop */
    align-items: center;
    padding: 20px;
    transition: all 0.8s ease-in-out;
}

/* ================= EFECTO HOVER (SOLO DESKTOP) ================= */
@media (min-width: 769px) {
    body:hover .image-section {
        width: 66.66%;
        opacity: 1;
    }

    body:hover .form-section {
        width: 33.33%;
        background-color: #f4f7fa;
    }
}

/* ================= LOGO ================= */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 250px;
    height: auto;
}

/* ================= CARD ================= */
.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;
}

/* ================= TÍTULOS ================= */
h2 {
    margin-bottom: 25px;
    color: #000;
    font-weight: 600;
}

/* ================= INPUTS ================= */
.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;
}

/* ================= BOTONES ================= */
.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: 600px; /* Desktop */
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ================= FORM GROUP ================= */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
}

/* ================= LOGIN LINK ================= */
.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;
}

/* ================= MODAL ================= */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 14px;
    padding: 25px 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
    text-align: justify;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.btn-cerrar {
    width: 100%;
    margin-top: 25px;
    background-color: #0069ff;
    color: #fff;
    font-size: 16px;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cerrar:hover {
    background-color: #0052cc;
}

/* ================= LOADER ================= */
.loader-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #ddd;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= MÓVILES (SCROLL REAL) ================= */
@media (max-width: 768px) {

    body {
        overflow: hidden; /* body NO scrollea */
    }

    .main-container {
        height: 100dvh;          /* 🔑 viewport real móvil */
        overflow-y: auto;        /* 🔥 SCROLL AQUÍ */
        -webkit-overflow-scrolling: touch;
    }

    .image-section {
        display: none;
    }

    .form-section {
        width: 100%;
        padding: 15px;
        justify-content: flex-start;
        align-items: stretch;
    }

    .card {
        max-width: 100%;
        padding: 25px;
    }

    .logo-container img {
        max-width: 180px;
    }

    .hidden-fields.active {
        max-height: none;
        overflow: visible;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
        padding: 20px;
    }
}
