/* ==
/* ==========================
   VARIABLES DE COLOR
   ========================== */
:root {
    --color-fondo-claro: #4a90e2;      /* ← este es el blanco que usa el header */
    --color-fondo-oscuro: #ffffff;
    --color-texto-claro: #ffffff;
    --color-texto-oscuro: #4a90e2;
    --color-acento: #4a90e2; /* morado suave */
    --color-boton: #4a90e2;
    --color-boton-texto: ##4a90e2;
}

   DETECCIÓN AUTOMÁTICA MODO OSCURO

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(to bottom, #4a90e2, #4a90e2);
        color: var(--color-texto-oscuro);
    }

    .tarjeta,
    .destacados,
    header,
    footer {
        background-color: #4a90e2;
        color: var(--color-texto-oscuro);
    }

    .redes img {
        filter: brightness(0.9);
    }
}

/* ==========================
   ESTILOS GENERALES
   ========================== */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: #ffffff
    color: #ffffff;
    transition: background 0.3s, color 0.3s;
}

a {
    color: var(--color-texto-claro);
    text-decoration: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: var(--color-fondo-claro);
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
    transition: background-color 0.5s;
}

header img {
    width: 150px; /* logo más grande */
    height: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a:hover {
    color: var(--color-boton);
}

/* ==========================
   SECCIÓN BIENVENIDA
   ========================== */
.bienvenida {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 80vh; 
    padding: 20px;
    background: linear-gradient(to bottom, rgba(74,144,255,0.6), rgba(225,225,225,0.5)), url('../img/fondo-bienvenida.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-texto-claro);
}

.bienvenida h1 {
    font-size: 3em;
    margin: 0.5em 0;
}

.bienvenida p {
    font-size: 1.2em;
    max-width: 700px;
}

/* ==========================
   BOTÓN MODO OSCURO
   ========================== */
#btn-modo {
    padding: 10px 20px;
    font-size: 1em;
    background-color: var(--color-boton);
    color: var(--color-boton-texto);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 20px 0;
}

/* ==========================
   SECCIÓN DESTACADOS
   ========================== */
.destacados {
    padding: 50px 20px;
    background: linear-gradient(to bottom, #4a90e2, #ffffff); /* azul arriba a blanco abajo */
    color: #222222;
}

.tarjetas {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tarjeta {
    background-color: #e6f0ff; /* azul muy claro */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 250px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.tarjeta h3 {
    margin-top: 0;
    color: var(--color-acento);
}

/* ==========================
   FOOTER
   ========================== */
footer {
    text-align: center;
    padding: 20px;
    background-color: #ffffff; /* blanco */
    color: #4a90e2;
}

/* ----------------- ICONOS DE REDES ----------------- */
.redes {
    display: flex;
    justify-content: center;
    gap: 20px; 
    margin: 25px 0;
}

.redes img {
    width: 30px; 
    height: 30px;
    transition: transform 0.2s;
}

.redes img:hover {
    transform: scale(1.3);
}

/* ==========================
   MODO OSCURO MANUAL
   ========================== */
body.modo-oscuro {
    background: linear-gradient(to bottom, #222222, #1a1a1a);
    color: var(--color-texto-oscuro);
}

body.modo-oscuro header,
body.modo-oscuro footer,
body.modo-oscuro .destacados,
body.modo-oscuro .tarjeta {
    background-color: #222222;
    color: var(--color-texto-oscuro);
}

body.modo-oscuro a {
    color: #8a7bff;
}

/* ----------------- MEDIA QUERIES ----------------- */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .redes-header {
        justify-content: center;
        margin-top: 10px;
    }

    .redes-header img {
        width: 25px;
        height: 25px;
    }

    .logo img {
        width: 120px;
    }
}

@media (min-width: 769px) {
    nav ul {
        flex-direction: row;
    }

    .logo img {
        width: 150px;
    }
}
