/* ==========================================================================
   AS HOLDING - Responsive Styles
   Version: 1.0
   ========================================================================== */

/* ==========================================================================
   Tablet Landscape (1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Container */
    .container {
        max-width: 960px;
    }
    
    /* Hero */
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }
    
    /* About */
    .about-content {
        gap: var(--spacing-2xl);
    }
    
    /* Values */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Companies */
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Coverage */
    .coverage-content {
        gap: var(--spacing-2xl);
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }
}

/* ==========================================================================
   Tablet Portrait (768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Typography */
    :root {
        --font-size-base: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Section Padding */
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Logo */
    .logo-img {
        height: 40px;
    }
    
    .footer-logo-img {
        height: 60px;
    }
    
    /* Navigation */
    .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: 0 10px 27px rgba(0,0,0,0.05);
        padding: var(--spacing-xl) 0;
        gap: var(--spacing-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Hero */
    .hero-content {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Mission Vision */
    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        margin-bottom: var(--spacing-2xl);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ==========================================================================
   Mobile Large (640px)
   ========================================================================== */
@media (max-width: 640px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Values Grid */
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    /* Companies Grid */
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    /* Coverage */
    .coverage-content {
        grid-template-columns: 1fr;
    }
    
    .coverage-map {
        margin-top: var(--spacing-2xl);
    }
    
    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Mobile Medium (480px)
   ========================================================================== */
@media (max-width: 480px) {
    /* Typography */
    :root {
        --font-size-base: 14px;
    }
    
    /* Hero */
    .hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Section Headers */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* About Features */
    .about-features {
        gap: var(--spacing-md);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Value Cards */
    .value-card {
        padding: var(--spacing-lg);
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Company Cards */
    .company-card {
        padding: var(--spacing-lg);
    }
    
    /* Contact Form */
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    /* Social Icons */
    .social-icons {
        justify-content: center;
    }
}

/* ==========================================================================
   Mobile Small (360px)
   ========================================================================== */
@media (max-width: 360px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    /* Section Padding */
    section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Cards */
    .value-card,
    .company-card,
    .contact-form {
        padding: var(--spacing-md);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    /* Remove unnecessary elements */
    .header,
    .hamburger,
    .hero-particles,
    .back-to-top,
    .social-icons,
    .newsletter-form,
    .contact-form,
    .loader {
        display: none !important;
    }
    
    /* Adjust layout */
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    /* Simplify colors */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    /* Show URLs */
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   Accessibility - High Contrast Mode
   ========================================================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #FF4500;
        --secondary-color: #0033AA;
        --gray-600: #333333;
        --gray-700: #222222;
        --gray-800: #111111;
    }
    
    * {
        border-color: currentColor !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================================================
   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;
        scroll-behavior: auto !important;
    }
    
    .hero-particles {
        display: none;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2a2a2a;
        --gray-100: #333333;
        --gray-200: #3d3d3d;
        --gray-300: #4a4a4a;
        --gray-400: #5a5a5a;
        --gray-500: #6a6a6a;
        --gray-600: #8a8a8a;
        --gray-700: #aaaaaa;
        --gray-800: #cccccc;
        --gray-900: #eeeeee;
        --black: #ffffff;
        
        --primary-color: #FF8E5E;
        --primary-dark: #FF6B35;
        --secondary-color: #0056B3;
        --secondary-dark: #003D82;
    }
    
    /* Adjust shadows for dark mode */
    :root {
        --box-shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
        --box-shadow-md: 0 4px 16px rgba(0,0,0,0.3);
        --box-shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
        --box-shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
    }
    
    /* Invert images for better visibility */
    img {
        opacity: 0.9;
    }
    
    /* Adjust overlay colors */
    .image-overlay,
    .member-overlay,
    .photo-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
    }
}

/* ==========================================================================
   Landscape Orientation for Mobile
   ========================================================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding-top: 60px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nav-menu {
        top: 60px;
    }
}

/* ==========================================================================
   Retina Display Support
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Crisp borders for high-DPI displays */
    * {
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: auto;
    }
    
    /* Adjust border widths */
    .btn,
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-width: 1.5px;
    }
}

/* ==========================================================================
   Ultra-Wide Displays
   ========================================================================== */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .companies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link,
    .btn,
    .social-icon,
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .team-member:hover .member-overlay {
        bottom: -100%;
    }
    
    .about-image:hover .image-overlay {
        opacity: 0;
    }
    
    /* Add tap highlight */
    a, button {
        -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2);
    }
}
