/* Responsive Design */

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .about-content,
    .location-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .whatsapp-float {
        right: 20px;
    }
    
    .facebook-ad {
        width: 280px;
        right: 15px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        height: 100vh;
        padding: 0 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    .hero-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 2rem 1rem 8rem 1rem;
        z-index: 3;
        max-width: 100%;
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        max-width: 280px;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
        max-width: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .btn {
        width: 100%;
        max-width: 260px;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        text-align: center;
        display: inline-block;
        box-sizing: border-box;
    }
    
    .hero-stats {
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        transform: none;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        background: rgba(0, 0, 0, 0.8);
        padding: 0.8rem;
        border-radius: 6px;
        backdrop-filter: blur(10px);
        min-width: 120px;
        max-width: 130px;
    }
    
    .stat {
        text-align: center;
        padding: 0.3rem 0;
    }
    
    .stat h3 {
        font-size: 1.1rem;
        margin-bottom: 0.1rem;
        line-height: 1.1;
    }
    
    .stat h4 {
        font-size: 0.65rem;
        opacity: 0.9;
        margin: 0;
        line-height: 1.1;
        font-weight: 400;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .whatsapp-float {
        right: 15px;
        bottom: 20px;
        top: auto;
        transform: none;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    .facebook-ad {
        width: calc(100% - 30px);
        right: 15px;
        left: 15px;
        top: 15px;
    }


/* Small Mobile Styles */
@media (max-width: 480px) {
    .hero {
        padding: 0 10px;
    }
    
    .hero-content {
        padding: 0 10px;
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }
    
    .hero-buttons {
        gap: 0.8rem;
        margin-top: 1.5rem;
        max-width: 300px;
    }
    
    .btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        max-width: 260px;
    }
    
    .hero-stats {
        margin-top: 2rem;
        gap: 1rem;
        padding: 0 10px;
    }
    
    .stat h3 {
        font-size: 1.5rem;
    }
    
    .stat p {
        font-size: 0.85rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }
    
    .about-text h2 {
        font-size: 1.75rem;
    }
}

/* Extra Small Mobile Styles */
@media (max-width: 360px) {
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-title {
        font-size: 1.6rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-buttons {
        gap: 0.7rem;
        margin-top: 1.2rem;
        max-width: 280px;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        max-width: 240px;
        min-height: 44px; /* Mínimo para touch targets */
    }
    
    .hero-stats {
        margin-top: 1.5rem;
        gap: 0.8rem;
        padding: 0 5px;
    }
    
    .stat {
        padding: 0.8rem;
    }
    
    .stat h3 {
        font-size: 1.3rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
    
    .contact-form {
        padding: 1rem 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-stats {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-video video {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header,
    .whatsapp-float,
    .facebook-ad,
    .hero-video {
        display: none !important;
    }
    
    .hero {
        height: auto;
        background: var(--light-bg);
        color: var(--text-dark);
        padding: 2rem 0;
    }
    
    .hero-overlay {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-header h2 {
        font-size: 18pt;
        page-break-after: avoid;
    }
    
    .service-card,
    .gallery-item {
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-float a {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --white: #1f2937;
        --light-bg: #111827;
    }
    
    .header {
        background: rgba(31, 41, 55, 0.95);
    }
    
    .service-card,
    .contact-form,
    .contact-item {
        background: #374151;
        color: var(--text-dark);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #4b5563;
        border-color: #6b7280;
        color: var(--text-dark);
    }
    
    .facebook-ad {
        background: #374151;
        color: var(--text-dark);
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #000080;
        --accent-color: #ff8c00;
        --text-dark: #000000;
        --text-light: #333333;
    }
    
    .btn-primary {
        background: var(--primary-color);
        border: 2px solid var(--text-dark);
    }
    
    .btn-secondary {
        border: 3px solid var(--white);
    }
    
    .service-card,
    .contact-form {
        border: 2px solid var(--text-light);
    }
}