/* ===== RESPONSIVE DESIGN ===== */

/* ===== LARGE SCREENS (1200px+) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ===== MEDIUM SCREENS (768px - 1199px) ===== */
@media (max-width: 1199px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .areas-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .content-wrapper {
        grid-template-columns: 200px 1fr;
        gap: var(--spacing-xl);
    }
    
    .orcamento-content {
        gap: var(--spacing-xl);
    }
}

/* ===== TABLET LANDSCAPE (992px - 1199px) ===== */
@media (max-width: 1199px) and (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .sobre-content {
        gap: var(--spacing-xl);
    }
    
    .diferenciais-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLET PORTRAIT (768px - 991px) ===== */
@media (max-width: 991px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        gap: var(--spacing-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .sobre-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .sobre-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    .areas-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .diferenciais-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .orcamento-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .orcamento-info {
        order: 2;
    }
    
    .orcamento-form-container {
        order: 1;
    }
    
    .contato-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .content-sidebar {
        position: static;
        order: 2;
    }
    
    .content-main {
        order: 1;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== MOBILE LANDSCAPE (576px - 767px) ===== */
@media (max-width: 767px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .hero {
        min-height: 80vh;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-xl);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .page-header {
        padding: calc(70px + var(--spacing-lg)) 0 var(--spacing-lg);
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .sobre-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-item {
        padding: var(--spacing-md);
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .area-card {
        padding: var(--spacing-lg);
    }
    
    .diferenciais-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .diferencial-item {
        padding: var(--spacing-lg);
    }
    
    .diferencial-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
    
    .info-steps {
        margin: var(--spacing-lg) 0;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .step-number {
        align-self: center;
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .info-icon {
        align-self: center;
    }
    
    .mapa-placeholder {
        padding: var(--spacing-xl);
    }
    
    .mapa-placeholder i {
        font-size: 2rem;
    }
    
    .content-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }
    
    .content-nav a {
        font-size: 0.75rem;
        padding: var(--spacing-xs);
        text-align: center;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-sm);
    }
    
    .legal-text h2 {
        font-size: 1.5rem;
    }
    
    .legal-text h3 {
        font-size: 1.25rem;
    }
    
    .contact-box {
        padding: var(--spacing-md);
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

/* ===== MOBILE PORTRAIT (320px - 575px) ===== */
@media (max-width: 575px) {
    :root {
        --spacing-3xl: 2rem;
        --spacing-2xl: 1.5rem;
        --spacing-xl: 1.25rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .navbar {
        padding: var(--spacing-sm) 0;
    }
    
    .nav-brand .logo {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        gap: var(--spacing-md);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .page-header-content h1 {
        font-size: 1.75rem;
    }
    
    .page-header-content p {
        font-size: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    .area-card,
    .diferencial-item,
    .info-card,
    .orcamento-info,
    .orcamento-form-container,
    .contato-form-container {
        padding: var(--spacing-md);
    }
    
    .area-icon,
    .diferencial-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-item h4 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .checkbox-label {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .step {
        margin-bottom: var(--spacing-md);
    }
    
    .step-content h3 {
        font-size: 1rem;
    }
    
    .step-content p {
        font-size: 0.85rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .info-content h3 {
        font-size: 1rem;
    }
    
    .info-content p {
        font-size: 0.85rem;
    }
    
    .legal-text {
        font-size: 0.9rem;
    }
    
    .legal-text h2 {
        font-size: 1.25rem;
    }
    
    .legal-text h3 {
        font-size: 1.125rem;
    }
    
    .legal-text ul {
        padding-left: var(--spacing-lg);
    }
    
    .content-nav {
        grid-template-columns: 1fr;
    }
    
    .content-nav a {
        font-size: 0.8rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section {
        font-size: 0.85rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .cnpj-info {
        font-size: 0.75rem;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 0.9rem;
    }
    
    .last-update {
        font-size: 0.75rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .contact-box {
        padding: var(--spacing-sm);
    }
    
    .contact-box h3,
    .contact-box h4 {
        font-size: 1rem;
    }
    
    .mapa-placeholder {
        padding: var(--spacing-lg);
    }
    
    .mapa-placeholder p {
        font-size: 0.85rem;
    }
}

/* ===== VERY SMALL SCREENS (< 320px) ===== */
@media (max-width: 319px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.85rem;
    }
    
    .area-card,
    .diferencial-item,
    .info-card {
        padding: var(--spacing-sm);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-xs);
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        gap: var(--spacing-md);
    }
    
    .hero-scroll {
        display: none;
    }
    
    .page-header {
        padding: calc(60px + var(--spacing-md)) 0 var(--spacing-md);
    }
}

/* ===== HIGH DPI SCREENS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-placeholder,
    .area-icon,
    .diferencial-icon,
    .info-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-scroll a {
        animation: none;
    }
    
    .btn::before {
        display: none;
    }
    
    .loading::after {
        animation: none;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Implementação futura para modo escuro */
    /* Por enquanto mantemos o tema claro para consistência profissional */
}

/* ===== PRINT RESPONSIVE ===== */
@media print {
    .container {
        padding: 0;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20pt;
    }
    
    .areas-grid,
    .diferenciais-grid {
        grid-template-columns: 1fr;
        gap: 10pt;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20pt;
    }
    
    .legal-text {
        font-size: 10pt;
        line-height: 1.4;
    }
    
    .legal-text h2 {
        font-size: 14pt;
        margin-top: 20pt;
    }
    
    .legal-text h3 {
        font-size: 12pt;
        margin-top: 15pt;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (max-width: 767px) {
    /* Aumentar área de toque em dispositivos móveis */
    .btn,
    .nav-link,
    .area-link,
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .checkbox-label {
        min-height: 44px;
        align-items: center;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
}

/* ===== HOVER STATES FOR TOUCH DEVICES ===== */
@media (hover: none) {
    .btn:hover,
    .area-card:hover,
    .diferencial-item:hover,
    .info-card:hover,
    .stat-item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    .area-link:hover {
        transform: none;
    }
}

/* ===== FOCUS IMPROVEMENTS FOR MOBILE ===== */
@media (max-width: 767px) {
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    a:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 3px;
    }
}

/* ===== CONTAINER QUERIES (Future Enhancement) ===== */
/* Quando suportado pelos navegadores, permitirá layouts mais flexíveis */
/*
@container (max-width: 400px) {
    .area-card {
        padding: var(--spacing-md);
    }
}
*/
