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

:root {
  --primary: #0284C7;
  --primary-dark: #0369A1;
  --primary-light: #e0f2fe;
  --accent: #38BDF8;
  --red: #e53935;
  --text: #1a1a2e;
  --text-light: #555;
  --border: #e8e8e8;
  --bg-light: #f7faf9;
  --white: #fff;
  --shadow: 0 4px 20px rgba(0,107,94,0.1);
  --radius: 12px;
}

body {
  font-family: 'Cairo', sans-serif;
  color: var(--text);
  background: var(--white);
  direction: rtl;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--primary-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 28px;
  color: var(--primary);
}

.logo-text {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.logo-sub {
  display: block;
  font-size: 10px;
  color: var(--text-light);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.2s;
}

.nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn-search, .btn-menu {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-search:hover, .btn-menu:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-menu { display: none; }

.search-bar {
  display: none;
  padding: 10px 0;
  gap: 10px;
}

.search-bar.open { display: flex; }

.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--primary-light);
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--primary); }

.search-bar button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 2px solid var(--primary-light);
  padding: 10px 20px;
}

.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--text); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0369A1 0%, #0284C7 50%, #38BDF8 100%);
  color: white;
  padding: 70px 0;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
}

.highlight {
  color: #7fffef;
  position: relative;
}

.hero p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  margin-bottom: 40px;
}

.hero-search input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
}

.hero-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 16px 28px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}

.hero-stats {
  display: flex;
  gap: 30px;
}

.stat {
  text-align: center;
}

.stat span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: #7fffef;
}

.stat small {
  font-size: 13px;
  opacity: 0.8;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  position: relative;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.hero-icon { font-size: 80px; margin-bottom: 16px; }
.hero-card p { font-size: 15px; opacity: 0.9; }
.hero-card strong { display: block; font-size: 17px; margin-top: 4px; }

/* Services */
.services {
  padding: 40px 0;
  margin-top: -1px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.service-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.service-card.emergency {
  border-color: #ffcdd2;
  background: #fff5f5;
}

.service-card.emergency:hover { border-color: var(--red); }

.service-icon { font-size: 32px; margin-bottom: 10px; color: var(--primary); }
.service-icon i { font-size: 32px; }
.service-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.service-card p { font-size: 12px; color: var(--text-light); line-height: 1.5; }

/* Section */
.section { padding: 60px 0; }
.bg-light { background: var(--bg-light); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary-light);
}

.section-header h2 {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  position: relative;
  padding-right: 16px;
}

.section-header h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 4px;
}

.see-all {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  transition: all 0.2s;
}

.see-all:hover { background: var(--primary); color: white; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.news-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  position: relative;
}

.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary-light); }

.news-card.featured { grid-row: span 2; display: flex; flex-direction: column; }
.news-card.featured .news-img { height: 200px; background: linear-gradient(135deg, var(--primary-light), #d0ede9); display: flex; align-items: center; justify-content: center; font-size: 60px; color: var(--primary); }
.news-card.featured .news-img i { font-size: 64px; color: var(--primary); opacity: 0.8; }
.news-card:not(.featured) { display: flex; gap: 14px; padding: 14px; }
.news-card:not(.featured) .news-img.small { width: 80px; height: 80px; min-width: 80px; background: var(--primary-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--primary); }
.news-card:not(.featured) .news-img.small i { font-size: 30px; color: var(--primary); }

.news-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.news-body { padding: 16px; flex: 1; }
.news-card:not(.featured) .news-body { padding: 0; }

.news-cat {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.news-card:not(.featured) .news-body h3 { font-size: 14px; }
.news-body h3 a { color: var(--text); transition: color 0.2s; }
.news-body h3 a:hover { color: var(--primary); }
.news-body p { font-size: 14px; color: var(--text-light); margin-bottom: 12px; line-height: 1.7; }

.news-meta { display: flex; gap: 16px; font-size: 12px; color: #999; }

/* Doctors */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  background: white;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-light);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.doctor-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: all 0.25s;
}

.doctor-card:hover { box-shadow: var(--shadow); border-color: var(--primary); transform: translateY(-3px); }

.doctor-avatar {
  font-size: 50px;
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.doctor-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 3px solid var(--primary);
}

.doctor-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.featured-doctor {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, #f0f9ff, #fff);
  position: relative;
}

.featured-doctor .doctor-avatar-img {
  width: 130px;
  height: 130px;
  border: 4px solid var(--primary);
  box-shadow: 0 4px 20px rgba(2,132,199,0.3);
}

.featured-doctor::before {
  content: '⭐ موصى به';
  position: absolute;
  top: -12px;
  right: 50%;
  transform: translateX(50%);
  background: var(--primary);
  color: white;
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.doctor-info h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }

.specialty {
  display: block;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.doctor-details {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.doctor-tags {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.doctor-tags span {
  background: var(--bg-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-light);
}

.btn-doctor {
  display: block;
  background: var(--primary);
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  transition: background 0.2s;
}

.btn-doctor:hover { background: var(--primary-dark); }

.doctor-quals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  text-align: right;
}
.doctor-quals span {
  font-size: 11px;
  color: var(--text-light);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
}
.doctor-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.btn-map {
  display: block;
  background: #0f9d58;
  color: white;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.btn-map:hover { background: #0b8043; }
.btn-social {
  display: block;
  background: #1877f2;
  color: white;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}
.btn-social:hover { background: #1565c0; }
.featured-badge {
  display: none; /* handled by ::before */
}
.doctor-name { font-size: 15px; font-weight: 800; margin: 8px 0 4px; color: var(--text); }
.doctor-specialty { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.doctor-info { font-size: 12px; color: var(--text-light); margin-bottom: 6px; display: flex; flex-direction: column; gap: 3px; }

/* Diseases */
.alphabet-nav {
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--text-light);
}

.alphabet-nav a {
  background: var(--bg-light);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.alphabet-nav a:hover { background: var(--primary); color: white; }

.diseases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.disease-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s;
}

.disease-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }

.disease-icon { font-size: 36px; }
.disease-card h3 { font-size: 17px; font-weight: 800; color: var(--text); }
.disease-card p { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.article-count { font-size: 12px; color: var(--primary); font-weight: 700; margin-top: auto; }

/* Emergency */
.emergency-section {
  background: linear-gradient(135deg, #b71c1c, #e53935);
  color: white;
  padding: 50px 0;
  text-align: center;
}

.emergency-section h2 { font-size: 28px; font-weight: 900; margin-bottom: 30px; }

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.emergency-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.em-icon { font-size: 36px; }
.em-number { font-size: 28px; font-weight: 900; }
.em-name { font-size: 14px; opacity: 0.9; }

/* Newsletter */
.newsletter {
  background: var(--primary-light);
  padding: 60px 0;
  text-align: center;
}

.newsletter h2 { font-size: 28px; font-weight: 900; margin-bottom: 10px; }
.newsletter p { font-size: 16px; color: var(--text-light); margin-bottom: 28px; }

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.newsletter-form input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  outline: none;
}

.newsletter-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px 24px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
}

.newsletter-form button:hover { background: var(--primary-dark); }

/* Footer */
.footer {
  background: #082f49;
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer .logo-text { color: white; }
.footer .logo-sub { color: rgba(255,255,255,0.5); }

.footer-brand p {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.social-links a {
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.2s;
}

.social-links a:hover { background: var(--primary); }

.footer-links h4 {
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links a, .footer-links p {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  padding: 5px 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 2;
}

/* Responsive */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .btn-menu { display: block; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 16px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.featured { grid-row: span 1; }
  .doctors-grid { grid-template-columns: 1fr 1fr; }
  .diseases-grid { grid-template-columns: 1fr 1fr; }
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .doctors-grid { grid-template-columns: 1fr; }
  .diseases-grid { grid-template-columns: 1fr; }
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 12px; }
  .stat span { font-size: 22px; }
}
