/* ==========================================================================
   Elevated Systems — Main Stylesheet
   ========================================================================== */

/* --- Reset & Base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: #fff;
  line-height: 1.7;
}

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

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-navy);
}

/* --- Layout Helpers ------------------------------------------------------- */
.es-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons -------------------------------------------------------------- */
.es-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.es-btn--primary {
  background: var(--color-blue);
  color: #fff;
  border: 2px solid var(--color-blue);
}
.es-btn--primary:hover {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
  color: #fff;
}

.es-btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid var(--color-cyan);
}
.es-btn--outline:hover {
  background: var(--color-cyan);
  color: #fff;
}

.es-btn--white {
  background: #fff;
  color: var(--color-navy);
  border: 2px solid #fff;
}
.es-btn--white:hover {
  background: transparent;
  color: #fff;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.es-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-navy);
  height: var(--nav-height);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.es-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.es-header__logo img { width: 160px; height: auto; }

/* Nav list */
.es-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.es-nav__list > li > a {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  display: block;
  white-space: nowrap;
  transition: background 0.15s;
}
.es-nav__list > li > a:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* CTA button in nav */
.es-nav__cta {
  background: var(--color-blue) !important;
  border-radius: 4px !important;
  padding: 8px 18px !important;
}
.es-nav__cta:hover { background: var(--color-cyan) !important; }

/* Arrow indicators */
.arrow { font-size: 0.65em; margin-left: 4px; opacity: 0.7; }

/* Dropdowns */
.has-dropdown { position: relative; }

.es-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-navy);
  border-top: 3px solid var(--color-cyan);
  min-width: 230px;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
}

.has-dropdown:hover > .es-nav__dropdown,
.has-dropdown:focus-within > .es-nav__dropdown { display: block; }

.es-nav__dropdown li a {
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: 10px 18px;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s, color 0.15s;
}
.es-nav__dropdown li a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Sub-sub dropdown */
.es-nav__dropdown--sub {
  left: 100%;
  top: 0;
  border-top: none;
  border-left: 3px solid var(--color-cyan);
}

/* Mobile toggle */
.es-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.es-nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ==========================================================================
   HOMEPAGE — HERO
   ========================================================================== */
.es-hero {
  background: var(--color-navy);
  padding: 100px 24px 80px;
  text-align: center;
}

.es-hero__inner {
  max-width: 800px;
  margin: 0 auto;
}

.es-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.es-hero__sub {
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.es-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ==========================================================================
   HOMEPAGE — STATS BAR
   ========================================================================== */
.es-stats {
  background: var(--color-blue);
  padding: 36px 24px;
}

.es-stats__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.es-stats__number {
  display: block;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
}

.es-stats__label {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ==========================================================================
   HOMEPAGE — SERVICES GRID
   ========================================================================== */
.es-services {
  padding: 80px 24px;
  background: #fff;
}

.es-services h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
}

.es-services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.es-service-card {
  display: block;
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 36px 24px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border-bottom: 3px solid transparent;
}
.es-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-bottom-color: var(--color-blue);
}

.es-service-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.es-service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--color-navy);
}

.es-service-card p {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ==========================================================================
   HOMEPAGE — AREAS TEASER
   ========================================================================== */
.es-areas-teaser {
  background: var(--color-bg-light);
  padding: 72px 24px;
  text-align: center;
}

.es-areas-teaser h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.es-areas-teaser p {
  color: var(--color-text);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ==========================================================================
   HOMEPAGE — CTA STRIP
   ========================================================================== */
.es-cta-strip {
  background: var(--color-navy);
  padding: 72px 24px;
  text-align: center;
}

.es-cta-strip h2 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 16px;
}

.es-cta-strip p {
  color: var(--color-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ==========================================================================
   PAGE HERO (used by page.php, page-hub.php, page-content.php)
   ========================================================================== */
.es-page-hero,
.es-hub-page__hero,
.es-content-page__hero {
  background: var(--color-navy);
  padding: 60px 24px;
}

.es-page-hero h1,
.es-hub-page__hero h1,
.es-content-page__hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ==========================================================================
   PAGE CONTENT AREA
   ========================================================================== */
.es-page-content,
.es-hub-page__content,
.es-content-page__body {
  padding: 60px 24px;
}

.es-article {
  max-width: 860px;
}

.es-page-content h2,
.es-hub-page__content h2,
.es-article h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  color: var(--color-navy);
}

.es-page-content p,
.es-hub-page__content p,
.es-article p {
  margin-bottom: 18px;
  line-height: 1.8;
}

.es-page-content ul,
.es-hub-page__content ul,
.es-article ul {
  padding-left: 24px;
  margin-bottom: 18px;
}

.es-page-content ul li,
.es-hub-page__content ul li,
.es-article ul li {
  margin-bottom: 8px;
}

/* ==========================================================================
   CITY PAGE
   ========================================================================== */
.es-city-page__content {
  /* City page HTML is fully self-contained with its own hero/sections */
}

/* Styles referenced by city page post_content HTML */
.city-hero {
  background: var(--color-navy);
  padding: 60px 24px;
  text-align: center;
}

.city-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.city-hero p {
  color: var(--color-muted);
  margin-top: 12px;
  font-size: 1.05rem;
}

.city-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
}

.city-body h2 { margin: 32px 0 14px; font-size: 1.4rem; }
.city-body p { margin-bottom: 16px; }
.city-body ul { padding-left: 24px; margin-bottom: 16px; }
.city-body ul li { margin-bottom: 8px; }

.city-cta {
  background: var(--color-navy);
  padding: 48px 24px;
  text-align: center;
}

.city-cta h2 { color: #fff; font-size: 1.5rem; margin-bottom: 16px; }
.city-cta p { color: var(--color-muted); margin-bottom: 24px; }

/* ==========================================================================
   HUB PAGE — city grid (service areas)
   ========================================================================== */
.es-city-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  margin: 24px 0;
}

.es-city-grid a {
  color: var(--color-blue);
  font-weight: 500;
  padding: 6px 0;
  display: block;
}
.es-city-grid a:hover { color: var(--color-cyan); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.es-footer {
  font-family: var(--font-primary);
}

.es-footer__main {
  background: var(--color-navy);
  padding: 60px 24px;
}

.es-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 48px;
}

.es-footer__logo { margin-bottom: 20px; width: 200px; }

.es-footer__col--brand p {
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  padding-right: 16px;
}

.es-footer__col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.es-footer__list {
  list-style: none;
}

.es-footer__list li {
  margin-bottom: 12px;
}

.es-footer__list a,
.es-footer__list span {
  color: var(--color-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s;
}
.es-footer__list a:hover { color: #fff; }

/* Sub-footer */
.es-footer__sub {
  background: var(--color-subfooter);
  padding: 18px 24px;
}

.es-footer__sub-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.es-footer__sub p {
  color: #6b8fa8;
  font-size: 0.75rem;
}

.es-footer__sub a {
  color: #6b8fa8;
  font-size: 0.75rem;
  text-decoration: none;
}
.es-footer__sub a:hover { color: var(--color-muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .es-services__grid { grid-template-columns: repeat(2, 1fr); }
  .es-stats__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Nav */
  .es-nav__toggle { display: flex; }

  .es-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
  }
  .es-nav--open { display: block; }

  .es-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .es-nav__list > li > a { padding: 12px 24px; }

  .es-nav__dropdown {
    position: static;
    display: none;
    border-top: none;
    border-left: 3px solid var(--color-cyan);
    margin-left: 24px;
    box-shadow: none;
  }

  .has-dropdown > a { cursor: pointer; }

  /* Footer */
  .es-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .es-footer__sub-inner { flex-direction: column; text-align: center; }

  /* Homepage */
  .es-services__grid { grid-template-columns: 1fr; }
  .es-stats__inner { grid-template-columns: repeat(2, 1fr); }
  .es-hero__ctas { flex-direction: column; align-items: center; }
  .es-city-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .es-stats__inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

/* Hero */
.es-contact-hero {
  background: #1A2E41;
  padding: 64px 24px 56px;
  text-align: center;
}
.es-contact-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0 auto 12px;
  max-width: 700px;
}
.es-contact-hero p {
  color: #a8bfd0;
  font-size: 1.05rem;
  margin: 0;
}

/* Page background + container */
.es-contact-body {
  background: #f0f4f7;
  padding: 48px 24px 72px;
}
.es-contact-body .es-container {
  max-width: 780px;
}

/* ── Form selector ───────────────────────────────────── */
.es-form-selector {
  position: relative;
  margin-bottom: 0;
}

.es-form-selector__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0170B9;
  color: #fff;
  border: none;
  border-radius: 6px 6px 0 0;
  padding: 12px 22px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.01em;
}
.es-form-selector__btn:hover { background: #1A2E41; }
.es-form-selector__btn[aria-expanded="true"] { background: #1A2E41; }

.es-selector-arrow {
  font-size: 0.6em;
  transition: transform 0.2s;
}
.es-form-selector__btn[aria-expanded="true"] .es-selector-arrow {
  transform: rotate(180deg);
}

.es-form-selector__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #1A2E41;
  border-top: 3px solid #02AFEC;
  list-style: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  z-index: 300;
  border-radius: 0 4px 4px 4px;
}
.es-form-selector__menu.is-open { display: block; }
.es-form-selector__menu li { margin: 0; }
.es-form-selector__menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #a8bfd0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  padding: 12px 20px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.es-form-selector__menu button:hover { background: rgba(255,255,255,0.08); color: #fff; }
.es-form-selector__menu button.is-active { color: #02AFEC; font-weight: 600; }
.es-form-selector__menu li:last-child button { border-bottom: none; }

/* ── Form card ───────────────────────────────────────── */
.es-contact-form-wrap {
  background: #fff;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px 44px 44px;
}

.es-contact-form-wrap h2 {
  font-size: 1.4rem;
  color: #1A2E41;
  margin: 0 0 6px;
}
.es-form-intro {
  color: #4B4F58;
  font-size: 0.9rem;
  margin: 0 0 32px;
}

/* ── Form fields ─────────────────────────────────────── */
.es-contact-form { margin: 0; }

.es-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.es-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}

.es-form-group label {
  font-weight: 600;
  font-size: 0.82rem;
  color: #1A2E41;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.es-required { color: #c53030; margin-left: 1px; }
.es-optional { color: #4B4F58; font-weight: 400; font-size: 0.78rem; text-transform: none; letter-spacing: 0; }

.es-form-group input[type="text"],
.es-form-group input[type="tel"],
.es-form-group input[type="email"],
.es-form-group input[type="file"],
.es-form-group select,
.es-form-group textarea {
  width: 100%;
  border: 1.5px solid #d0dce6;
  border-radius: 5px;
  padding: 11px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  color: #1A2E41;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.es-form-group input[type="file"] {
  padding: 8px 14px;
  background: #f8fafc;
  cursor: pointer;
}
.es-form-group input:focus,
.es-form-group select:focus,
.es-form-group textarea:focus {
  border-color: #0170B9;
  box-shadow: 0 0 0 3px rgba(1,112,185,0.1);
  outline: none;
}
.es-form-group textarea { resize: vertical; min-height: 130px; }

.es-field-note {
  font-size: 0.76rem;
  color: #4B4F58;
}

/* Radio group */
.es-radio-group {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}
.es-radio-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: #1A2E41;
}

/* Divider before submit */
.es-form-divider {
  border: none;
  border-top: 1px solid #e8eef3;
  margin: 28px 0 24px;
}

/* Notice */
.es-form-notice {
  font-size: 0.78rem;
  color: #4B4F58;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Form type confirmation notice */
.es-form-type-notice {
  font-size: 0.8rem;
  color: #4B4F58;
  background: #eef3f8;
  border-left: 3px solid #0170B9;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.5;
  border-radius: 0 4px 4px 0;
}
.es-form-type-notice strong { color: #1A2E41; }

/* ── Calendar picker ─────────────────────────────────────── */
.es-calendar-loading { font-size: 0.85rem; color: #888; margin: 8px 0; }
.es-calendar-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 10px; }
.es-calendar-day-label { text-align: center; font-size: 0.7rem; font-weight: 600; color: #6b7280; padding: 4px 0; }
.es-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 2px; }
.es-calendar-day { display: flex; align-items: center; justify-content: center; min-height: 36px; font-size: 0.82rem; border-radius: 4px; border: 1.5px solid transparent; }
.es-calendar-day--empty { background: transparent; border-color: transparent; }
.es-calendar-day--available { background: #fff; border-color: #d0d8e0; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.es-calendar-day--available:hover { border-color: #0170B9; background: #eef3f8; }
.es-calendar-day--selected { background: #0170B9 !important; color: #fff !important; border-color: #0170B9 !important; font-weight: 600; }
.es-calendar-day--blocked { background: #f0f0f0; color: #aaa; border-color: #e0e0e0; cursor: not-allowed; }
.es-calendar-day--weekend { background: #fff8e1; border-color: #f0c040; }
.es-calendar-day--weekend:hover { border-color: #d4a017; background: #fef3c7; }
.es-weekend-notice { color: #b07d00; font-size: 0.8rem; margin-top: 6px; padding: 6px 10px; background: #fff8e1; border-left: 3px solid #f0c040; border-radius: 0 4px 4px 0; }
.es-calendar-error { color: #b91c1c; font-size: 0.85rem; margin-top: 6px; }
.es-calendar-error a { color: #b91c1c; }
.es-time-picker-wrap { margin-top: 6px; }
.es-afterhours-notice { color: #b07d00; font-size: 0.8rem; margin-top: 6px; padding: 6px 10px; background: #fff8e1; border-left: 3px solid #f0c040; border-radius: 0 4px 4px 0; }

/* Submit button */
.es-form-submit {
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 14px 32px;
}

/* ── Messages ────────────────────────────────────────── */
.es-form-message { margin-top: 20px; }

.es-form-success {
  background: #edf7f0;
  border-left: 4px solid #2d7a4f;
  border-radius: 4px;
  padding: 16px 20px;
  color: #1c4a2f;
  font-size: 0.92rem;
  line-height: 1.7;
}
.es-form-alert {
  background: #fff0f0;
  border-left: 4px solid #c53030;
  border-radius: 4px;
  padding: 16px 20px;
  color: #742a2a;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Contact nav dropdown — right-align ──────────────── */
.es-nav__contact-item { margin-left: auto; }
.es-nav__dropdown--contact { left: auto; right: 0; }

/* ── Alt strip ───────────────────────────────────────── */
.es-contact-alt {
  background: #1A2E41;
  padding: 40px 24px;
  text-align: center;
}
.es-contact-alt p {
  color: #a8bfd0;
  font-size: 1rem;
  font-weight: 500;
}
.es-contact-alt a { color: #02AFEC; font-weight: 600; }
.es-contact-alt a:hover { color: #fff; }
.es-contact-alt__note {
  margin-top: 10px;
  color: #6b8fa8;
  font-size: 0.82rem;
  font-weight: 400 !important;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .es-contact-form-wrap { padding: 28px 20px 32px; border-radius: 0 4px 4px 4px; }
  .es-form-row { grid-template-columns: 1fr; gap: 0; }
  .es-form-selector__btn { width: 100%; justify-content: space-between; }
  .es-form-selector__menu { width: 100%; }
  .es-nav__dropdown--contact { left: 0; right: auto; }
}
