/* =========================================================================
   EMPOWER ANESTHESIA PARTNERS · SITE STRUCTURE
   -------------------------------------------------------------------------
   Cross-page foundations that every page on empoweranesthesiapartners.com depends on:
   resets, layout container, section primitives, buttons, site header,
   site footer, modal, and toast.

   Page-specific styles live in homepage.css / about.css / etc.
   Assumes colors_and_type.css is loaded FIRST.
   ========================================================================= */

/* ---- Reset --------------------------------------------------------- */
* { box-sizing: border-box; }
body { margin: 0; }

/* ---- Page surface (subtle top vignette) --------------------------- */
body {
  background:
    radial-gradient(ellipse 90% 600px at 50% -100px, rgba(0,168,216,0.06), transparent 60%),
    var(--paper-2);
}

/* ---- Container ---------------------------------------------------- */
.eap-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section primitives ------------------------------------------ */
.eap-section { padding: var(--space-12) 0; }
.eap-section__head {
  text-align: center;
  margin: 0 auto var(--space-9);
  max-width: 720px;
}

.eap-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--sky-700);
  margin-bottom: var(--space-3);
}
.eap-eyebrow--dark { color: var(--sky-400); }

.eap-h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--ink-900);
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}
.eap-h2 em { color: var(--sky-500); font-style: normal; font-weight: var(--fw-bold); }
.eap-h2--ondark { color: #fff; }
.eap-h2--ondark em { color: var(--sky-400); }
.eap-h2--centered { text-align: center; }

.eap-body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  color: var(--ink-700);
  margin: 0 0 var(--space-5);
  max-width: 60ch;
}
.eap-body--ondark { color: rgba(255,255,255,0.8); }

/* ---- Icon base --------------------------------------------------- */
.eap-icon {
  fill: var(--navy-800);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.eap-btn .eap-icon { fill: currentColor; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.eap-btn {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  /* Default sizing — applied unless a size modifier overrides */
  font-size: 12px;
  padding: 14px 24px;
}
.eap-btn--sm { font-size: 11px; padding: 11px 18px; }
.eap-btn--md { font-size: 12px; padding: 14px 24px; }
.eap-btn--lg { font-size: 13px; padding: 18px 30px; }
.eap-btn:active { transform: scale(0.98); }
a.eap-btn { text-decoration: none; border: none; }

/* Primary — sky gradient, WHITE text always */
.eap-btn--primary {
  background: linear-gradient(180deg, #00A8D8 0%, #0070A8 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 -1px 0 rgba(0,80,117,0.30) inset,
    var(--shadow-2),
    0 7px 20px -7px rgba(0,168,216,0.5);
}
.eap-btn--primary:hover {
  background: linear-gradient(180deg, #3DBFE4 0%, #00A8D8 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.40) inset,
    var(--shadow-2),
    0 12px 30px -8px rgba(0,168,216,0.68);
}
.eap-btn--primary:active {
  background: linear-gradient(180deg, #0070A8 0%, #005075 100%);
  color: #fff;
}

/* Dark — navy gradient, white text */
.eap-btn--dark {
  background: linear-gradient(180deg, #204068 0%, #11223A 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    var(--shadow-2);
}
.eap-btn--dark:hover {
  background: linear-gradient(180deg, #2E5589 0%, #204068 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    var(--shadow-2),
    0 12px 30px -10px rgba(46,85,137,0.55);
}
.eap-btn--dark:active { color: #fff; }

/* Outline — navy text on light, navy fill + white text on hover */
.eap-btn--outline {
  background: transparent;
  color: var(--navy-900);
  box-shadow: inset 0 0 0 1.5px var(--navy-900);
}
.eap-btn--outline:hover {
  background: var(--navy-900);
  color: #fff;
}

/* Outline-white — for dark backgrounds. Text stays white. */
.eap-btn--outline-white {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.7);
}
.eap-btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* =========================================================================
   SITE HEADER (used across all pages)
   The Joomla theme will render this; styles included so previews work
   and so the design stays consistent if pasted into a custom module.
   ========================================================================= */
.eap-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(227,231,236,0.7);
  box-shadow: 0 1px 0 rgba(23,48,79,0.02), 0 4px 16px -8px rgba(23,48,79,0.08);
}
.eap-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.eap-site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  border: none;
}
.eap-site-header__logo img {
  height: 44px;
  width: auto;
  display: block;
}
.eap-site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.eap-site-nav a {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--ink-900);
  text-decoration: none;
  border: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.eap-site-nav a:not(.eap-btn):hover { color: var(--sky-700); }
.eap-site-header__menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.eap-site-header__menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 1px;
}

/* =========================================================================
   SITE FOOTER (used across all pages — Joomla module)
   ========================================================================= */
.eap-footer {
  position: relative;
  color: rgba(255,255,255,0.85);
  padding: var(--space-12) 0 0;
  background:
    radial-gradient(40% 50% at 50% 0%, rgba(0,168,216,0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0A1728 0%, #05101F 100%);
}
.eap-footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,168,216,0.40) 50%, transparent 100%);
}
.eap-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-10);
}
.eap-footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: none;
  margin-bottom: var(--space-5);
}
.eap-footer__mark {
  height: 58px;
  width: auto;
  max-width: 100%;
  display: block;
}
.eap-footer__blurb {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin: 0 0 var(--space-5);
  max-width: 380px;
}
.eap-footer__actions {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.eap-footer__social {
  display: flex;
  gap: 10px;
}
.eap-footer__social a {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: all var(--dur-base) var(--ease-out);
}
.eap-footer__social a:hover {
  background: var(--sky-500);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 0 0 1px rgba(0,168,216,0.40),
    0 8px 20px -4px rgba(0,168,216,0.40);
}
.eap-footer__heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky-400);
  margin-bottom: var(--space-4);
}
.eap-footer__addr {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.eap-footer__addr div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eap-footer__addr svg { color: var(--sky-400); }
.eap-footer .eap-icon { fill: var(--sky-400); }

.eap-footer__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13px;
}
.eap-footer__table th,
.eap-footer__table td {
  text-align: left;
  padding: 4px 0;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
}
.eap-footer__table th {
  color: rgba(255,255,255,0.65);
  width: 100px;
}

/* Bottom legal bar */
.eap-footer__legal {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--space-10);
  padding: var(--space-5) 0;
}
.eap-footer__legal-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  flex-wrap: wrap;
}
.eap-footer__legal a {
  color: rgba(255,255,255,0.85);
  border: none;
  text-decoration: none;
}
.eap-footer__legal a:hover { color: #fff; }
.eap-footer__credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eap-footer__credit-link {
  display: inline-flex;
  align-items: center;
  border: none;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--dur-base) var(--ease-out);
}
.eap-footer__credit-link:hover { opacity: 1; }
.eap-footer__credit-mark {
  height: 16px;
  width: 90px;
  display: block;
  object-fit: contain;
}

/* =========================================================================
   MODAL (booking form scrim)
   ========================================================================= */
.eap-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(17,34,58,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: eap-fade var(--dur-base) var(--ease-out);
}
@keyframes eap-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.eap-modal {
  background: #fff;
  border-radius: var(--r-lg);
  max-width: 520px;
  width: 100%;
  padding: var(--space-9) var(--space-8) var(--space-8);
  box-shadow: var(--shadow-3);
  position: relative;
}
.eap-modal__close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-500);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: background var(--dur-fast);
}
.eap-modal__close:hover { background: var(--paper-3); }
.eap-modal label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: block;
  margin-bottom: 6px;
}
.eap-modal input,
.eap-modal select,
.eap-modal textarea {
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink-900);
  box-sizing: border-box;
  transition: border-color var(--dur-fast);
}
.eap-modal input:focus,
.eap-modal select:focus,
.eap-modal textarea:focus {
  outline: none;
  border-color: var(--sky-500);
  box-shadow: 0 0 0 3px rgba(0,168,216,0.18);
}
.eap-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eap-modal__field { margin-bottom: var(--space-4); }
.eap-modal__actions { margin-top: var(--space-5); display: flex; justify-content: flex-end; gap: 10px; }
.eap-modal__success { text-align: center; padding: var(--space-7) 0; }
.eap-modal__success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--sky-200);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
}

/* =========================================================================
   TOAST
   ========================================================================= */
.eap-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy-900); color: #fff;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  z-index: 200;
  box-shadow: var(--shadow-3);
  animation: eap-toast-in 320ms var(--ease-out);
  display: flex; align-items: center; gap: 10px;
}
.eap-toast svg { color: var(--sky-400); }
@keyframes eap-toast-in {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}

/* =========================================================================
   RESPONSIVE — global elements only
   ========================================================================= */
@media (max-width: 900px) {
  .eap-site-nav { display: none; }
  .eap-site-header__menu { display: flex; }
  .eap-nav-open .eap-site-nav {
    display: flex; flex-direction: column;
    position: absolute; top: 84px; right: 0; left: 0;
    background: #fff; padding: 24px;
    box-shadow: var(--shadow-2);
    align-items: stretch;
    gap: 18px;
  }

  /* Footer collapses, centers, and the brand logo gets larger again on mobile */
  .eap-footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .eap-footer__brand,
  .eap-footer__contact,
  .eap-footer__hours {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .eap-footer__logo { justify-content: center; }
  .eap-footer__mark { height: 64px; }
  .eap-footer__blurb { max-width: 460px; }
  .eap-footer__actions { justify-content: center; }
  .eap-footer__social { justify-content: center; }
  .eap-footer__addr { text-align: left; }
  .eap-footer__table { max-width: 240px; }

  .eap-footer__legal-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
  }
  .eap-footer__credit { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 540px) {
  .eap-footer__mark { height: 56px; }
  .eap-footer__actions .eap-btn { flex: 1 1 auto; justify-content: center; }
}
