/* ==========================================================================
   SWMC Theme · home.css  (homepage-only sections)
   ========================================================================== */

/* ---------- Hero: editorial split + bento ---------- */
.hero-split {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(26, 151, 155, .16), transparent 42%),
    radial-gradient(circle at 8% 90%, rgba(27, 58, 107, .10), transparent 45%),
    var(--swmc-surface);
  padding: 4.5rem 0 10.5rem;
}
.hero-split::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(27, 58, 107, .09) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-pulse { position: absolute; left: 0; right: 0; bottom: 5.4rem; width: 100%; height: 80px; pointer-events: none; }
.hero-pulse path {
  fill: none; stroke: var(--swmc-teal); stroke-width: 2; opacity: .28;
  stroke-dasharray: 2200; stroke-dashoffset: 2200;
  animation: pulse-draw 5s var(--ease) .3s forwards;
}
@keyframes pulse-draw { to { stroke-dashoffset: 0; } }

.hero-split-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }

.hero-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  background: #fff; border: 1px solid var(--swmc-border); border-radius: 99px;
  padding: .4rem .9rem .4rem .7rem; font-size: .84rem; font-weight: 600; color: var(--swmc-navy);
  box-shadow: var(--shadow-sm); transition: all .2s var(--ease);
}
.hero-chip:hover { border-color: var(--swmc-teal); color: var(--swmc-teal-700); }
.hero-chip i { transition: transform .2s; }
.hero-chip:hover i { transform: translateX(3px); }
.hero-chip-dot, .bento-pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22B573; position: relative; flex-shrink: 0;
}
.hero-chip-dot::after, .bento-pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; color: #22B573;
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.hero-verse {
  font-family: "Amiri", "Traditional Arabic", "Scheherazade New", serif;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--swmc-teal-700);
  margin: 1.6rem 0 .1rem; line-height: 1.6; text-align: left;
}
.hero-verse-gloss { font-size: .8rem; color: var(--swmc-muted); letter-spacing: .02em; margin-bottom: 1.1rem; }
.hero-split-title {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.05; letter-spacing: -.02em;
  color: var(--swmc-navy); margin-bottom: 1.2rem;
}
.hero-split-title em {
  font-style: italic; color: var(--swmc-teal-700); position: relative; white-space: nowrap;
}
.hero-split-title em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .04em; height: .14em;
  background: var(--swmc-gold); opacity: .45; border-radius: 99px; z-index: -1;
}
.hero-split-text { font-size: 1.12rem; color: var(--swmc-body); max-width: 540px; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 1.8rem 0 0; font-size: .87rem; font-weight: 600; color: var(--swmc-ink); }
.hero-trust i { color: var(--swmc-teal); margin-right: .3rem; }

/* entrance */
.hero-copy > *, .bento-tile, .bento-notice { animation: rise .8s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: .06s; } .hero-copy > *:nth-child(3) { animation-delay: .1s; }
.hero-copy > *:nth-child(4) { animation-delay: .16s; } .hero-copy > *:nth-child(5) { animation-delay: .22s; }
.hero-copy > *:nth-child(6) { animation-delay: .28s; } .hero-copy > *:nth-child(7) { animation-delay: .34s; }
.bento-a { animation-delay: .15s; } .bento-b { animation-delay: .25s; } .bento-c { animation-delay: .35s; }
.bento-d { animation-delay: .45s; } .bento-e { animation-delay: .55s; } .bento-notice { animation-delay: .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* bento grid */
.hero-bento {
  position: relative; display: grid; gap: 14px;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 190px 170px 104px;
  grid-template-areas: "a b" "a c" "d e";
}
.bento-a { grid-area: a; } .bento-b { grid-area: b; } .bento-c { grid-area: c; } .bento-d { grid-area: d; } .bento-e { grid-area: e; }
.bento-tile {
  position: relative; margin: 0; border-radius: 20px; overflow: hidden; color: #fff;
  box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.bento-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: #fff; }
.bento-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.bento-photo:hover img { transform: scale(1.05); }
.bento-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(16, 37, 74, .75)); }
.bento-photo figcaption { position: absolute; left: 1.1rem; bottom: .9rem; z-index: 1; font-weight: 600; font-size: .95rem; }
.bento-kicker { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.bento-teal { background: var(--swmc-gradient); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; justify-content: flex-end; }
.bento-icon { position: absolute; top: 1rem; right: 1.1rem; font-size: 1.6rem; opacity: .55; }
.bento-num { font-family: var(--font-heading); font-size: 2.8rem; font-weight: 700; line-height: 1; }
.bento-label { font-size: .88rem; opacity: .9; margin-top: .3rem; line-height: 1.3; }
.bento-navy { background: var(--swmc-navy); display: flex; align-items: center; gap: .9rem; padding: 0 1.2rem; }
.bento-navy .bento-pulse-dot { background: #FF5A5A; }
.bento-navy .bento-pulse-dot::after { color: #FF5A5A; }
.bento-phone { display: block; font-weight: 700; font-size: 1.15rem; }
.bento-arrow { margin-left: auto; font-size: 1.3rem; color: #7FD3D6; }
.bento-gold { background: var(--swmc-gold); display: flex; align-items: center; gap: .8rem; padding: 0 1.2rem; }
.bento-gold .bento-num { font-size: 2.4rem; }
.bento-gold .bento-label { margin: 0; font-weight: 600; }

.bento-notice {
  position: absolute; left: -46px; top: 34px; z-index: 3; max-width: 300px;
  display: flex; gap: .75rem; align-items: flex-start;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border: 1px solid var(--swmc-border); border-radius: 14px; padding: .85rem 1rem;
  box-shadow: var(--shadow-lg); color: var(--swmc-ink);
}
.bento-notice:hover { color: var(--swmc-ink); border-color: var(--swmc-teal); }
.bento-notice .bento-kicker { color: var(--swmc-teal-700); opacity: 1; }
.bento-notice-title { display: block; font-size: .86rem; font-weight: 600; line-height: 1.35; margin-top: .15rem; }
.bento-notice-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: #FDECEC; color: var(--swmc-red);
  display: inline-flex; align-items: center; justify-content: center;
}

@media (max-width: 1199.98px) {
  .hero-split-inner { gap: 2.5rem; }
  .bento-notice { left: -24px; }
}
@media (max-width: 991.98px) {
  .hero-split { padding: 3rem 0 9.5rem; }
  .hero-split-inner { grid-template-columns: 1fr; }
  .bento-notice { left: auto; right: 1rem; top: auto; bottom: 128px; }
}
@media (max-width: 575.98px) {
  .hero-bento { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 150px 96px 96px; grid-template-areas: "a a" "b c" "d d" "e e"; gap: 10px; }
  .bento-notice { display: none; }
  .bento-num { font-size: 2.2rem; }
  .hero-pulse { bottom: 5.2rem; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pulse path { stroke-dashoffset: 0; animation: none; }
  .hero-chip-dot::after, .bento-pulse-dot::after { animation: none; }
}

/* ---------- Quick paths (overlaps hero) ---------- */
.paths { position: relative; z-index: 5; margin-top: -5rem; }
.paths-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.8rem 2rem 2rem; border-top: 4px solid var(--swmc-teal); }
.paths-title { font-size: 1.35rem; margin-bottom: 1.3rem; }
.paths-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.path { padding: 0 1.5rem; border-left: 1px solid var(--swmc-border); }
.path:first-child { padding-left: 0; border-left: 0; }
.path-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--swmc-navy-50); color: var(--swmc-navy);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .7rem;
  transition: all .25s var(--ease);
}
.path:hover .path-icon { background: var(--swmc-navy); color: #fff; }
.path-heading { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.path a { display: inline-flex; align-items: center; gap: .1rem; font-size: .9rem; color: var(--swmc-body); padding: .2rem 0; }
.path a i { opacity: 0; transform: translateX(-4px); transition: all .2s; color: var(--swmc-teal); }
.path a:hover { color: var(--swmc-teal-700); }
.path a:hover i { opacity: 1; transform: none; }
@media (max-width: 991.98px) {
  .paths-grid { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .path:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 575.98px) {
  .paths-card { padding: 1.4rem; }
  .paths-grid { grid-template-columns: 1fr; }
  .path { padding: 0 0 1.1rem; border-left: 0; border-bottom: 1px solid var(--swmc-border); }
  .path:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- Stats band (overlaps hero) ---------- */
.stats-band { position: relative; padding-top: 3.5rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stats-grid .stat-card { border-radius: 0; border-right: 1px solid var(--swmc-border); }
.stats-grid .stat-card:last-child { border-right: 0; }
@media (max-width: 1199.98px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid .stat-card { border-bottom: 1px solid var(--swmc-border); }
  .stats-grid .stat-card:nth-child(3n) { border-right: 0; }
}
@media (max-width: 575.98px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-card:nth-child(3n) { border-right: 1px solid var(--swmc-border); }
  .stats-grid .stat-card:nth-child(2n) { border-right: 0; }
  .stat-value { font-size: 1.6rem; }
}

/* ---------- Welcome ---------- */
.welcome-media { position: relative; padding: 0 3rem 3rem 0; }
.welcome-img-main { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.welcome-img-small {
  position: absolute; right: 0; bottom: 0; width: 45%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); border: 6px solid #fff; box-shadow: var(--shadow-lg);
}
.welcome-badge {
  position: absolute; left: -1rem; top: 2rem; display: flex; align-items: center; gap: .7rem;
  background: var(--swmc-gold); color: #fff; padding: .9rem 1.2rem; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 600; line-height: 1.25;
}
.welcome-badge-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }
@media (max-width: 575.98px) { .welcome-media { padding: 0; } .welcome-badge { left: .75rem; top: .75rem; } }

/* ---------- Principal message ---------- */
.message-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center;
  background: var(--swmc-navy-50); border-radius: var(--radius-lg); padding: 2.5rem; position: relative; overflow: hidden;
}
.message-card::after {
  content: "\201C"; position: absolute; right: 2rem; top: -2.5rem;
  font-family: var(--font-heading); font-size: 16rem; line-height: 1; color: rgba(27, 58, 107, .06);
}
.message-photo img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 5 / 6; object-fit: cover; box-shadow: var(--shadow); background: #fff; }
.message-quote { margin: 0 0 1.2rem; }
.message-quote p { font-family: var(--font-heading); font-size: clamp(1.1rem, 1.8vw, 1.4rem); color: var(--swmc-ink); font-style: italic; line-height: 1.6; margin: 0; }
.message-name { font-weight: 700; color: var(--swmc-navy); margin: 0; font-size: 1.05rem; }
.message-role { color: var(--swmc-muted); font-size: .9rem; margin-bottom: 1rem; }
@media (max-width: 767.98px) {
  .message-card { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; }
  .message-photo { max-width: 220px; }
}

/* ---------- Program tabs ---------- */
.program-tab-nav { gap: .5rem; margin-bottom: 2rem; }
.program-tab-nav .nav-link {
  border: 1px solid var(--swmc-border); background: #fff; color: var(--swmc-ink);
  font-weight: 600; border-radius: 99px; padding: .65rem 1.3rem; display: inline-flex; gap: .5rem; align-items: center;
}
.program-tab-nav .nav-link i { color: var(--swmc-teal); }
.program-tab-nav .nav-link.active { background: var(--swmc-navy); border-color: var(--swmc-navy); color: #fff; }
.program-tab-nav .nav-link.active i { color: #7FD3D6; }
.program-pane {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
  background: #fff; border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--swmc-border);
}
.program-title { font-size: 1.8rem; margin: .7rem 0 .6rem; }
@media (max-width: 767.98px) { .program-pane { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.25rem; } }

/* ---------- Hospital band ---------- */
.hospital-band { background: var(--swmc-navy); position: relative; overflow: hidden; }
.hospital-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 0% 100%, rgba(26, 151, 155, .45), transparent 55%);
}
.hospital-band .container-xl { position: relative; }
.hospital-band .service-card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.hospital-band .service-card .card-title-ui { color: #fff; }
.hospital-band .service-card .card-text-ui { color: rgba(255, 255, 255, .72); font-size: .86rem; }
.hospital-band .service-card .service-icon { background: rgba(127, 211, 214, .15); color: #7FD3D6; }
.hospital-band .service-card:hover { background: rgba(255, 255, 255, .1); border-color: #7FD3D6; }
.hospital-band .service-card:hover .service-icon { background: var(--swmc-teal); color: #fff; }
.emergency-box {
  display: flex; align-items: center; gap: 1rem; background: var(--swmc-red); color: #fff;
  border-radius: var(--radius); padding: 1rem 1.2rem;
}
.emergency-box > i { font-size: 1.8rem; }
.emergency-box span { display: block; font-size: .82rem; opacity: .9; }
.emergency-box a { color: #fff; font-weight: 700; font-size: 1.3rem; }

/* ---------- Facilities carousel ---------- */
.js-facilities-swiper { padding-bottom: .5rem; }
.js-facilities-swiper .swiper-slide { height: auto; }

/* ---------- Home gallery ---------- */
.home-gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; gap: 1rem; }
.home-gallery .gallery-item { margin: 0; height: 100%; }
.home-gallery .gallery-item img { height: 100%; object-fit: cover; }
.home-gallery .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 575.98px) { .home-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; } }
.video-card:not(.is-featured) { aspect-ratio: auto; height: 150px; }
.video-card:not(.is-featured) .video-play { width: 46px; height: 46px; font-size: 1.4rem; box-shadow: 0 0 0 6px rgba(255, 255, 255, .2); }

/* ---------- Accreditation ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 991.98px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .partner-grid { grid-template-columns: 1fr; } }
.partner-card {
  display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--swmc-border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; transition: all .25s;
}
.partner-card:hover { border-color: var(--swmc-teal); box-shadow: var(--shadow-sm); }
.partner-card > i {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; background: var(--swmc-navy-50); color: var(--swmc-navy);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.partner-card strong { display: block; color: var(--swmc-ink); font-size: .93rem; line-height: 1.3; }
.partner-card small { color: var(--swmc-muted); font-size: .8rem; }
.external-links { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--swmc-border); }
.external-links-title { font-family: var(--font-body); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--swmc-muted); margin-bottom: 1rem; }
.external-links ul { display: flex; flex-wrap: wrap; gap: .6rem; }
.external-links a {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 500;
  padding: .5rem 1rem; border-radius: 99px; background: #fff; border: 1px solid var(--swmc-border); color: var(--swmc-ink);
}
.external-links a i { font-size: .75rem; color: var(--swmc-teal); }
.external-links a:hover { border-color: var(--swmc-navy); color: var(--swmc-navy); }
