/* ============================================
   STAR RECICLAGEM - Media Queries
   Responsividade Mobile First
   ============================================ */

/* ========== TABLET (768px+) ========== */
@media (min-width: 768px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-8);
    }

    /* Seções */
    .section {
        padding: var(--spacing-20) 0;
    }

    .section__title {
        font-size: var(--text-5xl);
    }

    /* Header */
    .header {
        height: 80px;
    }

    .header__mobile-toggle {
        display: none;
    }

    .header__nav {
        display: flex;
    }

    .header__cta {
        display: block;
    }

    /* Hero */
    .hero__title {
        font-size: var(--text-5xl);
    }

    .hero__buttons {
        flex-direction: row;
    }

    /* Sobre - Grid de Valores */
    .sobre__values {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Serviços */
    .servicos__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Impacto */
    .impacto__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card__number {
        font-size: var(--text-6xl);
    }

    /* Diferenciais */
    .diferenciais__content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    /* Contato */
    .contato__grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer__content {
        grid-template-columns: 1fr 2fr;
        text-align: left;
    }

    .footer__brand {
        text-align: left;
    }

    .footer__logo {
        margin: 0 0 var(--spacing-4);
    }

    .footer__tagline {
        margin: 0;
    }

    .footer__links {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== DESKTOP (1024px+) ========== */
@media (min-width: 1024px) {
    /* Tipografia */
    .section__title {
        font-size: var(--text-5xl);
    }

    /* Header */
    .header__nav-list {
        gap: var(--spacing-10);
    }

    /* Hero */
    .hero__content {
        max-width: 600px;
    }

    .hero__title {
        font-size: var(--text-6xl);
    }

    .hero__description {
        font-size: var(--text-xl);
    }

    /* Sobre - Grid de Valores */
    .sobre__values {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Serviços */
    .servicos__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Processo - Timeline Horizontal */
    .processo__timeline {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: var(--spacing-4);
    }

    .processo__timeline::before {
        left: 0;
        right: 0;
        top: 24px;
        bottom: auto;
        width: auto;
        height: 3px;
        transform: none;
    }

    .process-step {
        flex-direction: column;
        text-align: center;
        flex: 1;
        gap: 0;
        align-items: center;
    }

    .process-step__number {
        margin: 0 auto var(--spacing-4);
    }

    .process-step__content {
        padding: var(--spacing-6);
        height: 100%;
        width: 100%;
    }

    .process-step__icon {
        margin: 0 auto var(--spacing-3);
    }

    /* Impacto */
    .impacto__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Depoimentos - Carousel Maior */
    .testimonial-card {
        padding: 0 var(--spacing-8);
    }

    .testimonial-card__content {
        padding: var(--spacing-10);
    }

    .testimonial-card__quote {
        font-size: var(--text-xl);
    }

    /* CTA Final */
    .cta-final__title {
        font-size: var(--text-5xl);
    }

    /* Contato */
    .contato__grid {
        grid-template-columns: 3fr 2fr;
        gap: var(--spacing-16);
    }

    .contato__form {
        padding: var(--spacing-10);
    }
}

/* ========== DESKTOP LARGE (1280px+) ========== */
@media (min-width: 1280px) {
    /* Container */
    .container {
        max-width: 1200px;
    }

    /* Hero com layout lado a lado */
    .hero__container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: var(--spacing-16);
    }

    .hero__content {
        max-width: none;
    }

    .hero__image {
        display: block;
    }

    /* Seções com mais espaçamento */
    .section {
        padding: var(--spacing-24) 0;
    }

    /* Cards maiores */
    .service-card {
        padding: var(--spacing-10);
    }

    .value-card {
        padding: var(--spacing-10);
    }
}

/* ========== DESKTOP EXTRA LARGE (1536px+) ========== */
@media (min-width: 1536px) {
    /* Container */
    .container {
        max-width: 1400px;
    }

    /* Hero */
    .hero__title {
        font-size: 4.5rem;
    }

    /* Tipografia maior */
    .section__title {
        font-size: var(--text-6xl);
    }
}

/* ========== AJUSTES MOBILE ESPECÍFICOS ========== */
@media (max-width: 767px) {
    /* Header Mobile */
    .header {
        height: 70px;
    }

    .header__logo {
        height: 40px;
    }

    /* Mobile Menu */
    .mobile-menu {
        top: calc(70px + env(safe-area-inset-top));
    }

    /* Hero Mobile */
    .hero {
        padding-top: calc(70px + env(safe-area-inset-top));
        text-align: center;
    }

    .hero__badge {
        margin: 0 auto var(--spacing-6);
    }

    .hero__seals {
        justify-content: center;
    }

    /* Processo Mobile - Layout: linha-numero-linha-card */
    .processo__timeline {
        padding: 0;
    }

    .process-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .process-step__number {
        align-self: center;
    }

    .process-step__content {
        width: 100%;
        margin: 0;
    }

    /* Depoimentos Mobile */
    .depoimentos__controls {
        flex-wrap: wrap;
    }

    /* CTA Final Mobile */
    .cta-final__title {
        font-size: var(--text-3xl);
    }

    /* Contato Mobile */
    .contato__social {
        justify-content: center;
    }

    /* Footer Mobile */
    .footer__content {
        text-align: center;
    }

    .footer__links {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }

    .footer__badges {
        flex-direction: column;
        align-items: center;
    }
}

/* ========== AJUSTES PARA TELAS PEQUENAS (< 375px) ========== */
@media (max-width: 374px) {
    /* Tipografia menor */
    .hero__title {
        font-size: var(--text-3xl);
    }

    .section__title {
        font-size: var(--text-3xl);
    }

    /* Botões empilhados */
    .hero__buttons {
        flex-direction: column;
    }

    .hero__buttons .btn {
        width: 100%;
    }

    /* Cards com menos padding */
    .service-card,
    .value-card {
        padding: var(--spacing-5);
    }

    /* Stats menores */
    .stat-card__number {
        font-size: var(--text-4xl);
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-16) 0;
    }
}

/* ========== HIGH DPI / RETINA ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ajustes para telas de alta densidade */
    .header {
        border-bottom: 0.5px solid transparent;
    }

    .header--scrolled {
        border-bottom-color: var(--cinza-medio);
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    /* Esconder elementos não essenciais */
    .header,
    .mobile-menu,
    .back-to-top,
    .depoimentos__controls,
    .hero__buttons .btn--secondary {
        display: none !important;
    }

    /* Remover backgrounds e cores */
    .hero,
    .impacto,
    .cta-final,
    .footer {
        background: white !important;
        color: black !important;
    }

    .hero *,
    .impacto *,
    .cta-final *,
    .footer * {
        color: black !important;
    }

    /* Mostrar URLs de links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    /* Quebras de página */
    .section {
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ========== FORCED COLORS MODE (Alta Acessibilidade) ========== */
@media (forced-colors: active) {
    .btn--primary,
    .btn--secondary {
        border: 2px solid currentColor;
    }

    .header--scrolled {
        border-bottom: 2px solid currentColor;
    }
}

/* ========== HOVER MEDIA QUERY ========== */
/* Desabilitar hover em dispositivos touch */
@media (hover: none) {
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }

    .service-card:hover,
    .value-card:hover {
        transform: none;
    }
}

/* ========== PREFERS CONTRAST ========== */
@media (prefers-contrast: high) {
    :root {
        --cinza-texto: #333333;
        --cinza-medio: #999999;
    }

    .btn--secondary {
        border-width: 3px;
    }
}
