/* ============================================================================
   CIVIL ELECTRIC - RESPONSIVE STYLESHEET
   ============================================================================ */

/* Tablet & Below (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .why-content,
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .why-image {
        order: -1;
    }

    .services-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile & Below (max-width: 768px) */
@media (max-width: 768px) {
    /* Typography */
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Top Bar */
    .top-bar {
        display: none;
    }

    /* Navigation */
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .navbar-nav li {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-link {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
        background: var(--gray-100);
    }

    .dropdown-item {
        padding: 0.75rem 1.5rem;
    }

    .navbar-menu .btn {
        margin-top: 1rem;
        width: 100%;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Hero Section */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Trust Badges */
    .trust-badges {
        gap: 1.5rem;
    }

    .trust-logo {
        height: 40px;
    }

    /* Sections */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
    }

    /* Services & Products */
    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card,
    .product-card {
        padding: 1.5rem;
    }

    /* Why Choose Us */
    .why-features {
        gap: 1.5rem;
    }

    .image-badge {
        bottom: 10px;
        right: 10px;
        padding: 1rem;
    }

    .badge-number {
        font-size: 2rem;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
    }

    .process-step {
        padding: 2rem 1rem;
    }

    .step-icon {
        font-size: 3rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Form */
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }

    /* CTA Section */
    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-buttons {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .cookie-buttons .btn {
        flex: 1;
    }

    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Buttons */
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Page Hero */
    .page-hero {
        padding: 3rem 0;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero .lead {
        font-size: 1.1rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

    .service-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .service-icon {
        width: 35px;
        height: 35px;
    }

    .product-image {
        height: 180px;
    }

    .brand-text strong {
        font-size: 1.25rem;
    }

    .brand-text small {
        font-size: 0.7rem;
    }

    .logo {
        height: 40px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

    .hero-stats {
        margin-top: 1rem;
    }

    section {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-float,
    .cookie-banner,
    .btn,
    .cta-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }

    a {
        text-decoration: underline;
        color: black;
    }

    .page-hero {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0052a3;
        --secondary: #d68600;
        --gray-700: #333333;
    }

    .btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .smooth-scroll {
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --dark: #ffffff;
        --white: #1a1a1a;
        --gray-100: #2d2d2d;
        --gray-200: #404040;
        --text: #ffffff;
    }

    body {
        background-color: var(--dark);
        color: var(--white);
    }

    .navbar {
        background-color: #2d2d2d;
    }
    */
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 1rem;
    z-index: 9999;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* Loading State */
.loading {
    overflow: hidden;
}

.loading * {
    animation-play-state: paused !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--dark);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 80px;
        right: 20px;
        font-size: 1.25rem;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 300px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}