/* Responsive Styles - محسن */
/* ========== متغيرات الوسائط ========== */
:root {
    --breakpoint-xs: 0px;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ========== Large devices (desktops, less than 1400px) ========== */
@media (max-width: 1399.98px) {
    .container {
        max-width: 1200px;
    }
    
    .main-header .container {
        max-width: 1200px;
    }
}

/* ========== Medium devices (tablets, less than 1200px) ========== */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .main-header .container {
        max-width: 960px;
    }
    
    .nav-list a {
        padding: 0 18px;
        font-size: 0.9rem;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        width: 55px;
        height: 55px;
    }
    
    .logo-icon i {
        font-size: 26px;
    }
    
    .btn-contact {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* ========== Tablets (less than 992px) ========== */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .main-header .container {
        max-width: 720px;
        padding: 0 20px;
    }
    
    .main-nav {
        display: none;
    }
    
    .quick-contact {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-text p {
        font-size: 0.8rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 140px 0 80px;
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }
    
    /* Grid Adjustments */
    .values-grid,
    .stats-grid,
    .services-grid,
    .contact-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vm-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid,
    .posts-grid,
    .social-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .booking-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Small devices (landscape phones, less than 768px) ========== */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .main-header {
        height: 70px;
    }
    
    .main-header.scrolled {
        height: 60px;
    }
    
    .main-header .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .mobile-menu {
        top: 70px;
        height: calc(100vh - 70px);
        width: 100%;
    }
    
    .logo a {
        gap: 12px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-icon i {
        font-size: 22px;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .logo-text p {
        display: none;
    }
    
    /* Page Header */
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .page-header p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 140px 0 80px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Grid Adjustments */
    .values-grid,
    .stats-grid,
    .services-grid,
    .contact-buttons-grid,
    .team-grid,
    .posts-grid,
    .social-main-grid,
    .booking-steps {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .specialized-services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Cards */
    .service-card,
    .feature,
    .value-item,
    .team-card,
    .specialty-card,
    .post-card,
    .step {
        padding: 25px 20px;
    }
    
    /* Buttons */
    .btn,
    .btn-contact {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 30px 25px;
    }
    
    .contact-form h3 {
        font-size: 1.8rem;
    }
    
    /* Emergency Banner */
    .emergency-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .emergency-text h3 {
        font-size: 1.5rem;
    }
    
    .btn-emergency {
        width: 100%;
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-row {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    /* Floating Buttons */
    .floating-whatsapp,
    .floating-phone {
        left: 15px;
    }
    
    .floating-whatsapp {
        bottom: 90px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .floating-phone {
        bottom: 155px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .back-to-top {
        left: 15px;
        bottom: 25px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ========== Extra small devices (portrait phones, less than 576px) ========== */
@media (max-width: 575.98px) {
    .container {
        padding: 0 12px;
    }
    
    .main-header .container {
        padding: 0 12px;
    }
    
    .logo a {
        gap: 10px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
    }
    
    .logo-icon i {
        font-size: 20px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .mobile-menu {
        padding: 20px;
    }
    
    .mobile-menu ul li a {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 110px 0 50px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 120px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Grid Adjustments */
    .features-grid,
    .specialized-services,
    .services-grid-detailed,
    .diagnostic-services {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .service-card,
    .feature,
    .value-item,
    .team-card,
    .specialty-card,
    .post-card,
    .step,
    .info-card,
    .map-card,
    .service-detail-card {
        padding: 20px 15px;
    }
    
    /* Stats */
    .stat-item h3 {
        font-size: 2.5rem;
    }
    
    /* Contact */
    .contact-button {
        padding: 20px 15px;
    }
    
    .contact-button i {
        font-size: 2.2rem;
    }
    
    /* Buttons */
    .btn,
    .btn-contact {
        padding: 11px 18px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 15px 25px !important;
        font-size: 1rem !important;
    }
    
    /* Forms */
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    /* Footer */
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .working-hours h4 {
        font-size: 1rem;
    }
    
    .hours-grid {
        grid-template-columns: 1fr;
    }
    
    .certifications {
        justify-content: center;
    }
    
    .legal-links {
        justify-content: center;
        text-align: center;
    }
    
    /* Floating Buttons */
    .floating-whatsapp {
        bottom: 85px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .floating-phone {
        bottom: 145px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ========== Very small devices (less than 400px) ========== */
@media (max-width: 399.98px) {
    .container {
        padding: 0 10px;
    }
    
    .main-header .container {
        padding: 0 10px;
    }
    
    .logo a {
        gap: 8px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .logo-icon i {
        font-size: 18px;
    }
    
    .logo-text h1 {
        font-size: 0.9rem;
    }
    
    .mobile-menu-toggle {
        padding: 8px;
    }
    
    .mobile-menu-toggle span {
        width: 24px;
        height: 2px;
    }
    
    /* Page Header */
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn,
    .btn-contact {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    /* Cards */
    .service-card,
    .feature,
    .value-item,
    .team-card {
        padding: 15px 12px;
    }
    
    /* Footer */
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-contact p,
    .footer-links a,
    .footer-services a {
        font-size: 0.9rem;
    }
    
    /* Floating Buttons */
    .floating-whatsapp {
        left: 10px;
        bottom: 80px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .floating-phone {
        left: 10px;
        bottom: 135px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .back-to-top {
        left: 10px;
        bottom: 20px;
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* ========== Landscape Mode ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .mobile-menu {
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .mobile-menu ul li {
        margin-bottom: 5px;
    }
    
    .mobile-menu ul li a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .mobile-contact {
        padding: 15px;
        margin-top: 20px;
    }
    
    .mobile-contact .btn-contact {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* ========== High DPI Screens ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .vm-icon,
    .team-image,
    .service-icon-large {
        box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    }
    
    .btn-contact,
    .btn {
        box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    }
}

/* ========== Dark Mode Support ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f0f0f0;
        --text-light: #b0b0b0;
        --bg-white: #1a1a1a;
        --bg-light: #2a2a2a;
        --border-color: #404040;
        --light-blue: #2a3a4a;
        --light-green: #2a4a42;
    }
    
    body {
        background-color: var(--bg-white);
        color: var(--text-dark);
    }
    
    .main-header {
        background: var(--bg-white);
        border-bottom-color: var(--border-color);
    }
    
    .nav-list {
        background: var(--bg-light);
        border-color: var(--border-color);
    }
    
    .mobile-menu {
        background: var(--bg-white);
        border-left-color: var(--border-color);
    }
    
    .page-header::before {
        opacity: 0.1;
    }
}

/* ========== Print Styles ========== */
@media print {
    .main-header,
    .quick-contact-section,
    .emergency-banner,
    .main-footer,
    .mobile-menu-toggle,
    .hero-buttons,
    .floating-whatsapp,
    .floating-phone,
    .back-to-top,
    .booking-cta,
    .cta-buttons,
    .mobile-menu,
    .social-icons,
    .newsletter {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: white;
        line-height: 1.4;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    .page-header {
        background: none !important;
        color: #000 !important;
        padding: 50px 0 30px !important;
        margin-top: 0 !important;
    }
    
    .page-header h1 {
        color: #000 !important;
        font-size: 24pt !important;
    }
    
    .page-header p {
        color: #000 !important;
        font-size: 12pt !important;
    }
    
    .btn,
    .btn-contact {
        display: none !important;
    }
    
    .section-title {
        color: #000 !important;
        font-size: 18pt !important;
    }
    
    .section-title::after {
        background: #000 !important;
    }
    
    /* Cards and Containers */
    .service-card,
    .feature,
    .value-item,
    .team-card,
    .specialty-card,
    .info-card,
    .map-card,
    .service-detail-card,
    .contact-form,
    .booking-form {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
        color: #000 !important;
        page-break-inside: avoid;
    }
    
    /* Hide decorative elements */
    .logo-icon,
    .vm-icon,
    .team-image,
    .service-icon-large,
    .service-icon,
    .feature i,
    .social-icon,
    .cert-badge,
    .step-number {
        border: 1px solid #ddd !important;
        background: #f5f5f5 !important;
        color: #000 !important;
    }
    
    /* Links in content */
    .service-link,
    .whatsapp-link,
    .footer-contact a,
    .footer-links a,
    .footer-services a {
        color: #000 !important;
    }
    
    /* Page breaks */
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
    
    .page-header,
    .about-content-section,
    .vision-mission-section,
    .values-section,
    .team-section,
    .services-main-section {
        page-break-before: always;
    }
    
    /* First page no break */
    .page-header:first-of-type {
        page-break-before: avoid;
    }
    
    /* Footer in print */
    .main-footer {
        page-break-before: always;
    }
    
    .copyright p {
        color: #000 !important;
    }
}