/* SEO Optimization CSS - Mobile Only (max-width: 768px) */
/* Desktop design remains unchanged */

/* ===== APPLY ONLY TO MOBILE DEVICES (max-width: 768px) ===== */
@media (max-width: 768px) {

    /* ===== BASE FONT SIZES (Minimum 16px for Mobile) ===== */
    html {
        font-size: 16px;
        scroll-behavior: smooth;
    }

    /* Ensure base text is readable on mobile */
    body {
        line-height: 1.6;
    }

    /* Form inputs must be 16px+ to prevent iOS zoom */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
        min-height: 44px;
        padding: 10px 12px;
    }

    /* ===== TOUCH TARGETS (Minimum 44-48px on Mobile) ===== */
    button,
    .btn,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    a[role="button"],
    .navbar-nav .nav-link {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 16px;
        font-size: 16px;
    }

    /* Dropdown items should be touch-friendly on mobile */
    .dropdown-item {
        min-height: 44px;
        padding: 12px 20px;
        display: flex;
        align-items: center;
    }

    /* Checkboxes and radio buttons on mobile */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 18px;
        min-height: 18px;
        cursor: pointer;
        margin-right: 6px;
    }

    /* ===== RESPONSIVE TEXT ON MOBILE ===== */
    body {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    p, li {
        font-size: 14px;
        line-height: 1.6;
    }
    
    small, .small-text {
        font-size: 12px;
    }
    
    /* Headings must be readable on mobile */
    h1, .h1 {
        font-size: clamp(18px, 5vw, 28px);
        line-height: 1.4;
        margin: 15px 0 10px 0;
    }
    
    h2, .h2 {
        font-size: clamp(16px, 4vw, 24px);
        line-height: 1.4;
        margin: 12px 0 8px 0;
    }
    
    h3, .h3 {
        font-size: clamp(15px, 3.5vw, 20px);
        line-height: 1.4;
        margin: 10px 0 6px 0;
    }
    
    h4, .h4 {
        font-size: clamp(14px, 3vw, 18px);
        line-height: 1.4;
        margin: 8px 0 4px 0;
    }
    
    h5, .h5 {
        font-size: 14px;
        margin: 6px 0 3px 0;
    }
    
    h6, .h6 {
        font-size: 13px;
        margin: 4px 0 2px 0;
    }

    /* ===== IMAGE OPTIMIZATION FOR MOBILE ===== */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Responsive images for different screen widths */
    picture {
        display: block;
        width: 100%;
    }

}

/* ===== DESKTOP UNCHANGED (min-width: 769px) ===== */
@media (min-width: 769px) {
    /* Desktop keeps all original styles - no changes here */
}

/* ===== ACCESSIBILITY (Both Mobile & Desktop) ===== */
/* Focus states for keyboard navigation */
button:focus,
.btn:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0761b7;
    outline-offset: 2px;
}

/* Respect prefers-reduced-motion for animations */
@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;
    }
}

/* ===== MOBILE-SPECIFIC RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 576px) {
    /* Extra small devices - additional optimizations */
    html { font-size: 15px; }
    
    body { font-size: 13px; }
    
    h1, .h1 { font-size: clamp(16px, 5vw, 24px); }
    h2, .h2 { font-size: clamp(15px, 4vw, 20px); }
    
    /* Ensure padding doesn't cause overflow */
    .container {
        padding: 0 10px;
    }
    
    /* Stack navigation items vertically */
    .navbar-nav {
        flex-direction: column;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

/* ===== TABLET OPTIMIZATION (576px - 768px) ===== */
@media (min-width: 577px) and (max-width: 768px) {
    html { font-size: 15.5px; }
    
    body { font-size: 14px; }
    
    /* Slightly larger headings on tablets */
    h1, .h1 { font-size: clamp(20px, 5vw, 30px); }
    h2, .h2 { font-size: clamp(18px, 4vw, 26px); }
}
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0761b7;
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
