/* ======================================
   CreativeMentor - Responsive Stylesheet
   ====================================== */

/* Mobile First Approach - Base styles for mobile */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    .display-4 {
        font-size: 2rem !important;
    }
    
    .display-3 {
        font-size: 2.5rem !important;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Header adjustments */
    .navbar-brand {
        font-size: 1.25rem !important;
    }
    
    /* Hero section mobile optimizations */
    .hero-section {
        min-height: 80vh !important;
        padding: 2rem 0;
    }
    
    .hero-section .container {
        text-align: center;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    /* Card spacing adjustments */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Section padding reduction */
    section {
        padding: 2rem 0 !important;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Gallery grid adjustments */
    .gallery .col-lg-3,
    .gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Team member spacing */
    .team .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Process steps mobile layout */
    .process-item {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Footer adjustments */
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* No animations on mobile for performance */
    .card:hover {
        transform: none !important;
    }
    
    .fas:hover,
    .far:hover,
    .fab:hover {
        transform: none !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.25rem !important;
    }
    
    .hero-section {
        min-height: 85vh !important;
    }
    
    section {
        padding: 2.5rem 0 !important;
    }
    
    /* Improved card layout for small tablets */
    .services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Team layout optimization */
    .team .col-lg-2 {
        margin-bottom: 1.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.5rem !important;
    }
    
    .hero-section {
        min-height: 90vh !important;
    }
    
    section {
        padding: 3rem 0 !important;
    }
    
    /* Optimize navigation for tablets */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    /* Card hover effects can be enabled on tablets */
    .card:hover {
        transform: translateY(-3px);
    }
    
    /* Team grid optimization */
    .team .col-lg-2 {
        margin-bottom: 1rem;
    }
    
    /* Process steps can show connections on tablets */
    .process-step::after {
        display: block;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full desktop experience starts here */
    .hero-section {
        min-height: 95vh !important;
        opacity: 1 !important; /* Ensure content is visible */
        visibility: visible !important;
    }
    
    /* Optimize spacing for large screens */
    section {
        padding: 3.5rem 0 !important;
        opacity: 1 !important; /* Ensure content is visible */
        visibility: visible !important;
    }
    
    /* Enhanced hover effects */
    .card:hover {
        transform: translateY(-5px);
    }
    
    /* Team layout perfected */
    .team .col-lg-2 {
        padding: 0 0.5rem;
    }

    /* Ensure all content is visible regardless of animation state */
    .fade-in, .slide-up {
        opacity: 1 !important;
        visibility: visible !important;
    }

    img, .card-img-top {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh !important;
        opacity: 1 !important; /* Ensure content is visible */
        visibility: visible !important;
    }
    
    /* Maximum section padding for large screens */
    section {
        padding: 4rem 0 !important;
        opacity: 1 !important; /* Ensure content is visible */
        visibility: visible !important;
    }
    
    /* Enhanced typography for large screens */
    .lead {
        font-size: 1.25rem;
    }
    
    /* Container max-width adjustments */
    .container {
        max-width: 1140px;
    }

    /* Ensure all content is visible regardless of animation state */
    .fade-in, .slide-up {
        opacity: 1 !important;
        visibility: visible !important;
    }

    img, .card-img-top {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Prevent overly wide content */
    section .row {
        margin: 0 auto;
    }
    
    /* Enhanced spacing for ultra-wide */
    section {
        padding: 5rem 0 !important;
    }
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 768px) {
    .hero-section {
        min-height: 100vh !important;
        padding: 1rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1rem !important;
    }
    
    section {
        padding: 2rem 0 !important;
    }
}

/* High DPI screens optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .card-img-top {
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Sharper text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
        min-height: auto !important;
        padding: 1rem 0 !important;
    }
    
    section {
        padding: 1rem 0 !important;
        break-inside: avoid;
    }
    
    .card {
        border: 1px solid #d6d6d6 !important;
        box-shadow: none !important;
    }
    
    a {
        text-decoration: none !important;
        color: black !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
}

/* Accessibility improvements for screen readers */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for users who prefer reduced motion */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-section::before {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-gray) !important;
    }
    
    .btn-primary {
        border: 2px solid var(--primary-dark) !important;
    }
    
    .form-control {
        border: 2px solid var(--dark-gray) !important;
    }
}

/* Dark mode preparation (for future implementation) */

/* Focus management for keyboard navigation */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn {
        min-height: 44px; /* Minimum touch target size */
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none !important;
    }
    
    .fas:hover,
    .far:hover,
    .fab:hover {
        transform: none !important;
    }
}

/* Container breakpoint customizations */
@media (min-width: 1200px) {
    .container-custom {
        max-width: 1140px;
        margin: 0 auto;
        padding: 0 15px;
    }
}

/* Custom grid for specific sections */
@media (min-width: 768px) {
    .services-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .team-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce expensive operations on mobile */
    .hero-section::before {
        display: none;
    }
    
    /* Simplify shadows on mobile */
    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Optimize images for mobile */
    .card-img-top {
        height: 180px;
    }
} 

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