/* ============================================
   RESPONSIVE STYLES - MOBILE FIRST APPROACH
   ============================================ */

/* ============================================
   LARGE TABLETS & SMALL DESKTOPS (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .services-grid,
    .features-grid {
        gap: 1.5rem;
    }
}

/* ============================================
   TABLETS (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        font-size: 15px;
    }
    
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 2rem;
        gap: 0;
        box-shadow: var(--shadow-xl);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: var(--transition-smooth);
    }
    
    .nav-menu.active {
        max-height: calc(100vh - 70px);
        opacity: 1;
        overflow-y: auto;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu > li > a {
        padding: 1rem 0;
        width: 100%;
        display: block;
    }
    
    .nav-menu a.active::after {
        display: none;
    }
    
    /* Dropdown Menu for Mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .dropdown-menu {
        background: var(--light-bg);
        border-radius: 0;
    }
    
    .submenu-items {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--white);
        max-height: 0;
        overflow: hidden;
    }
    
    .dropdown-submenu.active .submenu-items {
        max-height: 300px;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }
    
    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 3rem;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 3rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-category-card {
        padding: 2rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    /* CTA Section */
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
        bottom: 20px;
        left: 20px;
    }
}

/* ============================================
   MOBILE PHONES (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
        --container-padding: 0 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        margin-bottom: 3rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Service Cards */
    .service-category-card,
    .feature-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .service-icon,
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i,
    .feature-icon i {
        font-size: 1.75rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Testimonials */
    .testimonial-text {
        font-size: 1rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
    
    .author-avatar i {
        font-size: 1.5rem;
    }
    
    /* Newsletter */
    .newsletter-form input {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 15px;
        left: 15px;
    }
}

/* ============================================
   SMALL MOBILE PHONES (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
    :root {
        --section-padding: 40px 0;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .service-category-card,
    .feature-card,
    .testimonial-card {
        padding: 1.25rem;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FOR MOBILE
   ============================================ */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY & PRINT STYLES
   ============================================ */

/* Focus Styles for Keyboard Navigation */
@media (prefers-reduced-motion: no-preference) {
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible {
        outline: 3px solid var(--secondary-color);
        outline-offset: 2px;
    }
}

/* Reduced Motion */
@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;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-menu,
    .whatsapp-float,
    .back-to-top,
    .scroll-indicator,
    .newsletter-section,
    .cta-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
    }
}

/* ============================================
   HOVER EFFECTS FOR TOUCH DEVICES
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .service-category-card:hover,
    .feature-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
    }
}
