/* Baseline */
* {
  box-sizing: border-box;
}

/* Ensure hidden attribute always wins over any display rule */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  color: #263238;
  background-color: #f7fafb;
  line-height: 1.6;
}

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

a {
  color: #007a8a;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  margin: 0 0 0.5rem;
  color: #12323a;
}

p {
  margin: 0 0 0.75rem;
}

.section {
  padding: 3.5rem 1.5rem;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffffee;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e0ecef;
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.logo {
  height: 36px;
  width: auto;
}

.topbar-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-hours {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #607d8b;
  justify-content: center;
}

.topbar-hours-label {
  font-weight: 600;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background-color: #007a8a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #005c68;
  text-decoration: none;
}

.btn-secondary {
  background-color: #ffffff;
  color: #007a8a;
  border: 1px solid #b0d5db;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #f0f7f8;
  text-decoration: none;
}

.btn-call {
  white-space: nowrap;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Hero */
.section-hero {
  background: linear-gradient(135deg, #e4f3f6 0%, #f7fafb 40%, #ffffff 100%);
  padding-top: 4.5rem;
}

.section-hero .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-inner {
  max-width: 1040px;
}

.hero-text {
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.hero-text h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: #4b636e;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.hero-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.hero-thumbs img {
  flex: 1 1 30%;
  min-width: 80px;
  max-width: 120px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.hero-image {
  max-width: 560px;
  margin: 3rem auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-lower {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

.hero-consult {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.hero-consult-icon {
  width: 60px;
  height: auto;
  display: block;
  margin: 0 auto 0.75rem;
}

.hero-consult h2 {
  text-align: center;
  margin-bottom: 0.75rem;
}

.hero-consult p {
  font-size: 0.96rem;
  color: #455a64;
}

.btn-consult {
  display: inline-flex;
  margin-top: 1.25rem;
  padding-inline: 2.2rem;
}

/* About */
.section-about {
  background-color: #ffffff;
}

.section-about p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-about .section-inner {
  text-align: center;
}

/* Services */
.section-services {
  background-color: #f2f7f8;
}

.services-intro {
  max-width: 640px;
}

.services-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.service-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.service-card h3 {
  margin-bottom: 0.6rem;
}

.service-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.service-card li {
  margin-bottom: 0.25rem;
}

/* Contact & hours */
.section-contact {
  background-color: #f0f7f8;
  margin-top: 1.75rem;
}

.section-contact-grid {
  display: grid;
  gap: 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.contact-block,
.hours-block {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.clinic-name {
  font-weight: 600;
}

.contact-lines p {
  margin-bottom: 0.25rem;
}

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

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #dde9ec;
  font-size: 0.95rem;
}

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

.hours-note {
  font-size: 0.9rem;
  color: #607d8b;
}

/* Gallery */
.section-gallery {
  background-color: #ffffff;
}

.gallery-carousel {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  height: 260px;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-slide.is-active {
  opacity: 1;
}

@media (min-width: 640px) {
  .gallery-carousel {
    height: 320px;
  }
}

/* Coop */
.section-coop {
  background-color: #e4f3f6;
}

.coop-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.coop-logo img {
  max-width: 220px;
}

/* Social / Facebook */
.section-social {
  background-color: #ffffff;
}

.social-intro {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.section-social h2 {
  text-align: center;
}

.fb-feed-wrap {
  display: flex;
  justify-content: center;
}

.fb-feed-wrap iframe {
  max-width: 100%;
}

/* Footer */
.footer {
  background-color: #12323a;
  color: #e0f2f5;
  padding: 1rem 1.25rem 1.5rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.footer a {
  color: #e0f2f5;
}

.footer a:hover,
.footer a:focus {
  text-decoration: underline;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-link {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 639px) {
  .topbar-inner {
    justify-content: center;
  }

  .btn-call {
    font-size: 0.82rem;
    padding: 0.35rem 0.9rem;
    align-self: center;
  }

  .btn-consult {
    display: flex;
    margin: 1.25rem auto 0;
  }

  .footer-inner {
    text-align: center;
    align-items: center;
  }
}

@media (min-width: 640px) {
  .section {
    padding: 4rem 2rem;
  }

  .topbar-inner {
    padding-inline: 1.5rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }
}

@media (min-width: 768px) {
  .section-hero {
    padding-top: 5.5rem;
  }

  .section-hero .section-inner {
    padding-inline: 1.5rem;
  }

  .hero-lower {
    flex-direction: row;
    align-items: stretch;
  }

  .hero-image {
    margin: 3rem 0 0;
  }

  .hero-consult {
    max-width: 380px;
    margin-top: 3rem;
  }

  .section-contact-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

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

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hide-on-mobile {
    display: block;
  }

  .coop-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .topbar-hours {
    flex: 0 1 auto;
    justify-content: flex-start;
  }
}

/* ── Cookie banner ─────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 760px;
  background: #fff;
  border: 1px solid #d6e4e7;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner--hide {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.cookie-banner-text {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.88rem;
  color: #263238;
  line-height: 1.55;
}

.cookie-link {
  color: #007a8a;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #007a8a;
  color: #fff;
}

.cookie-btn-accept:hover,
.cookie-btn-accept:focus {
  background: #005f6e;
}

.cookie-btn-decline {
  background: transparent;
  color: #007a8a;
  border: 1.5px solid #007a8a;
}

.cookie-btn-decline:hover,
.cookie-btn-decline:focus {
  background: #e8f4f6;
}

/* ── Cookie policy modal ───────────────────────────────── */
.cm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 50, 58, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cm-overlay--visible {
  opacity: 1;
}

.cm-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.cm-overlay--visible .cm-box {
  transform: translateY(0);
}

.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #d6e4e7;
  flex-shrink: 0;
}

.cm-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  color: #12323a;
  margin: 0;
}

.cm-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #607d8b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.cm-close:hover,
.cm-close:focus {
  background: #e8f4f6;
  color: #12323a;
}

.cm-body {
  overflow-y: auto;
  padding: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #263238;
}

.cm-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: #12323a;
  margin: 1.25rem 0 0.35rem;
}

.cm-body p {
  margin: 0 0 0.6rem;
}

.cm-category {
  border: 1px solid #d6e4e7;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  background: #f7fafb;
}

.cm-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cm-category-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #12323a;
  display: block;
  margin-bottom: 0.25rem;
}

.cm-category-desc {
  font-size: 0.83rem;
  color: #546e7a;
  margin: 0;
  line-height: 1.5;
}

/* Toggle switch */
.cm-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cm-toggle-knob {
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 99px;
  background: #cfd8dc;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cm-toggle-knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: left 0.2s;
}

.cm-toggle--on .cm-toggle-knob {
  background: #007a8a;
}

.cm-toggle--on .cm-toggle-knob::after {
  left: 23px;
}

.cm-toggle--locked {
  cursor: default;
  pointer-events: none;
}

.cm-toggle--locked .cm-toggle-knob {
  background: #007a8a;
  opacity: 0.55;
}

.cm-toggle--locked .cm-toggle-knob::after {
  left: 23px;
}

.cm-toggle-label {
  font-size: 0.78rem;
  color: #007a8a;
  font-weight: 600;
  white-space: nowrap;
}

.cm-footer {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d6e4e7;
}

/* ── Cookie settings trigger ──────────────────────────────── */
.cookie-trigger {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9998;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #d6e4e7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  color: #007a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cookie-trigger:hover,
.cookie-trigger:focus {
  background: #e8f4f6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transform: scale(1.08);
  outline: none;
}
