/* style.css */

/* --- Variables --- */
:root {
  --primary-color: #8B0000; /* Dark Red (Pomegranate seed) */
  --secondary-color: #2E8B57; /* Sea Green (Pomegranate leaf) */
  --accent-color: #DAA520; /* Goldenrod (Highlight) */
  --text-color: #333333;
  --text-color-light: #f8f9fa;
  --bg-color: #FFFFFF;
  --bg-color-light: #f8f9fa;
  --border-color: #dee2e6;
  --border-radius: 5px;
  --font-family-arabic: 'Tahoma', 'Segoe UI', Arial, sans-serif; /* Common fonts with Arabic support */
  --header-height: 70px;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-arabic);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
  direction: rtl; /* Right-to-left layout for Arabic */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.75em;
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--primary-color);
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1rem;
  padding-right: 1.5em; /* Indentation for RTL */
}

button,
input[type="submit"],
input[type="reset"],
.button {
  display: inline-block;
  padding: 0.8em 1.5em;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.button:hover {
  background-color: darkred; /* Slightly darker red on hover */
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* --- Layout & Utility --- */
.container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 60px 0;
}

.section-light {
  background-color: var(--bg-color-light);
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Hide visually but keep accessible for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* --- Header --- */
.site-header {
  background-color: var(--bg-color);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.4rem;
}

.logo img, .logo svg {
  height: 40px; /* Adjust as needed */
  width: auto;
  margin-left: 10px; /* Space between logo and text in RTL */
}

.main-navigation ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  margin-right: 20px; /* Space between nav items in RTL */
}

.main-navigation a {
  display: block;
  padding: 5px 0;
  color: var(--text-color);
  font-weight: 500;
  text-decoration: none;
  position: relative;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0; /* Start from right in RTL */
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
  width: 100%;
}

.main-navigation a.active {
    color: var(--primary-color);
    font-weight: bold;
}

.mobile-nav-toggle {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary-color);
  padding: 5px;
}

/* --- Footer --- */
.site-footer {
  background-color: #343a40; /* Dark background */
  color: var(--text-color-light);
  padding: 40px 0 20px;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-color);
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-column h4 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 8px;
  display: inline-block;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column li a {
    color: #ced4da; /* Lighter gray for links */
}
.footer-column li a:hover {
    color: #ffffff;
}

.footer-column p {
    color: #ced4da;
    line-height: 1.6;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    fill: var(--accent-color);
    margin-left: 10px; /* Space between icon and text in RTL */
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #495057; /* Separator line */
  padding-top: 20px;
  font-size: 0.85rem;
  color: #adb5bd; /* Dimmer text for copyright */
}

/* --- Hero Section (Homepage) --- */
.hero {
  background-color: var(--bg-color-light); /* Light background */
  /* Optional: Add a subtle background image or pattern */
  /* background-image: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)), url('../images/hero-bg.jpg'); */
  /* background-size: cover; */
  /* background-position: center; */
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: 0.5em;
}

.hero .subtitle {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 1.5em;
  font-weight: 500;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto 2em;
}

.hero .cta-button {
  font-size: 1.1rem;
  padding: 0.9em 2em;
  margin: 0 10px;
}

/* --- Services Section/Cards --- */
.services-grid, .doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card, .doctor-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 25px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover, .doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

.service-card svg, .doctor-card svg { /* Style for potential icons */
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-card h3, .doctor-card h3 {
  color: var(--secondary-color);
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.doctor-card h3 {
    color: var(--primary-color); /* Doctors use primary color for heading */
}

.doctor-card .specialization {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p, .doctor-card p {
  font-size: 0.95rem;
  color: #555;
}

/* --- Forms --- */
.form-container {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--bg-color-light);
  padding: 30px 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8em 1em;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.2);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-feedback {
    padding: 1em;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    display: none; /* Hidden by default */
}

.form-feedback.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
    display: block;
}

.form-feedback.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
    display: block;
}

/* --- FAQs --- */
.faq-item {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.faq-question::after {
  content: '+'; /* Unicode plus sign */
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  transition: transform 0.3s ease;
  margin-right: 10px; /* Spacing in RTL */
}

.faq-item.active .faq-question::after {
  content: '−'; /* Unicode minus sign */
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding-right: 15px; /* Indent answer */
  padding-left: 15px;
  font-size: 0.95rem;
  color: #555;
}

.faq-item.active .faq-answer {
  max-height: 300px; /* Adjust as needed */
  padding-top: 15px;
}

/* --- Contact Info Block --- */
.contact-info-block {
  background-color: var(--bg-color-light);
  padding: 30px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
}

.contact-info-block h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contact-info-item {
  display: flex;
  align-items: start; /* Align items to the top */
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.contact-info-item svg {
  width: 22px;
  height: 22px;
  fill: var(--secondary-color);
  margin-left: 15px; /* Space between icon and text in RTL */
  margin-top: 4px; /* Align icon better with text */
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.contact-info-item strong {
    font-weight: 600;
    color: var(--text-color);
    margin-left: 5px; /* Space after label */
}

/* --- Responsive Design --- */

/* Tablet and smaller */
@media (max-width: 992px) {
  .container {
    width: 95%;
  }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero .subtitle { font-size: 1.2rem; }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  html { font-size: 15px; }

  .section { padding: 40px 0; }

  .main-navigation {
    position: absolute;
    top: var(--header-height);
    right: 0; /* Start from right in RTL */
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-color);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); /* Shadow on the left */
    transform: translateX(100%); /* Move off-screen to the right */
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    padding-top: 20px;
  }

  .main-navigation.nav-active {
    transform: translateX(0); /* Slide in */
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: flex-start; /* Align items to start in RTL */
    width: 100%;
  }

  .main-navigation li {
    margin-right: 0; /* Remove horizontal margin */
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
   .main-navigation li:last-child {
       border-bottom: none;
   }

  .main-navigation a {
    padding: 15px 20px;
    width: 100%;
    font-size: 1.1rem;
  }
   .main-navigation a::after {
       display: none; /* Hide underline effect on mobile nav */
   }
    .main-navigation a.active {
        background-color: var(--bg-color-light);
    }

  .mobile-nav-toggle {
    display: block; /* Show hamburger icon */
  }

  .hero { padding: 50px 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero .subtitle { font-size: 1.1rem; }
  .hero p { font-size: 1rem; }
  .hero .cta-button { display: block; margin: 15px auto; width: 80%; }

  .footer-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
    text-align: center;
  }
   .footer-column h4 {
       display: inline-block; /* Center heading */
   }
   .footer-column ul {
       padding-right: 0; /* Remove padding for centered lists */
   }
    .footer-contact-item {
        justify-content: center; /* Center contact items */
    }
    .footer-contact-item svg {
         margin-left: 10px; /* Adjust spacing */
         margin-right: 0;
    }

  .form-container {
    padding: 20px;
  }
}



/* WhatsApp button */
        .whatsapp-btn {
            position: fixed;
            bottom: 20px;
            left: 20px;
            z-index: 999;
            background-color: #25D366;
            color: white;
            border-radius: 50px;
            padding: 0.75rem 1.5rem;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            transition: all 0.3s;
            display: flex;
            align-items: center;
            font-weight: bold;
        }
        
        .whatsapp-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.25);
            color: white;
            text-decoration: none;
        }
        