/* Root Variables */
:root {
  --accent: #0b3a66;
  --muted: #6b7280;
  --menu-bg: rgba(255,255,255,0.98);
  --menu-border: #cbd5e1;
  --panel-shadow: 0 12px 32px rgba(11,58,102,0.12);
  --radius: 12px;
  --gap: 24px;
  --text: #111827;
  --transition: 200ms ease;
  --container: 1200px;
}

/* Base Styles */
html {
  height: 100%;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16.5px;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.98), rgba(255,255,255,0.95));
  border-bottom: 1px solid #e6edf3;
  z-index: 1200;
  gap: 28px;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-left: 20px;
}
.brand .logo {
  width: 168px;
  height: 36px;
  background: url('https://nexwell.ai/logo/60.1756302567959.9QQt-QTEQpr7Y5bfRcn_6HecX3zxivERcScLBRWJ-MI.Vy8iYzY5ZS0xOTgzNzc2NTNmZiI.webp') center/contain no-repeat;
  flex: 0 0 auto;
}

/* Nav */
.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  position: relative;
  min-width: 0;
}
.nav-list {
  display: flex;
  gap: 2px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 10px 13px;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  border-radius: 15px;
  transition: background var(--transition), color var(--transition);
  line-height: 1.0;
  cursor: pointer;
}
.nav-link:focus { outline: 2px solid rgba(11,58,102,0.12); outline-offset: 2px; }
.nav-link:hover { background: rgba(11,58,102,0.06); }
.nav-link .caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  display: inline-block;
}

/* Mega Menu Panel (Desktop) */
.mega-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  min-width: 860px;
  max-width: min(1140px, 96vw);
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--panel-shadow);
  display: none;
  gap: var(--gap);
  z-index: 1100;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  align-items: start;
}
.mega-col h4 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.2px;
}
.mega-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mega-col li { margin: 10px 0; }
.mega-col a {
  display: inline-block;
  text-decoration: none;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.4;
  transition: color var(--transition);
}
.mega-col a:hover { color: var(--text); }

/* Right Side Controls */
.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}
.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  color: inherit;
  display: inline-block;
}
.btn.primary {
  background: #16263f;
  color: #fff;
  border: 2px solid black;
  width: 8.2em;
  text-align: center;
}
.btn.outline {
  border: 2px solid black;
  color: #000;
  width: 8.2em;
  text-align: center;
}
.lang-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}
select[aria-label="language"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf3;
  background: #fff;
  font-size: 16px;
}

/* Mobile: Hamburger + Drawer */
.mobile-menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6edf3;
  background: white;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: auto;
}
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  z-index: 1400;
  align-items: flex-start;
  justify-content: flex-end;
}
.drawer-panel {
  width: min(360px, 92vw);
  height: 100%;
  background: #fff;
  padding: 20px;
  overflow: auto;
  box-shadow: -8px 0 28px rgba(2,6,23,0.12);
}
.drawer-close {
  float: right;
  background: transparent;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}
.logo-wrapper {
  padding: 6px 0 12px;
}
.logo-wrapper .logo {
  width: 140px;
  height: 32px;
  background: url('https://nexwell.ai/logo/60.1756302567959.9QQt-QTEQpr7Y5bfRcn_6HecX3zxivERcScLBRWJ-MI.Vy8iYzY5ZS0xOTgzNzc2NTNmZiI.webp') center/contain no-repeat;
}
.drawer-menu {
  margin-top: 16px;
}
.drawer-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 14px 6px;
}
.drawer-item > button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
}
.drawer-item > a {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 16px;
  display: block;
}
.drawer-sub {
  margin-top: 8px;
  padding-left: 12px;
  display: none;
}
.drawer-sub-title {
  display: block;
  margin: 8px 0 6px;
  color: var(--accent);
}
.drawer-sub a {
  display: block;
  padding: 9px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 15.5px;
}
.drawer-actions {
  margin-top: 18px;
}
.drawer-actions .btn {
  width: 100%;
}
.drawer-actions .btn.outline {
  margin-top: 8px;
}

/* Responsive Helpers & Containers */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
main { padding-top: 104px; }

/* Breadcrumb */
.breadcrumb {
  margin: 24px 20px 10px 20px;
  font-size: 18px;
  color: #333;
  font-weight: 600;
}
.breadcrumb a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover {
  color: #1a4066;
}

/* Video */
.video-wrap {
  margin: 0 auto 40px;
}
.video-container {
  margin: 0 auto;
  width: 95%;
  max-width: 1200px;
  height: clamp(220px, 55vw, 650px);
  background-color: #000;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
.video-container video {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  font-size: 48px;
  color: #999;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: background .3s ease, color .3s ease;
  z-index: 10;
  border: 0;
}
.play-button:hover {
  background: rgba(255,255,255,.35);
  color: #1a4066;
}

/* Cards (Medical Centers + Online Clinic) */
.medical-center-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  font-family: Arial, sans-serif;
}
.medical-center-container h2 {
  text-align: center;
  font-weight: bold;
  font-size: 36px;
  color: #555;
  margin-bottom: 20px;
}
.medical-center-container p {
  text-align: center;
  font-size: 16px;
  color: #555;
  margin-bottom: 50px;
  line-height: 1.6;
}
.cards-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin: 40px 20px;
  justify-content: space-between;
}
.cards-container::-webkit-scrollbar {
  height: 8px;
}
.cards-container::-webkit-scrollbar-thumb {
  background: #cfd4dc;
  border-radius: 8px;
}
.card {
  flex: 1 1 280px;
  max-width: 320px;
  border: 2px solid #ccc;
  border-radius: 12px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.card-content {
  padding: 20px;
}
.card-content strong {
  font-size: 22px;
  display: block;
}
.card-info {
  margin: 12px 0;
  font-size: 16px;
  color: #666;
}
.card-content p {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 12px;
}
.card-content a {
  display: inline-block;
  width: 100%;
  height: 52px;
  line-height: 52px;
  text-align: center;
  background-color: #213964;
  color: white;
  font-size: 22px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.card-header img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
}
.card-body h3 {
  margin: 10px 0 6px;
  font-size: 22px;
  font-weight: 700;
}
.card-body p {
  font-size: 16px;
  color: gray;
  margin: 6px 0;
  line-height: 1.4;
}
.card-footer-info {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}
.status-active {
  color: #22a352;
  font-weight: 700;
}
.status-disabled {
  color: #e53935;
  font-weight: 700;
}
.card-footer-link a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #0f2140;
}

/* Terms & Online Clinic */
.terms-container {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 24px;
  font-family: Segoe UI, Tahoma, Arial, sans-serif;
  color: #0f1d2b;
}
.terms-subtitle {
  text-align: center;
  font-size: 14px;
  color: #9aa7b4;
  margin-bottom: 10px;
}
.terms-container h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 36px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .2px;
}
.terms-description {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #1f2d3a;
  margin: 0 0 40px;
}
.terms-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.terms-image {
  flex: 1 1 420px;
  max-width: 520px;
  min-width: 320px;
  height: 260px;
  border-radius: 18px;
  background: #101f4a url('images/online-clinic.jpg') center/cover no-repeat;
  box-shadow: 0 10px 24px rgba(15,29,43,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
}
.terms-grid {
  flex: 1 1 460px;
  min-width: 360px;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  column-gap: 36px;
  row-gap: 26px;
}
.terms-item .terms-title {
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 8px;
}
.terms-item .terms-title:nth-child(3) {
  margin: 16px 0 8px;
}
.terms-text {
  font-size: 15px;
  line-height: 1.6;
  color: #6f8193;
}

/* Online Clinic Title */
.title-container {
  text-align: center;
}
.title-container h3 {
  text-align: center;
}
.title-container h2 {
  text-align: center;
  font-size: 35px;
}

/* Discover Button */
.discover-btn-container {
  text-align: center;
  margin-bottom: 30px;
}
.discover-btn-container a {
  display: inline-block;
  background: #0f2140;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Full-bleed Sections */
.full-bleed {
  width: 100%;
  background: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.chips {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.chip {
  background: #e5e7eb;
  padding: 10px 18px;
  border-radius: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

/* Footer */
.footer {
  background: #f9fafb;
  padding: 18px 0;
  width: 100%;
}
.footer .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  font-weight: 800;
  color: #6b7280;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-weight: 600;
}
.footer a {
  color: #6b7280;
  text-decoration: none;
}

/* Responsive Rules */
@media (max-width: 1100px) {
  .mega-panel {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    min-width: unset;
    max-width: unset;
  }
  .mega-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 980px) {
  .main-nav { display: none; }
  .mobile-menu-button { display: flex; }
  .brand .logo { width: 140px; height: 32px; }
}
@media (max-width: 768px) {
  body { padding-top: 70px; }
  main { padding-top: 92px; }
  .cards-container { margin: 40px 20px; gap: 20px; justify-content: center; }
  .card { flex: 1 1 100%; max-width: 100%; }
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .cards-container { justify-content: space-between; }
  .card { flex: 0 0 calc((100% - 3*24px)/4); }
}
@media (max-width: 480px) {
  .site-header { padding: 10px 14px; height: 72px; }
  .brand .logo { width: 128px; height: 30px; }
  .drawer-panel { width: 100%; max-width: 100%; }
  .mega-grid { grid-template-columns: 1fr; }
  .card-content strong { font-size: 18px; }
  .card-content p { font-size: 13px; }
  .card-footer-info { font-size: 13px; }
  .card-footer-link { font-size: 14px; }
}
/* Language Menu */
.lang-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6edf3;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.lang-toggle:hover {
  background: rgba(11, 58, 102, 0.06);
}

.lang-toggle .caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  display: inline-block;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
  display: none;
  z-index: 1100;
  padding: 8px 0;
}

.lang-menu.open {
  display: block;
}

.lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
}

.lang-item:hover {
  background: rgba(11, 58, 102, 0.06);
}

.lang-item[data-lang="ar"] {
  direction: rtl;
}

.lang-flag {
  width: 24px;
  height: 18px;
  display: inline-block;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
}

/* Flag icons */
.flag-en {
  background-image: url('https://flagcdn.com/24x18/gb.png');
}
.flag-es {
  background-image: url('https://flagcdn.com/24x18/es.png');
}
.flag-fr {
  background-image: url('https://flagcdn.com/24x18/fr.png');
}
.flag-de {
  background-image: url('https://flagcdn.com/24x18/de.png');
}
.flag-zh {
  background-image: url('https://flagcdn.com/24x18/cn.png');
}
.flag-ja {
  background-image: url('https://flagcdn.com/24x18/jp.png');
}
.flag-ru {
  background-image: url('https://flagcdn.com/24x18/ru.png');
}
.flag-ar {
  background-image: url('https://flagcdn.com/24x18/sa.png');
}
.flag-it {
  background-image: url('https://flagcdn.com/24x18/it.png');
}

/* Mobile menu language styles */
@media (max-width: 980px) {
  .drawer-menu .lang-wrapper {
    margin: 12px 0;
  }
  .drawer-menu .lang-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
  }
  .drawer-menu .lang-item {
    padding: 10px 0;
  }
}