/* ============================================================
   JustDevices — Responsive
   Breakpoints: 1024 (laptop), 768 (tablet), 480 (mobile)
   ============================================================ */

/* ---------- LAPTOP / SMALL DESKTOP ---------- */
@media (max-width: 1024px) {
    .services-grid,
    .seo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-grid:not([data-view="list"]) {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-10);
    }
}

/* ---------- TABLET ---------- */
@media (max-width: 768px) {
    :root {
        --header-h: 64px;
        --header-h-scrolled: 56px;
    }

    section {
        padding: var(--s-16) 0;
    }

    .container {
        padding: 0 var(--s-4);
    }

    /* ----- HEADER ----- */
    .nav-primary {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--c-bg);
        height: calc(100vh - var(--header-h));
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--s-8) var(--s-6);
        transform: translateX(100%);
        transition: transform var(--t-slow);
        box-shadow: var(--shadow-lg);
    }

    .nav-primary.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: var(--s-6);
        width: 100%;
    }

    .nav-link {
        font-size: var(--fs-xl);
        font-family: var(--f-display);
        font-weight: 500;
    }

    .menu-toggle {
        display: flex;
    }

    .btn-cta {
        display: none;
    }

    .lang-switch {
        font-size: var(--fs-xs);
    }

    /* ----- HERO ----- */
    .hero {
        min-height: 90vh;
        padding-top: calc(var(--header-h) + var(--s-8));
    }

    .hero-title {
        font-size: clamp(2.25rem, 9vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: var(--fs-lg);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--s-3);
        margin-bottom: var(--s-10);
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-scroll {
        display: none;
    }

    /* ----- SECTION TITLES ----- */
    .section-title {
        font-size: var(--fs-4xl);
    }

    .section-lead {
        font-size: var(--fs-md);
    }

    /* ----- GRIDS ----- */
    .services-grid,
    .seo-grid {
        grid-template-columns: 1fr;
        gap: var(--s-4);
    }

    .catalog-grid:not([data-view="list"]) {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--s-6);
    }

    /* En móvil/tablet quitamos el offset asimétrico para mejor UX */
    .project-card:nth-child(even) {
        margin-top: 0;
    }

    /* Slider de testimonios: 1 visible en móvil */
    .testimonial {
        flex: 0 0 100%;
        padding: var(--s-6);
    }

    .slider-controls {
        gap: var(--s-4);
        margin-top: var(--s-8);
    }

    .slider-btn {
        width: 42px;
        height: 42px;
    }

    /* ----- SEO ----- */
    .seo-stat {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--s-6);
        text-align: left;
    }

    /* ----- PROCESS ----- */
    .process-line-bg,
    .process-line-fg {
        left: 24px;
    }

    .process-step {
        padding-left: var(--s-16);
    }

    .process-num {
        width: 48px;
        height: 48px;
        font-size: var(--fs-sm);
    }

    /* ----- PROJECTS ----- */
    .project-body {
        padding: var(--s-6);
    }

    .project-name {
        font-size: var(--fs-2xl);
    }

    /* ----- TECH MARQUEE ----- */
    .marquee-item {
        font-size: var(--fs-2xl);
    }

    .marquee-track {
        gap: var(--s-8);
    }

    /* ----- CONTACT ----- */
    .contact-wrap {
        grid-template-columns: 1fr;
        gap: var(--s-6);
    }

    .contact-form,
    .contact-aside {
        padding: var(--s-6);
    }

    /* ----- FOOTER ----- */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--s-8);
        text-align: left;
    }

    /* ----- COOKIE BANNER ----- */
    .cookie-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-actions {
        justify-content: center;
    }
}

/* ---------- SMALL MOBILE ---------- */
@media (max-width: 480px) {
    .hero-eyebrow {
        font-size: var(--fs-xs);
        padding: 0.4rem 0.75rem;
    }

    .catalog-grid:not([data-view="list"]) {
        grid-template-columns: 1fr;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        right: var(--s-4);
        bottom: var(--s-4);
    }

    .whatsapp-tooltip {
        display: none;
    }

    .cookie-banner {
        left: var(--s-3);
        right: var(--s-3);
        bottom: var(--s-3);
    }
}

/* ---------- LARGE DESKTOPS — protect against giant viewport ---------- */
@media (min-width: 1400px) {
    .hero-title {
        font-size: 5.5rem;
    }
}
