/* ============================================================
   Unity Home Care — Shared Site Stylesheet
   Navy-forward brand palette, responsive layout system
   ============================================================ */

:root {
  --navy: #16374d;
  --navy-dark: #0e2839;
  --navy-tint: #e5edf2;
  --teal: #2b93a3;
  --teal-dark: #1c7a86;
  --teal-tint: #e9f4f2;
  --tan: #f3ebda;
  --tan-text: #8a6d2f;
  --border-tan: #eee2c9;
  --cream: #ffffff;
  --text-muted: #5b7280;
  --footer-navy: #12293a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito Sans', sans-serif;
  color: var(--navy);
  background: var(--cream);
  overflow-x: hidden;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--teal); }
::selection { background: var(--teal); color: #fff; }

img { max-width: 100%; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 48px; }

/* ==========================================================
   HEADER / NAV
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 48px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-tan);
}

.site-header .brand img { height: auto; width: 120px; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
  font-size: 17px;
}

.site-nav a { color: var(--navy); padding: 6px 2px; position: relative; }
.site-nav a.active { color: var(--navy); }
.site-nav a:hover { color: var(--teal); }
.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  border-radius: 2px;
  background: var(--teal);
}

.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.header-phone {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  white-space: nowrap;
}

.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  padding: 16px 30px;
  border-radius: 100px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 55, 77, 0.25);
}
.btn-primary:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 14px 28px;
}
.btn-outline:hover { background: var(--teal); border-color: var(--teal); color: #fff; }

.btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  padding: 14px 28px;
}
.btn-outline-light:hover { background: var(--teal); border-color: var(--teal); color: #fff; }

.btn-sm {
  padding: 11px 20px;
  font-size: 15px;
  border-radius: 100px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 55, 77, 0.3);
}
.btn-sm:hover { background: var(--teal); color: #fff; }

/* ==========================================================
   SECTION LABEL / EYEBROW
   ========================================================== */
.eyebrow {
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: #7dd0d9; }
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); display: inline-block;
}

/* ==========================================================
   LAYOUT: GRIDS & FLEX ROWS
   ========================================================== */
.row {
  display: flex;
  gap: 56px;
  align-items: center;
}

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

/* ==========================================================
   CARDS
   ========================================================== */
.card {
  background: #fff;
  border-radius: 24px;
  padding: 34px 28px;
  border: 1px solid var(--border-tan);
}

.icon-circle {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 22px;
  background: var(--navy-tint);
}
.icon-circle.alt { background: var(--tan); }

/* Photo-topped service card (homepage) */
.card-photo {
  padding: 0;
  overflow: hidden;
}
.card-photo .card-photo-img {
  width: 100%;
  height: 190px;
  overflow: hidden;
}
.card-photo .card-photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-photo .card-photo-body {
  padding: 26px 28px 30px;
}

/* Photo thumbnail for service rows (services page) */
.service-photo {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .service-photo {
    width: 100%;
    height: 160px;
    border-radius: 16px;
  }
}

.tag {
  background: var(--tan);
  color: var(--tan-text);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 100px;
}
.tag.blue { background: var(--navy-tint); color: var(--navy); }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  padding: 88px 48px 100px;
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 1360px;
  margin: 0 auto;
}

.page-hero {
  padding: 80px 48px;
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}
.page-hero.split { text-align: left; display: flex; align-items: center; gap: 56px; padding-bottom: 40px; }

/* ==========================================================
   SECTIONS
   ========================================================== */
.section { padding: 100px 48px; max-width: 1300px; margin: 0 auto; }
.section-tan { background: var(--tan); }
.section-navy { background: var(--navy); color: #fff; }
.section-narrow { max-width: 900px; margin: 0 auto; }

/* ==========================================================
   COMPARISON TABLE
   ========================================================== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(22, 55, 77, 0.1);
}
.compare-table th, .compare-table td {
  padding: 18px 20px;
  text-align: left;
  font-size: 15px;
  border-bottom: 1px solid var(--border-tan);
}
.compare-table thead th {
  font-family: 'Baloo 2', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--navy);
}
.compare-table thead th.highlight { background: var(--navy-dark); }
.compare-table tbody th {
  font-weight: 700;
  color: var(--navy);
  background: var(--tan);
  width: 34%;
}
.compare-table td { color: var(--text-muted); }
.compare-table td.yes { color: var(--navy); font-weight: 800; }
.compare-table td.highlight { background: var(--navy-tint); }
.compare-table tbody tr:last-child td,
.compare-table tbody tr:last-child th { border-bottom: none; }

/* ==========================================================
   FAQ ACCORDION
   ========================================================== */
.faq-item {
  background: #fff;
  border: 1px solid var(--border-tan);
  border-radius: 16px;
  padding: 4px 24px;
  margin-bottom: 14px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-tint);
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ==========================================================
   LOCATION SEARCH
   ========================================================== */
.location-search {
  position: relative;
  margin-bottom: 28px;
}
.location-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 20px 15px 46px;
  border-radius: 100px;
  border: 1px solid var(--border-tan);
  font-size: 15px;
  font-family: 'Nunito Sans', sans-serif;
  background: #fff;
}
.location-search input:focus { outline: 2px solid var(--teal); }
.location-search::before {
  content: '\1F50D';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.6;
}
.location-chip[hidden] { display: none; }
.location-empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 0;
  display: none;
}
.location-empty.visible { display: block; }

/* ==========================================================
   FORMS
   ========================================================== */
.form-panel {
  background: #fff;
  border-radius: 28px;
  padding: 44px;
  box-shadow: 0 24px 48px rgba(22, 55, 77, 0.1);
  border: 1px solid var(--border-tan);
}

.form-row { display: flex; gap: 16px; }
.form-field { flex: 1; margin-bottom: 20px; }
.form-field label {
  font-size: 13px; font-weight: 800; color: var(--navy);
  display: block; margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid #e2d8bf;
  font-size: 15px;
  font-family: 'Nunito Sans', sans-serif;
  background: #fff;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: 2px solid var(--teal); }
.form-field textarea { resize: vertical; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer { background: var(--footer-navy); padding: 64px 48px 32px; color: #9fb8c4; }
.footer-top {
  max-width: 1300px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid #234a5f;
}
.footer-top img { height: 38px; filter: brightness(0) invert(1) opacity(0.9); }
.footer-col-title { color: #fff; font-weight: 800; font-size: 14px; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-links a { color: #9fb8c4; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom {
  max-width: 1300px; margin: 0 auto; padding-top: 24px; font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero { flex-wrap: wrap; padding: 64px 32px 72px; }
  .hero > * { min-width: 100% !important; }
  .row { flex-wrap: wrap; }
  .row > * { min-width: 100% !important; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .site-header { padding: 12px 20px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--cream);
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--border-tan);
    box-shadow: 0 16px 32px rgba(22, 55, 77, 0.12);
  }
  .site-nav.active { display: flex; }
  .site-nav a { display: block; width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--border-tan); }
  .site-nav a.active::after { display: none; }

  .header-phone { display: none; }
  .header-actions .btn-sm { padding: 10px 16px; font-size: 14px; }
  .hamburger-btn { display: flex; }

  .hero,
  .page-hero.split { padding: 48px 20px 56px; flex-direction: column; }
  .hero h1 { font-size: 34px !important; }

  .section { padding: 56px 20px; }
  .page-hero { padding: 56px 20px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; padding: 0 0 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .form-row { flex-direction: column; gap: 0; }
  .form-panel { padding: 28px 22px; }

  .btn { width: 100%; }
  .hero .btn-row, .page-hero .btn-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1, .page-hero h1 { font-size: 28px !important; }
  .card { padding: 24px 20px; }
}
