/* Responsive CSS for all devices */

/* Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    direction: rtl;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navigation styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5%; /* Reduced padding */
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 60px;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Nav Content Wrapper */
.nav-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end; /* Push to right (start in RTL) */
    margin-right: 20px; /* Space from logo */
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
    margin: 0 5px; /* Reduced margin */
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 8px 10px; /* Compact padding */
    border-radius: 4px;
    display: flex;
    align-items: center;
    min-height: 40px;
    justify-content: center;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.08);
    text-decoration: none;
}

.nav-links a.active {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.12);
    font-weight: 700;
}

/* Language Switcher */
.language-switch {
    margin-right: 15px; /* Space from main links */
}

.language-switch a {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    background-color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: inline-block;
    line-height: 1.2;
}

.language-switch a:hover {
    background-color: #f0f0f0;
    color: #333;
    border-color: #aaa;
    text-decoration: none;
}

/* Dropdown menu */
.dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 5px 0;
    margin-top: 5px;
    border: 1px solid #eee;
}

.dropdown:hover .dropdown-menu,
.dropdown .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f1f1;
    font-weight: 400;
    font-size: 14px;
    white-space: nowrap;
    color: #333;
    min-height: auto;
    justify-content: flex-start;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f9f9f9;
    color: #4CAF50;
}

.dropdown > a .fa-chevron-down {
    margin-right: 5px;
    font-size: 0.8em;
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    padding: 10px;
    margin-left: -10px; /* Adjust position */
}

/* --- Responsive --- */

/* Medium screens (Tablets) */
@media (max-width: 992px) {
    .nav-content {
        margin-right: 10px; /* Reduce space */
    }
    .nav-links li {
        margin: 0 3px; /* Further reduce margin */
    }
    .nav-links a {
        font-size: 14px;
        padding: 6px 8px;
    }
    .language-switch {
        margin-right: 10px;
    }
    .language-switch a {
        font-size: 0.8em;
        padding: 3px 6px;
    }
    /* Keep other tablet styles from previous version */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .doctor-content {
        flex-direction: column;
        gap: 30px;
    }
    .doctor-image {
        flex: 0 0 auto;
    }
    .contact-content {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }
    .footer-content {
        gap: 20px;
    }
    .footer-links, .footer-regions, .footer-contact {
        min-width: 180px;
    }
}

/* Small screens (Mobiles) */
@media (max-width: 768px) {
    nav {
        padding: 10px 5%;
    }
    .menu-toggle {
        display: block; /* Show hamburger icon */
        order: 3; /* Place it after nav-content */
    }
    .nav-content {
        position: absolute;
        right: 0;
        top: 100%; /* Position below nav */
        background-color: #fff;
        width: 100%;
        flex-direction: column;
        align-items: stretch; /* Stretch items */
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        margin-right: 0; /* Reset margin */
        order: 2; /* Place it before menu-toggle visually */
    }
    .nav-content.active {
        max-height: calc(100vh - 60px); /* Adjust max height */
        overflow-y: auto; /* Allow scrolling if needed */
    }
    .nav-links {
        flex-direction: column;
        width: 100%;
        order: 2; /* Links below language switch */
    }
    .nav-links li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f1f1f1;
    }
    .nav-links li:last-child {
        border-bottom: none;
    }
    .nav-links a {
        padding: 15px 20px;
        justify-content: flex-start; /* Align text start */
        font-size: 16px;
        min-height: 48px;
        border-radius: 0;
    }
    .language-switch {
        order: 1; /* Move language switch to the top */
        margin: 0;
        padding: 10px 20px;
        background-color: #f9f9f9;
        border-bottom: 1px solid #eee;
        width: 100%;
        text-align: right; /* Align text right for RTL */
    }
    .language-switch a {
        margin: 0;
        display: inline-block;
        width: auto;
        border: none;
        padding: 5px;
        font-size: 1em;
        background-color: transparent;
    }
    .language-switch a:hover {
        background-color: transparent;
        text-decoration: underline;
    }

    /* Mobile Dropdown */
    .dropdown > a .fa-chevron-down {
        display: inline-block;
        margin-right: auto; /* Push icon to the end */
        padding-left: 15px;
        transition: transform 0.3s ease;
    }
    .dropdown.open > a .fa-chevron-down {
        transform: rotate(180deg);
    }
    .dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        width: 100%;
        padding: 0;
        margin-top: 0;
        background-color: #f0f0f0; /* Slightly different background */
        border: none;
    }
    .dropdown.open .dropdown-menu {
        max-height: 400px; /* Adjust as needed */
    }
    .dropdown-menu a {
        padding: 12px 30px; /* Indent dropdown items */
        font-size: 15px;
        border-bottom: 1px solid #e0e0e0;
    }
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    /* Keep other mobile styles from previous version */
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .doctor-image img {
        max-width: 200px;
    }
    .whatsapp-btn {
        width: 55px;
        height: 55px;
        left: 15px;
        bottom: 15px;
    }
    .whatsapp-btn i {
        font-size: 25px;
    }
    .whatsapp-chat {
        width: calc(100% - 30px);
        left: 15px;
        bottom: 80px;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Further adjustments for very small screens if needed */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    .hero {
        padding: 50px 15px;
    }
    .cta-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .feature-card, .service-card, .region-card {
        padding: 20px 15px;
    }
    .contact-form input,
    .contact-form textarea {
        padding: 10px 12px;
    }
    .footer-content {
        gap: 15px;
    }
}

/* --- Other Sections (Keep existing styles below) --- */

/* Styles for sections like hero, features, doctor, contact, footer, etc. */
/* These should ideally be in style.css, but kept here if they were part of the original responsive file */

/* Example: Hero section styles (if they were here) */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
}

/* ... (rest of the styles from the previous version of responsive.css) ... */
/* Ensure all necessary styles for other sections are present */

/* Footer styles (example) */
footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0 15px;
    font-size: 0.9rem;
}

/* ... etc ... */

