/* Responsive Design - Mobile First Approach */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

/* Tablet Large */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--text-white);
        box-shadow: 0 5px 15px var(--shadow-medium);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-item {
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hide WhatsApp button on mobile */
    .nav-contact {
        display: none;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-item {
        align-items: center;
        text-align: left;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    /* Office Showcase */
    .showcase-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .showcase-item.reverse {
        direction: ltr;
    }
    
    .showcase-text {
        order: 2;
    }
    
    .showcase-image {
        order: 1;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

/* Tablet */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-logo img {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .whatsapp-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .whatsapp-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Cards */
    .service-card,
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    /* Hero features */
    .hero-features {
        gap: 0.75rem;
    }
    
    .feature {
        font-size: 0.9rem;
    }
    
    /* Office Showcase */
    .showcase-content {
        gap: 3rem;
    }
    
    .showcase-item {
        padding: 1.5rem 0;
    }
    
    .showcase-text h3 {
        font-size: 1.5rem;
    }
    
    .showcase-text p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
    }
}

/* Mobile Large */
@media (max-width: 575px) {
    .container {
        padding: 0 8px;
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 12px;
    }
    
    
    .whatsapp-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    /* Hero */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    /* Services and Features */
    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .service-card,
    .feature-card {
        padding: 1.25rem;
    }
    
    /* Office Showcase */
    .showcase-content {
        gap: 2.5rem;
    }
    
    .showcase-item {
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }
    
    .contact-icon {
        align-self: flex-start;
    }
    
    /* Form */
    .form-group input,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Small */
@media (max-width: 375px) {
    .container {
        padding: 0 5px;
    }
    
    /* Typography */
    .hero-title {
        font-size: 1.7rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 5px;
    }
    
    .nav-logo img {
        width: 75px;
        height: 75px;
    }
    
    .whatsapp-btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    /* Cards */
    .service-card,
    .feature-card,
    .contact-form-container {
        padding: 1rem;
    }
    
    .service-icon,
    .feature-card .feature-icon {
        font-size: 2rem;
    }
    
    /* Office Showcase */
    .showcase-content {
        gap: 2rem;
    }
    
    .showcase-text h3 {
        font-size: 1.3rem;
    }
    
    .showcase-text p {
        font-size: 0.95rem;
    }
    
    .showcase-features span {
        font-size: 0.9rem;
    }
    
    /* Floating buttons */
    .phone-float {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 75px;
        right: 20px;
        font-size: 1rem;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 130px;
        right: 20px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    /* Optimize images and icons for retina displays */
    .nav-logo img,
    .footer-logo img,
    .hero-image img,
    .about-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 24px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .whatsapp-btn {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .service-card:hover,
    .showcase-image:hover,
    .nav-link:hover,
    .phone-float:hover,
    .whatsapp-float:hover,
    .scroll-top:hover {
        transform: none;
    }
    
    /* Optimize form inputs for mobile */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: var(--border-radius);
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }
    
    .hero-container {
        gap: 1.5rem;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
}

/* Dark mode support (if system prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-container,
    .about-content,
    .service-card,
    .showcase-image,
    .btn,
    .phone-float,
    .whatsapp-float,
    .scroll-top {
        transition: none;
    }
    
    .service-card:hover,
    .showcase-image:hover,
    .btn:hover,
    .phone-float:hover,
    .whatsapp-float:hover,
    .scroll-top:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: var(--text-dark);
        border: 2px solid var(--text-white);
    }
    
    .btn-secondary {
        background: var(--text-white);
        color: var(--text-dark);
        border: 2px solid var(--text-dark);
    }
}