/* Responsive Design */

/* Tablets e dispositivos médios */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-features {
        gap: 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Smartphones e dispositivos pequenos */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Header Mobile */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        top: 100%;
    }
    
    .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 Mobile */
    .hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Services Mobile */
    .services {
        padding: 3rem 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* About Mobile */
    .about {
        padding: 3rem 0;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .image-placeholder {
        width: 250px;
        height: 250px;
    }
    
    /* Contact Mobile */
    .contact {
        padding: 3rem 0;
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .form {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Portfolio/Gallery Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .portfolio {
        padding: 3rem 0;
    }
    
    .portfolio-info {
        padding: 1.25rem;
    }
    
    .portfolio-info h3 {
        font-size: 1.1rem;
    }
    
    .portfolio-info p {
        font-size: 0.9rem;
    }
    
    .portfolio-overlay i {
        font-size: 2.5rem;
    }
    
    .portfolio-cta {
        padding: 1.5rem;
    }
    
    .portfolio-cta p {
        font-size: 1rem;
    }
    
    /* Floating Review Widget Mobile */
    .floating-review-widget {
        width: calc(100% - 2rem);
        right: 1rem;
        bottom: 80px;
    }
    
    /* Testimonial Filters Mobile */
    .testimonial-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Rating Stats Mobile */
    .rating-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-item {
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-text {
        font-size: 0.75rem !important;
    }
    
    /* Quality Badge Mobile */
    .quality-badge {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }
    
    .badge-item {
        font-size: 0.75rem !important;
    }
    
    .badge-item i {
        font-size: 1rem !important;
    }
    
    /* WhatsApp Float Button Mobile */
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float i {
        font-size: 1.25rem;
    }
}

/* Dispositivos muito pequenos */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .form {
        padding: 1.25rem;
    }
    
    .about-features .feature-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .contact-item {
        padding: 0 0.5rem;
    }
    
    .btn {
        max-width: 100%;
    }
    
    /* Portfolio ajustes para telas muito pequenas */
    .portfolio-info {
        padding: 1rem;
    }
    
    .portfolio-info h3 {
        font-size: 1rem;
    }
    
    .portfolio-info p {
        font-size: 0.85rem;
    }
    
    .portfolio-overlay i {
        font-size: 2rem;
    }
}

/* Tablets em modo paisagem */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Ajustes para dispositivos com altura reduzida */
@media (max-height: 600px) {
    .hero {
        min-height: auto;
        padding: 6rem 0 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Ajustes para impressão */
@media print {
    .header,
    .whatsapp-float,
    .hero-buttons {
        display: none;
    }
    
    .hero {
        background: white;
        color: black;
        padding: 2rem 0;
    }
    
    .services {
        background: white;
    }
    
    .service-card {
        break-inside: avoid;
    }
}

/* Ajustes para dispositivos com preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Ajustes para modo escuro (se o navegador suportar) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --border-color: #374151;
    }
    
    .service-card,
    .form {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
    .contact-item h4,
    .footer-section h4 {
        color: var(--text-primary);
    }
}

/* Ajustes de foco para acessibilidade */
@media (max-width: 768px) {
    .nav-link:focus,
    .btn:focus,
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .service-card:focus-within {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Animações suaves para elementos visíveis */
@media (min-width: 769px) {
    .service-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }
    .service-card:nth-child(4) { animation-delay: 0.4s; }
    .service-card:nth-child(5) { animation-delay: 0.5s; }
    .service-card:nth-child(6) { animation-delay: 0.6s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes para garantir que o botão do WhatsApp não cubra conteúdo importante */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* Espaço para o botão flutuante */
    }
    
    .footer {
        margin-bottom: 60px; /* Evita que o botão cubra o footer */
    }
}

/* Melhorias de legibilidade em telas pequenas */
@media (max-width: 480px) {
    .service-list li {
        font-size: 0.85rem;
    }
    
    .contact-item p,
    .contact-item small {
        font-size: 0.85rem;
    }
    
    .about-features p {
        font-size: 0.85rem;
    }
    
    /* Melhorias nas avaliações - Mobile */
    .rating-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-number.highlight {
        font-size: 2.2rem;
    }
    
    .verified-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        margin-left: 0;
        margin-top: 0.5rem;
        display: block;
        text-align: center;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .testimonial-card::before {
        font-size: 3.5rem;
        top: -2px;
        left: 15px;
    }
    
    .testimonial-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
}
}

/* Ajustes para garantir que o formulário funcione bem em todos os dispositivos */
@media (max-width: 768px) {
    .form-group select {
        font-size: 16px; /* Previne zoom em iOS */
    }
    
    .form-group input[type="tel"] {
        font-size: 16px;
    }
}

/* Otimizações para performance em dispositivos móveis */
@media (max-width: 768px) {
    .service-card,
    .form {
        will-change: transform;
        transform: translateZ(0); /* Força aceleração por hardware */
    }
}