/* Amperedis - Responsive Styles */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container-xxl {
        max-width: 1320px;
    }
    
    .hero-section .display-4 {
        font-size: 4rem;
    }
    
    .service-icon {
        width: 100px;
        height: 100px;
    }
    
    .service-icon i {
        font-size: 2.5rem;
    }
}

/* Large Devices (992px and up) */
@media (min-width: 992px) {
    .hero-section {
        min-height: 80vh;
        display: flex;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .navbar-nav .nav-link {
        font-size: 0.95rem;
    }
}

/* Medium Devices (768px and up) */
@media (min-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .service-card {
        padding: 2.5rem;
    }
    
    .contact-item {
        margin-bottom: 2rem;
    }
    
    .project-card .project-details {
        padding: 2rem;
    }
    
    .quote-form-container {
        padding: 4rem;
    }
    
    .footer {
        padding: 4rem 0 2rem;
    }
}

/* Small Devices (576px and up) */
@media (min-width: 576px) {
    .hero-buttons .btn {
        margin: 0.5rem 0.5rem;
    }
    
    .cta-buttons .btn {
        margin: 0.5rem 0.5rem;
    }
    
    .language-switcher a {
        margin: 0 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Mobile Devices (575px and below) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0;
    }
    
    .page-header {
        padding: 3rem 0 2rem;
        text-align: center;
    }
    
    .page-header .display-4 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .language-bar {
        padding: 0.25rem 0;
    }
    
    .language-switcher {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .language-switcher a {
        font-size: 0.8rem;
        margin: 0.1rem 0.25rem;
        padding: 0.25rem 0.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .service-detailed-card .service-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .about-section .row {
        text-align: center;
    }
    
    .about-section .stats-grid {
        margin-top: 2rem;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        margin: 0 auto 0.75rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-section {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .quote-form-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        text-align: center;
        padding-left: 0;
    }
    
    .section-title::before {
        display: none;
    }
    
    .project-filters {
        text-align: center;
    }
    
    .project-filters .btn {
        margin: 0.25rem;
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-overlay {
        padding: 0.5rem;
    }
    
    .project-overlay h4 {
        font-size: 1.1rem;
    }
    
    .project-details {
        padding: 1rem;
    }
    
    .project-details h5 {
        font-size: 1.1rem;
    }
    
    .info-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .info-icon i {
        font-size: 2rem;
    }
    
    .article-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .article-header {
        flex-direction: column;
        text-align: center;
    }
    
    .article-header i {
        margin: 0 0 0.5rem 0;
        font-size: 2rem;
    }
    
    .installation-steps > li {
        padding-left: 1.5rem;
    }
    
    .installation-steps > li::before {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.75rem;
    }
    
    .benefit-item,
    .tip-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .benefit-item i,
    .tip-item i {
        margin: 0 0 0.5rem 0;
        font-size: 1.5rem;
    }
    
    .maintenance-section {
        padding: 2rem 1rem !important;
    }
    
    .maintenance-section .row {
        text-align: center;
    }
    
    .cta-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .cta-section .display-5 {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin: 0;
    }
    
    .emergency-contact {
        text-align: center;
    }
    
    .emergency-contact .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .emergency-contact .btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer .row > div {
        margin-bottom: 2rem;
    }
    
    .footer .social-links {
        justify-content: center;
        display: flex;
    }
    
    .footer .language-switcher-footer {
        justify-content: center;
        display: flex;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .accordion-button {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Extra Small Devices (480px and below) */
@media (max-width: 479.98px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .page-header .display-4 {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .quote-form-container {
        padding: 1rem;
        margin: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .project-filters .btn {
        width: 100%;
        margin: 0.125rem 0;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .maintenance-section {
        padding: 1.5rem 0.5rem !important;
    }
    
    .cta-section .display-5 {
        font-size: 1.5rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* Landscape Mobile Devices */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .page-header {
        padding: 2rem 0 1rem;
    }
    
    .whatsapp-float {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .whatsapp-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-image img,
    .project-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-button {
        animation: none;
    }
    
    .service-card:hover,
    .project-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
        --gray-900: #ffffff;
    }
}

/* Focus Management for Accessibility */
@media (max-width: 767.98px) {
    .navbar-toggler:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .form-control:focus,
    .form-select:focus,
    .btn:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .whatsapp-button:focus {
        outline: 2px solid var(--white);
        outline-offset: 2px;
    }
}

/* Container Adjustments for Very Small Screens */
@media (max-width: 375px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section,
    .page-header,
    .cta-section {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .quote-form-container {
        margin: 0 -0.75rem;
        border-radius: 0;
    }
    
    .contact-form {
        border-radius: var(--border-radius);
    }
}

/* iPad and Tablet Specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-image {
        height: 220px;
    }
    
    .quote-form-container {
        padding: 3rem;
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
}

/* Large Tablets and Small Laptops */
@media (min-width: 1025px) and (max-width: 1199px) {
    .hero-section .display-4 {
        font-size: 3rem;
    }
    
    .service-card {
        padding: 2.25rem;
    }
    
    .quote-form-container {
        padding: 3.5rem;
    }
}

/* Print Responsive */
@media print {
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .row {
        margin: 0 !important;
    }
    
    .col-lg-6,
    .col-md-6,
    .col-sm-6 {
        width: 50% !important;
        float: left !important;
    }
    
    .col-lg-4,
    .col-md-4 {
        width: 33.333% !important;
        float: left !important;
    }
    
    .col-lg-3,
    .col-md-3 {
        width: 25% !important;
        float: left !important;
    }
    
    .service-card,
    .project-card,
    .info-card {
        break-inside: avoid;
        margin-bottom: 1rem !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
