/* ==========================================================================
   N&Ncare Zorg — website stylesheet
   Font: Montserrat | Kleuren gebaseerd op de huisstijl van het logo
   ========================================================================== */

:root {
  --color-bg: #f6ece8;        /* lichte blush achtergrond */
  --color-bg-alt: #efe0da;    /* iets donkerdere blush band */
  --color-white: #ffffff;
  --color-ink: #241b17;       /* hoofdtekstkleur */
  --color-ink-soft: #4a3a33;
  --color-heading: #c4432f;   /* terracotta — H1 */
  --color-heading-soft: #734332; /* warm bruin — H2/H3 */
  --color-navy: #1c1c1c;      /* navbar */
  --color-accent: #2e6b63;    /* diep groen accent, uit het logo-lint */
  --color-border: rgba(115, 67, 50, 0.18);
  --shadow-soft: 0 10px 30px rgba(36, 27, 23, 0.08);
  --radius: 16px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-white);
  color: var(--color-ink);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Header / navigatie ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Ruimte reserveren zodat gekoppelde kopjes niet achter de vaste header
   verdwijnen wanneer er via het menu naar een sectie wordt gescrolld. */
section[id] {
  scroll-margin-top: 170px;
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-white);
}

.brand-logo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-name-accent { color: #e0a48f; font-weight: 500; }

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(255,255,255,0.12);
  color: var(--color-white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* ---------- Dropdown: "Over ons" submenu ---------- */

.nav-dropdown {
  position: relative;
}

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

.nav-dropdown-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 6px 10px;
  margin-left: -8px;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-caret,
.nav-dropdown.open .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 190px;
  background: var(--color-navy);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Sluiten: pas na een korte vertraging, zodat een kort "afdwaal-
     momentje" van de muis het menu niet meteen laat verdwijnen.
     Bewust geen transform/verschuiving hier: die zou de onzichtbare
     brug hieronder tijdelijk uit positie brengen tijdens het
     openen, waardoor de muis er alsnog doorheen kan glippen. */
  transition:
    opacity 0.15s ease 0.3s,
    visibility 0s linear 0.45s,
    pointer-events 0s linear 0.45s;
}

/* Onzichtbare "brug" die de ruimte tussen het menu-item en het dropdown-
   menu opvult, zodat de muis daar niet uit het hoverbereik valt en het
   menu niet voortijdig sluit. */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
}

.nav-dropdown-menu a {
  white-space: nowrap;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* Openen: direct, zonder vertraging. */
  transition: opacity 0.15s ease;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-white);
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  color: var(--color-white);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,18,17,0.3) 0%, rgba(20,18,17,0.16) 45%, rgba(20,18,17,0.08) 100%);
}

.hero-content {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 38px 24px 64px;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  margin: 0 0 12px;
  max-width: 16ch;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 40ch;
  margin: 0;
  color: rgba(255,255,255,0.92);
}

/* ---------- Secties ---------- */

.section { padding: 72px 0; }
.section-alt { background: var(--color-bg-alt); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 8px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--color-heading);
  margin: 0 0 20px;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-heading-soft);
  margin: 32px 0 10px;
}

.section p, .container p { margin: 0 0 16px; color: var(--color-ink); }

.pull-quote {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-heading-soft);
  border-left: 3px solid var(--color-heading);
  padding-left: 18px;
  margin: 24px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.value-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 16px 0;
}
.value-pair h3 { margin-top: 0; }

/* ---------- Foto's en video (Activiteitenpagina) ---------- */

.photo-frame {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
}

.photo-frame img,
.photo-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-frame-tall { aspect-ratio: 3 / 4; }
.photo-frame-square { aspect-ratio: 1 / 1; }

/* Positie van de foto binnen het kader bijstellen (bv. om een hoofd in beeld te krijgen) */
.schuiven {
  object-position: center 20%;
}

.photo-frame.schuiven img {
  object-position: center 0%;
}

.photo-frame-wide {
  aspect-ratio: auto;
  margin: 36px 0 8px;
}

.photo-frame-wide img { width: 100%; height: auto; object-fit: contain; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 36px 0 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.category-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.category-card .photo-frame {
  border-radius: 0;
}

.category-card-body { padding: 20px 22px 26px; }
.category-card-body h3 { margin: 0 0 8px; }
.category-card-body p { margin: 0; font-size: 0.95rem; }

.gallery-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 32px 0 8px;
}

/* Losse, uitgelichte foto + video onder de fotogalerij (bv. "Leren autorijden") */
.gallery-feature {
  margin: 40px 0 0;
}

.gallery-feature h3 {
  margin: 0 0 14px;
}

.gallery-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 560px;
}

/* Foto's zijn klikbaar en openen groot in de lightbox (video's niet) */
.photo-frame.lightbox-trigger {
  cursor: zoom-in;
}

.photo-frame.lightbox-trigger:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Lightbox: foto groot bekijken ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 9, 8, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px;
  z-index: 1000;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  font-size: 1.2rem;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox-close { width: 38px; height: 38px; top: 12px; right: 12px; font-size: 1.3rem; }
  .lightbox-prev, .lightbox-next { width: 42px; height: 42px; font-size: 1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- HKZ badge ---------- */

.badge-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
  box-shadow: var(--shadow-soft);
}

.badge-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.badge-card h3 { margin-top: 0; }

/* ---------- Pijlers (Life Wise) ---------- */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.pillar-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.pillar-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-heading);
  color: var(--color-white);
  font-weight: 700;
  margin-bottom: 12px;
}

.pillar-card h3 { margin: 0 0 8px; }
.pillar-card p { margin: 0; font-size: 0.95rem; }

/* ---------- Activiteitenlijst ---------- */

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.activity-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 500;
  position: relative;
  padding-left: 40px;
}

.activity-list li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Leidinggevenden ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 480px;
  margin: 28px 0 32px;
}

.team-card { text-align: center; }

.team-card .photo-frame { margin: 0 0 14px; }

.team-card h3 { margin: 0 0 4px; }

.team-role {
  margin: 0;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .team-grid { max-width: 320px; gap: 18px; }
}

/* ---------- Aandachtspuntenlijst ---------- */

.consideration-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.consideration-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px 12px 40px;
  font-weight: 500;
  position: relative;
}

.consideration-list li::before {
  content: "\2022";
  position: absolute;
  left: 16px;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

/* ---------- Closing CTA ---------- */

.closing-cta {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 72px 0;
  text-align: center;
}

.closing-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 20px;
  color: #f0c9bb;
}

.closing-cta p { color: rgba(255,255,255,0.85); max-width: 60ch; margin: 0 auto 14px; }

.closing-tagline {
  margin-top: 24px;
  font-style: italic;
  color: var(--color-white);
  font-size: 1.05rem;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-soft);
}

.contact-icon { font-size: 1.6rem; }
.contact-card h3 { margin: 10px 0 8px; font-size: 1.05rem; }
.contact-card p { margin: 0; font-size: 0.95rem; }
.contact-card a { text-decoration: none; color: var(--color-accent); font-weight: 600; }
.contact-card a:hover { text-decoration: underline; }

.contact-form-link {
  display: inline-block;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-form-link:hover,
.contact-form-link:focus-visible {
  border-color: var(--color-accent);
}

.contact-footnote {
  margin-top: 24px;
  color: var(--color-ink-soft);
}

/* ---------- Contactformulier ---------- */

.contact-form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 40px;
  box-shadow: var(--shadow-soft);
  max-width: 640px;
}

.form-title {
  margin-top: 0;
  margin-bottom: 20px;
}

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

.contact-form .form-group {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-heading-soft);
  margin-bottom: 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-ink);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(46, 107, 99, 0.15);
}

.contact-form textarea { resize: vertical; }

/* Honeypot anti-spamveld: onzichtbaar en onbereikbaar voor mensen,
   maar wel aanwezig in de HTML zodat de meeste spambots 'm invullen
   (en verwerken.php de inzending dan kan negeren). Bewust geen
   display:none / visibility:hidden, want sommige bots controleren daarop. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-form .checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  flex: none;
}

.contact-form .checkbox-group label {
  margin: 0;
  font-weight: 500;
  color: var(--color-ink);
}

.submit-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-heading);
  border: none;
  border-radius: 999px;
  padding: 13px 32px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover { background: #a83a29; }
.submit-btn:active { transform: translateY(1px); }

@media (max-width: 640px) {
  .contact-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form-card { padding: 24px; }
}

/* ---------- Bedankpagina ---------- */

.thanks-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.thanks-container {
  max-width: 640px;
  text-align: center;
}

.thanks-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thanks-section .eyebrow { text-align: center; }
.thanks-section .section-title { text-align: center; }
.thanks-section p { text-align: center; }

.thanks-actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.thanks-btn {
  display: inline-block;
  text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer-logo { width: 48px; height: 48px; border-radius: 50%; }
.footer-name { font-weight: 700; margin: 0; color: var(--color-heading-soft); }
.footer-tagline { margin: 2px 0 0; font-size: 0.9rem; color: var(--color-ink-soft); }

.footer-copy {
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* ---------- Responsief ---------- */

@media (max-width: 860px) {
  .two-col, .value-pair { grid-template-columns: 1fr; gap: 28px; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-wall { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    padding: 8px 24px 16px;
    display: none;
    gap: 4px;
  }

  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; }

  /* Op mobiel staan de sub-items altijd meteen zichtbaar onder "Over ons",
     net als de andere menu-items — geen extra tik op een pijltje nodig. */
  .nav-dropdown-caret {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    display: flex;
    margin: 0 0 4px 16px;
    border: none;
    box-shadow: none;
    background: rgba(255,255,255,0.06);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .pillar-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .photo-gallery { grid-template-columns: 1fr; }
  .gallery-wall { grid-template-columns: repeat(2, 1fr); }
  .gallery-feature-grid { grid-template-columns: 1fr; max-width: 320px; }
  .section { padding: 52px 0; }
  .hero { min-height: 88vh; }
}

/* ---------- Chatbot (FAQ) ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chatbot-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: var(--color-white);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.chatbot-toggle:hover { transform: scale(1.06); }

.chatbot-toggle-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chatbot-panel {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chatbot-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
}

.chatbot-header {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--color-bg);
}

.chatbot-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
}

.chatbot-bubble p { margin: 0; color: inherit; }

.chatbot-bubble-bot {
  align-self: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  border-bottom-left-radius: 4px;
}

.chatbot-bubble-user {
  align-self: flex-end;
  background: var(--color-accent);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
}

.chatbot-bubble-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: underline;
}

.chatbot-bubble-user .chatbot-bubble-link { color: var(--color-white); }

.chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--color-bg);
}

.chatbot-chip {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chatbot-chip:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}

.chatbot-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
}

.chatbot-input-row input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
}

.chatbot-input-row input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }

.chatbot-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .chatbot-widget { right: 14px; bottom: 14px; }
  .chatbot-panel {
    right: 14px;
    bottom: 82px;
    width: calc(100vw - 28px);
    height: min(70vh, 520px);
  }
  .chatbot-toggle { width: 54px; height: 54px; }
}
