/*
 * responsive.css — Disfruta Saludable
 * Diseño adaptable para todos los dispositivos
 * ─────────────────────────────────────────────
 * Breakpoints:
 *   xs  < 480px   → Móviles pequeños (iPhone SE, Galaxy A)
 *   sm  < 640px   → Móviles estándar (iPhone 14, Pixel)
 *   md  < 768px   → Tablets verticales
 *   lg  < 1024px  → Tablets horizontales / laptops pequeñas
 *   xl  < 1280px  → Laptops estándar
 *   2xl > 1280px  → Escritorios grandes
 */

/* ══════════════════════════════════════════════
   BASE: Reglas globales de adaptabilidad
══════════════════════════════════════════════ */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ══════════════════════════════════════════════
   HEADER / NAVEGACIÓN
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0;
    }

    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Menú hamburguesa — visible solo en móvil */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
    }

    .bar {
        width: 26px;
        height: 2.5px;
        background: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s ease;
        display: block;
    }

    /* Menú desplegable en móvil */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(8, 26, 10, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(76, 175, 80, 0.25);
        z-index: 1000;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 5rem 2rem 2rem;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-link {
        display: block;
        padding: 0.9rem 1rem;
        font-size: 1.05rem;
        border-radius: 12px;
        border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    }

    .btn-cta-outline {
        margin-top: 1rem;
        display: block;
        text-align: center;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}

/* ══════════════════════════════════════════════
   HERO / PORTADA
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        order: 1;
    }

    .hero-image {
        order: 2;
        max-width: 420px;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
        line-height: 1.25;
    }

    .hero-description {
        font-size: 0.95rem !important;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero-image {
        max-width: 300px;
    }

    .experience-badge {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 2rem;
    }

    .hero-title {
        font-size: clamp(1.4rem, 8vw, 2rem) !important;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* ══════════════════════════════════════════════
   SOBRE NOSOTROS / ABOUT
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
    }

    .about-image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    .about-content {
        text-align: center;
    }

    .about-mission {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .about {
        padding: 4rem 0;
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 2rem) !important;
    }

    .about-mission {
        flex-direction: column;
        gap: 1.25rem;
    }

    .mission-item {
        flex-direction: column;
        text-align: center;
    }

    .nuestro-equipo-container,
    .equipo-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════
   SERVICIOS
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .services-grid,
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {

    .services-grid,
    .servicios-grid {
        grid-template-columns: 1fr !important;
    }

    .service-card {
        padding: 1.5rem !important;
    }
}

/* ══════════════════════════════════════════════
   CALCULADORA IMC / HERRAMIENTAS
══════════════════════════════════════════════ */
@media (max-width: 768px) {

    .calculator-container,
    .tool-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .imc-form,
    .calculator-form {
        padding: 1.5rem !important;
    }

    .hydration-grid,
    .tools-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════
   PLAN SEMANAL / TABLA
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .plan-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .plan-table {
        min-width: 600px;
    }

    .plan-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .plan-tab {
        font-size: 0.82rem;
        padding: 0.5rem 0.9rem;
    }
}

/* ══════════════════════════════════════════════
   RECETAS
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .recipes-grid,
    .recetas-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {

    .recipes-grid,
    .recetas-grid {
        grid-template-columns: 1fr !important;
    }

    .recipe-card {
        max-width: 360px;
        margin: 0 auto;
    }
}

/* ══════════════════════════════════════════════
   PRODUCTOS
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .products-grid,
    .productos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {

    .products-grid,
    .productos-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════
   VIDEO
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .video-container {
        padding: 0 1rem;
    }

    .video-box,
    .video-wrapper {
        border-radius: 12px !important;
    }

    .video-wrapper iframe,
    .video-wrapper video {
        height: 220px !important;
    }
}

@media (max-width: 480px) {

    .video-wrapper iframe,
    .video-wrapper video {
        height: 180px !important;
    }
}

/* ══════════════════════════════════════════════
   GUÍAS / BLOG CARDS
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .guides-grid,
    .guias-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {

    .guides-grid,
    .guias-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════
   FAQ
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .faq-container {
        padding: 0 1rem;
    }

    .faq-question {
        font-size: 0.95rem !important;
        padding: 1rem 1.25rem !important;
    }

    .faq-answer-inner {
        padding: 0 1.25rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* ══════════════════════════════════════════════
   CONTACTO
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .contact-grid,
    .contacto-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .contact-map {
        height: 280px !important;
    }

    .contact-map iframe {
        height: 280px !important;
    }
}

@media (max-width: 640px) {
    .contact-form {
        padding: 1.5rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
@media (max-width: 768px) {

    .footer-grid,
    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ══════════════════════════════════════════════
   PÁGINAS DE RECETA DETALLE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .recipe-hero {
        padding: 6rem 1rem 3rem;
        text-align: center;
    }

    .recipe-hero-title {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
    }

    .recipe-layout,
    .recipe-content-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .recipe-card-box {
        padding: 1.5rem !important;
    }

    .back-btn,
    .btn-volver {
        top: 1rem !important;
        left: 1rem !important;
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }
}

/* ══════════════════════════════════════════════
   BLOG
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .blog-hero-content {
        padding: 5rem 1.5rem 3rem;
    }

    .blog-title {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
    }

    .blog-grid {
        grid-template-columns: 1fr !important;
    }

    .article-container {
        padding: 1.5rem !important;
    }

    .trend-card {
        padding: 1.5rem !important;
    }

    .trend-card h2 {
        font-size: 1.35rem !important;
    }
}

/* ══════════════════════════════════════════════
   BOTONES FLOTANTES (WhatsApp + Back to Top)
══════════════════════════════════════════════ */
@media (max-width: 480px) {
    #wa-float {
        bottom: 16px !important;
        right: 14px !important;
        width: 50px !important;
        height: 50px !important;
    }

    #back-to-top {
        bottom: 76px !important;
        right: 14px !important;
        width: 40px !important;
        height: 40px !important;
    }

    #scroll-progress-bar {
        height: 2.5px !important;
    }
}

/* ══════════════════════════════════════════════
   SECCIÓN HERRAMIENTAS (Calculadora + Hidratación)
══════════════════════════════════════════════ */
@media (max-width: 768px) {

    .herramientas-grid,
    .tools-section .container>div {
        grid-template-columns: 1fr !important;
    }

    .tool-card {
        padding: 1.5rem !important;
    }
}

/* ══════════════════════════════════════════════
   SECCIÓN NUESTRO EQUIPO
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    #nuestro-equipo .about-container {
        flex-direction: column !important;
        text-align: center;
        align-items: center;
    }

    #nuestro-equipo .about-image-wrapper {
        max-width: 260px;
    }
}

/* ══════════════════════════════════════════════
   TIPOGRAFÍA FLUIDA — Escala automática
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.3rem, 5vw, 2rem);
    }

    h3 {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    .section-description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    section {
        padding: 3.5rem 0;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: clamp(1.3rem, 8vw, 1.9rem);
    }

    h2 {
        font-size: clamp(1.15rem, 6vw, 1.6rem);
    }

    section {
        padding: 2.5rem 0;
    }

    .container {
        padding: 0 0.85rem;
    }
}

/* ══════════════════════════════════════════════
   TABLET HORIZONTAL / LAPTOP PEQUEÑA (1024px)
══════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .hero-title {
        font-size: 2.4rem !important;
    }

    .section-title {
        font-size: 1.8rem !important;
    }
}

/* ══════════════════════════════════════════════
   PANTALLAS GRANDES (1280px+)
══════════════════════════════════════════════ */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* ══════════════════════════════════════════════
   MEJORAS DE ACCESIBILIDAD TÁCTIL
   (targets mínimos de 44px para iOS/Android)
══════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .btn,
    .nav-link,
    .faq-question,
    button,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Evita zoom automático en iOS */
    }
}

/* ══════════════════════════════════════════════
   PREVENIR OVERFLOW HORIZONTAL
══════════════════════════════════════════════ */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}