:root {
    --primary-color: #2563eb;
    --secondary-color: #133482;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --text-color: #111827;
    --border-radius: 12px;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f9fafb;
    margin: 0;
    height: 100%;
    padding: 0;
    overflow-x: hidden;
}

#page-container {
    height: 100%;
}

.login-container {
    display: flex;
    height: 100%;
}


@media (max-width: 992px) {
    .login-column {
        width: 100% !important;
    }
}


.institution-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.institution-badge img {
    height: 36px;
    margin-right: 12px;
}

.institution-badge span {
    font-weight: 600;
    color: var(--dark-color);
}

/* Columna derecha - Formulario */
.login-column {
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px 20px;
}

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

.login-header img {
    max-width: 200px;
    margin-bottom: 20px;
}

.login-header h3 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 52px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
}

.btn {
    height: 52px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 105, 179, 0.2);
}

.btn-outline-secondary {
    color: var(--dark-color);
    border-color: #e2e8f0;
    background-color: white;
}

.btn-outline-secondary:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
    transform: translateY(-2px);
    border-color: #235ede;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-icon {
    margin-right: 8px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 5px 0;
    color: var(--gray-color);
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.divider span {
    padding: 0 15px;
    font-size: 0.9rem;
}

.help-links {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 25px;
}

.help-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.help-links a:hover {
    color: var(--accent-color);
}

.footer-login {
    margin-top: 30px;
    text-align: center;
    color: var(--gray-color);
    font-size: 0.85rem;
}

/* Modal de _login SGA */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow);
}

.modal-header {
    border-bottom: none;
    padding: 20px 20px 0;
}

.modal-body {
    padding: 20px 30px 30px;
}

.platform-logos {
    text-align: center;
    margin-bottom: 20px;
}

.platform-logos img {
    max-width: 180px;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation: fadeIn 0.5s ease forwards;
}

/* Personalización modal */
.close {
    font-size: 2rem;
    color: var(--gray-color);
    opacity: 0.5;
    transition: var(--transition);
}

.close:hover {
    opacity: 1;
    color: var(--danger-color);
}

/* Personalización Sweet Alert */
.swal2-popup {
    border-radius: var(--border-radius);
    padding: 2em;
}

/* Spinner personalizado */
.custom-spinner {
    width: 70px;
    height: 70px;
}

/* Estilos adicionales para mejorar la experiencia en móviles */
@media (max-width: 767px) {
    body {
        background-color: white;
    }

    .login-column {
        padding: 20px;
    }

    .login-card {
        padding: 10px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-header img {
        max-width: 150px;
    }

    .login-header h3 {
        font-size: 1.5rem;
    }

    .form-control {
        height: 48px;
    }

    .btn {
        height: 48px;
    }

    /* Agregar una imagen de fondo en dispositivos móviles */
    .mobile-bg {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 30vh;
        background-color: var(--primary-color);
        background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        z-index: -1;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }

    .mobile-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px 0;
    }

    .mobile-logo img {
        height: 50px;
        margin-right: 10px;
    }

    .mobile-logo span {
        color: white;
        font-weight: 600;
        font-size: 1.2rem;
    }

    .login-mobile-card {
        background-color: white;
        border-radius: 20px;
        padding: 25px 20px;
        margin-top: 10vh;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
}

/* Mejoras en la visualización de errores para móviles */
@media (max-width: 767px) {
    .swal2-popup {
        padding: 1.5em;
        width: 90%;
        max-width: 400px;
    }

    .swal2-title {
        font-size: 1.3rem !important;
    }

    .swal2-content {
        font-size: 0.95rem !important;
    }
}

/* Animaciones específicas para móviles */
@media (max-width: 767px) {
    @keyframes slideInUp {
        from {
            transform: translateY(50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .login-mobile-card {
        animation: slideInUp 0.5s ease forwards;
    }
}

/* Estilos mejorados para el carrusel */
.showcase-column {
    width: 55%;
    position: relative;
    overflow: hidden;
    background-color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    height: 100vh; /* Altura explícita */
}

.carousel-container {
    height: 100%;
    width: 100%;
    position: relative;
    flex: 1;
    overflow: hidden; /* Importante para evitar desbordamientos */
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.carousel-item {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.carousel-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.carousel-item-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(45, 55, 72, 0.4), rgba(17, 24, 39, 0.7));
    z-index: 1;
}

.carousel-indicators {
    z-index: 3;
    bottom: 30px;
    margin-bottom: 0; /* Eliminar margen que puede causar desbordamiento */
}

.carousel-indicators li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.carousel-indicators li.active {
    background-color: white;
}

.carousel-control-prev, .carousel-control-next {
    z-index: 3;
    width: 10%;
    opacity: 0.7;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}

.carousel-content {
    position: absolute;
    bottom: 80px;
    left: 0;
    padding: 2rem 3rem;
    color: white;
    z-index: 2;
    width: 100%;
}

.carousel-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.carousel-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 80%;
}

/* Asegurarse de que la transición funcione correctamente */
.carousel-item {
    transition: transform 0.6s ease-in-out;
    display: none;
}

.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
    display: block;
}

.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
    transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
    transform: translateX(-100%);
}

.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(45, 55, 72, 0.4), rgba(17, 24, 39, 0.7));
    z-index: 1;
}


@media (max-width: 992px) {
    .showcase-column {
        display: none;
    }

    .login-column {
        width: 100% !important;
    }
}