/* ================= VARIABLES ================= */
:root {
    --bg: #1E1A1A;
    --bg-soft: #3a3434;
    --text: #ffffff;
    --accent: #FF4E3D;
    --border: #332E2E;
}

body.light {
    --bg: #f4f4f4;
    --bg-soft: #ffffff;
    --text: #111111;
    --border: #dddddd;
}

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

/* ================= BASE ================= */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background .3s ease, color .3s ease;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity .2s ease;
}

a:hover {
    opacity: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 60px auto 0;
}

h1,
h2,
h3 {
    margin: 0;
}

p {
    line-height: 1.6;
    opacity: .9;
}

section {
    margin-bottom: 4rem;
}

/* ================= NAVBAR ================= */
.navbar {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* IZQUIERDA */
.nav-left {
    flex: 1;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.logo {
    width: 90px;
    margin-right: 8px;
}

.logo-light {
    display: none;
}

body.light .logo-dark {
    display: none;
}

body.light .logo-light {
    display: block;
}

/* CENTRO */
.nav-links {
    flex: 2;
    display: none;
    justify-content: center;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    opacity: .85;
    transition: opacity .2s ease;
}

.nav-links a:hover {
    opacity: 2;
    font-weight: 600;
}

/* DERECHA */
.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.btn-account {
    background: var(--accent);
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
}

/* ================= HAMBURGER ================= */
.hamburger {
    width: 26px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: .3s;
}

/* MOBILE MENU */
.nav-links.active {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-soft);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    display: flex;
    z-index: 2000;
    /* 🔥 clave */
}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
}

/* ================= HERO ================= */
.hero {
    position: relative;
    width: 90%;
    margin: 40px auto;
    background-color: #332E2E;
    padding: 20px;
    border-radius: 14px;
    overflow: hidden;
}


/* Imagen */
.hero picture img {
    width: 100%;
    display: block;
}


/* Contenido */
.hero-content {
    margin-top: 20px;
    color: #fff;
}


.hero-content h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}


.hero-content p {
    margin-top: 10px;
    font-size: 15px;
    opacity: 0.9;
}


/* Botón */
.btn-hero {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 22px;
    background: var(--accent);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

/* ================= RANKING ================= */
.ranking h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.ranking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.ranking-card {
    background: #f9f9f9;
    color: #000;
    padding: 1.5rem;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    transition: transform .25s ease;
}

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

.ranking-card h3 {
    margin-bottom: 1rem;
}

.ranking-card img {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
}

/* ================= CARDS ================= */
.cards-row,
.news-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.card,
.news-card {
    background: var(--bg-soft);
    padding: 15px;
    border-radius: 12px;
    transition: transform .25s ease;
}

.card:hover,
.news-card:hover {
    transform: translateY(-4px);
}

.card img,
.news-card img {
    width: 100%;
    border-radius: 10px;
}

.meta,
.date {
    font-size: 13px;
    opacity: .7;
}

.btn-dark {
    margin-top: 12px;
    width: 100%;
    background: var(--accent);
    padding: 8px;
    border: none;
    border-radius: 8px;
    color: #fff;
}

.btn-dark:hover {
    background-color: var(--bg);
    color: var(--accent)
}

/* ================= PARTNERS ================= */
.partners-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 25px;
    background: var(--bg-soft);
    border-radius: 12px;
}

.partners-row img {
    width: 100px;
}

/* ================= FOOTER ================= */
footer {
    margin-top: 80px;
    padding: 40px 20px;
    background: transparent;
}

body.light footer {
    background: #eaeaea;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

footer a {
    opacity: .7;
}

.copy {
    text-align: center;
    margin-top: 30px;
    opacity: .6;
}

.socials {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

.socials a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-soft);
    transition: transform 0.25s ease, background 0.25s ease;
}

.socials img {
    width: 35px;
    height: 35px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}


/* Hover desktop */
@media (hover: hover) {
    .btn-download:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
        opacity: .95;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* Hover desktop */
@media (hover: hover) {
    .socials a:hover {
        transform: translateY(-3px);
        background: var(--accent);
    }
}

/* ================= DESKTOP ================= */
@media (min-width: 768px) {

    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .hero {
        padding: 20px;
    }


    .hero picture img {
        border-radius: 14px;
    }


    .hero-content {
        position: absolute;
        top: 25%;
        left: 8%;
        width: 50%;
        margin-top: 0;
        z-index: 2;
    }


    .hero-content h1 {
        font-size: 48px;
    }


    .hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to right,
                rgba(0, 0, 0, 0.6),
                rgba(0, 0, 0, 0));
    }

    .ranking-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-row,
    .news-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {

    .cards-row,
    .news-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ================= GALERIA ================= */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}


#gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    transition: transform .3s ease;
}


#gallery img:hover {
    transform: scale(1.05);
}


#fotos h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.gallery-row img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
}

/* Hover desktop */
@media (hover: hover) {
    .gallery-row img:hover {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
    }
}

/* Tablet */
@media (min-width: 768px) {
    .gallery-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-row img {
        height: 220px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .gallery-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-row img {
        height: 240px;
    }
}

/* ================= LIGHTBOX ================= */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 9999;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 14px;
    animation: zoomIn .3s ease;
}

/* Botones */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 10px;
    transition: opacity .2s ease;
}

.lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 42px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox button:hover {
    opacity: .7;
}

/* Mobile ajustes */
@media (max-width: 600px) {

    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
    }
}

/* Animación */
@keyframes zoomIn {
    from {
        transform: scale(.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}