:root {
    --primary-blue: #002B45;
    --secondary-blue: #3A6BD5;
    --accent-cyan: #3BDAEA;
    --accent-yellow: #EFFF45;
    --primary-light: #FFFFFF;
}

body {
    font-family: 'Roboto', 'Open Sans', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a3a52 100%);
    color: var(--primary-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Efecto de fondo con blur */
body::before {
    content: '';
    width: 40vh;
    height: 40vh;
    position: fixed;
    background: radial-gradient(circle, var(--secondary-blue) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    top: 30%;
    left: 35%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

h2{
    font-size: 1.2rem;
}

h3{
    font-size: 1.1rem;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
}

/* Layout principal - Desktop */
.main-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    align-items: center;
    width: 100%;
    height: 100vh;
    padding: 2rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.logo-section {
    display: flex;
    flex-direction: column;
    grid-column: 2/5;
    grid-row: 1/7;
    justify-content: center;
    align-items: center;
    padding-right: 2rem;
}

.logo-section img {
    width: 100%;
    height: auto;
    max-width: 450px;
}

.dependecies-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.dependecies-section ul{
    display: flex;
    column-gap: 30px;
    margin-top: 1em;
    padding: 10px 20px;
    border-radius: 50px;
    background: #3A6BD5;
    background: linear-gradient(90deg, rgba(58, 107, 213, 1) 0%, rgba(59, 218, 234, 1) 100%);
    list-style-image: url("/img/biñeta.png");
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.dependecies-section ul li:first-child{
    list-style-type: none;
    list-style-image: none;
}

.center-section {
    display: flex;
    flex-direction: column;
    grid-column: 4/7;
    grid-row: 5/6;
    gap: 2rem;
    align-items: center;
    margin-left: 5rem;
}

.center-section img {
    width: 60%;
    height: auto;
    max-width: 300px;
}

.decoration-section {
    display: flex;
    grid-column: 5/8;
    grid-row: 1/3;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.decoration-section img {
    width: clamp(200px, 25vw, 300px);
    height: auto;
}

/* Botón principal */
.btn-access {
    background: transparent;
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 200px;
    cursor: pointer;
}

.btn-access:hover {
    background: var(--primary-blue);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    box-shadow: 0 0 20px rgba(239, 255, 69, 0.2);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(0, 43, 69, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(58, 107, 213, 0.3);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1050;
    overflow-y: auto;
}

.sidebar.show {
    right: 0;
}

.sidebar-header {
    padding: 1.3rem;
    border-bottom: 1px solid rgba(58, 107, 213, 0.3);
    position: relative;
}

.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--accent-yellow);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sidebar-close:hover {
    transform: rotate(90deg);
    color: var(--accent-cyan);
}

.sidebar-body {
    padding: 2rem;
}

/* Formulario de login */
.login-form .form-control {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--accent-yellow);
    color: var(--primary-light);
    border-radius: 0;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent-yellow);
    box-shadow: var(--accent-yellow);
    color: var(--primary-light);
    outline: none;
}

.login-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-form label {
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.btn-login {
    background: var(--accent-yellow);
    border: none;
    color: var(--primary-blue);
    padding: .5rem;
    border-radius: 50px;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--accent-yellow);
    color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(239, 255, 69, 0.4);
    transform: translateY(-1px);
}

.form-check-input:checked {
    border-color: var(--secondary-blue);
}

.form-check-label {
    color: var(--primary-blue);
    font-weight: 300;
}

/* Botón de información */
.btn-info-sidebar {
    background: transparent;
    border: none;
    color: var(--accent-yellow);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
}

.btn-info-sidebar:hover {
    background: transparent;
    color: var(--accent-cyan);
}

/* Modal personalizado */
.modal-content {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a3a52 100%);
    border: 1px solid rgba(58, 107, 213, 0.3);
    color: var(--primary-light);
}

.modal-header {
    border-bottom: 1px solid rgba(58, 107, 213, 0.3);
}

.modal-title {
    color: var(--primary-light);
}

.accordion-button i{
    color: var(--accent-yellow) !important;
}

.btn-close {
    filter: invert(1);
}

.alert-custom {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    border-radius: 10px;
}

.btn-secondary{
    background-color: transparent !important;
    color: var(--accent-yellow);
    border: solid 1px var(--accent-yellow) !important;
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* ========== RESPONSIVE DESIGN ========== */

/* Laptops medianas */
@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
    
    .logo-section {
        grid-column: 1/4;
        grid-row: 1/6;
        padding-right: 1rem;
    }
    
    .center-section {
        grid-column: 3/6;
        grid-row: 4/5;
        margin-left: 3rem;
    }
    
    .decoration-section {
        grid-column: 4/7;
        grid-row: 1/2;
    }
}

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
        padding: 1.5rem;
    }
    
    .logo-section {
        grid-column: 1/3;
        grid-row: 1/5;
        padding-right: 0.5rem;
    }
    
    .logo-section img {
        width: 90%;
        max-width: 400px;
    }
    
    .center-section {
        grid-column: 2/5;
        grid-row: 3/4;
        margin-left: 2rem;
    }
    
    .decoration-section {
        grid-column: 3/5;
        grid-row: 1/2;
        padding-bottom: 1rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 2rem;
        padding: 2rem 1rem;
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .logo-section {
        grid-column: 1;
        grid-row: 1;
        justify-content: center;
        padding: 0;
        order: 1;
    }
    
    .logo-section img {
        width: 80%;
        max-width: 350px;
    }
    
    .center-section {
        grid-column: 1;
        grid-row: 2;
        align-items: center;
        padding: 0 1rem;
        margin-left: 0;
        order: 2;
    }
    
    .center-section img {
        width: 70%;
        max-width: 280px;
    }
    
    .decoration-section {
        grid-column: 1;
        grid-row: 3;
        padding: 0;
        order: 3;
        justify-content: center;
    }
    
    .decoration-section img {
        width: 60%;
        max-width: 250px;
    }
    
    .sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    body::before {
        width: 30vh;
        height: 30vh;
        top: 50%;
        left: 50%;
    }
    
    .main-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    
    .logo-section img {
        width: 85%;
        max-width: 300px;
    }
    
    .center-section {
        gap: 1.5rem;
    }
    
    .center-section img {
        width: 80%;
        max-width: 250px;
    }
    
    .btn-access {
        width: 100%;
        max-width: 250px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .decoration-section {
        min-height: 200px;
        display: flex;
        align-items: center;
    }
    
    .decoration-section img {
        width: 75%;
        max-width: 240px;
        height: auto;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-body {
        padding: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Móviles */
@media (max-width: 576px) {
    .main-container {
        padding: 1rem;
        gap: 1.5rem;
        justify-content: center;
    }
    
    .logo-section img {
        width: 90%;
        max-width: 250px;
    }
    
    .center-section {
        gap: 1rem;
    }
    
    .center-section img {
        width: 100%;
        max-width: 230px;
        height: 90px;
    }
    
    .btn-access {
        font-size: 0.9rem;
        padding: 12px 20px;
        letter-spacing: 0.5px;
    }
    
    .decoration-section {
        justify-content: center;
        padding: 0;
        min-height: 180px;
        display: flex;
        align-items: center;
    }

    .dependecies-section ul{
        width: 85%;
        font-size: .7em;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        padding: 5px 5px;
    }
    /*
    .decoration-section img {
        width: 80%;
        max-width: 373px;
        height: 120px;
    }
    */
    .sidebar-header h5 {
        font-size: 1.1rem;
    }
    
    .sidebar-body {
        padding: 1rem;
    }
    
    .login-form .form-control {
        font-size: 0.95rem;
    }
    
    .btn-login {
        padding: 10px;
        font-size: 0.95rem;
    }
    
    .btn-info-sidebar {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 380px) {
    .main-container {
        gap: 1rem;
    }
    
    .logo-section img {
        width: 95%;
        max-width: 200px;
    }
    
    .center-section img {
        width: 90%;
        max-width: 180px;
    }
    
    .decoration-section {
        min-height: 160px;
    }
    
    .decoration-section img {
        width: 85%;
        max-width: 200px;
    }
    
    .btn-access {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
}

/* Landscape en móviles */
@media (max-height: 600px) and (orientation: landscape) {
    .main-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
        padding: 1rem;
        height: 100vh;
    }
    
    .logo-section {
        grid-column: 1;
        grid-row: 1;
        padding: 0;
    }
    
    .logo-section img {
        width: 80%;
        max-width: 180px;
    }
    
    .center-section {
        grid-column: 2;
        grid-row: 1;
        gap: 0.5rem;
        margin-left: 0;
    }
    
    .center-section img {
        width: 70%;
        max-width: 150px;
    }
    
    .decoration-section {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        padding: 0;
    }
    
    .decoration-section img {
        width: 80%;
        max-width: 150px;
    }
    
    .btn-access {
        padding: 8px 15px;
        font-size: 0.85rem;
        width: auto;
    }
}

/* Ajustes adicionales para sidebar en móviles */
@media (max-width: 768px) {
    .sidebar.show {
        right: 0;
        width: 100%;
        height: 100%;
    }
    
    .sidebar-header {
        position: sticky;
        top: 0;
        background: rgba(0, 43, 69, 0.98);
        z-index: 10;
    }
    
    .sidebar-close {
        font-size: 1.8rem;
        padding: 0.5rem;
    }
}

/* Prevenir scroll horizontal en móviles */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }
    
    .main-container {
        overflow-x: hidden;
    }
}

/* Ajustes finos para diferentes alturas de pantalla */
@media (max-height: 700px) {
    .main-container {
        padding: 1rem;
    }
    
    .center-section {
        gap: 1rem;
    }
}

/* Pantallas ultra anchas */
@media (min-width: 1920px) {
    .main-container {
        max-width: 1800px;
        margin: 0 auto;
    }
    
    .logo-section img {
        max-width: 550px;
    }
    
    .center-section img {
        max-width: 400px;
    }
    
    .btn-access {
        width: 250px;
        padding: 14px 35px;
        font-size: 1.1rem;
    }
}

