/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}

/* TRANSICIONES */
body, header, .hero, footer, nav a, p, h1, h2, h3, span {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* MODO OSCURO */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #0d0d0d;
    color: #e5e5e5;
}

/* CONTENEDORES */
.section-inner {
    max-width: 1200px;
    margin: auto;
    padding: 60px 20px;
}

/* HEADER */
header {
    width: 100%;
    padding: 15px 30px;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000;
}
header .logo img {
    height: 50px;
}

/* MENÚ ESCRITORIO */
.menu-desktop {
    display: flex;
    gap: 25px;
}
.menu-desktop a {
    text-decoration: none;
    color: #e5e5e5;
}
.menu-desktop a:hover {
    color: #00c8ff;
}

/* MENÚ MÓVIL (OCULTO POR DEFECTO) */
.menu-mobile {
    display: none;
}

/* HAMBURGER */
#hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
#hamburger div {
    width: 25px;
    height: 3px;
    background: #fff;
}

/* HERO */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 120px 30px 80px;
    gap: 40px;
}
.hero-image img {
    width: 100%;
    border-radius: 10px;
}

/* GRID */
.grid {
    display: grid;
    gap: 30px;
}
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* TARJETAS DEL INDEX */
.card-index {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #222;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 340px;
}
.card-index h3 {
    min-height: 40px;
    margin-bottom: 10px;
}
.card-index p {
    flex-grow: 1;
}

/* IMÁGENES DEL INDEX */
.card-index img.card-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    display: block;
}

/* BOTONES */
.btn-primary {
    padding: 10px 20px;
    background: #00c8ff;
    color: #000;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: #000;
    color: #777;
}

/* MODO CLARO */
body.light-mode {
    background: #f5f5f5;
    color: #111;
}

body.light-mode header {
    background: rgba(255,255,255,0.85);
}

body.light-mode .menu-desktop a,
body.light-mode .menu-mobile a {
    color: #111;
}

body.light-mode .card-index {
    background: #ffffff;
    border-color: #ddd;
    color: #111;
}

body.light-mode footer {
    background: #e5e5e5;
    color: #333;
}

body.light-mode .btn-primary {
    background: #0077aa;
    color: #fff;
}

/* Asegurar que el botón Modo no quede tapado */
#toggleDark {
    position: relative;
    z-index: 2000;
}

/* RESPONSIVE */
@media (max-width: 900px) {

    .menu-desktop {
        display: none;
    }

    #hamburger {
        display: flex;
    }

    .menu-mobile {
        display: flex;
        flex-direction: column;
        background: #111;
        padding: 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}