*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f2ec;
  --ink: #1a1814;
  --muted: #9a9590;
  --accent: #AFC1CF;
  --nav-h: 64px;
}

body {
  background: var(--bg);
  font-family: 'Montserrat', serif;
  color: var(--ink);
  display:flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}


/* ─── NAV ─────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid rgba(26,24,20,.12);
  display: flex;
  align-items: center;
  padding: 0 40px;
  z-index: 100;
  animation: slideDown .5s ease both;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.wordmark {
  height: 50px;
  width: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
}

.wordmark img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color .2s;
}

.nav-links a.active {
  font-weight: 600;
  color: var(--ink);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--accent);
  transition: right .25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.nav-cta {
  margin-left: 40px;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--bg);
  background: var(--ink);
  text-decoration: none;
  padding: 9px 22px;
  transition: background .2s, color .2s;
}

.nav-cta:hover {
  background: #23488A;
  color: white;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 20px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: .2s ease;
}


/* ─── PAGE HEADERS (shared) ───────────────────────────── */

.location-header,
.insurance-header,
.eye-library-header,
.hipaa-header,
.services-header {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
  padding-top: 50px;
}

.location-header h1,
.insurance-header h1,
.eye-library-header h1,
.hipaa-header h1,
.services-header h1,
.team-header h1 {
  font-family: 'Montserrat', serif;
  font-size: 2rem;
  margin-bottom: 10px;
}

.location-header p,
.insurance-header p,
.eye-library-header p,
.hipaa-header p,
.services-header p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.insurance-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.insurance-divider span:first-child,
.insurance-divider span:last-child {
  width: 90px;
  height: 1px;
  background: #cbd5e1;
}

.insurance-divider span {
  background: rgba(7,10,41,.2);
}

.eye-dot {
  width: 8px;
  height: 8px;
  background: #23488A;
  border-radius: 50%;
}


/* ─── HOME ────────────────────────────────────────────── */

.home-page {
  padding-top: var(--nav-h);
}

.home-hero {
  position: relative;
  min-height: 93.85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 20px 80px;
  background-image: url("images/clinic-hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(245, 242, 236, 0.72),
    rgba(245, 242, 236, 0.58)
  );
  backdrop-filter: blur(1px);
}

.home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
}

.home-eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(26, 24, 20, 0.75);
  margin-bottom: 18px;
}

.home-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(3.5rem, 8vw, 5rem);
  line-height: 0.95;
  font-weight: 450;
  letter-spacing: -0.04em;
  max-width: 1100px;
  margin: 0 auto 24px;
}

.home-subtitle {
  font-size: 1.45rem;
  line-height: 1.5;
  color: rgba(26, 24, 20, 0.75);
  max-width: 760px;
  margin: 0 auto 38px;
}

.home-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 290px;
  padding: 18px 28px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(7, 10, 41, 0.08);
}

.home-button.primary {
  background: #070A29;
  color: white;
}

.home-button.primary:hover {
  background: #23488A;
  transform: translateY(-2px);
}

.home-button.secondary {
  border: 1px solid rgba(26, 24, 20, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.home-button.secondary:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.home-intro {
  padding: 70px 20px 20px;
}

.home-intro-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.home-intro-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.6rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.home-intro-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #555;
}

.home-feature-grid {
  max-width: 1100px;
  margin: 50px auto 0;
  padding: 0 20px 70px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.home-feature-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: #AFC1CF;
  border: 1px solid rgba(7, 10, 41, 0.12);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.home-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(7, 10, 41, 0.12);
}

.home-feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.home-feature-card p {
  line-height: 1.6;
  color: #2f2f2f;
}


/* ─── LOCATION & HOURS ────────────────────────────────── */

.location-hours-section {
  padding: 70px 20px;
}

.location-grid {
  max-width: 1150px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}

.location-card {
  padding: 35px;
  border-radius: 16px;
  background-color: #AFC1CF;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.info-block {
  margin-bottom: 28px;
}

.info-block:last-child {
  margin-bottom: 0;
}

.info-block h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.info-block p {
  line-height: 1.6;
}

.hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.hours-list li:last-child {
  border-bottom: none;
}

.map-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
}


/* ─── INSURANCE ───────────────────────────────────────── */

.insurance-section {
  padding: 70px 20px;
}

.insurance-grid {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.insurance-card {
  background: #AFC1CF;
  padding: 16px 22px;
  border-radius: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  transition: all 0.18s ease;
  border: 1px solid rgba(7, 10, 41, 0.12);
}

.insurance-card::before {
  content: "✓";
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #23488A;
  color: white;
  font-size: 0.7rem;
}

.insurance-sub {
  display: block;
  font-size: 0.85rem;
  color: #3E5F86;
}

.insurance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(7, 10, 41, 0.12);
}


/* ─── SERVICES ────────────────────────────────────────── */
.service-layout .service-image,
.service-layout.reverse .service-image {
  align-self: start;
}
.services-page {
  padding: 70px 20px;
}
.service-block {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 0;
  border-bottom: 1px solid #e3e7ed;
}
.service-layout,
.service-layout.reverse {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 48px;
  align-items: start;
}
.service-layout .service-image {
  grid-column: 1;
  justify-self: start;
}
.service-layout .service-text {
  grid-column: 2;
}
.service-layout.reverse .service-text {
  grid-column: 1;
  order: -1;
}
.service-layout.reverse .service-image {
  grid-column: 2;
  justify-self: end;
  order: 1;
}
.service-image {
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.service-text {
  max-width: 400px;
  justify-self: end;
}
.service-text h2 {
  margin-bottom: 12px;
}
.service-text h3 {
  margin-top: 18px;
  margin-bottom: 10px;
}
.service-text ul {
  padding-left: 22px;
}
.service-text li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ─── EYE LIBRARY ─────────────────────────────────────── */

.eye-library-page {
  padding: 70px 20px;
}

.eye-library-header p {
  line-height: 1.6;
}

.eye-library-header a,
.library-topic a {
  color: #23488A;
  text-decoration: none;
  font-weight: 500;
}

.eye-library-header a:hover,
.library-topic a:hover {
  text-decoration: underline;
}

.library-topic {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 0;
  border-bottom: 1px solid #dfe3e8;
}

.topic-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

.topic-layout.reverse {
  grid-template-columns: 400px 1fr;
}

.topic-layout, 
.topic-layout.reverse {
  grid-template-columns: 1fr 400px;
}

.topic-layout .topic-text {
  grid-column: 1;
}

.topic-layout .topic-image {
  grid-column: 2;
  justify-self: end;
  /* order: -1; */
}

.topic-layout.reverse .topic-image {
  grid-column: 1;
  justify-self: start;
}

.topic-layout.reverse .topic-text {
  grid-column: 2;
}

.topic-image {
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.topic-text {
  width: 100%;
  margin: 0;
  text-align: left;
}

.topic-text h2 {
  margin-bottom: 16px;
}

.topic-text ul {
  padding-left: 24px;
  margin-bottom: 18px;
}

.topic-text li {
  margin-bottom: 10px;
  line-height: 1.6;
}


/* ─── HIPAA ───────────────────────────────────────────── */

.hipaa-section {
  padding: 70px 20px;
}

.hipaa-header p {
  color: #555;
  margin-bottom: 18px;
}

.hipaa-download {
  display: inline-block;
  padding: 10px 22px;
  background: #23488A;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: .2s ease;
}

.hipaa-download:hover {
  background: #4A8CB4;
}

.hipaa-pdf-container {
  max-width: 800px;
  margin: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.hipaa-pdf-container iframe {
  width: 100%;
  height: 80vh;
  border: none;
}


/* ─── TEAM ────────────────────────────────────────────── */

.team-page {
  padding: 70px 20px;
}

.team-header {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
  padding-top: 50px;
}

.team-header p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.team-feature {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 0;
  border-bottom: 1px solid #dfe3e8;
}

.team-feature-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}

.team-feature-text h2 {
  margin-bottom: 16px;
}

.team-feature-text p {
  line-height: 1.7;
  margin-bottom: 16px;
}

.team-feature-image {
  width: 380px;
  height: 420px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);

}

.team-group {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 0;
  border-bottom: 1px solid #dfe3e8;
}

.team-group h2 {
  margin-bottom: 22px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.team-card {
  background: #AFC1CF;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(7, 10, 41, 0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}


/* ─── FOOTER ──────────────────────────────────────────── */

.site-footer {
  background: #070A29;
  color: #ffffff;
  padding-top: 50px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1250px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 0 20px 40px;
}

.footer-column h3,
.footer-column h4 {
  color: #ffffff;
  position: relative;
  margin-bottom: 18px;
  padding-bottom: 8px;
  font-weight: 600;
}

.footer-column h3 {
  font-size: 1.35rem;
}

.footer-column h3::after,
.footer-column h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.footer-column p {
  line-height: 1.6;
  margin-bottom: 8px;
  color: #d6e0f0;
}

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

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column a {
  text-decoration: none;
  color: #d6e0f0;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-hours li {
  margin-bottom: 6px;
}

.footer-button {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 22px;
  background: #23488A;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: 0.25s ease;
}

.footer-button:hover {
  background: #4A8CB4;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #c9d6ea;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: -6px;
}

.footer-logo {
  width: 160px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 14px;
  opacity: 0.96;
}

.inside {
  font-weight: 700;
  color: black;
  background: white;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ─── SCROLL TO TOP ───────────────────────────────────── */

.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: #AFC1CF;
  color: #f5f2ec;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, background .2s ease, transform .2s ease;
  z-index: 200;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top:hover {
  transform: translateY(-3px);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

  .error-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
  }

  .error-content {
    max-width: 520px;
  }

  .error-code {
    font-size: 7rem;
    font-weight: 300;
    line-height: 1;
    color: var(--primary, #2a6496);
    opacity: 0.2;
    margin: 0;
    letter-spacing: -4px;
  }

  .error-title {
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0.5rem 0 1rem;
    color: #222;
  }

  .error-message {
    color: #666;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2.5rem;
  }

  .error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }

  .error-actions a {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
  }

  .error-actions a:hover {
    opacity: 0.85;
  }

  .error-actions .btn-primary {
    background: var(--primary, #2a6496);
    color: #fff;
  }

  .error-actions .btn-secondary {
    border: 1px solid #ccc;
    color: #444;
  }


/* ─── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 1250px) {
  nav {
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    padding: 12px 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 18px;
    gap: 18px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: inline-block;
    font-size: .95rem;
  }

  .nav-cta {
    margin-left: 0;
    padding: 12px 18px;
  }

  .service-layout,
  .service-layout.reverse,
  .topic-layout,
  .topic-layout.reverse,
  .team-feature-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-layout .service-image,
  .service-layout.reverse .service-image,
  .topic-layout .topic-image,
  .topic-layout.reverse .topic-image {
    grid-column: auto;
    justify-self: center;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    order: 1;
  }

  .service-layout .service-text,
  .service-layout.reverse .service-text,
  .topic-layout .topic-text,
  .topic-layout.reverse .topic-text {
    grid-column: auto;
    justify-self: center;
    text-align: center;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    order: 2;
  }

  .service-text ul,
  .topic-text ul {
    text-align: left;
    display: inline-block;
  }

  .team-feature-image {
    width: 330px;
    height: 360px;
    object-fit: cover;
    object-position: center top;
    justify-self: center;
    margin: 0 auto;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 78vh;
    padding: 90px 20px 60px;
  }

  .home-hero h1 {
    line-height: 1;
  }

  .home-subtitle {
    font-size: 1.15rem;
  }

  .home-button {
    min-width: 100%;
  }

  .home-intro-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 900px) {
  .location-grid {
    grid-template-columns: 1fr;
  }

  .map-card iframe {
    min-height: 400px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .insurance-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .footer-container {
    grid-template-columns: 1fr;
  }

  .insurance-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}