/* ===========================================================
   Mega Adubos - Estilos Responsivos Otimizados
   =========================================================== */

/* Definições de variáveis globais (independentes de viewport) */
:root {
    --transition-normal: 0.3s ease;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Cores */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-200: #e5e7eb;
    
    /* Espaçamentos base */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Base mobile-first */
:root {
    --container-max-width: 100%;
    --container-padding: 1rem;
    --header-height: 70px;
}

/* Utilitários gerais responsivos */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    margin: 0 auto;
}

/* =============== MEDIA QUERIES CRESCENTES =============== */

/* Dispositivos Móveis Pequenos (base - até 575px) */
@media (max-width: 575px) {
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero {
        padding-top: calc(var(--header-height) + var(--spacing-xl));
    }
    
    .hero__title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero__badge {
        right: 0;
        bottom: -10px;
        font-size: 0.75rem;
        padding: 0.75rem;
        max-width: 200px;
        transform: translateY(50%);
    }
    
    .hero__badge-icon {
        font-size: 1.25rem;
    }
    
    .hero__actions {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-md);
    }
    
    .hero__actions .btn {
        width: 100%;
    }
    
    .section__title {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .section__description {
        font-size: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .btn--lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .about__experience {
        right: 0;
        bottom: 0;
        width: 110px;
        height: 110px;
    }
    
    .about__experience-number {
        font-size: 2.5rem;
    }
    
    .stats__grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    .cta__title {
        font-size: 1.5rem;
    }
    
    .cta__text {
        font-size: 1rem;
    }
    
    .footer__bottom {
        gap: var(--spacing-md);
    }
    
    /* Botões flutuantes */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .whatsapp-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .whatsapp-btn__tooltip {
        display: none;
    }
    
    .cookie-consent {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: calc(100% - 2rem);
        padding: var(--spacing-md);
    }
    
    .cookie-consent__actions {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
}

/* Dispositivos Móveis (576px a 767px) */
@media (min-width: 576px) {
    :root {
        --container-max-width: 540px;
        --container-padding: 1rem;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .hero__title {
        font-size: 2.25rem;
    }
    
    .hero__badge {
        max-width: 220px;
        font-size: 0.8rem;
    }
    
    .hero__actions {
        flex-direction: row;
        gap: var(--spacing-md);
    }
    
    .cookie-consent {
        padding: var(--spacing-lg);
    }
}

/* Tablets e laptops pequenos (768px a 991px) */
@media (min-width: 768px) {
    :root {
        --container-max-width: 720px;
        --container-padding: 1.5rem;
    }
    
    .section__title {
        font-size: 2.25rem;
    }
    
    .section__description {
        font-size: 1.125rem;
    }
    
    /* Stats */
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .stat-item {
        border-bottom: none;
    }
    
    /* Serviços e benefícios */
    .services__grid,
    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    /* Contato */
    .contact__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .form__row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Footer */
    .footer__nav {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    /* Botões flutuantes */
    .back-to-top {
        bottom: 30px;
        right: 30px;
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-btn {
        bottom: 30px;
        left: 30px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .whatsapp-btn__tooltip {
        display: block;
    }
}

/* Laptops e desktops (992px a 1199px) */
@media (min-width: 992px) {
    :root {
        --container-max-width: 960px;
        --header-height: 80px;
    }
    
    .hero__title {
        font-size: 3rem;
    }
    
    .hero__subtitle {
        font-size: 1.25rem;
    }
    
    /* Navigation */
    .nav__toggle {
        display: none;
    }
    
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .nav__list {
        flex-direction: row;
        align-items: center;
    }
    
    .nav__item {
        margin: 0 1rem;
    }
    
    .nav__link {
        padding: 0;
        border-bottom: none;
    }
    
    .nav__item--mobile {
        display: none;
    }
    
    .nav__action {
        display: flex;
    }
    
    /* Hero Section */
    .hero__wrapper {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-2xl);
    }
    
    .hero__content, 
    .hero__visual {
        width: 50%;
        text-align: left;
    }
    
    .hero__actions {
        justify-content: flex-start;
    }
    
    /* About Section */
    .about {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-2xl);
    }
    
    .about__image, 
    .about__content {
        width: 50%;
    }
    
    /* Stats */
    .stats__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Footer */
    .footer__top {
        grid-template-columns: 1fr 2fr;
        gap: var(--spacing-2xl);
    }
    
    .footer__nav {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer__nav-col {
        border-bottom: none;
    }
    
    /* Contato */
    .contact__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Grandes desktops e telas maiores (1200px e acima) */
@media (min-width: 1200px) {
    :root {
        --container-max-width: 1140px;
        --container-padding: 2rem;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .hero__subtitle {
        font-size: 1.375rem;
    }
    
    .section__title {
        font-size: 2.75rem;
    }
    
    .section__description {
        font-size: 1.25rem;
    }
    
    .about__experience {
        width: 140px;
        height: 140px;
    }
    
    .about__experience-number {
        font-size: 3rem;
    }
}

/* Telas muito grandes (1400px e acima) */
@media (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }
    
    .hero__title {
        font-size: 4rem;
    }
    
    .section__title {
        font-size: 3rem;
    }
    
    .hero__badge {
        max-width: 260px;
        padding: 1.25rem;
        font-size: 0.95rem;
    }
}

/* =============== SUPORTE A DISPOSITIVOS ESPECIAIS =============== */

/* Altura reduzida (telefones em modo paisagem) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 2rem) 0 2rem;
    }
    
    .nav__menu {
        padding-top: 4rem;
        overflow-y: auto;
    }
}

/* Suporte para dispositivos com dark mode */
@media (prefers-color-scheme: dark) {
    .cookie-consent {
        background-color: #222;
        color: #fff;
    }
}

/* Suporte para preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* =============== UTILITÁRIOS GLOBAIS PARA COMPORTAMENTO RESPONSIVO =============== */

/* Visibilidade responsiva */
.hide-on-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-on-mobile {
        display: block;
    }
    
    .hide-on-desktop {
        display: none;
    }
}

/* Ajustes de imagem responsiva */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Ajustes para vídeos incorporados responsivos */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Proporção 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}