/* Responsive CSS - Energy Storage Template */

/* ==========================================
   MOBILE FIRST RESPONSIVE DESIGN
   ========================================== */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    
    /* Typography adjustments */
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 5rem;
        padding-bottom: 3rem;
        min-height: 80vh;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    /* Disable animations on mobile for better performance */
    .shape-1,
    .shape-2 {
        display: none;
    }
    
    .space-particles {
        display: none;
    }
    
    /* Services Section */
    #services .card-img-top {
        height: 180px;
    }
    
    .price-tag {
        text-align: center;
    }
    
    /* Statistics */
    .stat-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Team Section */
    .team-member {
        margin-bottom: 2rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery Section */
    #gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Contact Form */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer */
    #footer .col-lg-4,
    #footer .col-lg-2 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Additional Page Styles */
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        width: 10px;
        height: 10px;
    }
    
    .safety-card {
        margin-bottom: 1.5rem;
    }
    
    .schedule-item {
        margin-bottom: 1rem;
    }
    
    .comparison-card {
        margin-bottom: 1.5rem;
    }
    
    .feature-block {
        margin-bottom: 1rem;
    }
    
    .tech-stat {
        margin-bottom: 1rem;
    }
    
    .trend-item {
        margin-bottom: 1.5rem;
    }
    
    .legal-section {
        margin-bottom: 3rem;
    }
    
    /* Breadcrumbs */
    .breadcrumb-section {
        margin-top: 70px;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    
    /* Hero Section */
    #hero {
        padding-top: 5rem;
    }
    
    .hero-buttons .btn {
        display: inline-block;
        width: auto;
        margin-right: 1rem;
    }
    
    /* Services */
    #services .card-img-top {
        height: 200px;
    }
    
    /* Team images */
    .team-member img {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery responsive adjustments */
    #gallery .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    
    /* Hero Section */
    #hero {
        padding-top: 6rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.75rem 0.75rem;
    }
    
    /* Services */
    #services .card-img-top {
        height: 220px;
    }
    
    /* Statistics grid */
    .stat-item {
        margin-bottom: 1rem;
    }
    
    /* Team */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-2 {
        margin-bottom: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    
    /* Hero fine-tuning */
    .display-4 {
        font-size: 2.75rem;
    }
    
    /* Services cards */
    #services .card-img-top {
        height: 200px;
    }
    
    /* Team spacing */
    .team-member {
        margin-bottom: 1rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    
    /* Container max-widths already handled by Bootstrap */
    
    /* Hero section optimal display */
    .display-4 {
        font-size: 3rem;
    }
    
    /* Services optimal sizing */
    #services .card-img-top {
        height: 220px;
    }
}

/* ==========================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ========================================== */

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    
    #hero {
        min-height: 100vh;
        padding-top: 4rem;
        padding-bottom: 2rem;
    }
    
    .hero-buttons {
        margin-top: 1rem;
    }
    
    /* Hide decorative elements to save space */
    .hero-shapes,
    .space-particles {
        display: none;
    }
}

/* ==========================================
   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: 1px;
    }
    
    /* Optimize text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */

@media (hover: none) and (pointer: coarse) {
    
    /* Remove hover effects for touch devices */
    .card:hover,
    .btn:hover,
    .stat-item:hover,
    .team-member:hover img,
    #gallery img:hover,
    #testimonials .card:hover,
    #faq .card:hover,
    .safety-card:hover,
    .schedule-item:hover,
    .comparison-card:hover,
    .feature-block:hover,
    .tech-stat:hover,
    .trend-item:hover,
    .legal-section .card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Simplified animations */
    .shape-1,
    .shape-2 {
        animation: none;
    }
    
    .particle {
        animation: none;
        opacity: 0.5;
    }
}

/* ==========================================
   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;
    }
    
    /* Remove floating shapes */
    .shape-1,
    .shape-2,
    .particle {
        display: none;
    }
    
    /* Maintain smooth scrolling preference */
    html {
        scroll-behavior: auto;
    }
    
    /* Keep essential focus indicators */
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        transition: none;
        outline: 2px solid var(--primary-blue);
    }
}

/* ==========================================
   PRINT MEDIA OPTIMIZATIONS
   ========================================== */

@media print {
    
    /* Hide interactive elements */
    .navbar,
    .breadcrumb-section,
    #contact,
    footer,
    .hero-buttons,
    .btn {
        display: none !important;
    }
    
    /* Optimize typography for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black !important;
        background: white !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
    }
    
    /* Ensure content fits page */
    .container {
        max-width: none !important;
        padding: 0;
    }
    
    /* Remove shadows and decorative elements */
    .card,
    .shadow,
    .shadow-sm,
    .shadow-lg {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
    
    /* Optimize images for print */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Page break controls */
    .section {
        page-break-inside: avoid;
    }
    
    .row {
        page-break-inside: avoid;
    }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
    
    :root {
        --primary-blue: #0000ff;
        --primary-green: #008000;
        --gray-800: #000000;
        --gray-600: #000000;
    }
    
    .card {
        border: 2px solid black;
    }
    
    .btn {
        border: 2px solid black;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Reduced transparency mode */
@media (prefers-reduced-transparency: reduce) {
    
    #header {
        background: white;
        backdrop-filter: none;
    }
    
    .hero-shapes .shape-1,
    .hero-shapes .shape-2 {
        opacity: 1;
    }
}

/* ==========================================
   UTILITY RESPONSIVE CLASSES
   ========================================== */

/* Show/hide elements at different breakpoints */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Responsive spacing */
.py-mobile-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (min-width: 768px) {
    .py-mobile-3 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Responsive text alignment */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */

/* Reduce layout thrashing on mobile */
@media (max-width: 767.98px) {
    
    /* Use transform instead of changing layout properties */
    .hover-lift {
        transform: translateZ(0); /* Force hardware acceleration */
    }
    
    /* Optimize images */
    img {
        image-rendering: optimizeSpeed;
    }
    
    /* Reduce complexity of shadows */
    .shadow-lg {
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    }
}

/* GPU acceleration for smooth animations */
@media (min-width: 768px) {
    
    .card,
    .btn,
    .team-member img {
        will-change: transform;
        transform: translateZ(0);
    }
} 