/**
 * Lupuzo HomeCare - Responsive CSS
 * Comprehensive responsive styles for all device sizes
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   BASE RESPONSIVE CONTAINER
   ============================================ */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 992px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============================================
   HEADER & NAVIGATION RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .mobile-menu-btn {
        display: block !important;
    }
    
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 0;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        display: flex;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }
    
    .header-nav.active {
        transform: translateX(0);
    }
    
    .btn-login,
    .btn-register,
    .btn-provider {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 12px !important;
        height: 60px !important;
    }
    
    .header-logo {
        font-size: 1.1rem !important;
    }
    
    .header-logo i {
        font-size: 1.25rem !important;
    }
}

/* ============================================
   HERO SECTION RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .homecare-hero {
        min-height: 450px !important;
    }
    
    .homecare-hero::before {
        width: 60% !important;
    }
    
    .hero-title {
        font-size: 2.25rem !important;
    }
}

@media (max-width: 768px) {
    .homecare-hero {
        min-height: 400px !important;
    }
    
    .homecare-hero::before {
        width: 100% !important;
        opacity: 0.1 !important;
    }
    
    .hero-title {
        font-size: 1.875rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        max-width: 100% !important;
    }
    
    .hero-badge {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

@media (max-width: 576px) {
    .homecare-hero {
        min-height: auto !important;
        padding: 40px 0 60px !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem !important;
    }
    
    .service-search-bar {
        padding: 16px !important;
        margin: 0 !important;
    }
    
    .search-btn {
        width: 100% !important;
        margin-top: 12px !important;
    }
}

/* ============================================
   SERVICE CARDS RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .service-card-img {
        height: 140px !important;
    }
    
    .service-card .card-body {
        padding: 12px !important;
    }
    
    .service-card h5 {
        font-size: 0.9375rem !important;
    }
    
    .service-card .text-muted {
        font-size: 0.75rem !important;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .service-card-img {
        height: 150px !important;
    }
}

/* ============================================
   CATEGORY CARDS RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .category-card {
        margin-bottom: 12px !important;
    }
    
    .category-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    .category-card h6 {
        font-size: 0.8125rem !important;
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 40px 0 !important;
    }
    
    .category-hero h1 {
        font-size: 1.75rem !important;
    }
    
    .category-icon-large {
        width: 60px !important;
        height: 60px !important;
        font-size: 28px !important;
    }
}

/* ============================================
   PROFESSIONAL CARDS RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .professional-card {
        margin-bottom: 16px !important;
    }
    
    .pro-banner {
        height: 50px !important;
    }
    
    .pro-avatar-wrap {
        margin-top: -20px !important;
    }
    
    .pro-img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ============================================
   HOW IT WORKS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .how-it-works-step::after {
        display: none !important;
    }
    
    .how-it-works-step {
        padding: 0 5px !important;
        margin-bottom: 30px !important;
    }
    
    .step-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 20px !important;
    }
    
    .step-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
    }
    
    .step-title {
        font-size: 1rem !important;
    }
    
    .step-desc {
        font-size: 12px !important;
    }
}

/* ============================================
   BOOKING PAGE RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .summary-card {
        position: relative !important;
        top: 0 !important;
        margin-top: 24px !important;
    }
    
    .booking-progress {
        margin-bottom: 30px !important;
    }
    
    .step-label {
        font-size: 11px !important;
    }
}

@media (max-width: 576px) {
    .booking-progress {
        padding: 0 10px !important;
    }
    
    .step-circle {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    .step-label {
        display: none !important;
    }
    
    .address-card,
    .time-slot-card,
    .payment-method-card {
        padding: 12px !important;
    }
    
    .time-slot-card {
        font-size: 12px !important;
    }
}

/* ============================================
   SERVICE DETAILS RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .pricing-card {
        position: relative !important;
        top: 0 !important;
    }
    
    .service-gallery .main-image {
        height: 300px !important;
    }
}

@media (max-width: 576px) {
    .service-gallery .main-image {
        height: 200px !important;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px !important;
    }
    
    .price-display {
        font-size: 28px !important;
    }
    
    .feature-list li {
        padding: 6px 0 !important;
        font-size: 13px !important;
    }
}

/* ============================================
   DASHBOARD RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 12px !important;
    }
    
    .stat-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
    
    .quick-action-btn {
        padding: 12px !important;
    }
    
    .quick-action-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .booking-card {
        padding: 12px !important;
    }
    
    .booking-card h6 {
        font-size: 0.875rem !important;
    }
    
    .status-badge {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }
    
    .wallet-balance {
        padding: 16px !important;
    }
}

/* ============================================
   SERVICES LISTING RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .filter-sidebar {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        margin-bottom: 24px !important;
    }
    
    .filter-mobile-toggle {
        display: block !important;
    }
}

@media (max-width: 576px) {
    .service-listing-card {
        flex-direction: column !important;
    }
    
    .service-listing-card img {
        width: 100% !important;
        height: 160px !important;
    }
    
    .price-tag-lg {
        font-size: 12px !important;
    }
    
    .rating-badge {
        font-size: 11px !important;
    }
}

/* ============================================
   BOOKINGS PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .booking-tabs .nav-link {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    
    .booking-tabs .badge {
        margin-left: 4px !important;
    }
    
    .search-bookings {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .booking-item {
        padding: 12px !important;
    }
}

@media (max-width: 576px) {
    .booking-item .d-flex {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .status-pill {
        align-self: flex-start !important;
    }
}

/* ============================================
   PROFESSIONAL PROFILE RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .profile-sidebar {
        position: relative !important;
        margin-bottom: 24px !important;
    }
}

@media (max-width: 576px) {
    .profile-banner {
        height: 100px !important;
    }
    
    .profile-avatar-wrap {
        margin-top: -40px !important;
    }
    
    .profile-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    
    .service-price-card {
        padding: 12px !important;
    }
}

/* ============================================
   REVIEW CARDS RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .review-card {
        padding: 12px !important;
    }
    
    .testimonial-img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .review-slider-item {
        width: 260px !important;
    }
}

/* ============================================
   SECTION HEADERS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.5rem !important;
    }
    
    .section-header p {
        font-size: 14px !important;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 1.25rem !important;
    }
    
    .section-header {
        margin-bottom: 1rem !important;
    }
}

/* ============================================
   APP DOWNLOAD SECTION RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .app-download-section {
        padding: 50px 0 !important;
    }
    
    .app-download-section h2 {
        font-size: 1.5rem !important;
    }
    
    .app-stat h4 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .app-download-section {
        padding: 40px 0 !important;
    }
    
    .app-store-btns {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .app-store-btns a {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ============================================
   FOOTER RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .footer-section {
        padding: 40px 0 20px !important;
    }
    
    .footer-section [class*="col-lg"] {
        margin-bottom: 30px !important;
    }
}

@media (max-width: 576px) {
    .footer-section h5 {
        font-size: 1rem !important;
    }
    
    .footer-section a {
        font-size: 13px !important;
    }
}

/* ============================================
   POPULAR TAGS RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .popular-tags {
        gap: 6px !important;
    }
    
    .popular-tag {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
}

/* ============================================
   INFINITE SLIDER RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .slider-track {
        animation-duration: 20s !important;
    }
    
    .slider-item {
        width: 160px !important;
    }
    
    .professional-card-slider .pro-img-slider {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ============================================
   TRUST BADGES RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .trust-badges {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .trust-badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

/* ============================================
   CTA SECTION RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .cta-section {
        padding: 40px 0 !important;
    }
    
    .cta-section h2 {
        font-size: 1.25rem !important;
    }
    
    .cta-section .btn {
        width: 100% !important;
    }
}

/* ============================================
   STATS SECTION RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .stats-section .col-6 {
        margin-bottom: 20px !important;
    }
    
    .stats-section h3 {
        font-size: 1.5rem !important;
    }
    
    .stats-section p {
        font-size: 12px !important;
    }
}

/* ============================================
   TABLET SPECIFIC (577px - 991px)
   ============================================ */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .homecare-hero::before {
        width: 50% !important;
    }
    
    .service-search-bar {
        padding: 20px !important;
    }
    
    .section-header h2 {
        font-size: 1.625rem !important;
    }
}

/* ============================================
   LARGE MOBILE (481px - 576px)
   ============================================ */
@media (min-width: 481px) and (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   SMALL MOBILE (up to 480px)
   ============================================ */
@media (max-width: 480px) {
    .btn-primary-custom,
    .btn-outline-custom {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    /* Stack flex buttons on small mobile */
    .d-flex.gap-2.flex-wrap {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .d-flex.gap-2.flex-wrap .btn,
    .d-flex.gap-2.flex-wrap a {
        width: 100% !important;
    }
}

/* ============================================
   LANDSCAPE MODE
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .homecare-hero {
        min-height: auto !important;
        padding: 30px 0 !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .sidebar-menu {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .category-card:hover,
    .professional-card:hover,
    .feature-card:hover,
    .dashboard-card:hover,
    .booking-card:hover {
        transform: none !important;
    }
    
    .btn-primary-custom:hover,
    .btn-outline-custom:hover,
    .search-btn:hover {
        transform: none !important;
    }
    
    .popular-tag:hover {
        transform: none !important;
    }
}

/* ============================================
   HIGH DPI / RETINA SCREENS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-card-img,
    .professional-avatar,
    .pro-img,
    .testimonial-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
@media (max-width: 576px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .w-100-mobile {
        width: 100% !important;
    }
    
    .mb-2-mobile {
        margin-bottom: 0.5rem !important;
    }
    
    .mt-2-mobile {
        margin-top: 0.5rem !important;
    }
    
    .p-2-mobile {
        padding: 0.5rem !important;
    }
}

/* Hide on mobile */
@media (max-width: 576px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on tablet */
@media (min-width: 577px) and (max-width: 991px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 992px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   ANIMATION REDUCTION FOR ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .slider-track {
        animation: none !important;
    }
    
    .availability-dot {
        animation: none !important;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
