/* Solar Lighting Template - Responsive CSS */
/* Mobile-first responsive design with reduced motion support */

/* Extra Extra Small Devices (Very small phones, less than 400px) */
@media (max-width: 399.98px) {
    /* Team section - ensure single column with extra spacing */
    #team .col-lg-2-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2.5rem;
    }
    
    #team .text-center {
        padding: 0 1rem;
    }
    
    /* Smaller team images for very small screens */
    #team .team-member img,
    #team img.rounded-circle {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Compact social links */
    #team .social-link {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    #team .social-icons-grid {
        gap: 6px !important;
    }
    
    #team .team-social-links {
        margin-top: 10px;
        padding: 10px 0;
    }
    
    /* Team member names and titles */
    #team h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
    }
    
    #team .text-muted {
        font-size: 0.85rem !important;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Disable animations on mobile as per requirements */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 1.85rem !important;
    }
    
    h2 {
        font-size: 1.54rem !important;
    }
    
    h3 {
        font-size: 1.38rem !important;
    }
    
    .display-5 {
        font-size: 2rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.38rem !important;
    }
    
    /* Hero section adjustments */
    #hero {
        min-height: 70vh;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    #hero .btn {
        width: 100%;
        margin-bottom: 0.84rem;
    }
    
    /* Section padding reduction */
    section {
        padding: 2rem 0 !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Team member layout - single column on mobile */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Team section - force single column layout on mobile */
    #team .col-lg-2-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2rem;
    }
    
    /* Center team member content */
    #team .team-member,
    #team .text-center {
        padding: 0 2rem;
    }
    
    /* Adjust social links for mobile */
    .team-social-links {
        margin-top: 15px;
        padding: 15px 0;
    }
    
    .social-icons-grid {
        gap: 10px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Contact info stacking */
    .contact-info {
        text-align: center !important;
        margin-bottom: 2rem;
    }
    
    /* Button size adjustments */
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Gallery grid adjustments */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Services grid - single column */
    #services .col-md-6 {
        margin-bottom: 1.74rem;
    }
    
    /* Features layout adjustments */
    .feature-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 1rem;
    }
    
    .feature-item {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Reduced animations on small devices */
    [data-sal] {
        animation-duration: 0.64s !important;
    }
    
    /* Hero adjustments */
    #hero {
        min-height: 80vh;
    }
    
    .display-5 {
        font-size: 2.32rem;
    }
    
    /* Services grid - 2 columns */
    #services .col-md-6:nth-child(odd) {
        padding-right: 0.75rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 0.75rem;
    }
    
    /* Team layout adjustments - 2 columns on small devices */
    #team .col-lg-2-4 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-bottom: 2rem;
    }
    
    .team-member {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    /* Adjust team member images for small screens */
    #team .team-member img,
    #team img.rounded-circle {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Optimize social links spacing */
    .team-social-links {
        margin-top: 12px;
        padding: 12px 0;
    }
    
    .social-link {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }
    
    /* Section spacing */
    section {
        padding: 3rem 0;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* Hero section */
    #hero {
        min-height: 85vh;
    }
    
    /* Services layout */
    #services .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Features layout improvements */
    .feature-item {
        display: flex;
        align-items: flex-start;
        text-align: left;
    }
    
    .feature-icon {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    /* Team grid adjustments - 3 columns on tablets */
    #team .col-lg-2-4 {
        width: 33.333333% !important;
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        margin-bottom: 2rem;
    }
    
    /* Adjust team member layout for tablets */
    #team .team-member img,
    #team img.rounded-circle {
        width: 110px !important;
        height: 110px !important;
    }
    
    #team .team-member {
        padding: 0 0.75rem;
    }
    
    /* Social links adjustments for tablets */
    .team-social-links {
        margin-top: 15px;
        padding: 15px 0;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .social-icons-grid {
        gap: 12px;
    }
    
    /* FAQ grid layout */
    #faq .col-lg-6 {
        margin-bottom: 1.72rem;
    }
    
    /* Gallery hover effects enabled */
    #gallery img:hover {
        transform: scale(1.05);
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full hero height */
    #hero {
        min-height: 100vh;
    }
    
    /* Team grid - 5 columns */
    .col-lg-2-4 {
        width: 20%;
    }
    
    /* Navigation hover effects */
    .navbar-nav .nav-link:hover::after {
        width: 100%;
    }
    
    /* Enhanced card hover effects */
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 21px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    }
    
    /* Services layout optimization */
    #services .col-lg-4:hover {
        z-index: 10;
        position: relative;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max-width adjustments */
    .container {
        max-width: 1200px;
    }
    
    /* Enhanced typography */
    .display-5 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.29rem;
    }
    
    .lead {
        font-size: 1.36rem;
    }
    
    /* Enhanced spacing */
    section {
        padding: 6rem 0;
    }
    
    /* Team hover effects */
    .team-member:hover img {
        transform: scale(1.1);
    }
    
    /* Advanced card interactions */
    .card {
        transition: all 1.16s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .card:hover {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Extra Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Enhanced hero section */
    #hero {
        min-height: 100vh;
    }
    
    #hero .display-5 {
        font-size: 3.51rem;
    }
    
    /* Improved section spacing */
    section {
        padding: 8rem 0;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduced hero height for landscape mobile */
    #hero {
        min-height: 100vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Compact navigation */
    .navbar {
        padding: 0.25rem 0;
    }
    
    /* Reduced section padding */
    section {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    /* Remove unnecessary elements */
    .navbar,
    .btn,
    footer,
    [data-sal] {
        display: none !important;
    }
    
    /* Optimize colors for print */
    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    
    /* Ensure readable text */
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
    }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows */
    .card {
        border-width: 0.5px;
    }
    
    .btn {
        border-width: 0.5px;
    }
    
    /* Enhanced image quality hints */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility - Reduced Motion */
@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 transforms */
    .card:hover,
    .btn:hover,
    #gallery img:hover,
    .team-member:hover img {
        transform: none !important;
    }
    
    /* Disable Sal.js animations */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    /* Enhanced borders */
    .card,
    .btn,
    .form-control {
        border-width: 2px;
        border-color: #000;
    }
    
    /* High contrast text */
    body {
        color: #000;
        background: #fff;
    }
    
    /* Button contrast */
    .btn-primary {
        background: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-outline-primary {
        color: #000;
        border-color: #000;
    }
}

/* Dark Mode Support */

/* Container Fluid Adjustments for Very Wide Screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    /* Enhanced spacing for very wide screens */
    .col-lg-2-4 {
        padding: 0 2rem;
    }
    
    /* Larger typography for better readability */
    body {
        font-size: 1.25rem;
    }
    
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.875rem 1.75rem;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    /* Remove hover effects that don't work on touch */
    .card:hover,
    .btn:hover,
    .nav-link:hover::after {
        transform: none;
        box-shadow: initial;
        width: 0;
    }
    
    /* Enhanced tap targets */
    .form-control {
        min-height: 48px;
    }
    
    /* Better spacing for touch */
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    /* Optimize team social links for touch devices */
    #team .social-link {
        min-width: 48px !important;
        min-height: 48px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
        margin: 2px;
    }
    
    #team .social-icons-grid {
        gap: 8px !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #team .team-social-links {
        padding: 20px 10px !important;
        margin-top: 20px !important;
    }
} 