/* ==========================================================================
   OpenHaft — Responsive: All width-based media queries
   ========================================================================== */

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .site-header, .site-main, .site-footer { animation: none; }
    .mobile-menu__item { opacity: 1; transform: none; transition: none; }
    .mobile-navigation__contact, .mobile-navigation__social { opacity: 1; transform: none; transition: none; }
    .shimmer-gold::after { animation: none; display: none; }
    [data-animate] { opacity: 1; transform: none; transition: none; }
    .grid-animate { opacity: 1; transform: none; transition: none; }
}

/* --- Header account label (768px) --- */
@media (max-width: 768px) {
    .header-actions__account-label {
        display: none;
    }
    .header-actions__account {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* --- DTF Metrażowy Teaser (768px) --- */
@media (max-width: 768px) {
    .dtfm-teaser__content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Tablet landscape (992px) --- */
@media (max-width: 992px) {
    .content-area.has-sidebar { grid-template-columns: 1fr; }
    .footer-main__grid { grid-template-columns: repeat(2, 1fr); }

    .main-navigation { display: none; }
    .menu-toggle { display: flex; }

    .header-main__inner { gap: 1rem; }
    .mega-menu__categories { grid-template-columns: repeat(3, 1fr); }
    .mega-menu__methods { grid-template-columns: repeat(2, 1fr); }
    .site-logo__name { font-size: 1.3rem; }

    .hero { min-height: 460px; max-height: 80vh; }

    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

    .process-steps { gap: 0.5rem; }
    .process-step__icon { width: 64px; height: 64px; }
    .process-step__icon svg { width: 24px; height: 24px; }
    .process-line { top: 55px; }

    .methods-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }

    .section-header__title { font-size: 2.2rem; }

    .cta-section__inner { max-width: 100%; }
}

/* --- Tablet portrait (768px) --- */
@media (max-width: 768px) {
    .top-bar__inner { justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
    .top-bar__messages { display: none; }
    .top-bar__right .top-bar__separator--desktop { display: none; }
    .top-bar__link--email { display: none; }

    .site-logo__tagline { display: none; }

    .hero { min-height: 440px; max-height: 80vh; }
    .hero__subtitle { font-size: 1rem; }

    /* Section padding for mobile */
    .categories-section,
    .sitodruk-section,
    .methods-section,
    .testimonials-section,
    .brands-section,
    .blog-section,
    .cta-section,
    .contact-section,
    .process-section,
    .clients-section { padding: var(--space-xl) 0; }

    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .methods-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }

    /* Process steps: vertical timeline on mobile */
    .process-steps {
        flex-direction: column;
        gap: 0;
        padding-left: 56px;
    }
    .process-step {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 1.25rem;
        padding-bottom: 2.5rem;
    }
    .process-step:last-child { padding-bottom: 0; }
    .process-step__number {
        position: absolute;
        left: -56px;
        top: 0;
        width: 24px;
        text-align: center;
        font-size: 0.65rem;
    }
    .process-step__icon {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .process-step__icon svg { width: 20px; height: 20px; }
    .process-step__desc { max-width: none; }
    .process-line {
        top: 24px;
        bottom: 24px;
        left: -32px;
        right: auto;
        width: 2px;
        height: auto;
    }
    .process-line__fill {
        transform: scaleY(0);
        transform-origin: top;
    }
    .process-line.is-visible .process-line__fill {
        transform: scaleY(1);
    }

    .section-header { margin-bottom: 3rem; }
    .section-header__title { font-size: 2rem; }

    .footer-main__grid { grid-template-columns: 1fr; }
    .footer-main__col--brand { text-align: center; }
    .footer-main__social { justify-content: center; }
    .footer-bottom__inner { flex-direction: column; text-align: center; }

    /* Collapsible footer columns */
    .footer-main__heading {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
    }
    .footer-main__heading::after {
        content: '+';
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1;
        color: var(--gold-400);
        transition: transform 0.3s ease;
    }
    .footer-main__col.is-open .footer-main__heading::after {
        content: '\2212';
    }
    .footer-main__links,
    .footer-main__col > .footer-main__contact {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    .footer-main__col.is-open .footer-main__links,
    .footer-main__col.is-open .footer-main__contact {
        max-height: 500px;
    }
    /* Brand column stays open */
    .footer-main__col--brand .footer-main__links,
    .footer-main__col--brand .footer-main__contact {
        max-height: none;
        overflow: visible;
    }

    .posts-grid { grid-template-columns: 1fr; }
    .entry-title { font-size: 1.6rem; }
    .error-404__title { font-size: 5rem; }

    .contact-form__row { grid-template-columns: 1fr; }
    .testimonials-track { min-height: 340px; }
    .testimonial-card { padding: 2rem; }
}

/* --- Mobile (480px) --- */
@media (max-width: 480px) {
    :root { --container-padding: 1rem; }

    .hero { min-height: 400px; max-height: 75vh; }
    .hero__badge { font-size: 0.65rem; letter-spacing: 0.15em; }
    .hero__actions { flex-direction: column; align-items: center; }
    .hero__scroll-indicator { display: none; }
    .cta-section__actions { flex-direction: column; align-items: center; }

    .btn { padding: 0.75rem 1.5rem; font-size: 0.85rem; }
    .btn--lg { padding: 0.85rem 1.75rem; font-size: 0.9rem; }

    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card__name { font-size: 16px; }
    .category-card__content { padding: 16px; }

    .sitodruk-table { font-size: 0.85rem; }

    .testimonial-card { padding: 1.5rem; }
    .testimonials-track { min-height: 380px; }

    .section-header__title { font-size: 1.6rem; }
    .section-header { margin-bottom: 2.5rem; }

    .contact-form__field label { font-size: 0.85rem; }

    /* Developer credit mobile */
    .developer-credit {
        padding: 14px 16px;
    }
    .developer-credit .credit-name {
        font-size: 14px;
    }
    .developer-credit .credit-label,
    .developer-credit .credit-role {
        font-size: 12px;
    }
}
