/* LinguaQuest - Responsive Styles */
/* Mobile-first approach with progressive enhancement */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    h1, .display-4 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding-top: 4rem;
        min-height: auto;
        text-align: center;
    }
    
    .hero-section .container {
        padding: 2rem 1rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Section padding */
    section {
        padding: 2rem 0;
    }
    
    /* Team member cards */
    .team-member img {
        width: 80px;
        height: 80px;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Hide hover effects on mobile */
    .card:hover {
        transform: none;
    }
    
    /* Mobile navigation */
    .navbar-collapse {
        margin-top: 1rem;
        border-top: 1px solid var(--gray-200);
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
        border-bottom: 1px solid var(--gray-100);
    }
    
    /* Process steps mobile layout */
    .process-item {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Gallery adjustments */
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer adjustments */
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Contact form mobile */
    .contact-section .row {
        flex-direction: column-reverse;
    }
    
    .contact-section .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding-top: 5rem;
    }
    
    .btn {
        width: auto;
    }
    
    .navbar-brand {
        font-size: 1.125rem !important;
    }
    
    h1, .display-4 {
        font-size: 1.75rem;
    }
    
    /* Team member adjustments */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Process steps */
    .process-item {
        margin-bottom: 1.5rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero adjustments */
    .hero-section {
        padding-top: 5.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    h1, .display-4 {
        font-size: 2rem;
    }
    
    /* Card columns */
    .services-grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team layout */
    .team-section .col-lg-2 {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps tablet layout */
    .process-section .col-lg-2 {
        margin-bottom: 1rem;
    }
    
    /* Blog grid tablet */
    #blog_grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Testimonials tablet */
    .reviews-section .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        padding-top: 6rem;
    }
    
    /* Ensure proper spacing on larger tablets */
    .container {
        max-width: 960px;
    }
    
    /* Card hover effects enabled */
    .card:hover {
        transform: translateY(-4px);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        padding-top: 6rem;
        min-height: 100vh;
    }
    
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced spacing for large screens */
    section {
        padding: 5rem 0;
    }
    
    /* Larger team member images */
    .team-member img {
        width: 140px;
        height: 140px;
    }
    
    /* Process steps with connecting lines */
    .process-step::after {
        display: block;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Hero section adjustments for ultra-wide */
    .hero-section .container {
        padding: 0 2rem;
    }
    
    /* Larger typography for ultra-wide screens */
    h1, .display-4 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    /* Reduce section padding in landscape on short screens */
    section {
        padding: 3rem 0;
    }
    
    /* Navbar adjustments for landscape */
    .navbar {
        padding: 0.5rem 0;
    }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp borders and shadows on high DPI displays */
    .card {
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    }
    
    .btn {
        border-width: 1px;
    }
    
    /* Enhance text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    footer,
    .btn,
    #gallery,
    .breadcrumb {
        display: none !important;
    }
    
    /* Ensure good contrast for print */
    body {
        color: #000;
        background: #fff;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    /* Typography for print */
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Ensure contact information is visible */
    #contact-info-phone,
    #contact-info-email,
    #contact-info-address {
        display: block !important;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions 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;
    }
    
    /* Remove hover transforms */
    .card:hover,
    .btn:hover,
    .team-member:hover img {
        transform: none !important;
    }
    
    /* Disable Sal.js animations */
    [data-sal] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Dark Mode Support */

/* Container Responsive Adjustments */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Grid System Enhancements for Mobile */
@media (max-width: 767.98px) {
    /* Force single column layout on mobile for better readability */
    .row.force-mobile-single > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Service cards mobile layout */
    .services-section .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Features section mobile */
    .features-section .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* FAQ mobile layout */
    .faq-section .col-lg-6 {
        margin-bottom: 1rem;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Two column layout for tablets */
    .tablet-two-col .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .tablet-two-col .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .tablet-two-col .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 767.98px) {
    /* Reduce expensive effects on mobile */
    .hero-section::before {
        display: none;
    }
    
    /* Simplify shadows on mobile */
    .card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    /* Disable transform effects that can cause repaints */
    .card:hover .card-img-top {
        transform: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover,
    .navbar-nav .nav-link:hover {
        transform: none;
        box-shadow: initial;
    }
    
    /* Increase touch targets */
    .navbar-nav .nav-link {
        padding: 1rem 0.5rem;
        min-height: 44px;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Form controls for touch */
    .form-control {
        min-height: 44px;
        padding: 1rem;
    }
} 

.hero-section h1 {
    padding-top: 125px;
}