:root {
  --primary: #0e6f85;
  --primary-dark: #0a5666;
  --accent: #4ca9bb;
  --bg: #f3f9fb;
  --text: #13333a;
  --white: #ffffff;
  --border: #d5e8ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.top-header {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.92rem;
}

.top-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}

.notice {
  margin: 0;
}

.top-contact {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.top-contact a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.main-nav {
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand img {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.menu-row {
  border-top: 1px solid var(--border);
  background: #f7fcfd;
}

.menu-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0;
  overflow: visible;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--primary-dark);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.menu > li {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-block;
  padding: 0.35rem 0.15rem;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.menu a:hover {
  color: var(--primary-dark);
  background: #e7f5f9;
}

.has-dropdown > a::after {
  content: " \25BE";
  font-size: 0.7em;
  color: #5b7b83;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  list-style: none;
  margin: 0;
  padding: 0.45rem 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(6, 51, 61, 0.14);
  z-index: 20;
  display: none;
}

.submenu li {
  position: relative;
}

.submenu a {
  width: 100%;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 0;
}

.submenu a:hover {
  background: #def2f7;
  color: var(--primary-dark);
}

.submenu-right {
  left: 100%;
  top: 0;
}

.submenu .submenu {
  z-index: 30;
}

.menu li:hover > .submenu {
  display: block;
}

.nav-cta {
  white-space: nowrap;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline.light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-outline.light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-banner {
  position: relative;
  background-image:
    linear-gradient(rgba(8, 40, 49, 0.6), rgba(8, 40, 49, 0.55)),
    url("https://images.unsplash.com/photo-1609840114035-3c981b782dfe?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 520px;
}

.hero-overlay {
  padding: 4.2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy {
  color: var(--white);
}

.hero-copy h1 {
  color: var(--white);
  max-width: 16ch;
}

.hero-copy p {
  max-width: 65ch;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e9ef;
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 10px 26px rgba(4, 28, 34, 0.2);
}

.eyebrow {
  margin: 0;
  color: #d8f5fb;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

h1 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
}

h2 {
  margin: 0 0 0.8rem;
  color: var(--primary-dark);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  margin-top: 0;
  color: var(--primary-dark);
}

p {
  margin-top: 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: 0 5px 20px rgba(12, 73, 86, 0.08);
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--bg);
}

.section-tag {
  margin: 0 0 0.35rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.section-intro {
  max-width: 68ch;
}

.section-services {
  padding-top: 3.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 7px 24px rgba(14, 74, 88, 0.08);
}

.service-card img {
  width: 50%;
  height: 180px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.service-content {
  padding: 1rem;
}

.service-content h3 {
  margin-bottom: 0.45rem;
}

.implants-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.feature-image img {
  width: 50%;
  max-width: 50%;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(7, 50, 59, 0.12);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 50%;
  max-width: 50%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-copy {
  background: #f8fdff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
}

.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.contact-badges span {
  background: #e8f6fa;
  color: var(--primary-dark);
  border: 1px solid #c8e6ef;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.appointment-form {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
}

.appointment-form label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid #bfdce4;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: var(--white);
}

.form-flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-flash-success {
  background: #e6f7ed;
  border: 1px solid #9fd4b1;
  color: #1e5a32;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: #8b1a1a;
}

.inner-main {
  min-height: 50vh;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0d5f73 55%, var(--primary) 100%);
  color: var(--white);
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.page-hero h1 {
  margin: 0.35rem 0 0;
  color: var(--white);
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
}

.breadcrumb {
  font-size: 0.88rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.92;
}

.breadcrumb a {
  color: #c8eef6;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  opacity: 0.65;
  user-select: none;
}

.breadcrumb-current {
  font-weight: 600;
}

.inner-content {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.map-embed-wrap {
  margin: 0.75rem 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(15, 60, 80, 0.08);
}

.map-embed-wrap iframe {
  display: block;
  width: 100%;
  height: min(420px, 55vw);
  min-height: 280px;
  border: 0;
}

.contact-inline-cta {
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 1.75rem 1.25rem;
  border-radius: 12px;
}

.doctor-bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin: 0.5rem 0 1.25rem;
}

.doctor-bio-photo {
  margin: 0;
}

.doctor-bio-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(12, 73, 86, 0.12);
}

@media (max-width: 640px) {
  .doctor-bio-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}

.patient-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 2rem;
  align-items: start;
}

.patient-content {
  min-width: 0;
}

.patient-sidebar {
  position: sticky;
  top: 0.75rem;
}

.patient-sidebar-heading {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: var(--primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.patient-side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.patient-side-nav li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.patient-side-nav li:last-child {
  border-bottom: 0;
}

.patient-side-nav a {
  display: block;
  padding: 0.5rem 0.4rem;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  margin: 0.1rem 0;
}

.patient-side-nav a:hover {
  background: #e8f6fa;
  color: var(--primary);
}

.patient-side-nav a[aria-current="page"] {
  background: #def2f7;
  color: var(--primary-dark);
  box-shadow: inset 3px 0 0 0 var(--primary);
  padding-left: 0.55rem;
}

.patient-side-nested {
  margin: 0.2rem 0 0.35rem 0.45rem;
  padding: 0 0 0.35rem 0.65rem;
  list-style: none;
  border-left: 2px solid #c8e6ef;
}

.patient-side-nested a {
  font-size: 0.86rem;
  font-weight: 600;
}

.content-prose .lead {
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.content-prose h2 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.content-prose h2:first-child {
  margin-top: 0;
}

.content-prose ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}

.content-figure {
  margin: 1.25rem 0;
}

.content-prose > .content-figure:first-child {
  margin-top: 0;
}

.content-figure img {
  width: 50%;
  max-width: 50%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(7, 50, 59, 0.1);
}

.content-prose ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.content-prose h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.content-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.content-figure-grid .content-figure {
  margin: 0;
}

@media (max-width: 640px) {
  .content-figure-grid {
    grid-template-columns: 1fr;
  }
}

.submenu a[aria-current="page"] {
  font-weight: 700;
  color: var(--primary-dark);
  background: #def2f7;
}

.site-footer {
  background: var(--primary-dark);
  color: var(--white);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  font-size: 0.93rem;
}

@media (max-width: 860px) {
  .patient-layout {
    grid-template-columns: 1fr;
  }

  .patient-sidebar {
    position: static;
    order: -1;
  }

  .hero-grid,
  .contact-grid,
  .implants-grid,
  .services-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .top-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-content {
    flex-wrap: nowrap;
  }

  .menu-content {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-block;
  }

  .menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

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

  .menu > li {
    margin: 0;
    padding: 0;
  }

  .submenu,
  .submenu-right {
    position: static;
    min-width: 100%;
    display: block;
    box-shadow: none;
    border-radius: 8px;
    margin-top: 0.2rem;
    margin-bottom: 0.4rem;
  }

  .submenu a {
    padding-left: 0.8rem;
  }

  .submenu .submenu a {
    padding-left: 1.35rem;
  }

  .nav-cta {
    margin-left: auto;
  }
}

/* Admin — appointment requests (admin/index.php) */
.admin-wrap {
  padding: 1.5rem 0 2.5rem;
  max-width: 1100px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.admin-meta,
.admin-count,
.admin-lead {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.admin-meta a {
  font-weight: 600;
}

.admin-login-form {
  max-width: 22rem;
  margin-top: 1rem;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: #f0f9fc;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #fafdfe;
}

.admin-nowrap {
  white-space: nowrap;
}

.admin-msg {
  max-width: 22rem;
  word-break: break-word;
}

.form-flash-error {
  background: #fdeaea;
  border: 1px solid #e8a4a4;
  color: #6b1515;
}
