/* ===================================
   Responsive Design
   Mobile-First Approach
   =================================== */

/* Tablet (768px and below) */
@media screen and (max-width: 768px) {
    
    /* Typography */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Language Switcher */
    .language-switcher {
        top: 10px;
        right: 10px;
        flex-wrap: wrap;
        max-width: calc(100% - 20px);
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Navigation */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: var(--white);
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        z-index: 998;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
    }
    
    .nav-list li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-sm) 0;
    }
    
    .nav-contact {
        display: none;
    }
    
    /* Hamburger Animation */
    .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 Section */
    .hero {
        height: 90vh;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-badge {
        bottom: 15px;
        right: 15px;
        padding: 15px;
    }
    
    .badge-number {
        font-size: 2rem;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats Section */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Gallery Section */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Spacing Adjustments */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-md);
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Language Switcher */
    .lang-btn .lang-code {
        display: none;
    }
    
    .lang-btn {
        padding: 8px;
    }
    
    /* Logo */
    .logo h1 {
        font-size: 1.2rem;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    /* Service Cards */
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-suffix {
        font-size: 1.5rem;
    }
    
    /* Contact Items */
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Form */
    .form-group input,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Large Tablets and Small Laptops (1024px and below) */
@media screen and (max-width: 1024px) {
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra Small Devices (320px and below) */
@media screen and (max-width: 320px) {
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Landscape Orientation for Phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    
    /* Larger touch targets */
    .btn,
    .nav-link,
    .lang-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Disable hover effects on touch devices */
    .service-card:hover,
    .gallery-item:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Replace hover with active state */
    .btn:active {
        transform: scale(0.95);
    }
}

/* Print Styles */
@media print {
    
    .header,
    .language-switcher,
    .whatsapp-float,
    .hero-scroll,
    .contact-form {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero {
        height: auto;
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    
    /* Sharper images and icons */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax {
        background-attachment: scroll;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    
    /* Keep light theme for now, but structure is ready */
    /* Uncomment to enable dark mode */
    
    /*
    :root {
        --primary-color: #ffffff;
        --text-dark: #ffffff;
        --text-light: #b0b0b0;
        --light-bg: #1e1e1e;
        --white: #2c2c2c;
        --border-color: #404040;
    }
    
    body {
        background: #121212;
        color: var(--text-dark);
    }
    */
}

/* iPad Specific */
@media only screen 
    and (min-device-width: 768px) 
    and (max-device-width: 1024px) 
    and (-webkit-min-device-pixel-ratio: 2) {
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPhone X and newer notch support */
@supports (padding: max(0px)) {
    
    .header {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .whatsapp-float {
        bottom: max(20px, env(safe-area-inset-bottom));
        right: max(20px, env(safe-area-inset-right));
    }
}
