/*
  Safest Places to Live (SP2L) – Ported from ChatGPT reference
  ------------------------------------------------
  Pixel reference: SafestPlacestoLive_Website.pdf
  This is dependency-free (no build step).
*/

/* ---------- Font faces (extended Roboto family) ---------- */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-MediumItalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --color-navy-900: #1c203a;
  --color-navy-700: #384275;
  --color-green: #3ea862;
  --color-green-dk: #2f7e4a;
  --color-green-lt: #9fd3b1;

  --chip-assisted: #9fd3b1;
  --chip-memory: #81dce1;
  --chip-independent: #8aaeda;
  --chip-lifeplan: #d8caff;
  --chip-ccrc: #9ca0ba;
  --chip-all: #e1e3ea;

  --color-star: #fbbc02;
  --color-text: #333333;
  --color-muted: #999999;
  --color-border: #e1e3ea;
  --color-border-2: #e6e6e6;
  --color-surface: #ffffff;
  --color-surface-2: #f5f5f5;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --shadow-card: 0 8px 24px rgba(28, 33, 59, 0.08);

  --container: 1200px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

/* ---------- Base / reset ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.35;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
input::placeholder { color: #8e909d; }
hr { border: none; border-top: 1px solid var(--color-border-2); margin: 0; }

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

/* Utility */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.muted { color: var(--color-muted); }
.link { color: var(--color-green); text-decoration: none; }
.link:hover { text-decoration: underline; }

.pill {
  border-radius: var(--radius-pill);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  user-select: none;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-navy-700);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-navy-900);
}
.btn--dark {
  background: #000;
  color: #fff;
}
.btn--rect {
  height: 30px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 12px;
}
.btn--green {
  background: var(--color-green);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}
.btn--muted {
  background: var(--color-border);
  color: #6b7280;
  border-color: var(--color-border);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-teal {
  background: #086a61;
  color: #fff;
}
.btn-sm {
  padding: 8px 12px;
  font-size: 11px;
}

/* Icon-only circle button */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-navy-900);
  border: 1px solid rgba(28,33,59,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Inputs ---------- */
.input {
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  padding: 0 12px;
  background: #fff;
  font-size: 12px;
  outline: none;
}
.input:focus { border-color: #9297b3; box-shadow: 0 0 0 3px rgba(56,66,117,0.12); }

.input--rect {
  height: 30px;
  border-radius: 6px;
  border: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 11px;
  color: #ffffff;
  opacity: 0.9;
}

/* ---------- Header ---------- */
.site-header {
  background: #ffffff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-inner,
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.brand {
  display: block;
  text-decoration: none;
}
.brand-badge,
.brand__logo {
  height: 80px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  gap: 30px;
}
.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu li {
  list-style: none;
}
.nav-menu li::before {
  display: none !important;
  content: none !important;
}
.nav-menu a {
  color: #1a2744;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s;
}
.nav-menu a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
}
.nav-menu a:hover {
  opacity: 0.7;
  color: #2d8659;
}
.nav-toggle {
  display: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Contact Us button in header - black rounded button */
.site-header .btn,
.site-header .btn-primary,
.site-header .btn-dark,
.header-actions .btn {
  background: #000;
  color: #fff;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
}
.site-header .btn:hover,
.site-header .btn-primary:hover,
.site-header .btn-dark:hover,
.header-actions .btn:hover {
  background: #333;
}
.header-search {
  width: 340px;
}

/* ---------- Hero ---------- */
.hero {
  background: #1a2744;
  min-height: 500px;
  max-height: 600px;
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.hero-image-container {
  width: 100%;
  height: 600px;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  text-align: center;
  width: 100%;
  max-width: 900px;
  z-index: 2;
  padding: 0 20px;
}

/* Hero Component Wrapper */
.hero-component {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* RIBBON CONTAINER */
.ribbon-container {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: center;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3));
  width: 100%;
  max-width: 800px;
}

/* Ribbon Segments */
.ribbon-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Left Ribbon Segment */
.ribbon-left {
  background: #2d7d46;
  padding: 0 20px 0 40px;
  height: 90px;
  flex: 1;
  justify-content: flex-end;
}

/* Center Ribbon Segment (Popped Out) */
.ribbon-center {
  background: #3e9c56;
  padding: 0 30px;
  flex-direction: column;
  z-index: 30;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: scaleY(1.15);
  height: 90px;
  min-width: 280px;
}

/* Right Ribbon Segment */
.ribbon-right {
  background: #2d7d46;
  padding: 0 40px 0 20px;
  height: 90px;
  flex: 1;
  justify-content: flex-start;
}

.ribbon-right-content {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

/* Ribbon Text Styles */
.ribbon-text-large {
  font-family: 'Montserrat', sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: white;
  text-transform: uppercase;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ribbon-text-small {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.95;
  margin-bottom: 2px;
}

.ribbon-text-to {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Ribbon Tails - positioned behind ribbon ends */
.ribbon-tail {
  position: absolute;
  width: 50px;
  height: 100%;
  background-color: #1a3322;
  z-index: -1;
}

.ribbon-tail-left {
  top: 22px;
  left: -12px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 25% 50%);
}

.ribbon-tail-right {
  top: 22px;
  right: -12px;
  clip-path: polygon(0 0, 100% 0, 75% 50%, 100% 100%, 0 100%);
}

/* HERO CARD */
.hero-card {
  width: 94%;
  max-width: 760px;
  background-color: #2D365F;
  position: relative;
  z-index: 10;
  margin-top: -48px;
  padding: 80px 50px 50px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border-radius: 0 0 8px 8px;
}

.hero-subtitle {
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 8px 0;
  text-shadow: none;
}

.hero-cta-text {
  color: #b8bcd4;
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 25px 0;
}

/* Search Box */
.search-box {
  display: flex;
  max-width: 550px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  height: 52px;
}

.search-input {
  flex: 1;
  border: none;
  padding: 15px 25px;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  color: #555;
  background: #e8e8e8;
}

.search-input::placeholder {
  color: #777;
}

.btn-go {
  background: #111;
  color: white;
  border: none;
  padding: 15px 35px;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 0;
}

.btn-go:hover {
  background: #333;
}

.hero__content {
  padding: 110px 0 80px;
}
.hero__stack {
  width: min(800px, 92vw);
  margin: 0 auto;
  text-align: center;
  position: relative;
}

/* ========================================
   Hero Banner Ribbon Design
   ======================================== */
.hero-banner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-bottom: 0;
  position: relative;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
  overflow: visible !important;
}

/* SVG Ribbon Tails */
.ribbon-tail,
.ribbon-arrow {
  display: block;
  height: 100%;
  flex-shrink: 0;
}
.ribbon-tail--left {
  width: 35px;
}
.ribbon-tail--right {
  width: 35px;
}
.ribbon-arrow--left {
  width: 30px;
  z-index: 2;
}

/* Left section: "SAFEST" */
.hero-banner__left {
  background: var(--color-green-dk);
  color: #fff;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 26px 10px 26px 20px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100px;
}

/* Center section: "SENIOR LIVING" / "PLACES" stacked */
.hero-banner__center {
  background: var(--color-green);
  color: #fff;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  z-index: 1;
  position: relative;
  min-height: 100px;
}
.hero-banner__center-top {
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}
.hero-banner__center-bottom {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: 0.02em;
  line-height: 0.9;
}

/* Right section: "TO LIVE" */
.hero-banner__right {
  background: var(--color-green-dk);
  color: #fff;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  padding: 26px 20px 26px 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  position: relative;
  min-height: 100px;
}
.hero-banner__right-to {
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  letter-spacing: 0.2em;
  opacity: 0.95;
}
.hero-banner__right-live {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
}

/* Hero panel/card below banner */
.hero__panel,
.hero-card {
  margin: 0 auto;
  background: var(--color-navy-700);
  color: #fff;
  border-radius: 0 0 24px 24px;
  padding: 28px 50px 35px;
  max-width: 580px;
  position: relative;
  z-index: 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.hero__panel p,
.hero-card p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
}
.hero__search,
.hero-search,
.search-form {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
}
.hero__search input,
.hero-search input,
.search-form input[type="text"],
.search-form input[name="q"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 999px 0 0 999px;
  border: none;
  padding: 0 20px;
  font-size: 14px;
  background: #fff;
  color: #333;
}
.hero__search input::placeholder,
.hero-search input::placeholder,
.search-form input::placeholder {
  color: #8e909d;
}
.hero__search .btn,
.hero-search .btn,
.search-form .btn {
  height: 44px;
  padding: 0 24px;
  border-radius: 0 999px 999px 0;
  font-size: 14px;
  font-weight: 700;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
}
.hero__search .btn:hover,
.hero-search .btn:hover,
.search-form .btn:hover {
  background: #222;
}
.search-label {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  color: #fff;
}
.search-inputs {
  display: flex;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
}

/* Hero subtitle in card */
.hero-subtitle,
.hero-subtitle-wrapper p {
  font-size: 18px !important;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 20px !important;
  color: #fff;
}

/* Hero eyebrow - hidden in new design */
.hero-eyebrow,
.hero-eyebrow-wrapper {
  display: none;
}

/* Hero title - hidden in new design (using banner instead) */
.hero-title-wrapper {
  display: none;
}

/* Legacy support */
.ribbon {
  display: none;
}
.ribbon__cap,
.ribbon__mid {
  display: none;
}

/* Hero title styling (legacy - hidden) */
.hero-title {
  display: none;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #fff;
  margin: 0 0 var(--space-4);
}
.hero-title .script {
  font-family: "Kalam", cursive;
  font-size: 0.9em;
}
.hero-title .highlight {
  color: var(--color-green);
  background: transparent;
  position: relative;
}

/* Responsive hero banner */
@media (max-width: 800px) {
  .hero-banner {
    flex-direction: column;
    gap: 0;
  }
  .hero-banner__left,
  .hero-banner__center,
  .hero-banner__right {
    width: 100%;
    max-width: 400px;
    justify-content: center;
    text-align: center;
  }
  .hero-banner__left::before,
  .hero-banner__left::after,
  .hero-banner__right::before,
  .hero-banner__right::after {
    display: none;
  }
  .hero-banner__left {
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
  }
  .hero-banner__center {
    padding: 10px 20px;
  }
  .hero-banner__right {
    padding: 15px 20px;
    align-items: center;
  }
  .hero__panel,
  .hero-card {
    max-width: 400px;
    padding: 20px;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-7) 0;
}
.section--dark {
  background: var(--color-navy-900);
  color: #fff;
}
.section--dark h2,
.section--dark h3 {
  color: var(--color-green);
}
.section--dark p {
  color: rgba(255, 255, 255, 0.85);
}
.section--mint {
  background: #8ccba1;
}

/* ===== ABOUT SECTION ===== */
.about {
  background: #1a2744;
  padding: 60px 0 0;
}

.about .container {
  max-width: 900px;
}

.about-title {
  color: #d4a84b;
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 15px 0;
}

.about-description {
  color: #fff;
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}

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

/* ===== BADGES SECTION ===== */
.badges-section {
  background: #1a2744;
  padding: 40px 0 60px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.badge-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.badge-icon {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 10px 0;
}

.badge-content p {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  margin: 0;
}

.section-muted {
  background: var(--color-navy-900);
  color: #fff;
}
.section-muted h2,
.section-muted h3 {
  color: var(--color-green);
}
.section-muted p {
  color: rgba(255, 255, 255, 0.85);
}

.section__title {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 14px;
}
.section__title--green { color: var(--color-green); }
.section__subtitle {
  font-size: 14px;
  margin: 0;
  color: #dfe3ff;
}

/* Badge cards under "What is" */
.badge-grid {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  justify-items: center;
}
.badge-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  color: var(--color-text);
  border-radius: 20px;
  padding: 26px 22px 22px;
  border: 1px solid var(--color-border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.badge-card__img {
  height: 175px;
  width: auto;
  display: block;
}
.badge-card__body p {
  margin: 0;
  font-size: 11px;
  color: #555;
  line-height: 1.45;
}

/* Badge rows (current site pattern) */
.badge-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.badge-row img {
  width: 120px;
  height: auto;
  flex-shrink: 0;
}
.badge-row p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}

/* Featured */
.tabs {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 18px 0 var(--space-5);
  font-size: 12px;
  color: #555;
}
.tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 var(--space-5);
}
.tabs-nav {
  display: flex;
  gap: 18px;
  justify-content: center;
}
.tab {
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: #555;
}
.tab[aria-selected="true"] {
  color: var(--color-green);
  border-bottom-color: var(--color-green);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

/* Featured section wrapper */
.featured-section {
  width: 100%;
}

/* ---------- Card media/content structure (JS-generated) ---------- */
.media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface-2);
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.media-badges img {
  height: 58px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18));
}
.content {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-row h3 {
  margin: 0;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.verify-dot {
  display: inline-flex;
  color: var(--color-green);
  flex-shrink: 0;
}
.verify-dot svg {
  width: 18px;
  height: 18px;
}
.distance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-muted);
}
.distance-badge svg {
  width: 14px;
  height: 14px;
}
.meta {
  font-size: 13px;
  color: var(--color-muted);
}
.learn-more {
  color: var(--color-green);
  font-weight: 500;
  text-decoration: none;
}
.learn-more:hover {
  text-decoration: underline;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.tag-more {
  color: var(--color-muted);
  font-size: 11px;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- Community card ---------- */
.community-card {
  background: #fff;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.community-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e6e6e6;
}
.community-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}
.community-card__fav svg { width: 22px; height: 22px; }
.community-card__fav path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.community-card__fav[data-active="true"] { color: #fbbc02; }
.community-card__fav[data-active="true"] path { fill: currentColor; }

.community-card__badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.community-card__badges img {
  height: 58px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18));
}

.community-card__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.community-card__title {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.verified-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-green);
  flex: none;
}

.community-card__address {
  font-size: 10px;
  color: #8e909d;
  line-height: 1.2;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #8e909d;
}
.stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.star svg { width: 12px; height: 12px; fill: var(--color-star); }

.review-snippet {
  font-size: 10px;
  color: #858585;
  line-height: 1.35;
  min-height: 36px;
}
.review-snippet a { color: var(--color-green); text-decoration: none; font-weight: 700; }
.review-snippet a:hover { text-decoration: underline; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 9.5px;
  font-weight: 700;
  color: #1c213b;
  background: var(--chip-all);
}
.chip--assisted { background: var(--chip-assisted); }
.chip--memory { background: var(--chip-memory); }
.chip--independent { background: var(--chip-independent); }
.chip--lifeplan { background: var(--chip-lifeplan); }
.chip--ccrc { background: var(--chip-ccrc); color: #fff; }
.chip--plus { background: #e6e6e6; color: #1c213b; }

.community-card__actions {
  margin-top: 2px;
  display: flex;
  gap: 10px;
}
.community-card__actions .btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 11px;
}

/* ---------- Accordion ---------- */
.accordion {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(28,33,59,0.10);
  padding: 18px;
}
.accordion__title,
.accordion-header {
  margin: 0 0 12px;
  font-weight: 900;
  font-size: 12px;
  color: #1c213b;
}
.accordion-item {
  border-top: 1px solid var(--color-border-2);
}
.accordion-item:first-child { border-top: none; }
.accordion-item button {
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: #1c213b;
}
.accordion-item__panel {
  padding: 0 0 14px;
  font-size: 11px;
  color: #333;
}
.accordion-item__panel ul {
  margin: 10px 0 0 18px;
  padding: 0;
}
.accordion-item__icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e6e6e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1c213b;
  flex: none;
}
.accordion-item__icon svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.testimonial,
.testimonial-card {
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fff;
}
.testimonial__avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #e6e6e6;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca0ba;
}
.testimonial__avatar svg { width: 26px; height: 26px; fill: currentColor; }
.testimonial__stars { display: flex; justify-content: center; margin: 0 0 10px; }
.testimonial__text {
  font-size: 11px;
  color: #555;
  line-height: 1.45;
  margin: 0 0 12px;
}
.testimonial__who {
  font-size: 11px;
  color: #333;
  text-align: center;
  font-weight: 700;
}

/* ---------- Lead form block ---------- */
.lead-block {
  background: var(--color-navy-900);
  color: #fff;
  padding: var(--space-7) 0;
}
.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
.lead-copy h2,
.lead-copy h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  color: var(--color-green);
}
.lead-copy p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #dfe3ff;
}
.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lead-form .span-2 { grid-column: 1 / -1; }
.lead-form input, .lead-form select {
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.95);
  padding: 0 10px;
  font-size: 12px;
}
.lead-form button {
  grid-column: 1 / -1;
  height: 34px;
  border-radius: 6px;
  border: none;
  background: var(--color-green);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.form-message {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #dfe3ff;
}
.form-note {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-3);
}

/* Split layout for contact section */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

/* ---------- Directory page ---------- */
.page-title {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 44px;
  margin: 0 0 16px;
  color: var(--color-navy-900);
}

.directory-toolbar,
.directory-search-section {
  padding: var(--space-6) 0 var(--space-3);
}
.search-shell,
.search-bar-wrapper {
  border: 2px solid var(--color-border-2);
  border-radius: var(--radius-pill);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 18px 40px rgba(28,32,58,0.08);
}
.search-shell input { width: 180px; }
.search-shell input:nth-child(2) { width: 92px; text-align: left; }

.search-shell .input {
  height: 40px;
  border-radius: 999px;
  border: 1px solid #dfe3ff;
  padding: 0 18px;
  font-size: 12px;
}

/* Directory search form */
.directory-search-form {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dir-search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--color-border-2);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  box-shadow: 0 18px 40px rgba(28,32,58,0.08);
}
.dir-search-field {
  display: flex;
  align-items: center;
}
.dir-search-field input {
  border: none;
  outline: none;
  font-size: 14px;
  min-width: 200px;
}
.dir-search-field select {
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  cursor: pointer;
}
.dir-search-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}
.dir-location-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dir-location-btn:hover {
  color: var(--color-green);
}
.location-status {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: var(--space-2);
}
.location-status--error {
  color: #dc3545;
}

.sort-row,
.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-5);
  font-size: 11px;
  color: #8e909d;
}
.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-row select,
.sort-control select {
  border: none;
  background: transparent;
  color: #1c213b;
  font-weight: 700;
  cursor: pointer;
}
.sort-row .count { text-align: center; flex: 1; }

.directory-wrapper {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
  width: 100%;
}

.directory-layout,
.directory-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: start;
  padding-bottom: var(--space-7);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.map-panel,
.map-card {
  position: sticky;
  top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-2);
  background: #e6e6e6;
  min-height: 540px;
}
.map-panel iframe,
.map-card iframe,
.slippy-map {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 540px;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: var(--space-6) 0;
  font-size: 12px;
  color: #8e909d;
}
.page-btn {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.page-btn[aria-current="page"] {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: #fff;
}

.load-more-btn {
  display: block;
  margin: var(--space-5) auto;
}

.filters-popover {
  position: absolute;
  margin-top: 10px;
  right: 0;
  width: 310px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: none;
}
.filters-popover[data-open="true"] { display: block; }
.filters-popover h4 {
  margin: 0 0 10px;
  font-size: 12px;
  color: #1c213b;
}
.filters-popover .chips { margin-bottom: 10px; }
.range-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: #8e909d; }
.range-row input[type="range"] { width: 170px; }

/* ---------- Community details page ---------- */
.community-page {
  padding: var(--space-6) 0;
}
.back-to-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
  margin-bottom: var(--space-4);
}
.back-to-search:hover {
  color: var(--color-green);
}
.back-to-search svg {
  width: 18px;
  height: 18px;
}
.page-title-row {
  margin-bottom: var(--space-4);
}
.page-title-row h1 {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0 0 var(--space-2);
  color: var(--color-navy-900);
}
.address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-muted);
}
.address-icon {
  color: var(--color-green);
}
.care-types-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-4);
}
.rating-row--google {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rating-num {
  font-weight: 700;
  font-size: 14px;
}
.reviews-link {
  font-size: 12px;
  color: var(--color-green);
}
.community-logo {
  max-width: 200px;
  max-height: 60px;
  margin-bottom: var(--space-4);
}
.community-phone-display {
  font-size: 14px;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-green);
  text-decoration: none;
}
.phone-link:hover {
  text-decoration: underline;
}
.community-cta {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.media-two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.photo-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e6e6e6;
}
.photo-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.photo-badges {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.photo-badges img {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.5);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.map-card--community {
  min-height: 340px;
}
.map-card--community .slippy-map {
  min-height: 340px;
}
.richtext {
  font-size: 14px;
  line-height: 1.6;
}
.richtext h2,
.richtext h3 {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-3);
  color: var(--color-navy-900);
}
.richtext p {
  margin: 0 0 var(--space-3);
}
.richtext ul {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-5);
}

.details-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-6);
}
.details-meta {
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fff;
}
.details-meta__logo {
  border: 1px solid var(--color-border-2);
  border-radius: 10px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #fff;
}
.details-meta__logo img { max-height: 42px; width: auto; }
.details-meta__addr {
  font-size: 12px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 10px;
}
.details-meta__actions { display: flex; gap: 10px; }

.media-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: start;
}
.gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-2);
  background: #e6e6e6;
  position: relative;
}
.gallery img { width: 100%; height: 340px; object-fit: cover; }
.gallery .community-card__badges { right: 12px; top: 12px; bottom: auto; }
.gallery .community-card__badges img { height: 74px; }

.details-section h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  color: #1c213b;
  font-weight: 900;
}
.details-section p,
.details-section li {
  font-size: 12px;
  color: #333;
  line-height: 1.6;
}

/* ---------- States page ---------- */
.states-tabs {
  margin-top: var(--space-5);
}
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}
.states-grid a {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.states-grid a:hover {
  border-color: var(--color-green);
  box-shadow: 0 2px 8px rgba(62,168,98,0.15);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-surface-2);
  padding: var(--space-6) 0;
  text-align: center;
  font-size: 13px;
  color: #5a5b5b;
}

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .directory-layout,
  .directory-grid,
  .media-grid,
  .media-two-col { grid-template-columns: 1fr; }
  .map-panel,
  .map-card { position: relative; top: auto; min-height: 360px; }
  .map-panel iframe,
  .map-card .slippy-map { min-height: 360px; }
  .results-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: 1fr; }
  .badges-grid { grid-template-columns: 1fr; }
  .lead-grid,
  .split { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .nav,
  .nav-menu { display: none; }
  .nav-toggle { display: block; }
  .header-inner,
  .site-header__inner { height: auto; padding: var(--space-4) var(--space-5); }

  /* Ribbon responsive */
  .ribbon-text-large { font-size: 38px; }
  .ribbon-center { min-width: 200px; }
  .hero-card { padding: 60px 30px 40px; }
}

@media (max-width: 768px) {
  /* Ribbon mobile */
  .ribbon-container {
    flex-direction: column;
    align-items: center;
  }
  .ribbon-segment {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    text-align: center;
  }
  .ribbon-left,
  .ribbon-right {
    height: 60px;
    padding: 0 20px;
  }
  .ribbon-center {
    height: 70px;
    transform: none;
  }
  .ribbon-tail-left,
  .ribbon-tail-right {
    display: none;
  }
  .ribbon-right-content {
    justify-content: center;
    width: 100%;
  }
  .ribbon-text-large {
    font-size: 32px;
  }
  .hero-card {
    margin-top: -20px;
    padding: 50px 20px 30px;
  }
  .hero-subtitle {
    font-size: 18px;
  }
  .search-box {
    flex-direction: column;
    height: auto;
  }
  .search-input {
    border-radius: 4px 4px 0 0;
  }
  .btn-go {
    border-radius: 0 0 4px 4px;
    padding: 12px 35px;
  }
  .badge-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .header-inner,
  .site-header__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
  }
  .brand-badge,
  .brand__logo {
    height: 60px;
  }
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  .dir-search-pill {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
    padding: var(--space-3);
  }
  .dir-search-field input {
    min-width: 150px;
  }
}

/* Selected card state (directory) */
.community-card[data-selected="true"] {
  box-shadow: 0 0 0 2px rgba(63,168,99,0.45);
  border-color: rgba(63,168,99,0.45);
}

/* ---------- Loading states ---------- */
.page-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s;
}
.page-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-badge {
  width: 120px;
  animation: pulse 1.5s ease-in-out infinite;
}
.loading-message {
  margin-top: var(--space-4);
  font-size: 16px;
  color: var(--color-navy-700);
  font-weight: 500;
}
.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: var(--space-3);
}
.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  animation: bounce 1.4s ease-in-out infinite;
}
.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-7);
  gap: var(--space-4);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-spinner.lg {
  width: 48px;
  height: 48px;
}
.loading-text {
  font-size: 14px;
  color: var(--color-muted);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton-card {
  background: #fff;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-image {
  aspect-ratio: 4 / 3;
}
.skeleton-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-title {
  height: 16px;
  border-radius: 4px;
  width: 70%;
}
.skeleton-text {
  height: 12px;
  border-radius: 4px;
  width: 90%;
}
.skeleton-text.short {
  width: 50%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Placeholder image state when no photo available */
.placeholder-img {
  background: linear-gradient(135deg, #e6e6e6 0%, #d0d0d0 100%);
  object-fit: contain !important;
  max-width: 80px !important;
  max-height: 80px !important;
  margin: auto;
  opacity: 0.4;
}
.media .placeholder-img,
.photo-card .placeholder-img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  opacity: 1;
}

/* Carousel for featured section */
.featured-carousel {
  position: relative;
  padding: 0 50px;
}
.featured-carousel-track,
.featured-track {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--space-2) 0;
}
.featured-carousel-track::-webkit-scrollbar,
.featured-track::-webkit-scrollbar {
  display: none;
}
.featured-carousel-track > *,
.featured-track > * {
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - var(--space-5) * 2 / 3);
  min-width: 280px;
}
/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--color-text);
}
.carousel-arrow:hover {
  background: var(--color-surface-2);
}
.carousel-arrow--prev { left: 0; }
.carousel-arrow--next { right: 0; }
.carousel-arrow svg {
  width: 20px;
  height: 20px;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.carousel-nav:hover {
  background: var(--color-surface-2);
}
.carousel-nav.prev { left: -20px; }
.carousel-nav.next { right: -20px; }
.carousel-nav svg {
  width: 20px;
  height: 20px;
  fill: var(--color-text);
}
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-green);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  margin-top: var(--space-4);
}
.view-all-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .featured-carousel-track > * {
    flex: 0 0 calc(50% - var(--space-5) / 2);
  }
  .carousel-nav { display: none; }
}
@media (max-width: 600px) {
  .featured-carousel-track > * {
    flex: 0 0 85%;
  }
}

/* Radius circle on map */
.radius-circle {
  stroke: var(--color-green);
  stroke-width: 2;
  fill: rgba(62, 168, 98, 0.15);
}
