:root {
    --baltic-blue: #015e90;
    --brick-ember: #1b1919;
    --bright-snow: #f8fafc;
    --white: #ffffff;
    --deep-space: #1e293b;
    --slate-grey: #64748b;
    --golden-orange: #f59e0b;
    --yale-blue: #004a73;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    scroll-behavior: smooth; 
}
#contacto {
    min-height: 90vh; 
    padding: 150px 20px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--deep-space);
    color: var(--bright-snow);
    overflow-x: hidden;
}
.video-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    object-fit: cover;
    filter: brightness(0.3);
}
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 120px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--baltic-blue);
    padding: 5px;
    background-color: var(--white);
    transition: 0.3s;
}
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,74,113,0.4) 0%, rgba(30,41,59,0.9) 100%);
    z-index: -1;
}
header {
    width: 100%;
    padding: 15px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--baltic-blue);
    position: fixed;
    top: 0; z-index: 1000;
}
.nav-links { 
    display: flex; 
    gap: 15px; 
    list-style: none; 
}
.nav-links a { 
    color: var(--bright-snow); 
    text-decoration: none;
    font-weight: 700; 
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 8px 15px;
    transition: 0.3s;
}
.nav-links a.active {
    color: var(--golden-orange);
    border-bottom: 2px solid var(--golden-orange);
}
.header-auth {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid var(--baltic-blue);
    transition: all 0.3s ease;
}

.login-img-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1); 
}


section {
    min-height: 75vh;
    width: 100%;
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.container { 
    max-width: 2000px; 
    width: 100%;
    margin: 0 auto; 
    padding: 20px 20px; 
    text-align: center; 
}
.hero-title { 
    font-size: 4rem;
    font-weight: 900;
    color: var(--white); 
}
.hero-subtitle { 
    color: var(--golden-orange); 
    text-transform: uppercase; 
    letter-spacing: 5px; 
    font-size: 0.9rem; 
    margin-bottom: 40px; 
    display: block; 
}
.systems-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 2fr)); 
    gap: 25px;
}
.system-card {
    background: var(--white);
    border-radius: 15px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.4s;
    border-bottom: 6px solid var(--baltic-blue);
    height: 240px;
}
.system-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--brick-ember);
}
.system-card img {
    width: auto;
    height: auto;
    max-height: 200px;
    max-width: 200px;
    width: 100%; 
}
.system-card span { 
    color: var(--deep-space); 
    font-weight: 800; 
    font-size: 0.85rem; 
}
footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--slate-grey);
    background: rgba(30, 41, 59, 1);
    border-top: 1px solid var(--yale-blue);
}
.hidden-login {
    color: var(--brick-ember);
    text-decoration: none;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    pointer-events: none;
}
.section-spacer { 
    margin-bottom: 200px; 
}
.reveal-login {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.hero-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.hero-avisos {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.avisos-label {
    color: var(--golden-orange);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-align: left;
}
.avisos-slider-viewport {
    width: 100%;
    overflow: hidden; 
    border-radius: 15px;
    border: 2px solid var(--baltic-blue);
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
}
.avisos-track {
    display: flex;
    gap: 15px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: stretch;
}


.hero-text-side {
    flex: auto;
}

.avisos-slider {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    border-radius: 15px;
    border: 2px solid var(--baltic-blue);
    overflow: hidden;
    gap: 10px;
}

.aviso-item {
    flex: 0 0 calc(33.333% - 10px); 
    width: calc(33.333% - 10px); 
    display: flex;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, border-color 0.3s;
    background: #000;
}
.aviso-item:hover {
    transform: translateY(-5px);
    border-color: var(--golden-orange);
}

/* .aviso-item.active {
    opacity: 1;
    z-index: 2;
    display: block;
} */

.aviso-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.modal-preview {
    border: none;
    border-radius: 10px;
    padding: 0;
    background: rgba(0, 0, 0, 0.9);
    max-width: 90vw;
    max-height: 90vh;
}
.modal-preview::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}
#modal-img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: auto;
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem; 
    }
    .systems-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}
@media (max-width: 768px) {
    header {
        padding: 0 15px;
        height: 65px;
        display: flex;
        flex-direction: row;
        justify-content: space-between; 
        align-items: center;
    }
    #inicio {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 30px;
    }
    .logo-img {
        width: 90px;
        border-radius: 5px;
    }
    .header-auth {
        margin-left: 10px;
    }
    .login-link {
        width: 38px;
        height: 38px;
    }
    .login-img-icon {
        width: 20px;
        height: 20px;
    }
    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 5px;
    }
    .nav-links a {
        font-size: 0.65rem;
        padding: 5px 8px;
        letter-spacing: 0;
        white-space: nowrap;
    }
    .hero-title {
        font-size: 1.3rem;
        line-height: 1.8;
        /* height: 1rem; */
    }
    .hero-subtitle {
        letter-spacing: 1px;
        font-size: 0.7rem;
    }
    .systems-grid {
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    .system-card {
        height: 150px;
        padding: 20px;
    }
    .system-card img {
        width: auto;
        height: auto;
        max-height: 100px;
        max-width: 100px;
        width: 100%; 
    }
    section {
        padding-top: 60px; 
        min-height: 0vh;    
    }
    .hero-avisos {
        padding: 0 10px;
    }
    .aviso-item {
        flex: 0 0 100%;
        width: 100%;
    }
    .aviso-img {
        height: 450px;
    }
    .hero-flex {
        flex-direction: column;
        gap: 20px;
    }

    .hero-text-side {
        order: 1;
    }

    .hero-avisos {
        order: 2;
        width: 100%;
    }

    .avisos-slider {
        height: auto;
    }
}