/* Responsive Design for Sweep SecretStar Website */

/* Mobile-first approach with progressive enhancement */

/* Large Desktop (1200px and up) */
@media screen and (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-content p {
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .goals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .success-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (992px to 1199px) */
@media screen and (max-width: 1199px) and (min-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .success-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        gap: var(--spacing-lg);
    }
}

/* Tablet (768px to 991px) */
@media screen and (max-width: 991px) {
    :root {
        --container-padding: var(--spacing-md);
        --spacing-xxl: 3rem;
        --spacing-xl: 2rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: hsl(var(--background-white));
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-xl);
        transition: var(--transition-normal);
        z-index: 1001;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        opacity: 0;
        transform: translateX(50px);
        transition: var(--transition-normal);
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
    
    .nav-link {
        font-size: 1.5rem;
        padding: var(--spacing-md);
    }
    
    .hamburger {
        display: flex;
        z-index: 1002;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        min-height: 80vh;
        margin-top: 70px;
    }
    
    .hero-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Page Header */
    .page-header {
        padding: calc(var(--spacing-xl) + 70px) 0 var(--spacing-xl) 0;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    /* Grid Layouts */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-content,
    .story-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .about-text,
    .story-text {
        padding-right: 0;
        order: 2;
    }
    
    .about-image,
    .story-image {
        order: 1;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .goals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .success-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mv-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .quick-contact {
        grid-template-columns: 1fr;
    }
    
    .products-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Typography Adjustments */
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Cookie Notice */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .cookie-content p {
        min-width: auto;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    /* Legal Tables */
    .cookies-table {
        font-size: 0.875rem;
    }
    
    .cookies-table th,
    .cookies-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* Mobile Large (576px to 767px) */
@media screen and (max-width: 767px) {
    :root {
        --container-padding: var(--spacing-sm);
        --spacing-xxl: 2.5rem;
        --spacing-xl: 1.5rem;
        --spacing-lg: 1.25rem;
    }
    
    /* Header adjustments */
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .nav-logo svg {
        width: 120px;
        height: 32px;
    }
    
    /* Hero Section */
    .hero {
        min-height: 70vh;
        margin-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Page Header */
    .page-header {
        padding: calc(var(--spacing-lg) + 60px) 0 var(--spacing-lg) 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Grid Layouts */
    .stats {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .success-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .products-preview {
        grid-template-columns: 1fr;
    }
    
    /* Service Cards */
    .service-card,
    .service-detailed {
        padding: var(--spacing-lg);
    }
    
    .service-image {
        height: 160px;
    }
    
    /* Team Members */
    .team-member {
        padding: var(--spacing-lg);
    }
    
    .member-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Contact Adjustments */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    .team-member-contact {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .social-links-large {
        grid-template-columns: 1fr;
    }
    
    /* Newsletter Form */
    .newsletter-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-newsletter {
        justify-content: center;
        width: 100%;
    }
    
    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .thanks-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thanks-actions .btn-primary,
    .thanks-actions .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Thanks Details */
    .thanks-details {
        flex-direction: column;
        align-items: center;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .services-preview h2,
    .services-main h2,
    .team-preview h2,
    .team-full h2,
    .goals-section h2,
    .success-section h2,
    .values-section h2,
    .achievements h2,
    .why-choose-us h2,
    .faq-section h2 {
        font-size: 1.75rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Legal Content */
    .legal-content {
        padding: var(--spacing-lg);
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.375rem;
        padding-left: var(--spacing-sm);
    }
    
    /* Cookie Modal */
    .cookie-modal {
        padding: var(--spacing-sm);
    }
    
    .cookie-modal-content {
        padding: var(--spacing-lg);
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
    
    .btn-save,
    .btn-cancel {
        width: 100%;
    }
    
    /* Tables */
    .cookies-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .cookies-table thead,
    .cookies-table tbody,
    .cookies-table tr {
        display: block;
    }
    
    .cookies-table th,
    .cookies-table td {
        display: inline-block;
        width: auto;
        padding: var(--spacing-xs);
        border-bottom: none;
        border-right: 1px solid hsl(var(--border-light));
    }
    
    .cookies-table th:last-child,
    .cookies-table td:last-child {
        border-right: none;
    }
}

/* Mobile Small (575px and below) */
@media screen and (max-width: 575px) {
    :root {
        --container-padding: 1rem;
        --spacing-xxl: 2rem;
        --spacing-xl: 1.25rem;
        --spacing-lg: 1rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-logo svg {
        width: 100px;
        height: 28px;
    }
    
    /* Hero */
    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    /* Page Header */
    .page-header h1 {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    /* Cards and Components */
    .service-card,
    .service-detailed,
    .team-member,
    .goal-item,
    .success-item,
    .value-item,
    .achievement-item,
    .benefit-item,
    .product-card,
    .contact-option {
        padding: var(--spacing-md);
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-submit {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    /* Forms */
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
    }
    
    /* Statistics */
    .stat-item h3 {
        font-size: 2rem;
    }
    
    /* Achievement numbers */
    .success-number {
        font-size: 1.5rem;
    }
    
    .achievement-year {
        font-size: 1.25rem;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.375rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    .services-preview h2,
    .services-main h2,
    .team-preview h2,
    .team-full h2,
    .goals-section h2,
    .success-section h2,
    .values-section h2,
    .achievements h2,
    .why-choose-us h2,
    .faq-section h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    /* Cookie Notice */
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-accept-all,
    .btn-necessary,
    .btn-settings {
        width: 100%;
        justify-content: center;
    }
    
    /* Browser Instructions */
    .browser-item {
        padding: var(--spacing-sm);
    }
    
    .browser-item h5 {
        font-size: 0.9rem;
    }
    
    .browser-item p {
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile (480px and below) */
@media screen and (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
        --spacing-xxl: 1.5rem;
        --spacing-xl: 1rem;
        --spacing-lg: 0.875rem;
        --spacing-md: 0.75rem;
    }
    
    /* Hero */
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    /* Page Headers */
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    /* Components */
    .service-card,
    .service-detailed,
    .team-member,
    .contact-item,
    .contact-option {
        padding: var(--spacing-sm);
    }
    
    /* Legal Content */
    .legal-content {
        padding: var(--spacing-md);
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    }
    
    .footer-content {
        gap: var(--spacing-md);
    }
    
    /* Typography */
    .services-preview h2,
    .services-main h2,
    .team-preview h2,
    .team-full h2,
    .goals-section h2,
    .success-section h2,
    .values-section h2,
    .achievements h2,
    .why-choose-us h2,
    .faq-section h2 {
        font-size: 1.375rem;
    }
    
    /* Tables - Stack layout for very small screens */
    .cookies-table,
    .cookies-table thead,
    .cookies-table tbody,
    .cookies-table th,
    .cookies-table td,
    .cookies-table tr {
        display: block;
    }
    
    .cookies-table tr {
        border: 1px solid hsl(var(--border-light));
        margin-bottom: var(--spacing-sm);
        border-radius: var(--radius-sm);
        padding: var(--spacing-sm);
    }
    
    .cookies-table th {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .cookies-table td {
        border: none;
        position: relative;
        padding-left: 40%;
        padding-right: var(--spacing-sm);
        padding-top: var(--spacing-xs);
        padding-bottom: var(--spacing-xs);
    }
    
    .cookies-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: var(--spacing-sm);
        width: 35%;
        font-weight: 600;
        color: hsl(var(--text-dark));
    }
}

/* Landscape orientation adjustments for mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 90vh;
    }
    
    .hero-content {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-content p {
        margin-bottom: var(--spacing-md);
    }
    
    .nav-menu {
        flex-direction: row;
        height: auto;
        top: 100%;
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .nav-link {
        font-size: 1rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* Hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .service-detailed:hover,
    .team-member:hover,
    .goal-item:hover,
    .success-item:hover,
    .value-item:hover,
    .achievement-item:hover,
    .benefit-item:hover,
    .product-card:hover,
    .contact-option:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-outline:hover,
    .btn-submit:hover {
        transform: none;
    }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn-primary:focus,
    .btn-secondary:focus,
    .btn-outline:focus,
    .btn-submit:focus,
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 2px solid hsl(var(--primary-blue));
        outline-offset: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: 210 14% 89%; /* Light text for dark mode */
        --text-medium: 210 14% 73%; /* Medium light text */
        --text-light: 202 8% 56%; /* Lighter text */
        
        --background-white: 210 16% 18%; /* Dark background */
        --background-light: 210 16% 15%; /* Darker background */
        --background-soft: 210 16% 12%; /* Darkest background */
        
        --border-light: 210 16% 25%; /* Dark borders */
        --border-medium: 210 16% 35%; /* Medium dark borders */
    }
    
    .hero {
        background: linear-gradient(135deg, hsl(var(--background-light)), hsl(var(--background-soft)));
    }
    
    .cookie-notice {
        background-color: hsl(var(--background-soft));
        border-top: 1px solid hsl(var(--border-light));
    }
    
    .nav-menu {
        background-color: hsl(var(--background-white));
    }
}

/* Print optimizations for mobile */
@media print {
    .container {
        padding: 0;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .services-grid,
    .team-grid,
    .goals-grid,
    .success-grid,
    .values-grid,
    .achievements-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .service-card,
    .service-detailed,
    .team-member {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
