/* Montserrat Regular */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Montserrat SemiBold */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* HeadingNowTrial */
@font-face {
    font-family: 'HeadingNowTrial';
    src: url('../fonts/HeadingNowTrial-46Bold.ttf') format('truetype');
    font-weight: bold;
}

/* BebasNeue Regular */
@font-face {
    font-family: 'BebasNeue';
    src: url('../fonts/BebasNeue/Regular.otf') format('opentype');
    font-weight: 400;
}

/* BebasNeue Bold */
@font-face {
    font-family: 'BebasNeue';
    src: url('../fonts/BebasNeueBold.ttf') format('truetype');
    font-weight: 800;
}


:root {
    --primary-red: #E60000;
    --dark-red: #A30000;
    --footer-red: #660000;
    --text-dark: #333;
    --text-light: #777;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-red);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.login-container {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 0;
}

/* Imágenes de fondo */
.bg-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-img {
    position: absolute;
    width: 200px;
    height: 255px;
    object-fit: cover;
    border: 10px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.top-left {
    top: -20px;
    left: -20px;
    transform: rotate(-10deg);
}

.top-right {
    top: -30px;
    right: -30px;
    transform: rotate(15deg);
}

.bottom-left {
    bottom: -30px;
    left: 20px;
    transform: rotate(5deg);
}

.bottom-right {
    bottom: -20px;
    right: 40px;
    transform: rotate(-10deg);

}

/* Logo lateral */
.side-logo {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.side-logo2 {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.side-logo img {
    width: 100%;
    max-width: 200px;
}

.side-logo2 img {
    width: 100%;
    max-width: 250px;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    color: var(--white);
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-text .small-text {
    font-size: 1rem;
    display: block;
    margin: 5px 0;
}

/* Tarjeta de login */
.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 510px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 2;
    position: relative;
}



.welcome-title {
    font-family: 'HeadingNowTrial';
    font-weight: 800;
    color: var(--primary-red);
    font-size: 82px;
    letter-spacing: 0;
    line-height: normal;
    height: auto;
    padding: 0;
    margin: -12px 0;
}

.welcome-subtitle {
    font-family: 'Montserrat';
    font-weight: 200;
    color: var(--text-dark);
    font-size: 18px;
    line-height: normal;
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.badges-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.badge {
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    border-radius: 20px;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 200;
    font-family: 'Montserrat';
}

.instruction-text {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-family: 'Montserrat';
    font-size: 16px;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loginForm label {
    font-weight: 400;
    margin-bottom: 20px !important;
    color: var(--text-dark);
    font-family: 'Montserrat';
    font-size: 15px;
    max-width: 380px;
}

.login-form label br {
    height: 30px;
}

.login-form input {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s;
    text-align: center;
    font-family: 'Montserrat';
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
}

/* Reglas específicas para el Formulario de Registro */
#registerForm {
    align-items: flex-start;
    width: 100%;
}

#registerForm div {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#registerForm label {
    width: 100%;
    max-width: none;
    text-align: left !important;
    display: block;
    margin-bottom: 0.5rem !important;
}

#registerForm input,
#registerForm select {
    max-width: none;
    text-align: left;
    font-family: 'Montserrat', sans-serif !important;
}

#registerForm .submit-btn {
    margin: 0 auto;
}

#registerForm .back-to-login-container {
    display: block !important;
    text-align: center !important;
    width: 100%;
}

.submit-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-weight: 700;
    width: 100%;
    max-width: 250px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    font-family: 'Montserrat';
    font-size: 18px;
    margin: 0 auto;
}

.register-link-container,
.back-to-login-container {
    width: 100%;
    text-align: center;
}

.submit-btn:hover {
    background-color: var(--dark-red);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--white);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Global Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    gap: 20px;
}

.loader-spinner-global {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* Footer */
.login-footer {
    background-color: var(--footer-red);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 400;
    z-index: 2;
    font-family: 'Montserrat';
}

.swal2-actions button {
    background-color: var(--primary-red) !important;
    background: var(--primary-red) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .bg-images {
        display: block;
    }

    .bg-img {
        width: 56% !important;
        height: auto !important;
        position: fixed;
        top: 0;
        object-fit: cover;
    }

    .top-left {
        top: 11px !important;
        left: -111px !important;
        transform: rotate(-10deg);
        max-width: 50%;
    }

    .top-right {
        top: -30px !important;
        right: -56px;
        transform: rotate(15deg);
        max-width: 35%;
    }

    .bottom-left {
        bottom: 49px;
        left: -26px;
        transform: rotate(294deg);
        top: initial !important;
        max-width: 42%;
    }

    .bottom-right {
        bottom: 30px;
        right: -23px;
        transform: rotate(340deg);
        top: initial !important;
        max-width: 34%;
    }

    .side-logo {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        display: flex;
        justify-content: center;
    }

    .side-logo2 {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
    }

    .side-logo img {
        height: 50px;
    }

    .side-logo2 img {
        height: 79px;
    }

    .login-container {
        flex-direction: column;
        padding: 20px;
        justify-content: center;
        align-items: center;
    }

    .login-card {
        padding: 30px 20px;
        width: 100%;
        max-width: 400px;
        box-sizing: border-box;
        padding-top: 60px;
    }

    .welcome-title {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .badges-container {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Styles for Language Selector */
.lang-selector-container {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
}

.lang-toggle-btn {
    background: rgba(230, 0, 0, 0.05);
    border: 1px solid rgba(230, 0, 0, 0.15);
    color: var(--primary-red);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.lang-toggle-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(230, 0, 0, 0.2);
}

.lang-toggle-btn:active {
    transform: translateY(0);
}