/* Responsive Design - Mobile First Approach */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    h1 { font-size: var(--font-3xl); }
    h2 { font-size: var(--font-2xl); }
    h3 { font-size: var(--font-xl); }
    
    /* Hero section */
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        padding: var(--spacing-xl) 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: var(--font-3xl);
        margin-bottom: var(--spacing-md);
    }
    
    .hero-section h2 {
        font-size: var(--font-xl);
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: var(--font-lg) !important;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: var(--spacing-md);
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-sm) 0;
        margin: var(--spacing-xs) 0;
    }
    
    /* Cards */
    .feature-card, .service-card, .pricing-card, .review-card,
    .case-study, .team-member, .career-card, .info-card,
    .process-step, .strategy-card, .implementation-card,
    .training-card, .monitoring-card, .optimization-card,
    .ai-card, .cloud-card, .security-card, .integration-card,
    .innovation-card, .blog-card {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    /* Contact form */
    .contact-form {
        padding: var(--spacing-lg);
        margin: var(--spacing-md);
    }
    
    /* Timeline */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: var(--spacing-md);
    }
    
    .timeline-item::after {
        left: 21px !important;
    }
    
    /* Mobile timeline layout */
    .timeline.mobile-layout .timeline-item {
        padding-left: 80px;
    }
    
    .timeline.mobile-layout::after {
        left: 35px;
    }
    
    .timeline.mobile-layout .timeline-item::after {
        left: 25px !important;
    }
    
    /* Team members */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Process steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: var(--font-lg);
    }
    
    /* Pricing cards */
    .pricing-card.featured {
        transform: none;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Gallery */
    .gallery .col-lg-3,
    .gallery .col-md-4,
    .gallery .col-sm-6 {
        margin-bottom: var(--spacing-md);
    }
    
    .gallery img {
        height: 150px;
    }
    
    /* FAQ */
    .accordion-button {
        font-size: var(--font-sm);
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: var(--spacing-xl);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    .hero-section h1 {
        font-size: var(--font-4xl);
    }
    
    /* Cards in rows */
    .service-card, .feature-card, .pricing-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Timeline adjustments */
    .timeline-item {
        padding-left: 80px;
    }
    
    /* Contact form */
    .contact-form {
        padding: var(--spacing-xl);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Cards */
    .service-card img {
        height: 180px;
    }
    
    .blog-card img {
        height: 180px;
    }
    
    /* Team members */
    .team-member {
        margin-bottom: var(--spacing-xl);
    }
    
    /* Timeline */
    .timeline-item {
        padding: var(--spacing-md);
    }
    
    /* Process steps */
    .process-step {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Reviews */
    .review-card {
        height: auto;
        min-height: 200px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero section */
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Ensure card heights are equal */
    .row .col-lg-4 .service-card,
    .row .col-lg-4 .feature-card,
    .row .col-lg-4 .pricing-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .service-card .price,
    .pricing-card .price {
        margin-top: auto;
    }
    
    /* Team members in a row */
    .team-member {
        margin-bottom: var(--spacing-lg);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Full width hero */
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Larger containers */
    .container {
        max-width: 1200px;
    }
    
    /* Enhanced card layouts */
    .service-card, .feature-card, .pricing-card,
    .review-card, .case-study, .career-card,
    .info-card, .blog-card {
        transition: all 0.3s ease;
    }
    
    /* Gallery with better spacing */
    .gallery .col-lg-3 {
        padding: var(--spacing-sm);
    }
    
    /* Team members */
    .team-member img {
        width: 140px;
        height: 140px;
    }
    
    /* Timeline */
    .timeline {
        max-width: 1000px;
    }
    
    .timeline-item {
        padding: var(--spacing-xl);
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        min-height: 70vh;
    }
    
    .navbar {
        padding: var(--spacing-sm) 0;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section::before {
        background-image: url('../YIF_images/hero-bg@2x.webp');
    }
    
    /* Ensure crisp icons and images */
    .fas, .fa {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Note: Template specifically requires no dark theme for accessibility */
    /* This media query is present but not implemented per requirements */
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        animation: none;
    }
    
    .timeline-item,
    .process-step,
    .feature-card,
    .service-card {
        transition: none;
    }
    
    .btn-primary:hover,
    .btn-outline-primary:hover {
        transform: none;
    }
}

/* Print optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    .breadcrumb,
    footer,
    .btn,
    form {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    section {
        padding: var(--spacing-md) 0;
    }
    
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        padding: var(--spacing-lg) 0;
        background: none !important;
    }
    
    /* Ensure text is readable */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    
    /* Remove shadows and effects */
    .feature-card,
    .service-card,
    .pricing-card,
    .review-card,
    .case-study,
    .team-member,
    .career-card,
    .info-card,
    .blog-card {
        box-shadow: none !important;
        border: 1px solid #bcbcbc;
        page-break-inside: avoid;
    }
    
    /* Timeline adjustments for print */
    .timeline::after {
        background: #000 !important;
    }
    
    /* Ensure proper page breaks */
    .hero-section,
    section {
        page-break-inside: avoid;
    }
}

/* Accessibility enhancements */
@media (prefers-contrast: high) {
    /* Enhance contrast for better accessibility */
    .btn-primary {
        background: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .btn-outline-primary {
        border: 3px solid #000 !important;
        color: #000 !important;
    }
    
    .feature-card,
    .service-card,
    .pricing-card {
        border: 2px solid #000 !important;
    }
    
    .navbar {
        background: #000 !important;
    }
    
    footer {
        background: #000 !important;
    }
}

/* Focus styles for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .form-control:focus,
    .accordion-button:focus {
        outline: 3px solid var(--primary-blue);
        outline-offset: 2px;
    }
}

/* Container adjustments for different screen sizes */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 320px) {
    .container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .hero-section h1 {
        font-size: var(--font-2xl);
    }
    
    .hero-section h2 {
        font-size: var(--font-lg);
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .navbar-brand {
        font-size: var(--font-base) !important;
    }
}

/* Address bar hide on mobile browsers */
@media screen and (max-width: 768px) {
    .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
        min-height: 100svh; /* Use small viewport height if supported */
        min-height: 100vh; /* Fallback */
    }
}

/* Hover effects only on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .feature-card:hover,
    .service-card:hover,
    .pricing-card:hover,
    .review-card:hover,
    .case-study:hover,
    .career-card:hover,
    .info-card:hover,
    .strategy-card:hover,
    .implementation-card:hover,
    .training-card:hover,
    .monitoring-card:hover,
    .optimization-card:hover,
    .ai-card:hover,
    .cloud-card:hover,
    .security-card:hover,
    .integration-card:hover,
    .innovation-card:hover,
    .blog-card:hover {
        transform: translateY(-5px);
    }
    
    .gallery img:hover {
        transform: scale(1.05);
    }
    
    .btn-primary:hover,
    .btn-outline-primary:hover {
        transform: translateY(-2px);
    }
} 