/* =========================================================
   ULTIMATE RESPONSIVE DESIGN SYSTEM
   Compatible with ALL devices and operating systems:
   - iPhone (all models including Pro Max, Mini, SE)
   - Android phones (Samsung, Google Pixel, OnePlus, etc.)
   - iPads (all sizes)
   - Android tablets
   - MacBooks (Air, Pro 13", 14", 15", 16")
   - Windows laptops (all resolutions)
   - Desktop monitors (HD, FHD, QHD, 4K, Ultrawide)
   ========================================================= */

/* =====================
   CRITICAL BASE SETUP
   ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    overflow-x: hidden;
}

/* Prevent horizontal scroll on all devices */
body {
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    min-height: 100vh;
}

/* =====================
   CONTAINER SYSTEM
   ===================== */
.container,
.nav-container,
section > .container,
.section-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* =====================
   TYPOGRAPHY SCALING
   ===================== */
/* Base typography that scales smoothly */
h1, .hero-title {
    font-size: clamp(1.75rem, 5vw + 1rem, 4rem);
    line-height: 1.1;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

h2, .section-title {
    font-size: clamp(1.5rem, 4vw + 0.5rem, 3rem);
    line-height: 1.2;
    margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.3;
    margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.4;
}

p {
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* =====================
   NAVBAR RESPONSIVE
   ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: clamp(60px, 8vh, 80px);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: clamp(35px, 5vh, 60px);
    width: auto;
    object-fit: contain;
}

/* Mobile menu button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* =====================
   HERO SECTION
   ===================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(80px, 10vh, 120px) 20px 40px;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.5vw + 0.3rem, 1.3rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* =====================
   BUTTONS
   ===================== */
.btn-primary,
.btn-secondary,
.cta-button,
button {
    padding: clamp(10px, 1.5vw, 14px) clamp(20px, 3vw, 35px);
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1.1rem);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px; /* iOS touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =====================
   CARDS & GRIDS
   ===================== */
.services-grid,
.pricing-grid,
.merchandise-grid {
    display: grid;
    gap: clamp(20px, 3vw, 30px);
    margin: clamp(30px, 5vw, 60px) 0;
}

.service-card,
.service-card-new,
.pricing-card,
.product-card {
    padding: clamp(20px, 3vw, 40px);
    border-radius: clamp(15px, 2vw, 25px);
    min-height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card icon wrapper */
.card-icon-wrapper {
    width: clamp(60px, 10vw, 90px);
    height: clamp(60px, 10vw, 90px);
    margin-bottom: clamp(15px, 2vw, 25px);
}

.card-icon-wrapper i {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

/* =====================
   FORMS
   ===================== */
input,
textarea,
select {
    width: 100%;
    padding: clamp(10px, 1.5vw, 15px);
    font-size: clamp(14px, 1vw + 0.25rem, 16px);
    border-radius: 8px;
    border: 1px solid #ddd;
    min-height: 44px; /* Touch target */
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* =====================
   MODALS
   ===================== */
.modal {
    padding: 20px;
}

.modal-content {
    width: min(90%, 800px);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: clamp(10px, 2vw, 20px);
    padding: clamp(20px, 3vw, 30px);
}

/* =====================
   SECTIONS
   ===================== */
section {
    padding: clamp(40px, 8vw, 100px) 0;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 60px);
}

/* =====================
   FOOTER
   ===================== */
footer {
    padding: clamp(30px, 5vw, 60px) 0;
}

.footer-content {
    display: grid;
    gap: clamp(20px, 3vw, 40px);
}

/* =====================
   SPECIFIC BREAKPOINTS
   ===================== */

/* 4K & Ultra Wide Monitors (2560px+) */
@media (min-width: 2560px) {
    .container { max-width: 2200px; }
    html { font-size: 20px; }
    .services-grid { grid-template-columns: repeat(5, 1fr); }
}

/* QHD Monitors (2048px - 2559px) */
@media (min-width: 2048px) and (max-width: 2559px) {
    .container { max-width: 1920px; }
    html { font-size: 18px; }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Full HD - Common Windows Desktop (1920px - 2047px) */
@media (min-width: 1920px) and (max-width: 2047px) {
    .container { max-width: 1600px; }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* MacBook Pro 16" (1728px - 1919px) */
@media (min-width: 1728px) and (max-width: 1919px) {
    .container { max-width: 1500px; }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* HD+ Laptops (1600px - 1727px) */
@media (min-width: 1600px) and (max-width: 1727px) {
    .container { max-width: 1400px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* MacBook Pro 15" / Dell XPS 15 (1440px - 1599px) */
@media (min-width: 1440px) and (max-width: 1599px) {
    .container { max-width: 1320px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* HD Laptops - Most Common Windows (1366px - 1439px) */
@media (min-width: 1366px) and (max-width: 1439px) {
    .container { max-width: 1200px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* MacBook Air 13" (1280px - 1365px) */
@media (min-width: 1280px) and (max-width: 1365px) {
    .container { max-width: 1140px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Small Laptops / iPad Pro 12.9" Landscape (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .container { max-width: 960px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }

    .nav-menu {
        gap: 20px;
    }
}

/* iPad Air/Pro 11" Landscape (834px - 1023px) */
@media (min-width: 834px) and (max-width: 1023px) {
    .container { max-width: 800px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }

    /* Show hamburger menu */
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active { left: 0; }
}

/* iPad Mini / iPad 9.7" Portrait (768px - 833px) */
@media (min-width: 768px) and (max-width: 833px) {
    .container { max-width: 720px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
    }

    .nav-menu.active { left: 0; }
}

/* Large Phones - iPhone 14 Pro Max, S22 Ultra (428px - 767px) */
@media (min-width: 428px) and (max-width: 767px) {
    .container { padding: 0 15px; }
    .services-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .merchandise-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
    }

    .nav-menu.active { left: 0; }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* iPhone 14/13/12 Standard (390px - 427px) */
@media (min-width: 390px) and (max-width: 427px) {
    .container { padding: 0 15px; }
    .services-grid,
    .pricing-grid,
    .merchandise-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }
    .hero-buttons { flex-direction: column; }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
}

/* iPhone X/11/12 Mini (375px - 389px) */
@media (min-width: 375px) and (max-width: 389px) {
    .container { padding: 0 12px; }
    .services-grid,
    .pricing-grid,
    .merchandise-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }
    .hero-buttons { flex-direction: column; }

    .btn-primary,
    .btn-secondary { width: 100%; }
}

/* Small Phones - iPhone SE, Galaxy S9 (320px - 374px) */
@media (min-width: 320px) and (max-width: 374px) {
    .container { padding: 0 10px; }
    html { font-size: 14px; }

    .services-grid,
    .pricing-grid,
    .merchandise-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }
    .hero-buttons { flex-direction: column; }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px 20px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }
}

/* Ultra Small - Galaxy Fold Closed (below 320px) */
@media (max-width: 319px) {
    .container { padding: 0 8px; }
    html { font-size: 13px; }

    .services-grid,
    .pricing-grid,
    .merchandise-grid { grid-template-columns: 1fr; }

    .hamburger { display: flex; }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        font-size: 0.875rem;
        padding: 10px 15px;
    }
}

/* =====================
   DEVICE-SPECIFIC FIXES
   ===================== */

/* iPhone Notch & Dynamic Island Support */
@supports (padding: env(safe-area-inset-top)) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }

    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .modal {
        padding: env(safe-area-inset-top) env(safe-area-inset-right)
                env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* High DPI Screens (Retina, AMOLED) */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Ensure crisp borders and text */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Thinner borders for high DPI */
    .service-card,
    .pricing-card {
        border-width: 0.5px;
    }
}

/* Touch Device Optimizations */
@media (pointer: coarse) {
    /* Larger touch targets */
    a, button, .btn-primary, .btn-secondary {
        min-height: 44px;
        min-width: 44px;
    }

    /* Disable hover effects on touch */
    .service-card:hover,
    .pricing-card:hover {
        transform: none;
    }

    /* Larger form inputs */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
}

/* Android Specific */
@supports (-webkit-appearance: none) and (not (-ms-ime-align: auto)) {
    select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 20px;
        padding-right: 40px;
    }
}

/* Windows High Contrast Mode */
@media (prefers-contrast: high) {
    .service-card,
    .pricing-card {
        border: 2px solid;
    }

    .btn-primary {
        border: 2px solid;
    }
}

/* =====================
   ANIMATION OPTIMIZATIONS
   ===================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================
   LANDSCAPE ORIENTATIONS
   ===================== */

/* Mobile Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 20px 40px;
    }

    .navbar {
        height: 50px;
    }

    .nav-logo img {
        height: 30px;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =====================
   UTILITIES
   ===================== */

/* Responsive visibility classes */
.desktop-only { display: block; }
.tablet-only { display: none; }
.mobile-only { display: none; }

@media (max-width: 1023px) {
    .desktop-only { display: none !important; }
    .tablet-only { display: block !important; }
}

@media (max-width: 767px) {
    .tablet-only { display: none !important; }
    .mobile-only { display: block !important; }
}

/* Responsive text alignment */
@media (max-width: 767px) {
    .text-center-mobile { text-align: center !important; }
    .text-left-mobile { text-align: left !important; }
    .text-right-mobile { text-align: right !important; }
}

/* Prevent horizontal scroll */
.overflow-hidden { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-hidden { overflow-y: hidden; }

/* Responsive spacing utilities */
.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

@media (max-width: 767px) {
    .m-0-mobile { margin: 0 !important; }
    .p-0-mobile { padding: 0 !important; }
    .mt-0-mobile { margin-top: 0 !important; }
    .mb-0-mobile { margin-bottom: 0 !important; }
}