
/* ========================================
   1. ESTILOS GENERALES
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #294256;
    background: linear-gradient(135deg, #eaf6ff, #f8fbff, #e1f3fc);
    line-height: 1.75;
}

/* ========================================
   2. MENÚ DE NAVEGACIÓN
======================================== */

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(120deg, #073b5b, #075985, #087eaa);
    border-bottom: 3px solid #38bdf8;
    box-shadow: 0 5px 18px rgba(7, 59, 91, 0.18);
}

nav a {
    display: inline-block;
    padding: 10px 18px;
    color: #f0f9ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: all 0.25s ease;
}

nav a:hover {
    color: #075985;
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   3. TÍTULO PRINCIPAL
======================================== */

body > h1 {
    width: min(1100px, calc(100% - 36px));
    margin: 45px auto 25px;
    color: #075985;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -1px;
}

/* ========================================
   4. PÁRRAFO INTRODUCTORIO
======================================== */

body > p {
    width: min(1050px, calc(100% - 36px));
    margin: 0 auto 35px;
    padding: 28px 30px;
    color: #506779;
    background: #ffffff;
    border: 1px solid #dcebf5;
    border-left: 6px solid #159bd0;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(25, 76, 108, 0.08);
    text-align: justify;
}

/* ========================================
   5. TÍTULOS DE LAS SECCIONES
======================================== */

body > h2 {
    width: min(1050px, calc(100% - 36px));
    margin: 45px auto 20px;
    padding: 0 0 12px;
    color: #075985;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.35;
    border-bottom: 3px solid #b9e7fa;
}

/* Primer título: Lo bueno de no consumir */

body > h2:first-of-type {
    color: #087e8b;
    border-bottom-color: #a8e5df;
}

/* Segundo título: Lo malo de consumir */

body > h2:last-of-type {
    color: #075985;
    border-bottom-color: #b9dff5;
}

/* ========================================
   6. LISTAS
======================================== */

body > ul {
    width: min(1050px, calc(100% - 36px));
    margin: 0 auto 30px;
    padding: 24px 28px 24px 50px;
    background: #ffffff;
    border: 1px solid #dcebf5;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(25, 76, 108, 0.07);
}

/* Cada elemento de la lista */

body > ul li {
    margin-bottom: 13px;
    padding: 13px 16px;
    color: #506779;
    background: #f4faff;
    border-left: 4px solid #38a9d6;
    border-radius: 8px;
    transition: background 0.2s ease,
                transform 0.2s ease;
}

body > ul li:last-child {
    margin-bottom: 0;
}

body > ul li:hover {
    background: #e6f5ff;
    transform: translateX(4px);
}

body > ul li strong {
    color: #075985;
    font-weight: 750;
}

/* ========================================
   7. IMÁGENES
======================================== */

body > img {
    display: block;
    width: min(650px, calc(100% - 36px));
    height: auto;
    max-height: 430px;
    object-fit: contain;
    margin: 30px auto 45px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #dcebf5;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(25, 76, 108, 0.12);
    transition: transform 0.25s ease,
                box-shadow 0.25s ease;
}

body > img:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 32px rgba(25, 76, 108, 0.17);
}

/* ========================================
   8. TABLETAS
======================================== */

@media (max-width: 800px) {
    nav {
        gap: 8px;
    }

    nav a {
        padding: 10px 13px;
    }

    body > p {
        padding: 23px;
    }

    body > ul {
        padding: 20px 20px 20px 42px;
    }
}

/* ========================================
   9. CELULARES
======================================== */

@media (max-width: 600px) {
    nav {
        position: relative;
        gap: 7px;
        padding: 12px 9px;
    }

    nav a {
        flex: 1 1 130px;
        padding: 10px 8px;
        font-size: 13px;
        text-align: center;
    }

    body > h1 {
        margin-top: 30px;
    }

    body > h2 {
        margin-top: 32px;
    }

    body > p {
        padding: 18px;
        text-align: left;
    }

    body > ul {
        padding: 15px 12px 15px 30px;
        border-radius: 14px;
    }

    body > ul li {
        padding: 11px;
        font-size: 0.94rem;
    }

    body > img {
        max-height: 300px;
        margin: 25px auto 35px;
        padding: 6px;
        border-radius: 14px;
    }
}

/* ========================================
   10. ACCESIBILIDAD
======================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
