/* ===== Inner pages (About, Services, Doctors, Corporate, Contact) ===== */

.section-sm {
  padding: 3rem 0;
}

.lead-text {
  max-width: 760px;
  font-size: 1.08rem;
  color: var(--nec-muted);
}

/* ---------- Page header ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 3.25rem;
  color: #fff;
  background: linear-gradient(135deg, #001a3d 0%, #022d56 55%, #04395f 100%);
}

.page-hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -260px;
  background: radial-gradient(circle, rgba(69, 200, 238, 0.28), transparent 65%);
  pointer-events: none;
}

/* Faint concentric rings echo the iris motif */
.page-hero::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: -140px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.025), 0 0 0 80px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: rgba(226, 240, 252, 0.65);
}

.page-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.35rem;
  opacity: 0.5;
}

.page-breadcrumb a {
  color: rgba(226, 240, 252, 0.85);
  text-decoration: none;
}

.page-breadcrumb a:hover {
  color: #45c8ee;
}

.page-breadcrumb [aria-current] {
  color: #45c8ee;
  font-weight: 600;
}

.page-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 820px;
}

.page-hero-lead {
  margin: 0.85rem 0 0;
  max-width: 680px;
  font-size: 1.08rem;
  color: rgba(226, 240, 252, 0.78);
}

/* ---------- Navbar dropdowns ---------- */
.site-header .dropdown-menu {
  --bs-dropdown-bg: var(--nec-surface);
  --bs-dropdown-border-color: var(--nec-border);
  --bs-dropdown-link-color: var(--nec-text);
  --bs-dropdown-link-hover-bg: rgba(var(--nec-primary-rgb), 0.08);
  --bs-dropdown-link-hover-color: var(--nec-primary);
  --bs-dropdown-link-active-bg: var(--nec-primary);
  padding: 0.5rem;
  border-radius: 1rem;
  box-shadow: var(--nec-shadow-lg);
  font-size: 0.95rem;
}

.site-header .dropdown-item {
  border-radius: 0.6rem;
  padding: 0.5rem 0.85rem;
}

/* The underline animation uses ::after, so dropdowns show a chevron icon instead of Bootstrap's caret */
.site-header .nav-link.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

@media (min-width: 992px) {
  /* Strip Bootstrap's caret borders so ::after stays a clean underline */
  .site-header .nav-link.dropdown-toggle::after {
    border: 0;
    margin: 0;
    vertical-align: initial;
  }
}

@media (max-width: 991.98px) {
  .site-header .nav-link.dropdown-toggle::after {
    display: none;
  }

  .site-header .nav-link.dropdown-toggle {
    display: flex;
    justify-content: space-between;
  }
}

.nav-caret {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.site-header .dropdown-toggle.show .nav-caret {
  transform: rotate(180deg);
}

@media (min-width: 992px) and (hover: hover) {
  .site-header .dropdown:hover .nav-caret {
    transform: rotate(180deg);
  }
}

.mega-menu {
  padding: 1.25rem !important;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.5rem;
}

.mega-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nec-primary);
}

.mega-footer {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0.9rem 0.85rem 0.25rem;
  border-top: 1px solid var(--nec-border);
  font-weight: 600;
}

.mega-footer a {
  text-decoration: none;
}

@media (min-width: 992px) {
  .site-header .nav-item.position-static .mega-menu {
    left: 50%;
    right: auto;
    width: min(960px, calc(100vw - 2rem));
    transform: translateX(-50%);
    margin-top: 0.25rem;
  }

  /* Open dropdowns on hover for mouse users; click still works */
  @media (hover: hover) {
    .site-header .dropdown:hover > .dropdown-menu {
      display: block;
      animation: menu-in 0.18s ease-out;
    }
  }
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(6px); }
}

@media (min-width: 992px) {
  .site-header .nav-item.position-static:hover > .mega-menu {
    animation: mega-in 0.18s ease-out;
  }
}

@keyframes mega-in {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 991.98px) {
  .mega-grid {
    grid-template-columns: 1fr;
  }

  .site-header .dropdown-menu {
    box-shadow: none;
    border: 0;
    background: var(--nec-surface-2);
  }
}

/* ---------- Shared content ---------- */
.media-frame {
  margin: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: var(--nec-shadow-lg);
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.prose {
  font-size: 1.02rem;
  color: var(--nec-text);
}

.prose p {
  color: var(--nec-muted);
  margin-bottom: 1.1rem;
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 0.85rem;
}

.prose .check-list {
  margin-top: 0.5rem;
}

.small-list li {
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 2rem 2.25rem;
  border-radius: 1.5rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: var(--nec-shadow);
}

.cta-strip h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.cta-strip p {
  margin: 0;
  color: var(--nec-muted);
}

.info-note {
  display: flex;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(var(--nec-primary-rgb), 0.07);
  border: 1px solid rgba(var(--nec-primary-rgb), 0.2);
}

.info-note > i {
  font-size: 1.3rem;
  color: var(--nec-primary);
}

.info-note p {
  margin: 0;
  color: var(--nec-text);
}

.info-note a {
  font-weight: 600;
  text-decoration: none;
  margin: 0 0.2rem;
}

/* ---------- About ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: var(--nec-shadow);
}

.fact {
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.fact + .fact {
  border-left: 1px solid var(--nec-border);
}

.fact-value {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--nec-primary);
  line-height: 1.1;
}

.fact-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--nec-muted);
}

.mission {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.mission-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 1.7rem;
  color: #fff;
  background: linear-gradient(135deg, var(--nec-primary), #1fb3e0);
  box-shadow: var(--nec-shadow);
}

[data-bs-theme="dark"] .mission-icon {
  color: #02203a;
}

.mission-statement {
  margin: 1rem 0 0.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--nec-primary);
}

.mission-text {
  margin-top: 1rem;
  font-size: 1.08rem;
  color: var(--nec-muted);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 3.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--nec-primary), rgba(var(--nec-primary-rgb), 0.1));
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-marker {
  position: absolute;
  left: -3.5rem;
  top: 0.25rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--nec-primary);
  background: var(--nec-surface);
  border: 2px solid var(--nec-primary);
  box-shadow: 0 0 0 6px var(--nec-bg);
}

.timeline-card {
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateX(6px);
  box-shadow: var(--nec-shadow);
}

.timeline-year {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--nec-primary);
  background: rgba(var(--nec-primary-rgb), 0.1);
}

.timeline-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.timeline-card p {
  margin: 0;
  color: var(--nec-muted);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item-wide {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--nec-surface-2);
  aspect-ratio: 4 / 3;
}

.gallery-item-wide .gallery-open {
  aspect-ratio: auto;
  height: calc(100% - 2.2rem);
}

/* <picture> only chooses the file; the <img> still sizes itself against the button */
.gallery-open picture {
  display: contents;
}

.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-open:hover img,
.gallery-open:focus-visible img {
  transform: scale(1.06);
}

.gallery-zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0, 26, 61, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-open:hover .gallery-zoom,
.gallery-open:focus-visible .gallery-zoom {
  opacity: 1;
}

.gallery-item figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nec-muted);
}

.gallery-modal {
  position: relative;
  border: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #000;
}

.gallery-modal img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.gallery-modal-caption {
  margin: 0;
  padding: 0.85rem 1.25rem;
  color: #fff;
  background: #001a3d;
}

/* News */
.news-card {
  height: 100%;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nec-shadow);
}

.news-card-featured {
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--nec-primary-rgb), 0.12), transparent 50%),
    var(--nec-surface);
  border-color: rgba(var(--nec-primary-rgb), 0.3);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
}

.news-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--nec-primary);
  background: rgba(var(--nec-primary-rgb), 0.1);
}

.news-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--nec-muted);
}

.news-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.news-card-featured h2 {
  font-size: 1.5rem;
}

.news-card p {
  color: var(--nec-muted);
}

.news-link {
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Explore the eye (Services page) ---------- */
.eye-svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

/* Colours live in the drawing itself (_EyeExplorer); the eye wall is decoration and lets clicks through */
.eye-deco {
  pointer-events: none;
}

.eye-part {
  cursor: pointer;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* The selected part glows; the rest step back */
.eye-svg:has(.is-active) .eye-part:not(.is-active) {
  opacity: 0.75;
}

.eye-part:hover {
  opacity: 1 !important;
}

.eye-part.is-active {
  filter: drop-shadow(0 0 6px rgba(var(--nec-primary-rgb), 0.85));
}

.eye-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.eye-chip {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--nec-border);
  border-radius: 999px;
  background: var(--nec-surface);
  color: var(--nec-text);
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.eye-chip:hover {
  border-color: rgba(var(--nec-primary-rgb), 0.5);
  color: var(--nec-primary);
}

.eye-chip.is-active {
  border-color: var(--nec-primary);
  background: var(--nec-primary);
  color: #fff;
}

[data-bs-theme="dark"] .eye-chip.is-active {
  color: #02203a;
}

.eye-panel {
  padding: 1.75rem;
  border-radius: 1.5rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: var(--nec-shadow);
}

.eye-info h3 {
  margin-bottom: 0.35rem;
  font-size: 1.4rem;
  font-weight: 800;
}

.eye-role {
  color: var(--nec-muted);
}

.eye-info h4 {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nec-primary);
}

.eye-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eye-conditions li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--nec-primary-rgb), 0.08);
  font-size: 0.85rem;
}

.eye-info .sidebar-links {
  margin-left: -0.65rem;
}

/* ---------- Careers ---------- */
.career-perk {
  height: 100%;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
}

.career-perk .service-icon {
  margin-bottom: 1rem;
}

.career-perk h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.career-perk p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--nec-muted);
}

.careers-empty {
  max-width: 760px;
}

.job-card {
  display: flex;
  flex-direction: column;
}

.job-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.job-card .check-list {
  margin-bottom: 1.25rem;
}

.job-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: auto;
}

.apply-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: 2rem 2.25rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--nec-primary-rgb), 0.12), transparent 55%),
    var(--nec-surface);
  border: 1px solid rgba(var(--nec-primary-rgb), 0.25);
  box-shadow: var(--nec-shadow);
}

.apply-panel h2 {
  margin: 0.5rem 0 1rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.apply-steps {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: apply-step;
}

.apply-steps li {
  position: relative;
  padding-left: 2.4rem;
  color: var(--nec-muted);
  counter-increment: apply-step;
}

.apply-steps li::before {
  content: counter(apply-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--nec-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

[data-bs-theme="dark"] .apply-steps li::before {
  color: #02203a;
}

.apply-steps strong {
  color: var(--nec-text);
}

.apply-steps a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .apply-panel {
    padding: 1.5rem 1.25rem;
  }

  .apply-panel .btn {
    width: 100%;
  }
}

.panel-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.panel-list li {
  display: flex;
  gap: 0.6rem;
  font-weight: 500;
}

.panel-list i {
  color: var(--nec-primary);
}

/* Policies */
.policy {
  max-width: 860px;
  margin: 0 auto;
}

.policy-intro {
  font-size: 1.12rem;
}

.policy-list {
  counter-reset: policy;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
}

.policy-list li {
  counter-increment: policy;
  position: relative;
  padding: 1.25rem 1.5rem 1.25rem 4.5rem;
  margin-bottom: 0.85rem;
  border-radius: 1rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
}

.policy-list li::before {
  content: counter(policy, decimal-leading-zero);
  position: absolute;
  left: 1.25rem;
  top: 1.1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nec-primary);
}

.policy-outro {
  margin-bottom: 1.75rem;
  color: var(--nec-muted);
}

/* ---------- Services ---------- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.category-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: var(--nec-text);
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-tabs a:hover {
  color: var(--nec-primary);
  border-color: var(--nec-primary);
  transform: translateY(-2px);
}

.category-tabs i {
  color: var(--nec-primary);
}

[id="clinical"], [id="refractive"], [id="diagnostic"] {
  scroll-margin-top: 90px;
}

.category-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.category-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  font-size: 1.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--nec-primary), #1fb3e0);
}

[data-bs-theme="dark"] .category-icon {
  color: #02203a;
}

.category-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0;
}

.category-head p {
  margin: 0.2rem 0 0;
  color: var(--nec-muted);
}

/* The original site's photos are low resolution, so show them at natural size inside a framed panel instead of stretching */
.service-article .media-frame {
  display: flex;
  justify-content: center;
  padding: 1.25rem;
  background: var(--nec-surface-2);
  box-shadow: none;
  border: 1px solid var(--nec-border);
}

.service-article .media-frame img {
  width: auto;
  max-width: 100%;
  max-height: 380px;
  border-radius: 1rem;
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
}

.sidebar-card .service-icon {
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.93rem;
  text-decoration: none;
  color: var(--nec-text);
  transition: background 0.2s ease, color 0.2s ease, padding 0.2s ease;
}

.sidebar-links a:hover {
  padding-left: 0.95rem;
  color: var(--nec-primary);
  background: rgba(var(--nec-primary-rgb), 0.08);
}

.sidebar-links i {
  color: var(--nec-primary);
}

.sidebar-appointment {
  margin-top: 1.5rem;
  height: auto;
  padding: 2rem 1.75rem;
}

.department-card {
  position: relative;
}

.department-number {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: rgba(var(--nec-primary-rgb), 0.15);
}

/* Refractive procedure cards are links */
a.procedure-card {
  color: inherit;
  text-decoration: none;
}

/* ---------- Doctors ---------- */
.consultant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.consultant-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--nec-shadow-lg);
}

.consultant-photo {
  width: 112px;
  height: 112px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--nec-primary), #5fd6f2);
}

.consultant-photo img,
.consultant-photo .doctor-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--nec-surface);
}

.consultant-photo .doctor-initials {
  font-size: 2rem;
}

.consultant-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.consultant-card p {
  flex: 1;
  font-size: 0.85rem;
  color: var(--nec-muted);
}

.consultant-book {
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

/* Cards open the doctor's profile: the name link is stretched over the card (Bootstrap .stretched-link) */
.consultant-card,
.doctor-card {
  position: relative;
}

.consultant-card h2 a,
.doctor-card h3 a {
  color: inherit;
  text-decoration: none;
}

.consultant-card:hover h2 a,
.doctor-card:hover h3 a {
  color: var(--nec-primary);
}

.consultant-card h2 a:focus-visible,
.doctor-card h3 a:focus-visible {
  outline: none;
}

.consultant-card:has(h2 a:focus-visible),
.doctor-card:has(h3 a:focus-visible) {
  outline: 2px solid var(--nec-primary);
  outline-offset: 3px;
}

/* Keeps "Book an appointment" clickable above the stretched profile link */
.consultant-book {
  position: relative;
  z-index: 2;
}

/* ---------- Doctor profile ---------- */
.doctor-profile {
  padding: 2rem;
  border-radius: 1.5rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: var(--nec-shadow);
}

.doctor-profile-head {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--nec-border);
}

.doctor-profile-photo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  margin: 0;
}

.doctor-profile-photo .doctor-initials {
  font-size: 2.6rem;
}

.doctor-profile-head h2 {
  margin-bottom: 0.3rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.doctor-profile-place {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--nec-muted);
}

.doctor-profile-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.doctor-profile-section {
  padding-top: 1.5rem;
}

.doctor-profile-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.doctor-profile-section h3 i {
  color: var(--nec-primary);
}

.doctor-profile-section p {
  margin: 0;
  color: var(--nec-muted);
}

.doctor-profile-services {
  margin-left: -0.65rem;
}

.doctor-mini-list {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.doctor-mini-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.75rem;
  color: var(--nec-text);
  text-decoration: none;
  transition: background 0.2s ease;
}

.doctor-mini-list a:hover {
  background: rgba(var(--nec-primary-rgb), 0.08);
}

.doctor-mini-list img,
.doctor-mini-list .doctor-initials {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 0.85rem;
}

.doctor-mini-list strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
}

.doctor-mini-list small {
  display: block;
  font-size: 0.75rem;
  color: var(--nec-muted);
}

.sidebar-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 575.98px) {
  .doctor-profile {
    padding: 1.5rem 1.25rem;
  }

  .doctor-profile-head {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .doctor-profile-place {
    justify-content: center;
  }

  .doctor-profile-photo {
    width: 128px;
    height: 128px;
  }

  .doctor-profile .btn {
    width: 100%;
  }
}

/* ---------- Corporate ---------- */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
}

.client-card {
  margin: 0;
  text-align: center;
}

.client-card .logo-tile {
  width: 100%;
  height: 96px;
}

.client-card figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nec-muted);
}

.partner-card {
  height: 100%;
  padding: 2rem;
  text-align: center;
  border-radius: 1.25rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.partner-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--nec-shadow-lg);
}

.partner-logo {
  width: 180px;
  height: 100px;
  margin: 0 auto 1.25rem;
}

.partner-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.partner-card p {
  margin: 0;
  color: var(--nec-muted);
}

/* ---------- Contact ---------- */
.contact-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.contact-quick-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border-radius: 1.1rem;
  text-decoration: none;
  color: var(--nec-text);
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

a.contact-quick-item:hover {
  color: var(--nec-text);
  transform: translateY(-3px);
  border-color: rgba(var(--nec-primary-rgb), 0.4);
  box-shadow: var(--nec-shadow);
}

.contact-quick-item small {
  display: block;
  font-size: 0.78rem;
  color: var(--nec-muted);
}

.contact-quick-item strong {
  font-size: 0.95rem;
}

.contact-quick-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  font-size: 1.2rem;
  color: var(--nec-primary);
  background: rgba(var(--nec-primary-rgb), 0.1);
}

.contact-quick-whatsapp {
  color: #fff;
  background: #25d366;
}

.map-embed {
  margin-top: 1.25rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--nec-border);
  aspect-ratio: 16 / 10;
  background: var(--nec-surface-2);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
  padding: 1.75rem;
  border-radius: 1.25rem;
  text-decoration: none;
  color: var(--nec-text);
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.action-card:hover {
  color: var(--nec-text);
  transform: translateY(-4px);
  border-color: rgba(var(--nec-primary-rgb), 0.4);
  box-shadow: var(--nec-shadow-lg);
}

.action-card .service-icon {
  margin: 0;
  flex-shrink: 0;
}

.action-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.action-card p {
  margin: 0;
  color: var(--nec-muted);
}

.action-arrow {
  margin-left: auto;
  font-size: 1.3rem;
  color: var(--nec-primary);
  transition: transform 0.25s ease;
}

.action-card:hover .action-arrow {
  transform: translateX(4px);
}

/* ---------- Forms ---------- */
.form-card {
  padding: 2rem;
  border-radius: 1.5rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: var(--nec-shadow);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.form-section-title i {
  color: var(--nec-primary);
}

.form-section-title:not(:first-of-type) {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--nec-border);
}

.form-card .form-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-card .form-control,
.form-card .form-select {
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  background-color: var(--nec-bg);
  border-color: var(--nec-border);
  color: var(--nec-text);
}

.form-card .form-control:focus,
.form-card .form-select:focus {
  border-color: var(--nec-primary);
}

.form-card .input-validation-error {
  border-color: #dc3545;
}

/* ---------- Custom dropdown (site.js enhances every select.form-select) ---------- */
.nec-select {
  position: relative;
}

/* Kept in the form for posting, but out of sight and out of the tab order */
.nec-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.nec-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--nec-border);
  border-radius: 0.75rem;
  background-color: var(--nec-bg);
  color: var(--nec-text);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nec-select-trigger:hover {
  border-color: rgba(var(--nec-primary-rgb), 0.45);
}

.nec-select-trigger:focus-visible,
.nec-select.is-open .nec-select-trigger {
  outline: 0;
  border-color: var(--nec-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--nec-primary-rgb), 0.15);
}

.nec-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.nec-select-value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nec-select-caret {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--nec-muted);
  transition: transform 0.2s ease;
}

.nec-select.is-open .nec-select-caret {
  transform: rotate(180deg);
  color: var(--nec-primary);
}

/* top/bottom, left, width and max-height are set inline from the trigger's position */
.nec-select-menu {
  position: fixed;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--nec-border);
  border-radius: 0.9rem;
  background: var(--nec-surface);
  box-shadow: var(--nec-shadow-lg);
  animation: nec-select-in 0.14s ease-out;
}

.nec-select-menu.is-up {
  animation-name: nec-select-in-up;
}

@keyframes nec-select-in {
  from { opacity: 0; transform: translateY(-4px); }
}

@keyframes nec-select-in-up {
  from { opacity: 0; transform: translateY(4px); }
}

.nec-select-search {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0.4rem 0;
  padding: 0 0.75rem;
  border: 1px solid var(--nec-border);
  border-radius: 0.6rem;
  background: var(--nec-bg);
  color: var(--nec-muted);
  font-size: 0.85rem;
}

.nec-select-search:focus-within {
  border-color: var(--nec-primary);
}

.nec-select-search input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--nec-text);
  font-size: 0.95rem;
}

.nec-select-options {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.35rem;
}

.nec-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--nec-text);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.nec-select-option:hover,
.nec-select-option:focus-visible {
  outline: 0;
  background: var(--nec-surface-2);
}

.nec-select-option.is-active {
  background: rgba(var(--nec-primary-rgb), 0.12);
  color: var(--nec-primary);
  font-weight: 600;
}

.nec-select-option:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nec-select-empty {
  margin: 0;
  padding: 0.25rem 0.75rem 0.75rem;
  font-size: 0.9rem;
  color: var(--nec-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .nec-select-menu {
    animation: none;
  }
}

.req {
  color: #dc3545;
}

.form-card .validation-summary-errors {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.form-card .validation-summary-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

.optional {
  font-weight: 400;
  color: var(--nec-muted);
}

.field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--nec-muted);
}

/* Once the field shows an error, the error replaces the hint */
.input-validation-error ~ .field-hint {
  display: none;
}

.field-error {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  color: #dc3545;
}

/* Honeypot: off-screen rather than display:none so naive bots still fill it */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.form-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--nec-muted);
}

.form-success {
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 1.5rem;
  background: var(--nec-surface);
  border: 1px solid rgba(var(--nec-primary-rgb), 0.35);
  box-shadow: var(--nec-shadow);
}

.form-success-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  border-radius: 50%;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.form-success h2 {
  font-weight: 800;
}

.form-success p {
  color: var(--nec-muted);
  margin-bottom: 1.5rem;
}

/* After submit: hand the request over to WhatsApp (see _WhatsAppHandoff) */
.whatsapp-handoff {
  border-color: rgba(37, 211, 102, 0.45);
}

.whatsapp-handoff .form-success-icon {
  display: grid;
  margin: 0 auto 0.75rem;
  background: #25d366;
}

.handoff-step {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.14);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-bs-theme="dark"] .handoff-step {
  color: #4ade80;
}

.whatsapp-handoff p {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}

.handoff-preview {
  max-width: 30rem;
  margin: 1.5rem auto 0;
  text-align: left;
}

.handoff-preview summary {
  width: fit-content;
  margin: 0 auto;
  color: var(--nec-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.handoff-preview pre {
  margin: 0.75rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--nec-bg);
  border: 1px solid var(--nec-border);
  color: var(--nec-text);
  font-family: inherit;
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.whatsapp-handoff .handoff-alt {
  margin: 1.25rem auto 0;
  font-size: 0.88rem;
}

.handoff-alt a {
  font-weight: 600;
  white-space: nowrap;
}

.handoff-alt a + a {
  margin-left: 0.5rem;
}

@media (max-width: 575.98px) {
  .whatsapp-handoff .btn-whatsapp {
    width: 100%;
  }
}

/* Star rating: radios in reverse order so CSS can colour all lower stars */
.rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.25rem;
}

.rating-input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-input label {
  font-size: 1.6rem;
  color: var(--nec-border);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
  color: #fbbf24;
}

.rating-input label:hover {
  transform: scale(1.15);
}

.rating-input input:focus-visible + label {
  outline: 2px solid var(--nec-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

[data-bs-theme="dark"] .rating-input label {
  color: rgba(226, 240, 252, 0.2);
}

/* Preferred time: three radio buttons drawn as one segmented control, the same height as the inputs */
.time-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  padding: 0.25rem;
  border: 1px solid var(--nec-border);
  border-radius: 0.75rem;
  background: var(--nec-bg);
}

.time-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.time-choice label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.55rem;
  color: var(--nec-muted);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.time-choice label span {
  display: flex;
  flex-direction: column;
}

.time-choice small {
  font-size: 0.7rem;
  font-weight: 500;
}

.time-choice label:hover {
  color: var(--nec-text);
}

.time-choice input:checked + label {
  background: var(--nec-surface);
  color: var(--nec-primary);
  box-shadow: 0 1px 4px rgba(12, 27, 46, 0.12);
}

[data-bs-theme="dark"] .time-choice input:checked + label {
  background: rgba(var(--nec-primary-rgb), 0.14);
  box-shadow: none;
}

.time-choice input:focus-visible + label {
  outline: 2px solid var(--nec-primary);
  outline-offset: 1px;
}

/* Narrow phones: stack icon above text so the three options still fit on one row */
@media (max-width: 400px) {
  .time-choice label {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.2rem;
  }
}

/* ---------- 404 ---------- */
.not-found {
  padding: 6rem 0;
}

.not-found-code {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(5rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--nec-primary);
}

.not-found-code i {
  font-size: 0.8em;
}

.not-found h1 {
  margin: 1.5rem 0 0.75rem;
  font-weight: 800;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .fact-grid,
  .contact-quick {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact:nth-child(3) {
    border-left: 0;
  }

  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--nec-border);
  }

  .panel-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-sticky {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .page-hero {
    padding: 2.5rem 0;
  }

  .contact-quick,
  .panel-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item-wide {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-item-wide .gallery-open {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .form-card {
    padding: 1.25rem;
  }

  /* !important only to override Bootstrap's px-5 utility, which is itself !important */
  .form-actions .btn {
    width: 100%;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .cta-strip {
    padding: 1.5rem;
  }

  .cta-strip .btn {
    flex: 1 1 auto;
  }

  .timeline {
    padding-left: 3rem;
  }

  .timeline-marker {
    left: -3rem;
    width: 38px;
    height: 38px;
  }

  .timeline::before {
    left: 1.1rem;
  }
}

/* ---------- Rate list ---------- */
.rate-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem 2.5rem;
  padding: 2rem 2.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(var(--nec-primary-rgb), 0.1), rgba(var(--nec-primary-rgb), 0.02)), var(--nec-surface);
  border: 1px solid var(--nec-border);
}

.rate-summary h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.rate-summary p {
  margin: 0;
  color: var(--nec-muted);
}

.rate-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.rate-includes li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
}

.rate-includes i {
  color: #16a34a;
}

/* The effective date is the key fact on the page: a desk-calendar page that flips down on load,
   next to a "New rates" label with a live, pulsing dot */
.rate-effective {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-left: 2rem;
  border-left: 1px solid var(--nec-border);
}

.rate-cal {
  position: relative;
  flex-shrink: 0;
  width: 92px;
  perspective: 600px;
}

/* Binder rings */
.rate-cal::before,
.rate-cal::after {
  content: "";
  position: absolute;
  top: -7px;
  z-index: 2;
  width: 8px;
  height: 16px;
  border-radius: 4px;
  background: #3b4a5c;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.rate-cal::before {
  left: 22px;
}

.rate-cal::after {
  right: 22px;
}

.rate-cal-page {
  display: block;
  overflow: hidden;
  text-align: center;
  border-radius: 0.9rem;
  background: var(--nec-surface);
  border: 1px solid var(--nec-border);
  box-shadow: 0 14px 30px rgba(12, 27, 46, 0.16);
  transform-origin: top center;
  animation: cal-flip 1s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.35s both;
}

.rate-cal-month {
  display: block;
  padding: 0.4rem 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #e5484d, #c62f35);
}

.rate-cal-day {
  display: block;
  padding-top: 0.2rem;
  font-family: var(--nec-font-heading, inherit);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--nec-text);
}

.rate-cal-year {
  display: block;
  padding-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nec-muted);
}

.rate-effective-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.rate-new {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.65rem 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #15803d;
  background: rgba(22, 163, 74, 0.12);
}

[data-bs-theme="dark"] .rate-new {
  color: #4ade80;
}

.rate-new-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.rate-new-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: currentColor;
  animation: rate-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.rate-effective-label {
  font-size: 0.85rem;
  color: var(--nec-muted);
}

.rate-effective-text strong {
  font-family: var(--nec-font-heading, inherit);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--nec-primary);
  white-space: nowrap;
}

@keyframes cal-flip {
  0% { transform: rotateX(-95deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotateX(0); opacity: 1; }
}

@keyframes rate-ping {
  0% { transform: scale(1); opacity: 0.75; }
  100% { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rate-cal-page,
  .rate-new-dot::after {
    animation: none;
  }
}

.rate-tools {
  margin: 2rem 0 1.5rem;
}

.rate-search {
  position: relative;
  display: block;
  max-width: 560px;
  margin: 0 auto 1.1rem;
}

.rate-search i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nec-muted);
}

.rate-search input {
  width: 100%;
  padding: 0.85rem 1.1rem 0.85rem 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--nec-border);
  background: var(--nec-surface);
  color: var(--nec-text);
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(12, 27, 46, 0.05);
}

.rate-search input:focus {
  outline: none;
  border-color: var(--nec-primary);
  box-shadow: 0 0 0 4px rgba(var(--nec-primary-rgb), 0.15);
}

.rate-jump a {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* A formal rate sheet: brand header row, specialty sub-headings, serial numbers and right-aligned rates */
.rate-sheet {
  --rate-line: #c3d1de;
  border-radius: 1.1rem;
  border: 1px solid var(--rate-line);
  background: var(--nec-surface);
  box-shadow: 0 4px 18px rgba(12, 27, 46, 0.05);
}

.rate-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.rate-table thead th {
  position: sticky;
  top: 72px;
  z-index: 2;
  padding: 0.95rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #0a3d62;
}

.rate-table thead th:first-child {
  border-top-left-radius: 1.1rem;
}

.rate-table thead th:last-child {
  border-top-right-radius: 1.1rem;
}

[data-bs-theme="dark"] .rate-sheet {
  --rate-line: #2c4058;
}

/* Full grid: a solid line under every row and between every column, as on a printed rate sheet */
.rate-table td {
  padding: 0.75rem 1.25rem;
  vertical-align: top;
  border-top: 1px solid var(--rate-line) !important;
}

.rate-table td + td {
  border-left: 1px solid var(--rate-line) !important;
}

.rate-table thead th + th {
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.rate-table tbody tr[data-rate-row]:nth-child(odd) td,
.rate-table tbody:not([data-rate-group]) tr:nth-child(even) td {
  background: rgba(var(--nec-primary-rgb), 0.035);
}

.rate-table tbody tr:hover td {
  background: rgba(var(--nec-primary-rgb), 0.08);
}

.rate-table td small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--nec-muted);
}

.rate-section th {
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  color: var(--nec-primary-dark);
  background: var(--nec-surface-2);
  border-top: 1px solid var(--rate-line) !important;
  border-left: 4px solid var(--nec-primary);
}

/* Section shortcuts land below the sticky site header and the sticky table header (table rows ignore scroll-margin) */
html:has(.rate-table) {
  scroll-padding-top: 150px;
}

[data-bs-theme="dark"] .rate-section th {
  color: var(--nec-primary);
}

.rate-section i {
  margin-right: 0.55rem;
  color: var(--nec-primary);
}

.rate-section a {
  float: right;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.rate-sr {
  width: 6rem;
  text-align: center;
  white-space: nowrap;
  color: var(--nec-muted);
  font-variant-numeric: tabular-nums;
}

.rate-table .rate-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rate-table td.rate-amount {
  font-weight: 700;
  color: var(--nec-text);
}

.rate-table tbody:last-child tr:last-child td:first-child {
  border-bottom-left-radius: 1.1rem;
}

.rate-table tbody:last-child tr:last-child td:last-child {
  border-bottom-right-radius: 1.1rem;
}

.rate-empty {
  margin-top: 1rem;
  text-align: center;
  color: var(--nec-muted);
}

@media (max-width: 575.98px) {
  .rate-summary {
    padding: 1.5rem 1.25rem;
  }

  .rate-effective {
    width: 100%;
    padding: 1.25rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--nec-border);
  }

  .rate-table thead th,
  .rate-table td,
  .rate-section th {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .rate-sr {
    width: 2.5rem;
  }

  /* Column headings wrap on phones so the 4-column room-rent table fits the screen; amounts stay on one line */
  .rate-table thead th,
  .rate-table thead th.rate-amount {
    white-space: normal;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
  }

  .rate-section a {
    float: none;
    display: block;
    margin-top: 0.2rem;
  }
}
/* Panels without a logo file show their name in the tile */
.logo-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #0b4f7a;
}
