/*
Theme Name: Aria Institute of Medical Sciences
Theme URI: https://ariahealth.com.pk/
Author: Aria Institute of Medical Sciences
Author URI: https://ariahealth.com.pk/
Description: Custom hospital theme for Aria Institute of Medical Sciences (AIMS) Quetta — clean modern medical-clinic design (navy/blue/green) with hero slider, service cards, doctor grid, and appointment booking. Built to be edited with Elementor: supports Elementor Pro Theme Builder header/footer locations and yields its coded sections to the Elementor canvas on any page built with Elementor.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: aims
*/

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --navy: #0A2938;
  --blue: #3F9FCA;
  --blue-dark: #2C7496;
  --green: #04CE78;
  --gray: #788094;
  --gray-light: #EEF7FB;
  --off-white: #F6F8FD;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--gray);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; color: var(--navy); }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

/* ===== Primary nav dropdowns ===== */
.nav-item { position: relative; }
.nav-item > a::after {
  content: '▾';
  display: inline-block;
  margin-left: 5px;
  font-size: 11px;
  transform: translateY(-1px);
}
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  margin-top: 14px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(10,41,56,0.16);
  padding: 10px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 200ms;
  z-index: 60;
}
.nav-item:first-child .nav-dropdown { left: 0; transform: translateY(6px); }
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-item:first-child:hover .nav-dropdown,
.nav-item:first-child:focus-within .nav-dropdown {
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy) !important;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav-dropdown a:hover { background: var(--off-white); color: var(--blue) !important; }
.nav-dropdown a::after { content: none; }
.nav-mega { display: flex; gap: 8px; min-width: 660px; padding: 18px; left: 0; transform: translateY(6px); }
.nav-item:hover .nav-mega, .nav-item:focus-within .nav-mega { transform: translateY(0); }
.nav-mega-col { display: flex; flex-direction: column; gap: 1px; min-width: 150px; }
.nav-mega-col-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gray);
  text-transform: uppercase;
  padding: 6px 14px 6px;
}

img { max-width: 100%; display: block; }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: 'DM Sans', sans-serif; cursor: pointer; }

input, textarea, select { font-family: 'DM Sans', sans-serif; }

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

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .split-2 { grid-template-columns: 1fr !important; }
  h1 { font-size: 34px !important; }
  h2 { font-size: 28px !important; }
  nav.primary-nav { display: none !important; }
}

/* ===== Eyebrow label ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--green);
  display: inline-block;
  border-radius: 2px;
}
.hl-green { color: var(--green); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 30px;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.97); }
.btn-primary { background: var(--blue); color: var(--white); box-shadow: 0 14px 30px rgba(63,159,202,0.28); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: #D7E7EF; }
.btn-outline:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-sm { padding: 11px 22px; font-size: 14px; }

/* ===== Keyframes ===== */
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(4,206,120,0.55); } 70% { box-shadow: 0 0 0 7px rgba(4,206,120,0); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== Reveal-on-scroll ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Hero slider ===== */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 1200ms var(--ease-in-out), filter 1200ms var(--ease-in-out);
  background-size: cover;
  background-position: center;
  will-change: opacity, filter;
}
.hero-slide.active {
  opacity: 1;
  filter: blur(0);
  animation: kenBurns 16s ease-in-out infinite alternate;
}
.hero-slide-split {
  background: none;
  pointer-events: none;
}
.hero-slide-split.active {
  pointer-events: auto;
  animation: none;
}
.hero-slide-split .floating-card img { animation: kenBurns 16s ease-in-out infinite alternate; }
.hero-dot {
  width: 10px;
  height: 6px;
  border-radius: 3px;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: width 220ms var(--ease-out), background-color 220ms var(--ease-out);
}
.hero-dot.active { width: 28px; background: var(--green); }
.hero-dot:active { transform: scale(0.9); }
.hero-dot-dark { background: rgba(10,41,56,0.15); }
.hero-dot-dark.active { background: var(--blue); }

/* ===== Full-bleed hero (photo + scrim + overlaid content) ===== */
.hero-full { position: relative; min-height: 640px; overflow: hidden; background: var(--navy); isolation: isolate; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,41,56,0.90) 0%, rgba(10,41,56,0.55) 42%, rgba(10,41,56,0.12) 70%);
}
.hero-arrow {
  position: absolute; top: 50%; right: 28px; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.14); border: 1.5px solid rgba(255,255,255,0.35);
  color: #FFFFFF; display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; z-index: 6;
  transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.hero-arrow:hover { background: var(--green); border-color: var(--green); transform: translateY(-50%) scale(1.06); }
.hero-arrow:active { transform: translateY(-50%) scale(0.94); }
.hero-arrow-prev { right: auto; left: 28px; }
@media (max-width: 900px) { .hero-arrow { display: none; } }

.hero-progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; height: 5px;
}
.hero-progress-seg {
  flex: 1; background: rgba(255,255,255,0.18); cursor: pointer;
  position: relative; overflow: hidden;
}
.hero-progress-seg::after {
  content: ''; position: absolute; inset: 0; background: var(--green);
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease-out);
}
.hero-progress-seg.active::after { transform: scaleX(1); }

.hero-feature { display: flex; align-items: flex-start; gap: 12px; }
.hero-feature .service-icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,0.12); color: var(--green); flex-shrink: 0; font-size: 17px; }
.hero-feature h4 { margin: 0 0 3px; font-size: 14.5px; color: #FFFFFF; font-weight: 700; }
.hero-feature p { margin: 0; font-size: 12.5px; color: #B8D3E0; line-height: 1.5; }

.hero-text { transition: opacity 400ms var(--ease-out); }
.hero-text:not(.active) { opacity: 0; position: absolute; pointer-events: none; }

/* ===== Card hovers ===== */
.card-hover { transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
.card-hover:hover { transform: translateY(-8px); box-shadow: 0 18px 36px rgba(10,41,56,0.12); }
.card-hover:active { transform: translateY(-4px) scale(0.99); }

.zoom-img { transition: transform 450ms var(--ease-out); }
.zoom-img-wrap:hover .zoom-img { transform: scale(1.06); }

.btn-lift { display: inline-block; transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out); }
.btn-lift:hover { transform: translateY(-3px); }
.btn-lift:active { transform: translateY(-1px) scale(0.97); }

.dept-link { transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 220ms var(--ease-out); }
.dept-link:hover { background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }
.dept-link:hover span { color: #fff !important; }
.dept-link:active { transform: scale(0.98); }

.testimonial-dot { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer; transition: background-color 220ms var(--ease-out), transform 220ms var(--ease-out); }
.testimonial-dot.active { transform: scale(1.2); }

.testimonial-item { transition: opacity 320ms var(--ease-out); }
.testimonial-item.is-hidden { opacity: 0; position: absolute; pointer-events: none; }

.page-hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.22; }

/* ===== Service cards (flip / color-invert on hover) ===== */
.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid #E9EDF7;
  border-radius: 16px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out), border-color 280ms var(--ease-out);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  transform: translateY(100%);
  transition: transform 380ms var(--ease-in-out);
  z-index: 0;
  border-radius: 16px;
}
.service-card > * { position: relative; z-index: 1; transition: color 280ms ease; }
/* Reusable icon chip — service cards, quick-actions, hero features all share
   this base sizing; scope hover/tint overrides to the parent instead of
   re-declaring width/height, or it collapses to 0x0 and flex-stretches. */
.service-icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  background: var(--gray-light); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 19px;
  transition: background-color 280ms ease, color 280ms ease;
}
.service-card h3 { margin: 0; font-size: 20px; font-weight: 600; }
.service-card p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.service-card .service-link { font-weight: 700; font-size: 14px; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }
.service-card .service-link .arrow { transition: transform 220ms var(--ease-out); }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(10,41,56,0.16); border-color: transparent; }
.service-card:hover::before { transform: translateY(0); }
.service-card:hover h3, .service-card:hover p, .service-card:hover .service-link { color: #FFFFFF !important; }
.service-card:hover .service-icon { background: rgba(255,255,255,0.16); color: #fff; }
.service-card:hover .service-link .arrow { transform: translateX(4px); }

/* ===== Quick-action strip ===== */
.quick-action {
  background: var(--white);
  border: 1px solid #E9EDF7;
  border-radius: 16px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), border-color 260ms var(--ease-out);
}
/* Icons here are emoji, which ignore CSS `color` — so the hover state only
   ever recolors the chip background behind them, never the card itself. */
.quick-action:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(10,41,56,0.14); border-color: var(--blue); }
.quick-action:hover .service-icon { background: var(--blue); }

/* ===== Doctor cards ===== */
.doctor-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; }
.doctor-photo-wrap { position: relative; overflow: hidden; border-radius: 16px; }
.doctor-photo-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,41,56,0.82), rgba(10,41,56,0) 55%);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}
.doctor-photo-wrap:hover::after { opacity: 1; }
.doctor-social {
  position: absolute; left: 0; right: 0; bottom: -40px;
  display: flex; justify-content: center; gap: 10px;
  opacity: 0;
  transition: bottom 320ms var(--ease-out), opacity 320ms var(--ease-out);
}
.doctor-photo-wrap:hover .doctor-social { bottom: 18px; opacity: 1; }
.doctor-social span {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  transition: background-color 200ms ease, transform 200ms var(--ease-out);
}
.doctor-social span:hover { background: var(--green); color: #fff; transform: translateY(-2px); }

.doctor-avatar-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 20px 26px; background: #FFFFFF; }
.doctor-avatar-wrap { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; margin-bottom: 18px; box-shadow: 0 0 0 5px #FFFFFF, 0 0 0 7px rgba(63,159,202,0.35), 0 14px 28px rgba(10,41,56,0.16); flex-shrink: 0; }
.doctor-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 420ms var(--ease-out); }
.doctor-avatar-card:hover .doctor-avatar-wrap img { transform: scale(1.08); }
.doctor-avatar-card:hover .doctor-avatar-wrap { box-shadow: 0 0 0 5px #FFFFFF, 0 0 0 7px var(--blue), 0 16px 32px rgba(10,41,56,0.2); }

.doctor-full-card { position: relative; display: block; border-radius: 18px; overflow: hidden; height: 380px; background: var(--gray-light); }
.doctor-full-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 420ms var(--ease-out); }
.doctor-full-card:hover img { transform: scale(1.06); }
.doctor-full-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; background: linear-gradient(to top, rgba(10,41,56,0.94), rgba(10,41,56,0.5) 58%, rgba(10,41,56,0) 100%); }
.doctor-full-card-info .name { display: block; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px; color: #FFFFFF; }
.doctor-full-card-info .specialty { display: block; font-size: 12.5px; color: #8EC9E6; font-weight: 600; margin-top: 4px; }

.doctor-tall-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: #FFFFFF; box-shadow: 0 10px 28px rgba(10,41,56,0.10); transition: box-shadow 260ms var(--ease-out); }
.doctor-tall-card:hover { box-shadow: 0 22px 44px rgba(10,41,56,0.18); }
.doctor-tall-photo { overflow: hidden; aspect-ratio: 7 / 8; background: var(--gray-light); }
.doctor-tall-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 420ms var(--ease-out); }
.doctor-tall-card:hover .doctor-tall-photo img { transform: scale(1.06); }
.doctor-tall-footer { background: #FFFFFF; padding: 18px 20px 20px; }
.doctor-tall-footer .name { display: block; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 16.5px; color: var(--navy); }
.doctor-tall-footer .specialty { display: block; font-size: 12.5px; color: var(--blue); font-weight: 600; margin-top: 4px; }

/* ===== Blog/news cards ===== */
.news-card { transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
.news-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(10,41,56,0.14); }
.news-read-more { position: relative; display: inline-block; }
.news-read-more::after {
  content: '';
  position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.news-card:hover .news-read-more::after { transform: scaleX(1); }

/* ===== Floating hours card ===== */
.floating-card {
  animation: floatY 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: opacity 300ms ease; transform: none !important; }
  .hero-slide { animation: none !important; transition: opacity 400ms ease !important; filter: none !important; }
  .card-hover, .card-hover:hover, .card-hover:active { transform: none !important; }
  .zoom-img, .zoom-img-wrap:hover .zoom-img { transform: none !important; }
  .btn-lift:hover, .btn-lift:active, .btn:hover, .btn:active { transform: none !important; }
  .service-card:hover { transform: none !important; }
  .quick-action:hover { transform: none !important; }
  .news-card:hover { transform: none !important; }
  .floating-card { animation: none !important; }
}

/* ===== Elementor compatibility ===== */
/* Let Elementor's own full-width sections run edge-to-edge inside our templates. */
.elementor-page .container { max-width: none; padding: 0; }
.elementor-section.elementor-section-boxed > .elementor-container { max-width: 1200px; }
