/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap");

/* ===== DESIGN SYSTEM - 3 COLOR SYSTEM ===== */
:root {
  /* 🟢 اللون الأساسي (الثقة والاستقرار) */
  --primary: #0f5132;

  /* 🟡 لون الفخامة (CTA والعروض) */
  --accent: #d4af37;

  /* ⚪ الخلفيات والنصوص */
  --bg: #f6f8f7;
  --white: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --footer: #1a7a4f;

  /* الألوان الإضافية (للتوافقية) */
  --primary-dark: #146c43;
  --light-green: #d1e7dd;
  --gray: #666;
  /*--dark: #222;

  /* Legacy aliases for backward compatibility */
  --primary-green: #0f5132;
  --secondary-green: #1a7a4f;
  --gold: #d4af37;
  --light-bg: #f6f8f7;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BASE ===== */
body {
  font-family: "Cairo", sans-serif;
  background-color: var(--white);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px;
}

/* ===== GLOBAL LAYOUT ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.section {
  padding: 60px 0;
}

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

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.8;
}

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

a:hover {
  color: var(--primary-dark);
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ===== BUTTON SYSTEM ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* PRIMARY - أخضر */
.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(15, 81, 50, 0.3);
  color: var(--accent);
}

/* ACCENT - ذهبي */
.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

/* SECONDARY - شفاف */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* OUTLINE - شفاف أبيض */
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* SMALL */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* FULL WIDTH */
.btn-block {
  width: 100%;
}

/* Legacy button classes */
.btn btn-primary {
  background: var(--accent);
  color: #1a1a1a;
  border-radius: 50px;
  padding: 12px 26px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.btn btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.btn-phone {
  font-size: 20px;
  color: var(--primary);
}

/* ===== GRID SYSTEM ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ===== CARD BASE ===== */
.card-base {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card-base:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
}

.card-base::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  transition: 0.3s;
}

.card-base:hover::before {
  width: 100%;
}

/* ===== HEADER ===== */
#masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 70px;
  background: var(--white);
  position: fixed;
  width: 100%;
  z-index: 9999;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--border);
}

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

.nav-links ul {
  display: flex;
  gap: 25px;
  list-style: none;
}

.nav-links ul li a {
  color: var(--text);
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

.nav-links ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: 0.3s;
}

.nav-links ul li a:hover::after,
.nav-links ul li a.active::after {
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
}

#menu-close {
  display: none;
}
.cta .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--footer);
  color: #fff;
  padding: 60px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
  padding-top: 15px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== MODAL & CUSTOM SELECT ===== */
.wa-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.wa-modal.show {
  display: flex;
}

.wa-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  position: relative;
  animation: modalIn 0.4s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#wa-close {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.wa-modal h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

.wa-modal input,
.wa-modal textarea,
.wa-modal select {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}

.wa-modal input:focus,
.wa-modal textarea:focus,
.wa-modal select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.1);
}

.custom-select {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.custom-select .selected {
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.custom-select .selected::after {
  content: "▼";
  font-size: 12px;
  color: var(--muted);
}

.custom-select .options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 5px;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.custom-select.open .options {
  display: block;
}

.custom-select .options.show {
  display: block;
}

.custom-select .options li {
  padding: 12px 15px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.custom-select .options li:last-child {
  border-bottom: none;
}

.custom-select .options li:hover {
  background: var(--light-green);
  color: var(--primary);
}

.faq-section {
  padding: 100px 5% 60px;
}
.faq-title {
  text-align: center;
}

.faq-cta {
  text-align: center;
  margin-bottom: 30px;
}
.fq-desc {
  text-align: center;
  margin-bottom: 40px;
  color: #666;
}

/* ===== FLOATING WHATSAPP ===== */
#waFloat {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  opacity: 0;
  visibility: hidden;
}

#waFloat.show {
  opacity: 1;
  visibility: visible;
}

#waFloat:hover {
  transform: scale(1.1);
}

#waBubble {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: #fff;
  padding: 10px 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

#waBubble.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: auto; /* RTL */
  left: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--accent);
  border-radius: 50%;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;

  z-index: 1000;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}
/*.scroll-to-top {
  position: fixed;
  z-index: 9999999;
  pointer-events: auto;
}
.scroll-to-top {
  background: red !important;
  opacity: 1 !important;
  visibility: visible !important;
}*/

.no-results {
  display: none;
}
.no-results.active {
  display: block;
}

.landing-hero {
  background: linear-gradient(135deg, #0a3c23 0%, #0f5132 60%, #1a7a4f 100%);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/eygptmedical.webp") center/cover no-repeat;
  opacity: 0.15;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MEDIA QUERIES - UNIFIED BREAKPOINTS ===== */

/* Desktop Large (1024px and below) */
@media (max-width: 1024px) {
  .container {
    width: 95%;
  }

  .section {
    padding: 50px 0;
  }

  h1 {
    font-size: 2.2em;
  }
  h2 {
    font-size: 1.8em;
  }
  h3 {
    font-size: 1.4em;
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .container {
    width: 95%;
  }

  .section {
    padding: 40px 0;
  }

  h1 {
    font-size: 1.8em;
  }
  h2 {
    font-size: 1.4em;
  }
  h3 {
    font-size: 1.1em;
  }

  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .nav-toggle {
    display: block !important;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: 0; /* 🔥 هذا كان ناقص */

    width: 100%;
    max-width: 400px;
    height: calc(100vh - 70px);

    padding: 20px;
    flex-direction: column;

    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;

    transition:
      transform 0.35s ease,
      opacity 0.3s ease;

    z-index: 10000;

    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);

    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  body.menu-open {
    overflow: hidden;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links ul li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }

  #menu-close {
    display: block;
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark);
  }

  .header-left {
    gap: 10px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    width: 95%;
  }

  .section {
    padding: 30px 0;
  }

  h1 {
    font-size: 1.5em;
  }
  h2 {
    font-size: 1.2em;
  }
  h3 {
    font-size: 1em;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  button {
    padding: 10px 15px;
    font-size: 0.9em;
  }

  input,
  textarea {
    padding: 10px;
    font-size: 16px;
  }
}

/* Mobile Touch Devices */
@media (hover: none) and (pointer: coarse) {
  button:active {
    transform: scale(0.95);
  }

  .card:active {
    transform: translateY(-2px);
  }
}

/* BASE (Mobile First) */
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.hero-actions .btn {
  width: 100%;
  text-align: center;
}

/* 📲 Tablet */
@media (min-width: 600px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 200px;
  }
}

/* 🖥️ Desktop */
@media (min-width: 1024px) {
  .hero-actions {
    gap: 15px;
  }

  .hero-actions .btn {
    min-width: 220px;
  }
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 600px) {
  .btn-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* BLOG ENHANCEMENTS */

.highlight {
  background: rgba(212, 175, 55, 0.1);
  transition: background 0.3s ease;
}

.fade-in {
  animation: fadeInUp 0.5s ease-out both;
}
