/* ===== RESPONSIVE DESIGN ===== */
/* Mobile First Approach */

/* ===== EXTRA SMALL DEVICES (Portrait phones, less than 576px) ===== */
@media (max-width: 575.98px) {
    
    /* Typography adjustments for mobile */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2.25rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Conservative navbar brand size */
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 90vh;
        padding-top: 80px;
    }
    
    #hero .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Section padding reduction */
    section {
        padding: 2rem 0;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Timeline adjustments for mobile */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-marker {
        left: 0;
    }
    
    /* Team images size reduction */
    .team-member img {
        width: 150px !important;
        height: 150px !important;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-lg-4,
    #gallery .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Stats display adjustment */
    .stat-number {
        font-size: 2rem;
    }
    
    /* Process steps spacing */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Disable animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Footer adjustments */
    #footer .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Breadcrumb adjustments */
    nav.py-3 img {
        height: 16px;
    }
}

/* ===== SMALL DEVICES (Landscape phones, 576px and up) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    
    /* Typography adjustments */
    .display-1 { font-size: 3rem; }
    .display-2 { font-size: 2.75rem; }
    .display-3 { font-size: 2.25rem; }
    .display-4 { font-size: 1.875rem; }
    .display-5 { font-size: 1.625rem; }
    
    /* Navbar brand conservative sizing */
    .navbar-brand {
        font-size: 1.375rem !important;
    }
    
    /* Hero section */
    #hero {
        min-height: 95vh;
    }
    
    /* Section spacing */
    section {
        padding: 2.5rem 0;
    }
    
    /* Timeline improvements */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        padding-left: 80px;
    }
    
    /* Team member images */
    .team-member img {
        width: 180px !important;
        height: 180px !important;
    }
    
    /* Process steps layout */
    .process-step {
        margin-bottom: 1.5rem;
    }
    
    /* Pricing cards */
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
}

/* ===== MEDIUM DEVICES (Tablets, 768px and up) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    
    /* Typography */
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    /* Hero section */
    #hero {
        min-height: 100vh;
    }
    
    /* Section spacing */
    section {
        padding: 3rem 0;
    }
    
    /* Timeline centered */
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item {
        padding-left: 0;
    }
    
    /* Team member layout */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Gallery responsive spacing */
    #gallery .col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Process steps in grid */
    .process-steps .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Services cards */
    .services .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* ===== LARGE DEVICES (Desktops, 992px and up) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    
    /* Full desktop experience */
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    /* Hero full height */
    #hero {
        min-height: 100vh;
    }
    
    /* Standard section spacing */
    section {
        padding: 4rem 0;
    }
    
    /* Timeline full layout */
    .timeline::before {
        left: 50%;
    }
    
    /* Team grid layout */
    .team-grid .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Features grid */
    .features-grid .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    /* Pricing cards spacing */
    .pricing .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* ===== EXTRA LARGE DEVICES (Large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
    
    /* Maximum container width control */
    .container {
        max-width: 1140px;
    }
    
    /* Enhanced typography for large screens */
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    /* Hero section optimal height */
    #hero {
        min-height: 100vh;
    }
    
    /* Generous section spacing */
    section {
        padding: 5rem 0;
    }
    
    /* Timeline fully centered */
    .timeline::before {
        left: 50%;
    }
    
    /* Optimal card sizing */
    .card-deck .card {
        margin-bottom: 2rem;
    }
    
    /* Team member optimal sizing */
    .team-member img {
        width: 200px;
        height: 200px;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 600px) {
    
    /* Reduce hero height in landscape mode */
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    /* Reduce section padding */
    section {
        padding: 1.5rem 0;
    }
    
    /* Navbar adjustments */
    .navbar {
        padding: 0.25rem 0;
    }
    
    /* Compact timeline */
    .timeline-marker {
        width: 40px;
        height: 40px;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    
    /* Sharper borders and shadows */
    .card {
        border-width: 0.5px;
    }
    
    .btn {
        border-width: 0.5px;
    }
    
    /* Optimized font rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
}

/* ===== REDUCED MOTION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
    
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover effects */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
    
    /* Disable parallax effects */
    #hero::before {
        transform: none !important;
    }
}

/* ===== CONTRAST PREFERENCES ===== */
@media (prefers-contrast: high) {
    
    /* Increase border contrast */
    .card {
        border: 2px solid var(--text-primary) !important;
    }
    
    .btn {
        border-width: 2px !important;
    }
    
    /* Higher contrast colors */
    .text-muted {
        color: var(--text-secondary) !important;
    }
    
    /* Stronger focus indicators */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 3px solid var(--primary-color) !important;
        outline-offset: 2px;
    }
}

/* ===== PRINT OPTIMIZATIONS ===== */
@media print {
    
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer .social-links {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    /* Ensure text is readable */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
    }
    
    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    /* Card layout for print */
    .card {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Remove backgrounds for print */
    * {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* ===== SPECIFIC COMPONENT RESPONSIVE BEHAVIOR ===== */

/* Navigation responsive behavior */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid var(--bg-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Hero section responsive images */
@media (max-width: 767.98px) {
    #hero .col-lg-6:last-child {
        margin-top: 2rem;
        text-align: center;
    }
    
    #hero img {
        max-width: 80%;
    }
}

/* Service cards responsive layout */
@media (max-width: 575.98px) {
    .services .card {
        margin-bottom: 1.5rem;
    }
    
    .services .card-img-top {
        height: 150px;
    }
}

/* Team section responsive */
@media (max-width: 767.98px) {
    .team .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .team img {
        width: 150px !important;
        height: 150px !important;
    }
}

/* FAQ responsive layout */
@media (max-width: 767.98px) {
    .faq .col-lg-6 {
        margin-bottom: 1rem;
    }
}

/* Gallery responsive behavior */
@media (max-width: 575.98px) {
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    #gallery img {
        border-radius: var(--border-radius-md);
    }
}

/* Contact form responsive */
@media (max-width: 767.98px) {
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .contact-info .col-lg-4 {
        margin-top: 2rem;
    }
}

/* Footer responsive layout */
@media (max-width: 991.98px) {
    #footer .col-lg-3,
    #footer .col-md-6 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    #footer .col-md-6 {
        text-align: center;
    }
    
    #footer .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Pricing tables responsive */
@media (max-width: 991.98px) {
    .pricing .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
}

/* Process steps responsive */
@media (max-width: 991.98px) {
    .process .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    .process .timeline::before {
        display: none;
    }
}

/* Case studies responsive */
@media (max-width: 767.98px) {
    .case-studies .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Blog grid responsive */
@media (max-width: 767.98px) {
    #blog_grid .col-lg-4 {
        margin-bottom: 2rem;
    }
} 