/* ═══════════════════════════════════════
   HOME PAGE — Professional Blue Theme
   ═══════════════════════════════════════ */

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 100px 0 64px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image:
    linear-gradient(rgba(10, 30, 60, 0.4), rgba(10, 30, 60, 0.55)), url('/assets/background.jpg');
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

/* floating blobs */
.hero-bg::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 199, 163, 0.08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: floatBlob 8s ease-in-out infinite;
}
.hero-bg::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 167, 214, 0.1) 0%, transparent 70%);
  bottom: -50px;
  left: -50px;
  animation: floatBlob 10s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 30px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

.hero-content h1 {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(36px, 5.5vw, 70px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-gradient {
  background: linear-gradient(135deg, #3ec7a3, #3fa7d6, #a8edda);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 44px;
  font-weight: 400;
}

/* ─── Search Bar ─── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto 44px;
  padding: 8px 8px 8px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  transition: all 0.25s;
}
.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}
.search-ico {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  padding: 8px 0;
}
/* Improved Select styling */
select.search-input {
  cursor: pointer;
  padding-right: 25px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat;
  background-position: left 0 center; /* Default for LTR */
}
[dir="rtl"] select.search-input {
  background-position: left 10px center;
  padding-left: 25px;
  padding-right: 0;
}
.search-input option {
  background-color: white !important;
  color: #1e3a5f !important;
  padding: 10px;
}
.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search-input + .btn {
  border-radius: 40px !important;
  min-width: 90px;
}

/* ─── Animated headline ─── */
.hero-headline {
  font-family: 'Cairo', sans-serif;
  font-size: clamp(36px, 5.5vw, 70px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}

/* Each line slides up and fades in */
.hero-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLineIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Hero gradient text ─── */
.hero-gradient {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  box-sizing: border-box;
  background: linear-gradient(-45deg, #3ec7a3, #3fa7d6, #a8edda, #3fa7d6, #3ec7a3);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Combine the shimmer and the typing effect */
  animation:
    typing 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both,
    gradientShimmer 6s ease infinite;
}

@keyframes typing {
  0% {
    max-width: 0;
  }
  100% {
    max-width: 100%;
  }
}

@keyframes gradientShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ─── Hero subtitle animate ─── */
.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 44px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(16px);
  animation: heroLineIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

/* ─── Search animate ─── */
.search-bar {
  opacity: 0;
  animation: heroLineIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  letter-spacing: -0.03em;
}
.hero-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
}

/* ─── Section ─── */
.section {
  padding: 32px 0 80px;
}

/* ─── Filter chips ─── */
.filter-scroll {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.filter-scroll::-webkit-scrollbar {
  display: none;
}

.specialty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  backdrop-filter: blur(6px);
}
.specialty-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}
.specialty-btn.active {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ─── Results info ─── */
.results-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.results-count {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.results-filter {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ─── Doctor Grid ─── */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.doctor-card {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 22px;
  display: block;
  text-decoration: none;
  color: #1e3a5f;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(8, 28, 48, 0.12);
  /* Staggered entrance animation */
  animation: cardEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) calc(var(--i, 0) * 0.08s)
    backwards;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.doctor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--secondary));
  opacity: 0;
  transition: opacity 0.25s;
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(8, 28, 48, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}
.doctor-card:hover::before {
  opacity: 1;
}

.doctor-card-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.doctor-avatar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.doctor-info {
  flex: 1;
  min-width: 0;
}
.doctor-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 4px;
}
.specialty-tag {
  font-size: 11px;
  padding: 3px 10px;
}
.doctor-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.stars-row {
  display: flex;
  gap: 2px;
}
.rating-val {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  margin-left: 2px;
}
.review-count {
  font-size: 11px;
  color: #7a9cbd;
}

.doctor-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #eef5fb;
  border-radius: 10px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #2f6f9f;
}
.meta-item svg {
  color: #3fa7d6;
  flex-shrink: 0;
}

.doctor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.doctor-price {
}
.price-label {
  display: block;
  font-size: 10px;
  color: #7a9cbd;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.price-val {
  font-size: 18px;
  font-weight: 800;
  color: #1e3a5f;
  font-family: 'Cairo', sans-serif;
}

/* ─── Empty state ─── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.empty-state p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  margin-bottom: 8px;
}

/* ─── PWA Install Button ─── */
.pwa-install-btn {
  background: linear-gradient(135deg, var(--accent), var(--secondary)) !important;
  color: white !important;
  border-color: transparent !important;
  font-weight: 700;
  animation: installPulse 2.5s ease-in-out infinite;
}
.pwa-install-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(62, 199, 163, 0.5);
}
@keyframes installPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(62, 199, 163, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(62, 199, 163, 0);
  }
}

/* ─── Navbar ─── */
.desktop-nav {
  display: flex;
}
.mobile-actions {
  display: none;
}

.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

/* ─── Overlay ─── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 28, 48, 0.65);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

/* ─── Mobile Drawer ─── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  width: min(82vw, 300px);
  background: linear-gradient(180deg, #1a3f68 0%, #0f2744 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideInDrawer 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}
[dir='rtl'] .mobile-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  animation-name: slideInDrawerRTL;
}
@keyframes slideInDrawer {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes slideInDrawerRTL {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-nav {
  padding: 12px 8px;
  flex: 1;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.15s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.drawer-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.drawer-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.15);
}
.drawer-link svg {
  flex-shrink: 0;
}

.drawer-controls {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-control-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.drawer-control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-ctrl-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  font-family: 'Cairo', sans-serif;
}
.drawer-ctrl-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}
.drawer-install {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .doctors-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .hero-content h1 {
    font-size: clamp(30px, 8vw, 50px);
  }
  .hero-stats {
    gap: 18px;
  }
  .hero-stat-num {
    font-size: 24px;
  }
  .hero-subtitle {
    font-size: 15px;
  }

  /* Mobile Hamburger Button - Blue Color */
  .hamburger-btn {
    color: var(--primary-light);
  }
  .hamburger-btn:hover {
    color: var(--primary);
  }
}
@media (max-width: 480px) {
  .filter-scroll {
    gap: 6px;
  }
  .filter-scroll .specialty-btn {
    padding: 7px 14px;
    font-size: 11px;
  }
}
