/* ============================================================================
   JNZ Insurance — Locations pages styles
   ============================================================================
   Loaded on /locations/, /locations/saint-augustine/, /locations/saint-johns/.
   Depends on /styles.css being loaded first.

   Patterns defined here:
     .office-details     — 2-col layout: large map embed LEFT, navy info card RIGHT
     .office-card        — navy fill card with stacked icon-rows for office details
     .walk-ins-badge     — teal pill below the office card
     .local-section      — 2-col layout: text LEFT, .office-image RIGHT
     .office-image       — figure with hover caption overlay
     .areas-list         — 2-col list of neighborhoods + ZIP row
     .location-hub-card  — large card on the hub page (map + facts + visit CTA)
     .visit-expectations — 3-up grid for "what to expect on a visit" hub block

   Hero on each location page uses the shared .hero pattern from /styles.css —
   full-screen dark gradient with animated diagonal stripes and watermark.
   Coverage and team sections also use the shared patterns from /styles.css.
============================================================================ */

/* ============ Office details (map LEFT + champagne info card RIGHT) ============ */
.office-details {
  display: grid;
  grid-template-columns: 1.4fr minmax(320px, 1fr);
  gap: 32px;
  align-items: center;
}
.office-card {
  background: var(--bg-warm);
  color: var(--jnz-charcoal);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 28px 32px 24px;
  border: 1px solid rgba(18, 58, 92, 0.06);
}
.office-card-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(18, 58, 92, 0.10);
  font-size: 15px;
  line-height: 1.5;
  color: var(--jnz-charcoal);
}
/* First row carries the address + the walk-ins badge in the top-right. */
.office-card-row:first-child {
  padding-top: 0;
  grid-template-columns: 28px 1fr auto;
}
.office-card-row:last-of-type { border-bottom: none; }
.office-card-row svg {
  width: 18px; height: 18px;
  color: var(--jnz-blue);
  margin-top: 4px;
  flex-shrink: 0;
}
.office-card-row a {
  color: var(--jnz-charcoal);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.office-card-row a:hover { color: var(--jnz-blue); }
.office-card-row .office-card-row-meta {
  font-size: 13px;
  color: var(--jnz-slate);
  font-style: italic;
}
.office-card-directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--jnz-blue);
  text-decoration: none;
  transition: gap var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.office-card-directions svg { width: 14px; height: 14px; }
.office-card-directions:hover { gap: 10px; color: var(--jnz-navy); }

/* Walk-ins badge sits in the third column of the first office-card-row.
   Solid teal pill, white text — accent color on champagne. */
.walk-ins-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  margin-top: 0;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--jnz-teal);
  color: var(--jnz-white);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.walk-ins-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--jnz-white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.office-map-large {
  min-height: 480px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #E8EEF1;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
}
.office-map-large iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: 0;
  display: block;
}

/* ============ Local section (text LEFT, office image RIGHT) ============ */
.local-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.local-section-text h2 {
  font-size: 36px;
  font-weight: var(--fw-bold);
  color: var(--jnz-navy);
  margin: 16px 0 24px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.local-section-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--jnz-charcoal);
  margin: 0 0 18px;
}
.local-section-text p:last-child { margin-bottom: 0; }

.office-image {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.office-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-premium);
}
.office-image:hover img {
  transform: scale(1.04);
}
.office-image figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 22px;
  background: linear-gradient(to top, rgba(13, 29, 46, 0.92) 0%, rgba(13, 29, 46, 0.72) 60%, rgba(13, 29, 46, 0) 100%);
  color: var(--jnz-white);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
.office-image:hover figcaption,
.office-image:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .office-image img { transition: none; }
  .office-image:hover img { transform: none; }
  .office-image figcaption { transition: none; }
}

/* Areas served sub-block (still part of the local section, full width below) */
.areas-served {
  padding-top: 36px;
  border-top: 1px solid var(--divider);
}
.areas-served h3 {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--jnz-teal);
  margin: 0 0 18px;
}
.areas-list {
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--jnz-charcoal);
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.areas-list li { break-inside: avoid; }
.areas-zip {
  font-size: 13px;
  color: var(--jnz-slate);
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.areas-zip-list {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}
.areas-zip-list li { display: inline; }
.areas-zip-list li:not(:last-child)::after { content: ' · '; }

/* Quote CTA banner pattern lives in /styles.css as .quote-cta — used here
   and on the homepage. */

/* ============ Hub page: large location cards ============ */
.location-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.location-hub-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.location-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(18, 58, 92, 0.18);
  border-color: rgba(18, 58, 92, 0.16);
}
.location-hub-card-map { height: 280px; background: #E8EEF1; overflow: hidden; }
.location-hub-card-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.location-hub-card-body { padding: 32px 32px 28px; display: flex; flex-direction: column; flex: 1; }
.location-hub-card-eyebrow {
  font-size: 12px; font-weight: var(--fw-bold);
  color: var(--jnz-teal);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.location-hub-card-name {
  font-size: 28px; font-weight: var(--fw-bold);
  color: var(--jnz-navy); margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.location-hub-card-addr {
  font-size: 15px; line-height: 1.5;
  color: var(--jnz-charcoal); margin-bottom: 20px;
}
.location-hub-card-meta {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 18px; border-top: 1px solid var(--divider);
  margin-bottom: 24px;
}
.location-hub-card-meta-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--jnz-charcoal); }
.location-hub-card-meta-row svg { width: 16px; height: 16px; color: var(--jnz-blue); flex-shrink: 0; }
.location-hub-card-meta-row a { color: var(--jnz-charcoal); text-decoration: none; font-weight: var(--fw-semibold); }
.location-hub-card-meta-row a:hover { color: var(--jnz-blue); }
.location-hub-card-meta-placeholder { font-size: 12px; color: var(--jnz-slate); font-style: italic; }
.location-hub-card-directions {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: var(--fw-semibold);
  color: var(--jnz-blue); text-decoration: none;
}
.location-hub-card-directions svg { width: 14px; height: 14px; }
.location-hub-card-directions:hover { color: var(--link-hover); text-decoration: underline; }
.location-hub-card-cta {
  margin-top: auto;
  padding-top: 24px;
  align-self: stretch;
}
.location-hub-card-cta .btn { width: 100%; justify-content: center; }

/* ============ Hub page: service area (prose left + sidebar list right) ============ */
.service-area-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 32px;
}
.service-area-prose p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--jnz-charcoal);
  margin: 0 0 18px;
}
.service-area-prose p:last-child { margin-bottom: 0; }

/* Right column — reads as a reference sidebar, lighter than the prose. */
.service-area-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.service-area-block { display: flex; flex-direction: column; gap: 8px; }
.service-area-label {
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--jnz-teal);
}
.service-area-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--jnz-navy);
  background: var(--jnz-champagne);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 4px;
}
/* Items flow horizontally and wrap onto new lines as the sidebar narrows.
   Each item stays internally unbroken (inline-block + nowrap) so multi-word
   names like "Julington Creek Plantation" don't split across lines. */
.service-area-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.85;
  color: var(--jnz-charcoal);
}
.service-area-list li {
  display: inline-block;
  white-space: nowrap;
}
.service-area-list li:not(:last-child)::after {
  content: '·';
  color: var(--jnz-slate);
  margin: 0 8px;
  font-weight: var(--fw-bold);
}

@media (max-width: 820px) {
  .service-area-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============ Hub: tighter padding on the secondary sections ============ */
/* Default .section padding is 96px (~6rem). These sections feel disconnected
   at that height — drop to 4rem so they read as part of one rhythm. */
.locations-visit,
.locations-service-area,
.locations-quote-cta { padding: 4rem 0; }

/* ============ Hub: "What to expect on a visit" 3-up ============ */
.visit-expectations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.visit-expectation { display: flex; flex-direction: column; gap: 14px; }
.visit-expectation-icon {
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  background: var(--jnz-champagne);
  color: var(--jnz-navy);
  display: flex; align-items: center; justify-content: center;
}
.visit-expectation-icon svg { width: 28px; height: 28px; }
.visit-expectation h3 {
  font-size: 18px;
  font-weight: var(--fw-bold);
  color: var(--jnz-navy);
  margin: 0;
  letter-spacing: -0.01em;
}
.visit-expectation p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--jnz-slate);
  margin: 0;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .office-details { grid-template-columns: 1fr; gap: 28px; }
  .office-map-large { min-height: 360px; }
  .office-map-large iframe { min-height: 360px; }
  .local-section { grid-template-columns: 1fr; gap: 32px; }
  .location-hub-grid { grid-template-columns: 1fr; gap: 24px; }
  .visit-expectations { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 820px) {
  .office-card { padding: 24px 18px 20px; }
  .office-map-large { min-height: 280px; }
  .office-map-large iframe { min-height: 280px; }
  .office-card-row { grid-template-columns: 24px 1fr; gap: 10px; font-size: 14px; }
  .office-card-row:first-child { grid-template-columns: 24px 1fr; }
  .office-card-row:first-child .walk-ins-badge { grid-column: 1 / -1; margin-top: 8px; }
  .office-card-row a { word-break: break-word; overflow-wrap: anywhere; }
  .areas-list { columns: 1; }
  .local-section-text h2 { font-size: 28px; }
  .location-hub-card-map { height: 220px; }
  .location-hub-card-body { padding: 26px 24px 24px; }
  .location-hub-card-name { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .location-hub-card { transition: none; }
  .location-hub-card:hover { transform: none; }
}
