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

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-content {
        gap: 80px;
    }

    .section {
        padding: 100px 0;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-content {
        gap: 40px;
    }

    .navbar-menu {
        gap: 30px;
    }
    .map-container{
        width: 100%;
        padding: 40px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {

    .navbar-menu,
    .navbar-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu.active {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            'text'
            'image';
        gap: 30px;
        text-align: center;
    }
   .hero-page .hero-subtitle { /* the element was p.hero-subtitle */
  margin: 0px auto 16px;
}

    .hero-text {
        justify-self: center;
    }

    .hero-image {
        justify-self: center;
        max-width: 420px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

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

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

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {

    html,
    body {
        overflow-x: hidden;
    }

    [data-aos] {
        transform: none !important;
    }

    .container {
        padding: 0 15px;
    }

    .grid>*,
    .grid-2>*,
    .grid-3>*,
    .grid-4>*,
    .project-grid>*,
    .contact-grid>*,
    .form-grid>*,
    .result-grid>*,
    .simulator-layout>*,
    .lead-container>* {
        min-width: 0;
    }

    .hero {
        min-height: 80vh;
        padding: 40px 0;
    }



    .hero-text h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-text .subtitle {
        font-size: 1.1rem;
        
    }

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

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }

    .navbar {
        padding: 10px 0;
    }

    .navbar-brand .logo {
        height: 40px;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
    }

    .card-content {
        padding: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* Mobile Small (320px - 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }

    .hero-text h1 {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }

    .hero-text .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 30px;
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h3 {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .card-content {
        padding: 15px;
    }

    .footer-top {
        padding: 40px 0 30px;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .mobile-menu-content {
        padding: 20px 15px;
    }

    .mobile-nav-link {
        font-size: 1rem;
        padding: 8px 0;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Mobile Extra Small (até 320px) */
@media (max-width: 320px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        padding: 15px;
    }

    .stat-item h3 {
        font-size: 1.5rem;
    }

    .stat-item p {
        font-size: 0.8rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .whatsapp-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .back-to-top {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

/* ===== ORIENTAÇÃO LANDSCAPE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 20px 0;
    }

    .hero-content {
        gap: 20px;
    }

    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero-text .subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .hero-cta {
        gap: 10px;
    }

    .section {
        padding: 30px 0;
    }
}

/* ===== ANIMAÇÕES RESPONSIVAS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .whatsapp-btn {
        animation: none;
    }
}

/* ===== HOVER STATES PARA TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {

    .btn:hover,
    .card:hover,
    .nav-link:hover,
    .social-link:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.95);
    }

    .card:active {
        transform: translateY(-2px);
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .header,
    .footer,
    .whatsapp-float,
    .back-to-top,
    .mobile-menu {
        display: none !important;
    }

    .main-content {
        margin-top: 0;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
        background: white !important;
        color: black !important;
    }

    .section {
        padding: 20px 0;
        break-inside: avoid;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        border: 1px solid #ddd;
        background: white !important;
        color: black !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .form-input,
    .form-select,
    .form-textarea {
        border-width: 2px;
    }

    .card {
        border: 1px solid var(--medium-gray);
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(24, 50, 64, 0.95);
    }

    .nav-link {
        color: var(--white);
    }

    .mobile-menu {
        background: var(--primary-color);
        color: var(--white);
    }

    .mobile-nav-link {
        color: var(--white);
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    .card {
        background: var(--primary-color);
        color: var(--white);
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: var(--primary-color);
        color: var(--white);
        border-color: rgba(255, 255, 255, 0.2);
    }
}