/* =========================================================
   Carolina Bath Solutions — shared styles
   Designed for readability and ease of use for visitors
   ages 55-80: large text, high contrast, big tap targets.
   ========================================================= */

:root {
  --navy: #163A5F;
  --navy-dark: #0F2A47;
  --carolina-blue: #4B9CD3;
  --teal: #1E7F79;
  --teal-dark: #16615C;
  --grey: #55606B;
  --grey-light: #EDF1F4;
  --silver: #DCE3E9;
  --white: #FFFFFF;
  --cream: #F7FAFC;
  --success-bg: #E6F4EA;
  --success-text: #205C2E;
  --error: #B3261E;

  --font-heading: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;

  --max-width: 1180px;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(22, 58, 95, 0.10);
  --shadow-lg: 0 10px 30px rgba(22, 58, 95, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--navy-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-dark);
  line-height: 1.25;
  margin: 0 0 0.6em 0;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em 0; }

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

.section {
  padding: 64px 0;
}

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

.section--navy {
  background: var(--navy-dark);
  color: var(--white);
}
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  color: var(--teal-dark);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 0.75em;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 40px auto;
  text-align: center;
}
.section-intro p { color: var(--grey); font-size: 1.15rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 16px 30px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 56px;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  line-height: 1.1;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--teal-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--navy-dark);
  border-color: var(--navy-dark);
}
.btn-secondary:hover { background: var(--grey-light); }

.btn-call {
  background: var(--navy);
  color: var(--white);
}
.btn-call:hover { background: var(--navy-dark); }

.btn-block { width: 100%; }

.btn-lg {
  font-size: 1.3rem;
  padding: 20px 36px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--silver);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--carolina-blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy-dark);
}
.brand-text span {
  font-size: 0.85rem;
  color: var(--teal-dark);
  font-weight: 700;
}

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

.main-nav a {
  color: var(--navy-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 12px 16px;
  border-radius: 8px;
}
.main-nav a:hover { background: var(--grey-light); }
.main-nav a.active { color: var(--teal-dark); background: var(--grey-light); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy-dark);
  text-decoration: none;
  white-space: nowrap;
}
.phone-link svg { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: var(--grey-light);
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  background: var(--navy-dark);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--grey-light) 0%, var(--white) 100%);
  padding: 56px 0 64px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy p.lead {
  font-size: 1.25rem;
  color: var(--grey);
  max-width: 560px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
}
.trust-item svg { flex-shrink: 0; color: var(--teal); }

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 34px;
  border-top: 6px solid var(--teal);
}
.hero-card h3 { margin-bottom: 0.3em; }
.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.hero-card li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.hero-card li svg { flex-shrink: 0; margin-top: 3px; color: var(--teal); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 28px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--grey-light);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-card .btn { align-self: flex-start; margin-top: 10px; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step {
  text-align: center;
  padding: 10px;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--carolina-blue);
}
.testimonial p.quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--navy-dark);
}
.stars { color: #E0A100; letter-spacing: 2px; margin-bottom: 10px; font-size: 1.1rem; }
.testimonial-author { font-weight: 800; color: var(--teal-dark); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal-dark) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 46px;
  text-align: center;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: #DCEAF2; font-size: 1.15rem; }
.cta-banner .hero-actions { justify-content: center; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.form-group {
  margin-bottom: 22px;
}
.form-group label {
  display: block;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.form-group .hint {
  display: block;
  font-weight: 400;
  color: var(--grey);
  font-size: 0.92rem;
  margin-top: 4px;
}
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 14px 16px;
  border: 2px solid var(--silver);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy-dark);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--carolina-blue);
  outline-offset: 1px;
  border-color: var(--carolina-blue);
}
textarea { resize: vertical; min-height: 120px; }

fieldset {
  border: 2px solid var(--silver);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 22px 0;
}
fieldset legend {
  font-weight: 800;
  color: var(--navy-dark);
  font-size: 1.05rem;
  padding: 0 8px;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 1.08rem;
}
.radio-option input {
  width: 24px;
  height: 24px;
  accent-color: var(--teal);
}

.form-note {
  background: var(--grey-light);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.98rem;
  color: var(--grey);
  margin-top: 18px;
}

/* ---------- Divider / or ---------- */
.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 36px 0;
  color: var(--grey);
  font-weight: 700;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--silver);
}

/* ---------- Info blocks (Location page) ---------- */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--silver);
  font-size: 1.08rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list svg { color: var(--teal); flex-shrink: 0; margin-top: 3px; }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.08rem;
}
.hours-table td {
  padding: 12px 4px;
  border-bottom: 1px solid var(--silver);
}
.hours-table td:last-child { text-align: right; font-weight: 700; color: var(--navy); }

.map-frame {
  border: none;
  width: 100%;
  height: 100%;
  min-height: 340px;
  border-radius: var(--radius);
}

.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.area-tag {
  background: var(--grey-light);
  color: var(--navy);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.98rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 6px 24px;
  margin-bottom: 16px;
}
.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 18px 0;
  cursor: pointer;
  color: var(--navy-dark);
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-size: 1.6rem;
  color: var(--teal);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 18px; color: var(--grey); }

.field-error {
  border-color: var(--error) !important;
  background: #FCEEEE;
}
.form-error-banner {
  display: none;
  background: #FCEEEE;
  color: var(--error);
  border: 2px solid var(--error);
  border-radius: 10px;
  padding: 16px 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ---------- Success message ---------- */
.success-box {
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #CBD9E4;
  padding: 56px 0 28px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}
.site-footer h4 { color: var(--white); font-size: 1.1rem; }
.site-footer a {
  color: #CBD9E4;
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  font-size: 1.02rem;
}
.site-footer a:hover { color: var(--white); }
.footer-brand p { color: #9FB4C6; max-width: 340px; }
.footer-bottom {
  border-top: 1px solid #274A6A;
  margin-top: 40px;
  padding-top: 22px;
  text-align: center;
  color: #83A0B7;
  font-size: 0.92rem;
}

/* ---------- Chat widget (Chip) ---------- */
.cb-chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 800;
}

.cb-launcher {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--teal);
  border-radius: 999px;
  padding: 10px 22px 10px 10px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-dark);
}
.cb-launcher svg { width: 44px; height: 44px; flex-shrink: 0; }
.cb-launcher:hover { background: var(--grey-light); }

.cb-window {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: 70vh;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--silver);
}

.cb-chat-widget.cb-open .cb-window { display: flex; }
.cb-chat-widget.cb-open .cb-launcher-label { display: none; }

.cb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy-dark);
  color: var(--white);
  padding: 14px 16px;
  flex-shrink: 0;
}
.cb-header-avatar svg { width: 42px; height: 42px; display: block; }
.cb-header-text { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.cb-header-text strong { font-family: var(--font-heading); font-size: 1.05rem; }
.cb-header-text span { font-size: 0.85rem; color: #B9CEDD; }

.cb-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.cb-close:hover { background: rgba(255,255,255,0.15); }

.cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cb-msg { display: flex; gap: 10px; align-items: flex-start; }
.cb-msg-bot { justify-content: flex-start; }
.cb-msg-user { justify-content: flex-end; }
.cb-msg-avatar svg { width: 30px; height: 30px; flex-shrink: 0; }
.cb-msg-bubble {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 240px;
}
.cb-msg-user .cb-msg-bubble {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.cb-controls {
  border-top: 1px solid var(--silver);
  padding: 14px;
  flex-shrink: 0;
  background: var(--white);
}

.cb-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cb-quick-reply {
  background: var(--grey-light);
  border: 2px solid var(--silver);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.cb-quick-reply:hover { background: var(--silver); }
.cb-quick-reply-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.cb-quick-reply-primary:hover { background: var(--teal-dark); }

.cb-input-row {
  display: flex;
  gap: 8px;
}
.cb-text-input {
  flex: 1;
  font-size: 1rem;
  padding: 10px 14px;
  border: 2px solid var(--silver);
  border-radius: 10px;
}
.cb-text-input:focus {
  outline: 3px solid var(--carolina-blue);
  border-color: var(--carolina-blue);
}
.cb-send {
  background: var(--teal);
  color: var(--white);
  border: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.cb-send:hover { background: var(--teal-dark); }
.cb-skip {
  background: none;
  border: 2px solid var(--silver);
  color: var(--grey);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .cb-chat-widget { right: 12px; bottom: 76px; }
  .cb-launcher-label { display: none; }
  .cb-launcher { padding: 10px; }
  .cb-window {
    right: -4px;
    bottom: 68px;
    width: calc(100vw - 24px);
    height: 72vh;
  }
}

/* ---------- Blog ---------- */
.post-date {
  display: inline-block;
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.1rem;
}
.article-body h2 {
  margin-top: 1.6em;
}
.article-body h3 {
  margin-top: 1.3em;
}
.article-body ul,
.article-body ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}
.article-body li {
  margin-bottom: 0.5em;
}
.article-hero {
  max-width: 760px;
  margin: 0 auto 8px auto;
  text-align: left;
}
.article-cta {
  max-width: 760px;
  margin: 48px auto 0 auto;
}

/* ---------- Sticky mobile call bar ---------- */
.mobile-bar {
  display: none;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--silver);
    box-shadow: var(--shadow-lg);
    padding: 10px 16px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 16px; font-size: 1.15rem; border-bottom: 1px solid var(--grey-light); }
  .nav-toggle { display: block; }
  .header-actions .phone-link span.phone-label { display: none; }
  .header-actions .header-cta { display: none; }
  .header-actions { gap: 8px; }
  .brand-text span { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 32px 22px; }
  .mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.12);
  }
  .mobile-bar a {
    flex: 1;
    text-align: center;
    padding: 16px 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.98rem;
    text-decoration: none;
  }
  .mobile-bar .call { background: var(--navy); color: var(--white); }
  .mobile-bar .text { background: var(--carolina-blue); color: var(--white); }
  .mobile-bar .book { background: var(--teal); color: var(--white); }
  body { padding-bottom: 64px; }
}
