:root {
    --color-green: #8DC63F;
    --color-gray: #808080;
    --color-black: #212529;
}

body {
    overflow-x: hidden;
}

.login-container {
    min-height: 100vh;
    display: flex;
}

.login-sidebar {
    width: 400px;
    background: linear-gradient(135deg, var(--color-gray) 0%, var(--color-black) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
}

.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.background-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    background-size: cover;
    background-position: center;
    -webkit-animation: kenburns 20s linear infinite;
    animation: kenburns 20s linear infinite;
}

.slide.active {
    opacity: 1;
}

@-webkit-keyframes kenburns {
    0% { -webkit-transform: scale(1) translate(0); transform: scale(1) translate(0); }
    50% { -webkit-transform: scale(1.1) translate(-2%, -2%); transform: scale(1.1) translate(-2%, -2%); }
    100% { -webkit-transform: scale(1) translate(0); transform: scale(1) translate(0); }
}

@keyframes kenburns {
    0% { transform: scale(1) translate(0); }
    50% { transform: scale(1.1) translate(-2%, -2%); }
    100% { transform: scale(1) translate(0); }
}

.content-overlay {
    background: rgba(0, 0, 0, 0.7);
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.logo-container {
    width: 150px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-image {
    max-width: 100%;
    height: auto;
    filter: brightness(1.1);
}

.form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
}

.form-control:focus {
    background-color: white;
    border-color: var(--color-green);
    box-shadow: 0 0 0 0.25rem rgba(141, 198, 63, 0.25);
}

.btn-custom {
    background-color: var(--color-green);
    border: none;
    color: white;
    transition: all 0.3s ease;
    border-radius: 8px;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.btn-custom:hover {
    background-color: #7ab32f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

.feature-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-green);
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 2rem;
}

.row {
    gap: 1.5rem;
}

/* Tutoriales bajo el botón de ingreso. La lista viene del catálogo y el login muestra a lo
   más 3: el resto queda en /Tutoriales. */
.tutoriales {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.tutoriales-cabecera {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.tutoriales-titulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tutoriales-todos {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-green);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.25rem 0;
}

.tutoriales-todos:hover,
.tutoriales-todos:focus-visible {
    color: #b5e27a;
    text-decoration: underline;
    outline: none;
}

.tutoriales-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.tutorial-item {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
}

.tutorial-link {
    flex: 1;
    min-width: 0;
    min-height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tutorial-link > i {
    flex: none;
    font-size: 1.3rem;
    color: var(--color-green);
}

.tutorial-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.tutorial-texto strong {
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tutorial-texto small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.tutorial-pdf {
    flex: none;
    min-width: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tutorial-pdf i {
    font-size: 1.05rem;
}

.tutorial-link:hover, .tutorial-link:focus-visible,
.tutorial-pdf:hover, .tutorial-pdf:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--color-green);
    color: white;
    outline: none;
}

/* Panel de ingreso: el formulario se centra con margin auto en vez de justify-content: center.
   Así, cuando el contenido es más alto que la pantalla (notebook bajo, celular acostado,
   teclado abierto), el panel crece y se recorre con scroll en vez de cortar el logo arriba. */
.login-sidebar {
    justify-content: flex-start;
}

.login-sidebar > form {
    margin-block: auto;
    width: 100%;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-sidebar {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) 1.5rem max(1.25rem, env(safe-area-inset-left));
    }

    .main-content {
        display: none; /* Hide features panel on mobile for better performance */
    }

    .logo-container {
        width: 120px;
        margin: 0 auto 1.5rem;
    }

    .form-control {
        font-size: 16px; /* Prevent iOS zoom on input focus */
        padding: 0.75rem;
    }

    .input-group-text {
        padding: 0.75rem;
    }

    .btn-custom {
        padding: 0.875rem;
        margin-top: 1rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .alert {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
}

/* Tablet y notebook angosto */
@media (min-width: 769px) and (max-width: 1199px) {
    /* Panel de ingreso de ancho fijo y tarjetas en una columna, con el ícono a la izquierda:
       en dos columnas el texto quedaba en tiras de una palabra por línea. */
    .login-sidebar {
        width: 400px;
        flex: none;
    }

    .content-overlay {
        padding: 1.5rem;
    }

    .features-grid {
        gap: 0.75rem;
    }

    .features-grid > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .feature-card {
        padding: 1rem 1.25rem;
        margin: 0;
    }

    .feature-card .text-center {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
        align-items: center;
        text-align: left !important;
    }

    .feature-card .feature-icon {
        grid-row: span 2;
        margin: 0;
        font-size: 2rem;
    }

    .feature-card h4 {
        margin: 0;
        font-size: 1.1rem;
    }

    .feature-card p {
        margin: 0;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .login-sidebar {
        padding: 1rem;
    }

    .logo-container {
        width: 100px;
        margin: 0 auto 1rem;
    }

    h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .form-control, .input-group-text {
        padding: 0.5rem;
    }

    .btn-custom {
        padding: 0.625rem;
    }
} 