/* ============================================
   MOBILE RESPONSIVE ENHANCEMENTS
   Comprehensive mobile optimization for all devices
   ============================================ */

/* Mobile First - Base styles for mobile */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Hero Section - Mobile */
    .hero-section {
        padding: 100px 0 60px !important;
        min-height: 500px !important;
    }
    
    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    
    .hero-subtitle {
        font-size: 1.3rem !important;
        margin-bottom: 20px !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px !important;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
    }
    
    /* Stats Section - Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 30px 15px !important;
    }
    
    .stat-item {
        padding: 20px 15px !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.85rem !important;
    }
    
    /* Services Grid - Mobile */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .service-card-enhanced {
        margin-bottom: 0 !important;
    }
    
    /* Page Hero Sections - Mobile */
    .page-hero-section {
        padding: 100px 0 60px !important;
    }
    
    .page-hero-section h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .page-hero-section p {
        font-size: 1.1rem !important;
        padding: 0 15px !important;
    }
    
    /* Section Titles - Mobile */
    .section-title h1,
    .section-title h2 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        padding: 0 15px !important;
    }
    
    .section-title p {
        font-size: 1rem !important;
        padding: 0 15px !important;
    }
    
    /* Search Filter Container - Mobile */
    .search-filter-container {
        padding: 25px 20px !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Doctor Cards - Mobile */
    .doctor-card {
        margin-bottom: 25px !important;
    }
    
    .doctor-card .photo-section {
        padding: 30px 20px !important;
    }
    
    .doctor-card .photo-section img {
        width: 140px !important;
        height: 140px !important;
    }
    
    .doctor-card .doctor-info {
        padding: 25px 20px !important;
    }
    
    .doctor-card h3 {
        font-size: 1.3rem !important;
    }
    
    .doctor-card .action-buttons {
        flex-direction: column !important;
    }
    
    .doctor-card .action-buttons .btn {
        width: 100% !important;
    }
    
    /* Service Cards - Mobile */
    .service-card-new {
        padding: 25px 20px !important;
    }
    
    .service-card-new .icon-wrapper {
        width: 70px !important;
        height: 70px !important;
        font-size: 2.5rem !important;
    }
    
    .service-card-new h3 {
        font-size: 1.3rem !important;
    }
    
    /* About Page - Mobile */
    .about-section-card {
        padding: 30px 20px !important;
    }
    
    .about-section-card h2 {
        font-size: 2rem !important;
    }
    
    .about-values-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Contact Page - Mobile */
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .contact-form-section {
        padding: 30px 20px !important;
    }
    
    .contact-form-section h2 {
        font-size: 2rem !important;
    }
    
    /* Facilities Page - Mobile */
    .facilities-grid-new {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .facilities-overview-card,
    .facilities-location-card {
        padding: 30px 20px !important;
    }
    
    .facilities-overview-card h2,
    .facilities-location-card h2 {
        font-size: 2rem !important;
    }
    
    /* Footer - Mobile */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .footer-widget {
        text-align: center !important;
    }
    
    /* Forms - Mobile */
    .appointment-form {
        padding: 25px 20px !important;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="date"],
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Grid layouts - Mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Two column grids become single column */
    div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Three column grids become single column */
    div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Padding adjustments */
    section[style*="padding: 80px"] {
        padding: 50px 0 !important;
    }
    
    section[style*="padding: 140px"] {
        padding: 80px 0 !important;
    }
    
    div[style*="padding: 60px"] {
        padding: 30px 20px !important;
    }
    
    div[style*="padding: 50px"] {
        padding: 30px 20px !important;
    }
    
    div[style*="padding: 40px"] {
        padding: 25px 20px !important;
    }
    
    /* Font size adjustments */
    h1 {
        font-size: 2.2rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
    
    h3 {
        font-size: 1.4rem !important;
    }
    
    /* Header - Mobile - Make it smaller */
    .header-top {
        padding: 5px 0 !important;
        font-size: 0.75rem !important;
    }
    
    .header-top-left {
        flex-direction: row !important;
        gap: 12px !important;
        font-size: 0.7rem !important;
        flex-wrap: wrap !important;
    }
    
    .header-top-left a,
    .header-top-left span {
        font-size: 0.7rem !important;
        padding: 2px 0 !important;
    }
    
    .header-top-left span {
        display: none !important; /* Hide full address on mobile to save space */
    }
    
    .header-top-right {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    .header-top-right .header-social-links {
        display: none !important; /* Hide social media in header on mobile */
    }
    
    .language-switcher a {
        padding: 3px 8px !important;
        font-size: 0.7rem !important;
    }
    
    .header-top-right .btn {
        padding: 4px 12px !important;
        font-size: 0.7rem !important;
    }
    
    .header-main {
        padding: 10px 0 !important;
    }
    
    .site-logo img {
        max-height: 60px !important;
    }
    
    .site-logo {
        max-width: 220px !important;
    }
    
    .site-logo img,
    .site-logo .custom-logo-link img {
        height: 60px !important;
        max-width: 220px !important;
    }
}

/* Small Mobile Devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .stat-number {
        font-size: 1.8rem !important;
    }
    
    .page-hero-section h1 {
        font-size: 2rem !important;
    }
    
    .section-title h1,
    .section-title h2 {
        font-size: 1.8rem !important;
    }
}

/* Tablet Devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .doctor-card {
        max-width: 100% !important;
    }
    
    .search-filter-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Mobile touch devices */
    .btn,
    .doctor-card .action-buttons .btn,
    button,
    a.btn {
        min-height: 44px !important; /* Apple's recommended touch target */
        min-width: 44px !important;
        padding: 12px 20px !important;
    }
    
    /* Remove hover effects on touch devices */
    .doctor-card:hover,
    .service-card-new:hover,
    .facility-item-card:hover,
    .value-card:hover {
        transform: none !important;
    }
}

/* Inline style overrides for mobile */
@media (max-width: 768px) {
    /* Fix all inline grid styles */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Appointment form two-column grids */
    form[style*="display: grid"] div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Facilities page two-column layout */
    div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 40px"] {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    /* Contact page info grid */
    .contact-info-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* All auto-fit grids become single column on mobile */
    div[style*="repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 400px !important;
        padding: 60px 0 40px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .hero-buttons {
        display: none !important;
    }
}
