/* ============================================
   LIMPIEZA RAPIDA - Responsive Styles
   ============================================ */

/* ===========================================
   Large Desktop (1440px+)
   =========================================== */
@media (min-width: 1440px) {
    :root {
        --container-max: 1320px;
    }

    .hero-title {
        font-size: var(--fs-7xl);
    }
}

/* ===========================================
   Desktop (1024px - 1439px)
   =========================================== */
@media (max-width: 1439px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: var(--space-2xl);
    }
}

/* ===========================================
   Tablet Landscape (1024px - 1199px)
   =========================================== */
@media (max-width: 1199px) {
    .hero-title {
        font-size: var(--fs-5xl);
    }

    .hero-image {
        width: 40%;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        gap: var(--space-2xl);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-options {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   Tablet Portrait (768px - 1023px)
   =========================================== */
@media (max-width: 1023px) {
    :root {
        --fs-5xl: 2.5rem;
        --fs-6xl: 3rem;
    }

    /* Header */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition-base);
        z-index: var(--z-modal);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .nav-link {
        font-size: var(--fs-lg);
        color: var(--white);
    }

    /* Ensure mobile menu links stay white even when header is scrolled */
    .header.scrolled .nav-link {
        color: var(--white);
    }

    .header-phone {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle span {
        background: var(--primary);
    }

    .menu-toggle.active span {
        background: var(--white);
    }

    /* Hero */
    .hero {
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .about-content {
        padding-left: 0;
        text-align: center;
    }

    .advantages-list {
        grid-template-columns: 1fr 1fr;
    }

    .about-image {
        order: -1;
    }

    .about-image-badge {
        bottom: -20px;
        right: 50%;
        transform: translateX(50%);
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .contact-info {
        align-items: center;
        text-align: center;
    }


    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

/* ===========================================
   Mobile Landscape (576px - 767px)
   =========================================== */
@media (max-width: 767px) {
    :root {
        --fs-4xl: 1.875rem;
        --fs-5xl: 2.25rem;
        --fs-6xl: 2.5rem;
        --space-5xl: 4rem;
        --container-padding: 1rem;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    /* Section Headers */
    .section-title {
        font-size: var(--fs-3xl);
    }

    .section-subtitle::before,
    .section-subtitle::after {
        display: none;
    }

    /* Hero */
    .hero-title {
        font-size: var(--fs-4xl);
    }

    .hero-description {
        font-size: var(--fs-base);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .hero-stat {
        flex: 1 1 40%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .service-card {
        padding: var(--space-xl);
    }

    /* Advantages */
    .advantages-list {
        grid-template-columns: 1fr;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Calculator */
    .calculator-tabs {
        flex-direction: column;
    }

    .calculator-tab {
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calculator-result-price {
        font-size: var(--fs-4xl);
    }

    /* Testimonials */
    .testimonial-content {
        padding: var(--space-xl);
    }

    .testimonial-text {
        font-size: var(--fs-base);
        padding-left: 0;
    }

    .testimonial-author {
        padding-left: 0;
        flex-direction: column;
        text-align: center;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin: 0 auto;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Scroll to top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===========================================
   Mobile Portrait (320px - 575px)
   =========================================== */
@media (max-width: 575px) {
    :root {
        --fs-3xl: 1.65rem;
        --fs-4xl: 2rem;
        --fs-5xl: 2.25rem;
        --space-4xl: 3.5rem;
        --space-5xl: 4.5rem;
    }

    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--fs-sm);
    }

    .btn-lg {
        padding: var(--space-md) var(--space-xl);
    }

    /* Header */
    .header .container {
        padding: var(--space-sm) var(--space-md);
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 45px;
    }

    .nav {
        width: 100%;
        right: -100%;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 80px 0 var(--space-4xl);
        background-position: center bottom;
    }

    .hero-title {
        text-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .hero-badge {
        font-size: var(--fs-xs);
    }

    /* Hero Stats - Unified Card */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: var(--white);
        padding: var(--space-md) var(--space-xs);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        margin-top: var(--space-lg);
        gap: 2px;
        text-align: center;
    }

    .hero-stat {
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 2px;
    }

    .hero-stat-number {
        font-size: 1.35rem;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 800;
        margin-bottom: 2px;
    }

    .hero-stat-text {
        font-size: 0.65rem;
        color: var(--text-secondary);
        line-height: 1.1;
        letter-spacing: -0.3px;
        font-weight: 600;
    }

    /* Service Cards */
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: var(--fs-2xl);
    }

    /* About */
    .about-image-badge {
        padding: var(--space-md);
    }

    .about-image-badge-number {
        font-size: var(--fs-3xl);
    }

    .advantage-item {
        flex-direction: column;
        text-align: center;
    }

    .advantage-icon {
        margin: 0 auto;
    }

    /* Calculator */
    .calculator-header {
        padding: var(--space-xl) var(--space-md);
        text-align: center;
    }

    .calculator-header h3 {
        font-size: var(--fs-xl);
    }

    .calculator-body {
        padding: var(--space-lg);
    }

    .calculator-tabs {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        margin-bottom: var(--space-xl);
    }

    .calculator-tab {
        width: 100%;
        padding: var(--space-md);
        justify-content: center;
        font-size: var(--fs-sm);
        border-radius: var(--radius-lg);
    }

    .form-group {
        margin-bottom: var(--space-lg);
    }

    .form-label {
        font-size: var(--fs-sm);
        margin-bottom: var(--space-xs);
    }

    .calculator-option {
        padding: var(--space-md);
        margin-bottom: var(--space-sm);
    }

    .quantity-control {
        height: 32px;
    }

    .qty-btn {
        width: 32px;
        height: 32px;
    }

    /* FAQ */
    .faq-question {
        padding: var(--space-md);
        font-size: var(--fs-base);
    }

    .faq-answer-content {
        padding: 0 var(--space-md) var(--space-md);
    }

    /* Contact */
    /* Contact */
    .contact-grid {
        gap: var(--space-xl);
    }

    .contact-info {
        gap: var(--space-md);
    }

    .contact-item {
        background: rgba(255, 255, 255, 0.05);
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-md);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .contact-icon {
        margin: 0;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        background: rgba(46, 125, 50, 0.2);
        color: var(--primary-light);
    }

    .contact-details h4 {
        font-size: 1rem;
        margin-bottom: 4px;
        color: var(--white);
    }

    .contact-details p,
    .contact-details a {
        font-size: 0.9rem;
        color: var(--gray-400);
    }

    .contact-form-wrapper {
        padding: var(--space-xl) var(--space-lg);
    }

    /* Premium Mobile Polish */
    .service-card,
    .testimonial-content,
    .gallery-item {
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .btn:active,
    .service-card:active,
    .gallery-item:active {
        transform: scale(0.98);
    }
}

/* ===========================================
   Print Styles
   =========================================== */
@media print {

    .header,
    .scroll-top,
    .menu-toggle {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
        background: none;
    }

    .hero-title,
    .section-title {
        color: #000;
    }

    .btn {
        border: 1px solid #000;
    }
}

/* ===========================================
   Accessibility
   =========================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #008000;
        --secondary: #FFD700;
        --text-primary: #000000;
        --text-secondary: #333333;
    }

    .btn {
        border-width: 3px;
    }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
    /* Can be enabled if needed */
    /* body {
    background: var(--dark);
    color: var(--gray-300);
  } */
}