/* ==========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================== */
:root {
    --verde: #2c6e49;
    --verde-claro: #4c9f70;
    --verde-suave: #e8f5e9;
    --crema: #fefae0;
    --crema-oscura: #faedcd;
    --naranja: #e67e22;
    --naranja-suave: #fdf4e6;
    --blanco: #ffffff;
    --gris-claro: #f8f9fa;
    --texto-oscuro: #1e2a2f;
    --texto-medio: #2d3e45;
    --texto-suave: #5a6b72;
    --sombra: rgba(0, 0, 0, 0.08);
    --radio: 1.5rem;
    --radio-g: 2rem;
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-cuerpo: 'Nunito', sans-serif;
    --fuente-acento: 'Lora', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-cuerpo);
    background: var(--blanco);
    color: var(--texto-oscuro);
    line-height: 1.5;
    font-size: 1rem;
}

/* ==========================================
   ACCESIBILIDAD - SALTAR AL CONTENIDO
   ========================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--verde);
    color: white;
    padding: 8px 16px;
    z-index: 1001;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.skip-link:focus {
    top: 0;
}

/* ==========================================
   NAVEGACIÓN - MENÚ RESPONSIVO
   ========================================== */
#menu-toggle {
    display: none;
}

#navbar {
    background: var(--blanco);
    box-shadow: 0 4px 12px var(--sombra);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--verde);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.hamburguesa {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
}

.hamburguesa span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--verde);
    border-radius: 3px;
    transition: 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.nav-links li a {
    font-weight: 600;
    color: var(--texto-oscuro);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-links li a:hover,
.nav-links li a.activo {
    background: var(--verde-suave);
    color: var(--verde);
}

/* ==========================================
   RESPONSIVE MENÚ (mobile)
   ========================================== */
@media (max-width: 768px) {
    .hamburguesa {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        background: var(--blanco);
        box-shadow: 0 8px 16px var(--sombra);
        padding: 0;                /* ← corregido: sin padding cuando está oculto */
        max-height: 0;
        overflow: hidden;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        gap: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    #menu-toggle:checked ~ #navbar .nav-links {
        max-height: 500px;         /* suficiente para mostrar todos los ítems */
        padding: 1rem 0;           /* ← recupera el padding al abrirse */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 0.8rem 1rem;
    }
}

/* ==========================================
   HERO
   ========================================== */
.hero {
    background: linear-gradient(145deg, var(--verde-suave), var(--crema));
    padding: 5rem 1.5rem 4rem;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(44, 110, 73, 0.1);
    color: var(--verde);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    border: 1px solid rgba(44,110,73,0.3);
}

.hero h1 {
    font-family: var(--fuente-titulos);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--verde);
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--texto-medio);
    max-width: 620px;
    margin: 0 auto 2rem;
    font-family: var(--fuente-acento);
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-img img {
    width: 100%;
    max-width: 900px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--radio-g);
    box-shadow: 0 16px 40px var(--sombra);
    display: block;
    margin: 0 auto;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-p {
    background: var(--verde);
    color: white;
    box-shadow: 0 8px 16px rgba(44,110,73,0.3);
}
.btn-p:hover {
    background: #1e4f34;
    transform: translateY(-2px);
}

.btn-s {
    background: transparent;
    color: var(--verde);
    border-color: var(--verde);
}
.btn-s:hover {
    background: var(--verde);
    color: white;
}

.btn-v {
    background: white;
    color: var(--verde);
    border-color: var(--verde);
}
.btn-v:hover {
    background: var(--verde-suave);
}

/* ==========================================
   SECCIONES Y CONTENEDORES
   ========================================== */
.sec {
    padding: 4rem 1.5rem;
}

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

.tag {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--verde);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(44,110,73,0.1);
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    border: 1px solid rgba(44,110,73,0.3);
}

.titulo {
    font-family: var(--fuente-titulos);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--verde);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.subtitulo {
    font-size: 1.1rem;
    color: var(--texto-medio);
    max-width: 720px;
    margin-bottom: 3rem;
    font-family: var(--fuente-acento);
}

/* ==========================================
   TARJETAS (estadísticas, recursos, etc.)
   ========================================== */
.stats-grid,
.recursos-grid,
.conc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--blanco);
    padding: 2rem;
    border-radius: var(--radio);
    box-shadow: 0 8px 28px var(--sombra);
    transition: 0.3s;
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--verde);
    line-height: 1.2;
    margin-bottom: 0.8rem;
}
.stat-label {
    font-size: 1.1rem;
    color: var(--texto-medio);
}
.stat-fuente {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.8rem;
    font-style: italic;
}

.recurso-card {
    background: var(--blanco);
    padding: 2rem;
    border-radius: var(--radio);
    border-top: 5px solid var(--verde);
    box-shadow: 0 8px 28px var(--sombra);
    transition: 0.3s;
}
.recurso-card:hover {
    transform: translateY(-5px);
}
.recurso-tipo {
    font-weight: 700;
    color: var(--verde);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.recurso-card h3 {
    font-family: var(--fuente-titulos);
    margin-bottom: 0.8rem;
    color: var(--texto-oscuro);
}
.recurso-card p {
    color: var(--texto-medio);
    margin-bottom: 1rem;
}
.recurso-card a {
    color: var(--verde);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.recurso-card a:hover {
    border-bottom-color: var(--verde);
}

.conc-card {
    background: var(--blanco);
    padding: 2rem;
    border-radius: var(--radio);
    box-shadow: 0 8px 28px var(--sombra);
}
.conc-icono {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.conc-card h3 {
    font-family: var(--fuente-titulos);
    margin-bottom: 0.8rem;
    color: var(--verde);
}
.conc-card p {
    color: var(--texto-medio);
}

/* ==========================================
   MÉTODO DEL PLATO (alimentación)
   ========================================== */
.plato-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 700px) {
    .plato-layout {
        grid-template-columns: 1fr;
    }
}
.plato-circulo {
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: var(--crema);
    box-shadow: 0 16px 40px var(--sombra);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
}
.plato-mitad {
    flex: 1;
    background: #b8e0c0;
    border-radius: 50% 50% 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    text-align: center;
}
.plato-cuartos {
    flex: 1;
    display: flex;
}
.plato-q1, .plato-q2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}
.plato-q1 {
    background: #f7d9b0;
    border-radius: 0 0 0 50%;
}
.plato-q2 {
    background: #f5e6b0;
    border-radius: 0 0 50% 0;
}
.plato-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.plato-txt {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--texto-oscuro);
}
.plato-div {
    display: none;
}

.pasos {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.paso {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.2rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px var(--sombra);
}
.paso-n {
    background: var(--verde);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.paso-i strong {
    display: block;
    color: var(--verde);
    margin-bottom: 0.3rem;
}
.paso-i span {
    color: var(--texto-medio);
    font-size: 0.95rem;
}

/* ==========================================
   TABS (alimentación - categorías)
   ========================================== */
.tabs-wrap .tab-panel {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}
.tabs-wrap #tab-verduras {
    display: grid;
}
.tabs-wrap #tab-proteinas:target,
.tabs-wrap #tab-frutas:target,
.tabs-wrap #tab-granos:target,
.tabs-wrap #tab-grasas:target,
.tabs-wrap #tab-evitar:target {
    display: grid;
}
.tabs-wrap:has(#tab-proteinas:target) #tab-verduras,
.tabs-wrap:has(#tab-frutas:target)    #tab-verduras,
.tabs-wrap:has(#tab-granos:target)    #tab-verduras,
.tabs-wrap:has(#tab-grasas:target)    #tab-verduras,
.tabs-wrap:has(#tab-evitar:target)    #tab-verduras {
    display: none;
}
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.tab-btn {
    background: var(--blanco);
    border: 1px solid var(--verde);
    color: var(--verde);
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}
.tab-btn:hover,
.tab-btn:focus {
    background: var(--verde);
    color: white;
}
.tab-btn.activo-default {
    background: var(--verde);
    color: white;
}
.alimento-card {
    background: white;
    padding: 1.2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px var(--sombra);
    text-align: center;
    transition: 0.2s;
}
.alimento-card:hover {
    transform: scale(1.02);
}
.alimento-emoji {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: block;
}
.alimento-nombre {
    font-weight: 700;
    color: var(--verde);
    font-size: 1rem;
}
.alimento-nota {
    font-size: 0.8rem;
    color: var(--texto-suave);
    margin-top: 0.3rem;
}
.alimento-card.evitar {
    border-left: 4px solid #e53935;
}
.alimento-card.evitar .alimento-nombre {
    color: #c62828;
}

/* ==========================================
   NOTAS Y MENSAJES
   ========================================== */
.nota {
    background: var(--crema);
    border-left: 6px solid var(--verde);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    font-family: var(--fuente-acento);
    margin-top: 2rem;
}
.nota-naranja {
    border-left-color: var(--naranja);
}
.nota p {
    color: var(--texto-medio);
}
.nota strong {
    color: var(--verde);
}

/* ==========================================
   REDES SOCIALES (contacto)
   ========================================== */
.social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem 0;
}
.social-card {
    background: var(--blanco);
    padding: 1.8rem 2rem;
    border-radius: 2rem;
    box-shadow: 0 8px 28px var(--sombra);
    text-align: center;
    min-width: 160px;
    transition: 0.2s;
    text-decoration: none;
    color: var(--texto-oscuro);
    border: 1px solid transparent;
}
.social-card:hover {
    transform: translateY(-5px);
    border-color: var(--verde);
}
.social-emoji {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    display: block;
}
.social-card h3 {
    font-family: var(--fuente-titulos);
    color: var(--verde);
    margin-bottom: 0.3rem;
}
.social-card p {
    font-size: 0.85rem;
    color: var(--texto-suave);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: var(--texto-oscuro);
    color: #ddd;
    padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}
.footer-col h4 {
    color: white;
    font-family: var(--fuente-titulos);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
.footer-col p,
.footer-col ul {
    font-size: 0.9rem;
    color: #aaa;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-col ul li a:hover {
    color: white;
    text-decoration: underline;
}
.footer-copy {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid #333;
    padding-top: 1.5rem;
}

/* ==========================================
   CONTADOR DE VISITAS
   ========================================== */
.visit-counter {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #aaa;
}
.visit-counter span {
    font-weight: bold;
    color: var(--verde-claro);
}

/* ==========================================
   ANIMACIONES (simples)
   ========================================== */
.anim {
    animation: fadeUp 0.6s ease forwards;
}
.anim-2 {
    animation: fadeUp 0.8s ease forwards;
}
.anim-3 {
    animation: fadeUp 1s ease forwards;
}
.anim-4 {
    animation: fadeUp 1.2s ease forwards;
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */
.lista-p {
    list-style: none;
    margin-top: 1rem;
}
.lista-p li {
    margin-bottom: 0.5rem;
    padding-left: 1.8rem;
    position: relative;
}
.lista-p li::before {
    content: "•";
    color: var(--verde);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.problema-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
@media (max-width: 700px) {
    .problema-grid {
        grid-template-columns: 1fr;
    }
}

.video-wrap {
    background: white;
    padding: 2rem;
    border-radius: 2rem;
    box-shadow: 0 8px 32px var(--sombra);
    max-width: 760px;
    margin: 0 auto;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
    margin: 1.5rem 0;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tabla-proyecto {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-family: var(--fuente-cuerpo);
}
.tabla-proyecto tr {
    border-bottom: 1px solid #eee;
}
.tabla-proyecto tr:last-child {
    border-bottom: none;
}
.tabla-proyecto td {
    padding: 0.8rem 0;
}
.tabla-proyecto td:first-child {
    font-weight: 700;
    color: var(--verde);
    width: 130px;
}

.claro {
    color: var(--blanco);
}
.conc-fondo {
    background: var(--verde);
}
/* ==========================================
   CALCULADORA IMC (nuevo)
   ========================================== */
.imc-card input:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(44,110,73,0.2);
}

#imc-mensaje {
  font-size: 1rem;
  line-height: 1.6;
}

#imc-mensaje strong {
  color: var(--verde);
  display: block;
  margin-bottom: 0.5rem;
}