/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Hero Section */
    .hero-modern {
        padding: 80px 0 40px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-features {
        flex-direction: column;
        gap: 15px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .cta-group .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .hero-stats .divider {
        display: none;
    }

    /* Navigation */
    header nav ul {
        flex-direction: column;
        gap: 10px;
    }

    /* Product Cards */
    .product-card {
        margin-bottom: 20px;
    }

    /* Blog Cards */
    .blog-grid,
    .events-grid,
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Section Padding */
    section {
        padding: 60px 0 !important;
    }

    /* Footer */
    footer .container>div {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Hero Section */
    .hero-modern {
        padding: 100px 0 50px;
    }

    .hero-container {
        flex-direction: column;
    }

    .hero-visual {
        margin-top: 40px;
    }

    /* Grid Layouts */
    .blog-grid,
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product Grids */
    [style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Section Padding */
    section {
        padding: 80px 0 !important;
    }

    /* About Section */
    .about-wrapper {
        flex-direction: column;
    }

    .about-image,
    .about-content-card {
        flex: 1 1 100%;
    }
}

/* Laptops and Small Desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    /* Product Grids */
    [style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Large Desktops (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1280px;
    }
}

/* ============================================
   COMPONENT-SPECIFIC RESPONSIVE STYLES
   ============================================ */

/* Header Responsive */
@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }

    .header-container {
        flex-wrap: wrap;
    }

    header nav {
        width: 100%;
        margin-top: 15px;
    }

    header nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Hero Section Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content,
    .hero-visual {
        flex: 1 1 100%;
    }

    .hero-visual {
        margin-top: 40px;
    }

    .float-card {
        display: none;
    }
}

/* Product Card Responsive */
@media (max-width: 768px) {
    .product-card {
        max-width: 100%;
    }

    .product-info {
        padding: 20px;
    }
}

/* Blog Section Responsive */
@media (max-width: 768px) {
    .blog-card-image {
        height: 200px;
    }

    .blog-card-content {
        padding: 20px;
    }
}

/* About Section Responsive */
@media (max-width: 992px) {
    .about-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .about-image,
    .about-content-card {
        flex: 1 1 100%;
    }

    .about-content-card {
        padding: 40px 30px;
    }
}

/* Benefits Section Responsive */
@media (max-width: 768px) {
    .benefits-section .row {
        flex-direction: column;
    }

    .benefits-text,
    .benefits-grid {
        flex: 1 1 100%;
    }

    .benefits-grid {
        margin-top: 30px;
    }
}

/* Stats Section Responsive */
@media (max-width: 768px) {
    [style*="grid-template-columns: repeat(auto-fit, minmax(250px"] {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Events Section Responsive */
@media (max-width: 768px) {
    .event-card {
        padding: 30px 20px;
    }
}

/* Testimonials Responsive */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 25px;
    }
}

/* Newsletter Section Responsive */
@media (max-width: 768px) {
    [style*="display: flex; gap: 10px"] form {
        flex-direction: column;
    }

    [style*="display: flex; gap: 10px"] input[type="email"],
    [style*="display: flex; gap: 10px"] button {
        width: 100%;
    }
}

/* Footer Responsive */
@media (max-width: 768px) {
    footer .container>div:first-child {
        grid-template-columns: 1fr;
        text-align: center;
    }

    footer ul {
        align-items: center;
    }

    footer [style*="display: flex; justify-content: space-between"] {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE DESIGN
   ============================================ */

/* Hide on Mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on Desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Show only on Mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Text Alignment Responsive */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
}

/* Padding Responsive */
@media (max-width: 768px) {
    .p-mobile-sm {
        padding: 20px !important;
    }

    .px-mobile-sm {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .py-mobile-sm {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}

/* Margin Responsive */
@media (max-width: 768px) {
    .m-mobile-sm {
        margin: 20px !important;
    }

    .mx-mobile-sm {
        margin-left: 20px !important;
        margin-right: 20px !important;
    }

    .my-mobile-sm {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus States */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* 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;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #006400;
        --text-dark: #000000;
        --text-light: #333333;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --white: #2d2d2d;
        --text-dark: #ffffff;
        --text-light: #b0b0b0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    header,
    footer,
    .whatsapp-float,
    .btn,
    nav {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
/* ============================================
   MOBILE HEADER FIXES
   ============================================ */

@media (max-width: 768px) {
    /* Fix Top Bar Layout */
    .top-bar {
        position: relative !important;
        padding: 5px 0 !important;
    }
    
    .top-bar-content {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .top-contact, .top-social {
        display: none !important;
    }
    
    .top-offer {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    /* Fix Header Positioning */
    header {
        position: sticky !important;
        top: 0 !important;
        margin-top: 0 !important;
        padding: 10px 0 !important;
    }
    
    .hero-modern {
        padding-top: 40px !important;
    }
    
    /* Fix Navigation Layout */
    nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        position: relative !important;
        flex-wrap: nowrap !important;
    }
    
    /* Fix Logo Size */
    .logo img {
        height: 35px !important;
    }
    
    .logo span {
        font-size: 1.1rem !important;
    }
    
    /* Mobile Menu Toggle Button Style */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.4rem;
        color: var(--text-dark);
        cursor: pointer;
        padding: 5px;
        margin-left: 10px;
        order: 3;
    }
    
    .nav-icons {
        order: 2;
        gap: 12px !important;
        margin-left: auto; /* Push icons to right but before toggle */
    }
    
    .nav-icons a {
        font-size: 1.1rem;
        width: 32px;
        height: 32px;
    }
    
    /* Mobile Menu Dropdown */
    header nav ul {
        display: none !important; /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column !important;
        padding: 20px;
        gap: 15px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-radius: 0 0 16px 16px;
        backdrop-filter: blur(10px);
        margin-top: 15px;
        z-index: 9999;
    }
    
    header nav ul.mobile-active {
        display: flex !important;
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Fix menu items in dropdown */
    header nav ul li {
        width: 100%;
        text-align: center;
    }

    header nav ul li a {
        display: block;
        padding: 10px;
        font-size: 1.1rem;
    }
}
