/**
 * ARETIV PRO - RESPONSIVE STYLES
 * ==============================
 * 
 * This file contains all responsive design styles for the Aretiv Pro theme.
 * It follows a mobile-first approach with progressive enhancement for larger screens.
 * 
 * Breakpoint System:
 * - Mobile: 0px - 767px (default)
 * - Tablet: 768px - 1023px
 * - Desktop: 1024px - 1199px
 * - Large Desktop: 1200px+
 * 
 * Table of Contents:
 * 1. Mobile-First Base Styles
 * 2. Tablet Styles (768px+)
 * 3. Desktop Styles (1024px+)
 * 4. Large Desktop Styles (1200px+)
 * 5. High-DPI Display Styles
 * 6. Print Styles
 */

/* ==========================================================================
   1. MOBILE-FIRST BASE STYLES (0px - 767px)
   ========================================================================== */

/**
 * Mobile Container
 * Optimized container padding for mobile devices
 */
.container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/**
 * Mobile Typography
 * Adjusted font sizes for better mobile readability
 */
h1 { 
    font-size: var(--font-size-3xl); 
    line-height: 1.2;
}

h2 { 
    font-size: var(--font-size-2xl); 
    line-height: 1.3;
}

h3 { 
    font-size: var(--font-size-xl); 
    line-height: 1.4;
}

/**
 * Mobile Navigation
 * Stack navigation items and hide desktop menu
 */
.main-navigation {
    display: none;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-background);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    transition: top var(--transition-base);
}

.main-navigation.is-active {
    display: block;
    top: 80px;
}

.main-navigation ul {
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-lg) 0;
}

.main-navigation li {
    border-bottom: 1px solid var(--color-border);
}

.main-navigation a {
    display: block;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.main-navigation .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--color-surface);
    margin-left: var(--spacing-lg);
}

/**
 * Mobile Menu Toggle
 * Show hamburger menu on mobile
 */
.mobile-menu-toggle {
    display: block;
}

/**
 * Mobile Header
 * Adjust header layout for mobile
 */
.header-container {
    min-height: 70px;
    padding: var(--spacing-sm) 0;
}

.header-cta {
    display: none;
}

.site-title {
    font-size: var(--font-size-xl);
}

/**
 * Mobile Hero Section
 * Optimize hero section for mobile viewing
 */
.hero-section {
    min-height: 60vh;
    padding: var(--spacing-2xl) 0;
}

.hero-content {
    padding: var(--spacing-lg);
}

.hero-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
}

.hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.hero-cta .btn {
    width: 100%;
    max-width: 280px;
}

.hero-trust {
    flex-direction: column;
    gap: var(--spacing-md);
}

/**
 * Mobile Services Section
 * Single column layout for services
 */
.services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.service-card {
    padding: var(--spacing-xl) var(--spacing-lg);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-md);
}

/**
 * Mobile About Section
 * Stack about content vertically
 */
.about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    text-align: center;
}

.about-text h2 {
    font-size: var(--font-size-2xl);
}

.team-member-image {
    max-width: 280px;
    height: 280px;
}

/**
 * Mobile Testimonials
 * Optimize testimonial cards for mobile
 */
.testimonial-card {
    padding: var(--spacing-xl) var(--spacing-lg);
}

.testimonial-quote {
    font-size: var(--font-size-lg);
}

.testimonial-author {
    flex-direction: column;
    gap: var(--spacing-md);
}

.slider-controls {
    flex-direction: column;
    gap: var(--spacing-md);
}

/**
 * Mobile FAQ Section
 * Adjust FAQ spacing for mobile
 */
.faq-question {
    padding: var(--spacing-lg);
    font-size: var(--font-size-base);
}

.faq-item.active .faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

/**
 * Mobile Footer
 * Single column footer layout
 */
.footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
}

.social-links {
    justify-content: center;
}

/**
 * Mobile Sections
 * Reduce section padding for mobile
 */
.section {
    padding: var(--spacing-2xl) 0;
}

.section--lg {
    padding: var(--spacing-3xl) 0;
}

/* ==========================================================================
   2. TABLET STYLES (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    /**
     * Tablet Container
     * Increase container padding for tablets
     */
    .container {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
    
    /**
     * Tablet Typography
     * Slightly larger fonts for tablet screens
     */
    h1 { font-size: var(--font-size-4xl); }
    h2 { font-size: var(--font-size-3xl); }
    
    /**
     * Tablet Header
     * Show simplified navigation on tablets
     */
    .header-container {
        min-height: 80px;
    }
    
    .main-navigation {
        display: flex;
        position: static;
        background: none;
        box-shadow: none;
    }
    
    .main-navigation ul {
        flex-direction: row;
        gap: var(--spacing-md);
        padding: 0;
    }
    
    .main-navigation li {
        border-bottom: none;
    }
    
    .main-navigation a {
        padding: var(--spacing-sm) 0;
        font-size: var(--font-size-base);
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    /**
     * Tablet Hero Section
     * Better proportions for tablet screens
     */
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-cta .btn {
        width: auto;
    }
    
    .hero-trust {
        flex-direction: row;
    }
    
    /**
     * Tablet Services Section
     * Two column layout for services on tablets
     */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /**
     * Tablet About Section
     * Two column layout with better spacing
     */
    .about-content {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .about-text h2 {
        font-size: var(--font-size-3xl);
    }
    
    /**
     * Tablet Testimonials
     * Improved testimonial layout
     */
    .testimonial-quote {
        font-size: var(--font-size-xl);
    }
    
    .testimonial-author {
        flex-direction: row;
    }
    
    .slider-controls {
        flex-direction: row;
    }
    
    /**
     * Tablet Footer
     * Two column footer layout
     */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    /**
     * Tablet Sections
     * Increase section padding
     */
    .section {
        padding: var(--spacing-3xl) 0;
    }
    
    .section--lg {
        padding: var(--spacing-4xl) 0;
    }
}

/* ==========================================================================
   3. DESKTOP STYLES (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    /**
     * Desktop Container
     * Maximum container width with centered alignment
     */
    .container {
        max-width: var(--container-max-width);
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
    
    /**
     * Desktop Typography
     * Full font sizes for desktop displays
     */
    h1 { font-size: var(--font-size-5xl); }
    h2 { font-size: var(--font-size-4xl); }
    h3 { font-size: var(--font-size-3xl); }
    
    /**
     * Desktop Header
     * Full navigation with CTA buttons
     */
    .header-cta {
        display: flex;
    }
    
    .main-navigation ul {
        gap: var(--spacing-lg);
    }
    
    /**
     * Desktop Navigation Dropdowns
     * Enable hover effects for desktop
     */
    .main-navigation .sub-menu {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        background: var(--color-background);
        box-shadow: var(--shadow-lg);
        margin-left: 0;
    }
    
    .main-navigation li:hover .sub-menu,
    .main-navigation li:focus-within .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /**
     * Desktop Hero Section
     * Full height hero with optimal proportions
     */
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    /**
     * Desktop Services Section
     * Three column layout for optimal viewing
     */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-card {
        padding: var(--spacing-2xl);
    }
    
    .service-icon {
        width: 80px;
        height: 80px;
    }
    
    /**
     * Desktop About Section
     * Improved spacing and typography
     */
    .about-text h2 {
        font-size: var(--font-size-4xl);
    }
    
    .team-member-image {
        max-width: 400px;
        height: 400px;
    }
    
    /**
     * Desktop Testimonials
     * Full-sized testimonial cards
     */
    .testimonial-quote {
        font-size: var(--font-size-2xl);
    }
    
    /**
     * Desktop Footer
     * Three or four column layout
     */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /**
     * Desktop Sections
     * Full section padding for desktop
     */
    .section {
        padding: var(--spacing-4xl) 0;
    }
    
    .section--lg {
        padding: calc(var(--spacing-4xl) * 1.5) 0;
    }
    
    /**
     * Desktop Hover Effects
     * Enable advanced hover effects on desktop
     */
    .service-card:hover,
    .card--hover:hover {
        transform: translateY(-5px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    /**
     * Desktop Animations
     * Smooth scroll and enhanced animations
     */
    html {
        scroll-behavior: smooth;
    }
    
    .fade-in,
    .slide-up {
        animation-duration: 0.6s;
    }
}

/* ==========================================================================
   4. LARGE DESKTOP STYLES (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    /**
     * Large Desktop Container
     * Maximum width for very large screens
     */
    .container {
        max-width: 1200px;
        padding-left: var(--spacing-2xl);
        padding-right: var(--spacing-2xl);
    }
    
    /**
     * Large Desktop Hero
     * Enhanced hero section for large displays
     */
    .hero-content {
        max-width: 900px;
        padding: var(--spacing-3xl);
    }
    
    /**
     * Large Desktop Services
     * Improved spacing for large screens
     */
    .services-grid {
        gap: var(--spacing-3xl);
    }
    
    .service-card {
        padding: var(--spacing-3xl) var(--spacing-2xl);
    }
    
    /**
     * Large Desktop About
     * Enhanced about section layout
     */
    .about-content {
        gap: calc(var(--spacing-4xl) * 1.5);
    }
    
    /**
     * Large Desktop Sections
     * Generous spacing for large displays
     */
    .section {
        padding: calc(var(--spacing-4xl) * 1.25) 0;
    }
    
    .section--lg {
        padding: calc(var(--spacing-4xl) * 2) 0;
    }
}

/* ==========================================================================
   5. HIGH-DPI DISPLAY STYLES
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /**
     * High-DPI Images
     * Crisp images for retina displays
     */
    .custom-logo,
    .team-member-image,
    .testimonial-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /**
     * High-DPI Border Radius
     * Smoother curves on high-DPI displays
     */
    .btn,
    .service-card,
    .faq-item,
    .card {
        border-radius: calc(var(--border-radius-lg) + 1px);
    }
}

/* ==========================================================================
   6. LANDSCAPE ORIENTATION STYLES
   ========================================================================== */

@media (orientation: landscape) and (max-height: 600px) {
    /**
     * Landscape Mobile/Tablet
     * Optimize for landscape viewing on small screens
     */
    .hero-section {
        min-height: 100vh;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content {
        padding: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
}

/* ==========================================================================
   7. REDUCED MOTION PREFERENCES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /**
     * Respect user's motion preferences
     * Disable animations for users who prefer reduced motion
     */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in,
    .slide-up {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ==========================================================================
   8. HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
    /**
     * Enhanced contrast for accessibility
     * Improve contrast ratios for users who need it
     */
    :root {
        --color-text: #000000;
        --color-background: #ffffff;
        --color-border: #000000;
        --color-primary: #DC2626;
        --color-secondary: #EF4444;
    }
    
    .btn,
    .service-card,
    .faq-item {
        border: 2px solid var(--color-text);
    }
    
    .hero-section {
        background: var(--color-text);
        color: var(--color-background);
    }
}

/* ==========================================================================
   9. DARK MODE SUPPORT
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /**
     * Dark mode color scheme
     * Automatic dark mode based on system preferences
     */
    :root {
        --color-background: #1a1a1a;
        --color-surface: #2d2d2d;
        --color-text: #ffffff;
        --color-text-light: #b3b3b3;
        --color-border: #404040;
    }
    
    .site-header {
        background: var(--color-surface);
        border-bottom-color: var(--color-border);
    }
    
    .service-card,
    .faq-item,
    .card {
        background: var(--color-surface);
    }
    
    .testimonials-section {
        background: linear-gradient(135deg, #1a365d 0%, #2d5a87 100%);
    }
}

/* ==========================================================================
   10. PRINT STYLES
   ========================================================================== */

@media print {
    /**
     * Print-optimized styles
     * Clean, readable layout for printing
     */
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .site-header,
    .site-footer,
    .hero-section,
    .mobile-menu-toggle,
    .slider-controls,
    .btn {
        display: none !important;
    }
    
    .section {
        padding: 1cm 0;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
    
    .service-card,
    .testimonial-card,
    .faq-item {
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 1cm;
    }
}