/* VARIABLES */
:root {
    --primary: #004aad;
    --primary-dark: #00337a;
    --accent: #ffc107;
    --text-main: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    /* Ajusta este valor para que coincida con el alto de tu cabecera */
    scroll-padding-top: 120px; /* Ejemplo basado en padding del header */
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 20px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

/* HEADER */
header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 100px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.3s;
}

.logo img:hover {
    opacity: 0.85;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-light);
}

.nav-menu a:hover {
    color: var(--primary);
}

.hero {
    background: linear-gradient(rgba(0, 74, 173, 0.7), rgba(0, 74, 173, 0.7)) center/cover;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: var(--white);
    padding: 40px 0;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text {
    text-align: center;
}

.hero-pic-top {
    height: 400px;
    width: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 25px;
}

.hero-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    padding: 18px 24px;
}

.hero-logos img {
    height: 104px;
    width: auto;
    opacity: 1;
    transition: 0.3s;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.hero-logos img:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.btn-main {
    background: var(--accent);
    color: var(--primary-dark);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-main:hover {
    transform: scale(1.05);
    background: var(--white);
}

/* CARDS & GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.card ul {
    text-align: left;
    margin-top: 20px;
}

.card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.card li::before {
    content: '•';
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
}

/* RESULTADOS */
.bg-light {
    background: #edf2f7;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.result-item {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border-bottom: 4px solid var(--primary);
    transition: 0.3s;
}

.result-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.result-item img {
    height: 50px;
    margin: 0 auto 15px;
    filter: none;
}

.result-item span {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    display: block;
}

/* PREMIOS */
.premios-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-top: -30px;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.premios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.premio-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premio-card img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.premio-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 74, 173, 0.15);
}

.premio-card:hover img {
    transform: scale(1.03);
}

/* HISTORIA */
.historia-intro {
    max-width: 850px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.8;
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--accent);
}

.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.timeline-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.timeline-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.timeline-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.timeline-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.timeline-card:hover .timeline-img img {
    transform: scale(1.08);
}

.timeline-info {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-date {
    display: inline-block;
    background: rgba(0, 74, 173, 0.1);
    color: var(--primary);
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    align-self: center;
}

.timeline-info h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
}

/* CONTACTO */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--primary);
    width: 25px;
}

/* Estilo específico para WhatsApp */
.whatsapp-contact .info-item i {
    color: #25d366;
    background: #eef7eb;
    padding: 5px;
    border-radius: 50%;
}

.whatsapp-contact .info-item span {
    font-weight: bold;
    color: var(--primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.contact-map {
    width: 100%;
    height: 380px;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* MODALES */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-scroll-area {
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 20px;
    text-align: left;
}

.modal-scroll-area h3 {
    color: var(--primary);
    margin: 20px 0 10px;
    font-size: 1.15rem;
}

.modal-scroll-area p {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-scroll-area ul {
    margin: 0 0 20px 20px;
    list-style-type: disc;
}

.modal-scroll-area li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    padding: 20px;
    z-index: 3000;
    transition: 0.5s;
}

.cookie-banner.show {
    bottom: 0;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-small {
    background: var(--accent);
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* FOOTER */
footer {
    background: #2d3436;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #bdc3c7;
    margin: 0 10px;
    font-size: 0.85rem;
}

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

/* ANIMACIONES */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s all ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-logos img {
        height: 38px;
    }

    .logo img {
        height: 70px;
    }

    .hero-pic-top {
        height: auto;
        width: 100%;
        max-width: 320px;
    }
}

/* LANDSCAPE MODE OPTIMIZATIONS (SMALL SCREEN HEIGHTS) */
@media (max-height: 600px) and (orientation: landscape) {
    header {
        padding: 10px 0;
    }

    .logo img {
        height: 55px;
    }

    .hero {
        min-height: auto;
        padding: 30px 0;
    }

    .hero-pic-top {
        max-height: 160px;
        width: auto;
        margin-bottom: 10px;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .hero-logos {
        padding: 10px 15px;
        gap: 12px;
        margin-bottom: 15px;
    }

    .hero-logos img {
        height: 32px;
    }
}