/**
 * Mobile Fixes and Enhancements for Loove Dove Theme
 * Add this to your theme's style.css or create a separate CSS file
 */

/* ============================================
   ENHANCED MOBILE FIXES
   ============================================ */

/* Fix for hero section on mobile */
@media (max-width: 768px) {
    .ld-hero {
        padding: 100px 0 60px; /* Reduced padding for mobile */
        min-height: auto; /* Remove fixed height */
    }
    
    .ld-hero-content {
        text-align: center;
        padding: 0;
    }
    
    .ld-hero-title {
        font-size: 2rem !important; /* Smaller title on mobile */
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    .ld-hero-subtitle {
        font-size: 2.5rem !important; /* Adjust subtitle */
        margin-bottom: 20px;
    }
    
    .ld-hero-description {
        font-size: 14px !important;
        line-height: 1.6;
        margin-bottom: 30px;
    }
    
    /* Fix stats display on mobile */
    .ld-hero-stats {
        margin-top: 40px;
    }
    
    .ld-stat-number {
        font-size: 2rem !important; /* Smaller stat numbers */
    }
    
    .ld-stat-label {
        font-size: 12px !important;
    }
}

/* Fix for logo and header on mobile */
@media (max-width: 768px) {
    .ld-logo-text {
        font-size: 1.5rem !important; /* Smaller logo text */
    }
    
    .ld-logo-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .ld-header {
        padding: 15px 0 !important;
    }
    
    .ld-btn-primary {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

/* Mobile menu improvements */
@media (max-width: 1023px) {
    .ld-menu-toggle {
        display: flex !important;
        cursor: pointer;
        z-index: 1001;
    }
    
    /* Mobile navigation overlay */
    .ld-nav-mobile {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .ld-nav-mobile.active {
        right: 0;
    }
    
    .ld-nav-mobile .ld-nav-link {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 16px;
    }
    
    /* Mobile menu backdrop */
    .ld-nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .ld-nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Category cards responsive improvements */
@media (max-width: 768px) {
    .ld-categories-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 20px !important;
    }
    
    .ld-category-card {
        padding: 30px 24px !important;
    }
    
    .ld-category-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .ld-category-title {
        font-size: 1.25rem !important;
    }
    
    .ld-category-count {
        font-size: 13px !important;
    }
}

/* Blog grid mobile fixes */
@media (max-width: 768px) {
    .ld-blog-card {
        margin-bottom: 24px;
    }
    
    .ld-blog-card-image {
        height: 200px !important; /* Fixed height for mobile */
    }
    
    .ld-blog-card-content {
        padding: 20px !important;
    }
    
    .ld-blog-card-title {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }
    
    .ld-blog-card-meta {
        flex-wrap: wrap;
        gap: 12px !important;
    }
    
    .ld-blog-card-meta-item {
        font-size: 12px !important;
    }
}

/* Quote section mobile */
@media (max-width: 768px) {
    .ld-quote {
        padding: 50px 0 !important;
    }
    
    .ld-quote-content {
        padding: 40px 24px !important;
    }
    
    .ld-quote-text {
        font-size: 1.25rem !important;
        line-height: 1.6;
    }
    
    .ld-quote-author-name {
        font-size: 14px !important;
    }
}

/* Newsletter section mobile */
@media (max-width: 768px) {
    .ld-newsletter-inner {
        padding: 40px 24px !important;
    }
    
    .ld-newsletter-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    .ld-newsletter-desc {
        font-size: 14px !important;
    }
    
    .ld-newsletter-benefits {
        flex-direction: column !important;
        gap: 16px !important;
        margin: 24px 0 !important;
    }
    
    .ld-newsletter-benefit {
        font-size: 13px !important;
    }
}

/* Footer mobile improvements */
@media (max-width: 768px) {
    .ld-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .ld-footer-column {
        text-align: center;
    }
    
    .ld-footer-logo {
        justify-content: center;
    }
    
    .ld-footer-social {
        justify-content: center;
    }
    
    .ld-footer-links {
        align-items: center;
    }
}

/* Floating buttons mobile positioning */
@media (max-width: 480px) {
    .ld-scroll-top {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .ld-scroll-top svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .ld-quick-message {
        bottom: 20px !important;
        left: 20px !important;
    }
    
    .ld-quick-message-btn {
        width: 50px !important;
        height: 50px !important;
    }
    
    .ld-quick-message-panel {
        width: calc(100vw - 40px) !important;
        max-width: 280px !important;
    }
}

/* Fix overflow issues */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .ld-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Prevent horizontal scroll */
    .ld-row, .ld-grid, .ld-flex {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Touch-friendly sizing */
@media (max-width: 768px) {
    /* Make all buttons and links easier to tap */
    .ld-btn-primary,
    .ld-btn-secondary,
    .ld-category-card,
    .ld-blog-card-link,
    .ld-nav-link {
        min-height: 44px; /* iOS recommended touch target */
    }
    
    /* Increase spacing between tappable elements */
    .ld-hero-buttons {
        gap: 16px !important;
    }
    
    .ld-footer-social-link {
        width: 44px !important;
        height: 44px !important;
    }
}

/* Testimonials mobile fix */
@media (max-width: 768px) {
    .ld-testimonial-card {
        padding: 24px !important;
    }
    
    .ld-testimonial-text {
        font-size: 14px !important;
        line-height: 1.6;
    }
    
    .ld-testimonial-author-name {
        font-size: 14px !important;
    }
    
    .ld-testimonial-author-role {
        font-size: 12px !important;
    }
    
    .ld-testimonial-nav-btn {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Improve loading performance on mobile */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .ld-animate-float,
    .ld-animate-pulse {
        animation: none !important;
    }
    
    /* Simplify gradient animations */
    .ld-bg-gradient,
    .ld-text-gradient {
        background-size: 100% 100% !important;
        animation: none !important;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    :root {
        --ld-section-padding: 40px !important;
    }
    
    .ld-hero-title {
        font-size: 1.75rem !important;
    }
    
    .ld-hero-subtitle {
        font-size: 2rem !important;
    }
    
    .ld-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .ld-stat-number {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
}

/* Landscape mode fixes */
@media (max-width: 896px) and (orientation: landscape) {
    .ld-hero {
        padding: 80px 0 40px !important;
    }
    
    .ld-hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Print styles */
@media print {
    .ld-header,
    .ld-scroll-top,
    .ld-quick-message,
    .ld-newsletter,
    .ld-footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Ensure focus states are visible */
    a:focus,
    button:focus {
        outline: 2px solid var(--ld-pink);
        outline-offset: 2px;
    }
    
    /* Improve contrast for better readability */
    .ld-text-light {
        color: #666 !important;
    }
    
    /* Skip to content link */
    .skip-to-content {
        position: absolute;
        top: -100px;
        left: 0;
        background: var(--ld-pink);
        color: white;
        padding: 10px 20px;
        z-index: 10000;
        transition: top 0.3s;
    }
    
    .skip-to-content:focus {
        top: 0;
    }
}
