/*
 Theme Name:   Divi Child - Safest Places to Live
 Theme URI:    https://safeplacestolive.com
 Description:  Child theme for SPL site - contains minimal custom CSS
 Author:       AccuShield
 Author URI:   https://accushield.com
 Template:     Divi
 Version:      1.1.0
 License:      GPL-2.0-or-later
 Text Domain:  divi-child-spl
*/

/* =========================================================
   SPL Child Theme Styles
   =========================================================

   Purpose: This file contains ONLY the CSS that cannot be
   handled by Divi's built-in module settings.

   Categories of CSS that belong here:
   - JS-driven page layouts (directory, community)
   - Loading states and animations
   - Card component styles (JS templating)
   - Carousel functionality
   - Complex positioning (hero ribbon)

   Everything else should use Divi's native attributes:
   - background_color, custom_padding, text_text_color, etc.
   ========================================================= */

/* ---------- Design Tokens (CSS Variables) ---------- */
:root {
  /* Colors - matching Divi Theme Customizer */
  --color-navy-900: #1c203a;
  --color-navy-700: #384275;
  --color-green: #3ea862;
  --color-green-dk: #2f7e4a;
  --color-green-lt: #9fd3b1;
  --color-mint: #8ccba1;
  --color-text: #333333;
  --color-muted: #999999;
  --color-border: #e1e3ea;
  --color-border-2: #e6e6e6;
  --color-surface: #ffffff;
  --color-surface-2: #f5f5f5;

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

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

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

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

  /* Layout */
  --container: 1200px;

  /* Stars */
  --color-star: #fbbc02;
}

/* ---------- Font Faces ---------- */
@font-face {
  font-family: "Roboto";
  src: url("https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/fonts/Roboto-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/fonts/RobotoCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base Resets ---------- */
* { 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; }

/* Override Divi default spacing */
#main-content,
#et-main-area,
.et-l--body,
.et-l--post,
.et_pb_pagebuilder_layout,
.et_full_width_page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.et_pb_section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.et_pb_row {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body,
#page-container,
#main-content,
#et-main-area,
.et-l {
  background: #ffffff !important;
}

/* ---------- Utility Classes ---------- */
.sr-only,
.visually-hidden {
  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); }
.text-center { text-align: center; }

/* ---------- Buttons (shared across pages) ---------- */
.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-primary {
  background: var(--color-navy-700);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-navy-900);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-dark,
.btn--dark {
  background: #000;
  color: #fff;
}

.btn--green {
  background: var(--color-green);
  color: #fff;
}

.btn-teal {
  background: #086a61;
  color: #fff;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 11px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 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 (JS mobile menu toggle) ---------- */
.site-header {
  background: #ffffff;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: visible;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 80px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-badge {
  height: 100px;
  width: auto;
  display: block;
}

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

/* wpautop defense: WP wraps inline content in <p> tags */
.nav-menu > p { display: contents; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: normal !important;
}

.nav-menu li {
  list-style: none;
  position: relative;
}

.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;
}

/* Chevron removed per design — clean text-only nav links */

.nav-menu a:hover {
  opacity: 0.7;
  color: #2d8659;
}

/* ---------- Desktop Dropdown Sub-menu ---------- */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(28,33,59,0.12);
  min-width: 220px;
  padding: 8px 0 !important;
  list-style: none !important;
  margin: 8px 0 0 !important;
  line-height: normal !important;
  z-index: 200;
}

.menu-item-has-children:hover > .sub-menu {
  display: block;
}

/* (chevron rotation removed — no arrow) */

.sub-menu li {
  position: relative;
}

.sub-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #1a2744;
  white-space: nowrap;
  transition: background 0.15s;
}

.sub-menu a:hover {
  background: var(--color-surface-2);
  opacity: 1;
  color: var(--color-green);
}

/* Sub-menu toggle button — hidden on desktop, shown on mobile */
.sub-menu-toggle {
  display: none;
}

.nav-toggle {
  display: none;
}

.site-header .btn {
  background: #000;
  color: #fff;
  border-radius: 4px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
}

/* ---------- Mobile Nav ---------- */
@media (max-width: 1050px) {
  /* Keep .nav visible (it holds hamburger + menu), only hide .nav-menu */
  .nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border-2);
    box-shadow: 0 8px 24px rgba(28,33,59,0.12);
    padding: 8px 0;
    z-index: 200;
  }
  .nav-menu.is-open { display: flex; }
  .nav-toggle { display: block; }

  /* Top-level nav items stack vertically */
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid var(--color-border-2);
  }
  .nav-menu > li:last-child { border-bottom: none; }
  .nav-menu > li > a {
    padding: 14px 24px;
    width: 100%;
  }

  /* Sub-menu toggle button visible on mobile */
  .sub-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 2px;
    color: #666;
    transition: transform 0.2s;
  }
  .menu-item-has-children.is-open > .sub-menu-toggle {
    transform: rotate(180deg);
  }

  /* Override desktop hover — only toggle via JS on mobile */
  .menu-item-has-children:hover > .sub-menu { display: none; }

  /* Mobile sub-menu: static, toggle via .is-open */
  .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    background: var(--color-surface-2);
    min-width: 0;
  }
  .menu-item-has-children.is-open > .sub-menu { display: block; }

  .sub-menu a {
    padding: 10px 24px 10px 40px;
  }
}

/* ---------- Hero Section (complex positioning) ---------- */
.et_pb_section.hero {
  padding: 0 !important;
  overflow: visible !important;
  position: relative !important;
  min-height: 600px !important;
  background-image: url('https://storage.googleapis.com/accushield-marketing-assets/spl-site-v2/assets/img/hero.png') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}

.hero-image-container {
  width: 100%;
  height: 560px;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background: transparent !important;
}

.hero-image {
  display: none !important;
}

.hero__content {
  padding: 110px 0 80px;
}

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

/* Hero Banner Ribbon */
.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;
}

.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;
}

.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;
}

.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 Card */
.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-subtitle {
  font-size: 18px !important;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 20px !important;
  color: #fff;
}

.search-label {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  color: #fff;
}

.search-form {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
}

.search-inputs {
  display: flex;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
}

.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;
}

.search-form .btn,
.btn-go {
  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;
}

@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 {
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
  }
  .hero-banner__right {
    padding: 15px 20px;
    align-items: center;
  }
  .hero-card {
    max-width: 400px;
    padding: 20px;
  }
}

/* ---------- Loading States & Animations ---------- */
.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 {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Page loading overlay */
.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); }
}

/* Skeleton cards */
.skeleton-card {
  background: #fff;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.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%;
}

/* Placeholder image 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;
}

/* ---------- Featured Carousel (JS-driven) ---------- */
.featured-section {
  width: 100%;
}

.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-carousel {
  position: relative;
  padding: 0 50px;
}

.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-track::-webkit-scrollbar {
  display: none;
}

.featured-track > * {
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - var(--space-5) * 2 / 3);
  min-width: 280px;
}

.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;
}

/* ---------- Community Cards (JS-generated) ---------- */
.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__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;
}

.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); }

.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; }

.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;
}

.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);
}

/* ---------- Directory Page (JS SPA) ---------- */
.directory-search-section {
  padding: 24px 0;
}

.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);
}

.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 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);
}

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

.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-control select {
  border: none;
  background: transparent;
  color: #1c213b;
  font-weight: 700;
  cursor: pointer;
}

.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-card {
  position: sticky;
  top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-2);
  background: #e6e6e6;
  min-height: 540px;
}

.slippy-map {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 540px;
}

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

@media (max-width: 1050px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
  .map-card {
    position: relative;
    top: auto;
    min-height: 360px;
  }
}

/* ---------- Community Detail Page (JS template) ---------- */
.community-page {
  padding: var(--space-6) 0;
}

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

.back-to-search {
  display: none;
}

.page-title-row h1 {
  font-family: "Montserrat", "Roboto Condensed", sans-serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 0;
  color: var(--color-navy-900);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.community-info-card {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-5);
  align-items: stretch;
}

.community-logo-box {
  flex-shrink: 0;
  width: 160px;
  min-height: 90px;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.community-logo-box img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.community-info-separator {
  width: 1px;
  background: var(--color-border-2);
  margin: 0 var(--space-4);
  align-self: stretch;
}

.community-details-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  padding: var(--space-2) 0;
}

.community-cta {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.media-two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  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;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.photo-badges img {
  height: 60px;
  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; }

.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", sans-serif;
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-3);
  color: var(--color-navy-900);
}

/* Accordion (JS-driven on community page) */
.accordion {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(28,33,59,0.10);
  padding: 18px;
}

.accordion-header {
  margin: 0 0 12px;
  font-weight: 900;
  font-size: 12px;
  color: #1c213b;
}

.acc-item {
  border-top: 1px solid var(--color-border-2);
}

.acc-item:first-child {
  border-top: none;
}

.acc-btn {
  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: 13px;
  color: #1c213b;
  gap: 12px;
}

.acc-btn:hover {
  color: var(--color-green);
}

.acc-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.acc-item.is-open .acc-icon {
  transform: rotate(180deg);
}

.acc-panel {
  padding: 0 0 14px;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}

@media (max-width: 1050px) {
  .media-two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------- States Page ---------- */
.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: #fff;
  padding: var(--space-6) 0;
  text-align: center;
  font-size: 13px;
  color: #5a5b5b;
}
.site-footer p { margin: 8px 0; }
.site-footer a { color: #333; text-decoration: underline; }
.site-footer a:hover { color: var(--color-green); }
.site-footer .et_pb_text p { color: #5a5b5b !important; }
.site-footer strong { color: #333; }

/* Hide JS loader section gap below footer */
.et_pb_section.js-loader { height: 0 !important; overflow: hidden !important; padding: 0 !important; margin: 0 !important; }

/* ---------- Divi Module Overrides ---------- */

/* Accordion Module */
.et_pb_accordion .et_pb_toggle {
  border: none !important;
  background: transparent !important;
}

.et_pb_accordion .et_pb_toggle_title {
  font-weight: 700 !important;
  font-size: 12px !important;
  color: #1c213b !important;
}

.et_pb_accordion .et_pb_toggle_content {
  font-size: 11px !important;
  color: #333 !important;
}

/* Testimonial Module */
.et_pb_testimonial {
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 16px !important;
  padding: 18px !important;
}

/* Tabs Module */
.et_pb_tabs .et_pb_tab_active {
  color: var(--color-green) !important;
}

.et_pb_tabs .et_pb_tabs_controls li.et_pb_tab_active a {
  color: var(--color-green) !important;
}

/* Text Module */
.et_pb_text p {
  padding-bottom: 0 !important;
}

.et_pb_text p:last-child {
  margin-bottom: 0 !important;
}

/* Button Module */
.et_pb_button {
  border: none !important;
}

/* ---------- Divi Layout Overrides ---------- */

/* Full-Width Sections */
.et_pb_section:has(.site-header),
.site-header-section {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding: 0 !important;
  background: transparent !important;
}

.et_pb_section:has(.site-header) .et_pb_row,
.site-header-section .et_pb_row {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Ensure dropdown extends beyond header without clipping */
.et_pb_section:has(.site-header),
.site-header-section {
  overflow: visible !important;
  z-index: 1000 !important;
}

.et_pb_section:has(.site-header) .et_pb_row .et_pb_column,
.site-header-section .et_pb_row .et_pb_column {
  overflow: visible !important;
}

.et_pb_code:has(.site-header),
.et_pb_code:has(.site-header) .et_pb_code_inner {
  overflow: visible !important;
}

/* Hero section Divi fixes */
.et_pb_section.hero .et_pb_row {
  padding-top: 60px !important;
  padding-bottom: 60px !important;
  position: relative !important;
  z-index: 2 !important;
}

.et_pb_section.hero .et_pb_column {
  overflow: visible !important;
}

.hero .et_pb_code_inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible !important;
}

/* Directory Page Layout Fixes */
.directory-search-section {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}

.directory-search-section .et_pb_row {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  text-align: center !important;
}

.directory-results-section .et_pb_row {
  display: block !important;
  width: 100% !important;
  max-width: var(--container) !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
}

.directory-search-section .et_pb_column,
.directory-results-section .et_pb_column {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

.search-bar-wrapper {
  display: inline-block !important;
  text-align: left !important;
  margin: 0 auto !important;
}

.directory-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 0 24px 0 !important;
}

/* Dark section text colors */
.section-muted,
.section--dark,
.et_pb_section.section-muted,
.et_pb_section.section--dark {
  background: var(--color-navy-900) !important;
  color: #fff !important;
}

.section-muted h2,
.section-muted h3,
.section--dark h2,
.section--dark h3 {
  color: var(--color-green) !important;
}

.section-muted p,
.section--dark p {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Mint section */
.section--mint {
  background: #8ccba1 !important;
}

/* HubSpot Form Styles (inline in page, keep here for consistency) */
.hs-form-wrapper { width: 100%; max-width: 100%; }
.hs-form-wrapper .hs-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.hs-form-wrapper .hs-form-row { display: flex; gap: 8px; width: 100%; }
.hs-form-wrapper .hs-form-row .hs-field { flex: 1; min-width: 0; }
.hs-form-wrapper .hs-field { width: 100%; }
.hs-form-wrapper .hs-field input,
.hs-form-wrapper .hs-field textarea,
.hs-form-wrapper .hs-field select {
  width: 100%; padding: 12px 14px; border: none; border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff; color: #374151;
  transition: box-shadow 0.2s; box-sizing: border-box;
}
.hs-form-wrapper .hs-field input:focus,
.hs-form-wrapper .hs-field textarea:focus,
.hs-form-wrapper .hs-field select:focus {
  outline: none; box-shadow: 0 0 0 2px rgba(62,168,98,0.3);
}
.hs-form-wrapper .hs-submit-btn {
  width: 100%; padding: 14px 24px; background: #3ea862; color: #fff; border: none;
  border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; margin-top: 8px;
}
.hs-form-wrapper .hs-submit-btn:hover { background: #2d8a4e; }
.hs-form-wrapper .hs-form-message {
  padding: 14px; border-radius: 4px; margin-top: 12px; text-align: center; display: none;
}
.hs-form-wrapper .hs-form-message.success { background: rgba(62,168,98,0.15); color: #3ea862; display: block; }
.hs-form-wrapper .hs-form-message.error { background: rgba(220,38,38,0.15); color: #dc2626; display: block; }

/* ---------- Responsive Styles ---------- */
@media (max-width: 1050px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
  .map-card {
    position: relative;
    top: auto;
    min-height: 360px;
  }
  .featured-grid,
  .testimonial-grid,
  .badge-grid,
  .badges-grid,
  .lead-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    height: auto;
    padding: var(--space-4) var(--space-5);
  }
}

@media (max-width: 768px) {
  .badge-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hs-form-wrapper .hs-form-row { flex-direction: column; }
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
  }
  .brand-badge {
    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;
  }
}

/* =========================================================
   Directory Page - Search Bar & Filters (New Design)
   Added for Visual Builder compatibility
   ========================================================= */

/* Search filter container - centers everything */
.search-filter-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  z-index: 100;
}

/* Search bar wrapper - the main centered element */
.search-bar-wrapper {
  display: flex !important;
  align-items: center;
  gap: 12px;
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
  width: auto !important;
}

/* Input pill with location and zip */
.search-input-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 2px solid var(--color-border-2);
  border-radius: var(--radius-pill);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(28,32,58,0.06);
}

.search-field {
  padding: 14px 20px;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--color-text);
}

.search-field::placeholder {
  color: #9ca3af;
}

.search-field--location {
  min-width: 200px;
  border-right: 1px solid var(--color-border-2);
  position: relative;
}

.search-field--location.has-location {
  padding-left: 32px;
}

.location-indicator {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-green);
  display: none;
  pointer-events: none;
}

.location-indicator svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.search-field--location.has-location + .location-indicator,
.location-wrapper.has-location .location-indicator {
  display: block;
}

.location-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.location-wrapper .search-field--location {
  width: 100%;
}

.search-field--radius {
  width: 110px;
  padding: 14px 12px;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

/* Dark circular buttons */
.search-btn,
.filter-toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-navy-900);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.search-btn:hover,
.filter-toggle-btn:hover {
  background: #2a2f4d;
  transform: scale(1.05);
}

.search-btn svg,
.filter-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.filter-toggle-btn.active {
  background: var(--color-green);
}

/* Filter panel - HIDDEN by default, positioned as dropdown */
.filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(28,32,58,0.12);
  min-width: 520px;
  z-index: 50;
}

.filter-panel.open {
  display: block;
}

.filter-panel-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy-900);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-panel-header svg {
  width: 18px;
  height: 18px;
}

/* Care type pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-pill {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}

.filter-pill:hover {
  transform: scale(1.03);
}

.filter-pill.active {
  border-color: var(--color-navy-900);
}

.filter-pill--all { background: var(--chip-all); color: #1c213b; }
.filter-pill--assisted { background: var(--chip-assisted); color: #1c213b; }
.filter-pill--memory { background: var(--chip-memory); color: #1c213b; }
.filter-pill--independent { background: var(--chip-independent); color: #1c213b; }
.filter-pill--lifeplan { background: var(--chip-lifeplan); color: #1c213b; }
.filter-pill--ccrc { background: var(--chip-ccrc); color: #fff; }

/* Rating slider */
.filter-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-slider-label {
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
  font-weight: 500;
}

.filter-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--color-star) 0%, var(--color-star) var(--slider-percent, 0%), #e5e7eb var(--slider-percent, 0%), #e5e7eb 100%);
  cursor: pointer;
}

.filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-star);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.filter-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-star);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.filter-slider-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy-900);
  min-width: 32px;
  text-align: right;
}

/* Active filter indicator badge */
.filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.filter-badge.show {
  display: flex;
}

/* Legacy compatibility */
.location-status {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 8px;
  display: none;
}

/* =========================================================
   Directory Page - Card Variant
   ========================================================= */

.community-card--directory {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.community-card--directory .media {
  position: relative;
  height: 200px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  overflow: hidden;
}

.community-card--directory .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card--directory .media img.placeholder-img {
  opacity: 0;
}

.community-card--directory .media-badges {
  position: absolute;
  right: 8px;
  bottom: 0;
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.community-card--directory .media-badges img {
  height: 58px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.community-card--directory .favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.community-card--directory .favorite-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #666;
  stroke-width: 2;
}

.community-card--directory .favorite-btn.active svg {
  fill: #e53935;
  stroke: #e53935;
}

.community-card--directory .content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.community-card--directory .title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.community-card--directory .title-row h3 {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1c213b;
  margin: 0;
}

.community-card--directory .verified-pill {
  height: 18px;
  width: auto;
  flex-shrink: 0;
}

.community-card--directory .meta {
  font-size: 11px;
  color: #8e909d;
  margin: 0;
  line-height: 1.3;
}

.community-card--directory .distance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-green);
  font-weight: 600;
}

.community-card--directory .distance-badge svg {
  width: 12px;
  height: 12px;
}

.community-card--directory .rating-row--google {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.community-card--directory .stars--blue svg {
  width: 12px;
  height: 12px;
  fill: var(--color-star);
}

.community-card--directory .rating-num {
  font-weight: 700;
  color: #1c213b;
}

.community-card--directory .reviews-link {
  color: var(--color-muted);
  font-size: 10px;
  text-decoration: none;
}

.community-card--directory .review-snippet {
  font-size: 11px;
  color: #666;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.community-card--directory .learn-more {
  font-size: 11px;
  color: var(--color-green);
  text-decoration: none;
  font-weight: 600;
}

.community-card--directory .learn-more:hover {
  text-decoration: underline;
}

.community-card--directory .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.community-card--directory .tag {
  background: var(--chip-all);
  color: #1c213b;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.community-card--directory .tag-more {
  background: transparent;
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 600;
  padding: 4px 0;
}

.community-card--directory .card-actions {
  margin-top: auto;
  padding-top: 8px;
}

.community-card--directory .card-actions .btn-full {
  width: 100%;
  justify-content: center;
}

/* =========================================================
   Home Page - Hero Card (New Gradient Design)
   ========================================================= */

.hero-card {
  margin: 0 auto;
  background: linear-gradient(145deg, #3d4470 0%, #2a2f52 50%, #1c203a 100%);
  color: #fff;
  border-radius: 28px;
  padding: 50px 55px 55px;
  max-width: 600px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05) inset;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(62, 168, 98, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-green), var(--color-mint), var(--color-green));
}

.hero-card__badge {
  background: linear-gradient(135deg, #4aba72 0%, #2f8f52 100%);
  color: #fff;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 18px 40px;
  border-radius: 14px;
  display: inline-block;
  margin-bottom: 28px;
  box-shadow: 0 8px 25px rgba(62, 168, 98, 0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative;
  z-index: 1;
}

/* =========================================================
   Home Page - Badge Cards Section
   ========================================================= */

.badge-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.badge-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.badge-card__content {
  flex: 1;
  padding: 0 30px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-card__image {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 24px;
}

.badge-card__image img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.badge-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 12px;
  text-align: center;
}

.badge-card__desc {
  font-size: 13px;
  line-height: 1.7;
  color: #555;
  margin: 0;
  text-align: center;
}

@media (max-width: 800px) {
  .badge-cards {
    grid-template-columns: 1fr;
    max-width: 450px;
  }
  .hero-card {
    max-width: 95%;
    padding: 24px 20px 28px;
    margin-top: 24px;
  }
}

/* Badge Cards - Native Divi Blurb Module Styling */
.badge-cards-row {
  gap: 40px;
}
.badge-cards-row .et_pb_column {
  display: flex;
}
.et_pb_blurb.badge-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
  padding: 0;
  flex: 1;
}
.et_pb_blurb.badge-card .et_pb_blurb_content {
  padding: 0 30px 30px;
}
.et_pb_blurb.badge-card .et_pb_main_blurb_image {
  margin-bottom: 0;
}
.et_pb_blurb.badge-card .et_pb_main_blurb_image img {
  max-height: 280px;
  width: auto;
  object-fit: contain;
}
.et_pb_blurb.badge-card .et_pb_module_header {
  font-size: 15px !important;
  font-weight: 700;
  color: #d4a84b !important;
  margin-bottom: 12px;
  padding-bottom: 0;
}
.et_pb_blurb.badge-card .et_pb_blurb_description {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}
.et_pb_blurb.badge-card .et_pb_blurb_description p {
  margin: 0;
}
@media (max-width: 800px) {
  .badge-cards-row .et_pb_column {
    margin-bottom: 24px;
  }
}

/* =========================================================
   Home Page - Featured Card Styles
   ========================================================= */

.community-card--featured {
  background: #fff;
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.community-card--featured .media {
  position: relative;
  height: 180px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  overflow: hidden;
}

.community-card--featured .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card--featured .media img.placeholder-img {
  opacity: 0;
}

.community-card--featured .media-badges {
  position: absolute;
  right: 8px;
  bottom: 0;
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.community-card--featured .media-badges img {
  height: 50px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.community-card--featured .content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.community-card--featured .content h3 {
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin: 0;
}

.community-card--featured .content h3 a {
  color: inherit;
  text-decoration: none;
}

.community-card--featured .content h3 a:hover {
  color: var(--color-green);
}

.community-card--featured .meta {
  font-size: 11px;
  color: #8e909d;
  margin: 0;
  line-height: 1.3;
}

.community-card--featured .featured-careline {
  font-size: 11px;
  color: var(--color-green);
  font-weight: 600;
  margin: 0;
}

.community-card--featured .featured-excerpt {
  font-size: 12px;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.community-card--featured .featured-excerpt a {
  color: var(--color-green);
  text-decoration: none;
  font-weight: 600;
}

.community-card--featured .favorite-btn {
  color: #999;
  transition: color 0.2s;
}

.community-card--featured .favorite-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.community-card--featured .favorite-btn.active {
  color: #e53935;
}

.community-card--featured .favorite-btn.active svg {
  fill: #e53935;
}

/* Security row for featured cards */
.security-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8e909d;
  margin-top: 8px;
}

.security-row .stars {
  margin-left: 4px;
}

/* =========================================================
   Community Page - Detail Styles
   ========================================================= */

.address {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
  font-size: 14px;
  margin-top: 8px;
}

.address-icon {
  flex-shrink: 0;
}

/* Care types chips */
.care-types-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--space-3) 0;
}

/* Rating */
.rating-row--google {
  margin-bottom: var(--space-3);
}

.rating-num {
  font-weight: 700;
  color: var(--color-text);
}

.reviews-link {
  color: var(--color-green);
  text-decoration: none;
}

.reviews-link:hover {
  text-decoration: underline;
}

/* Community info card */
.community-logo {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
  margin-right: var(--space-4);
}

.logo-placeholder {
  width: 80px;
  height: 80px;
  background: var(--color-navy-700);
  border-radius: var(--radius-sm);
  margin-right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
}

.community-contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.contact-item {
  font-size: 14px;
  color: var(--color-text);
}

.contact-item a {
  color: var(--color-green);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Gallery */
.gallery-main-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
}

.gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
}

/* Living Options & Amenities Sections */
.community-sections {
  margin-top: var(--space-5);
}

.content-card {
  margin-bottom: var(--space-5);
}

.content-card h3 {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--color-navy-900);
  margin: 0 0 var(--space-3);
}

.content-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: var(--space-2);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
}

.content-card li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--color-green);
  font-weight: bold;
}

.amenities-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amenity-pill {
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.care-types-row--redesign {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--space-3) 0;
}

.care-types-row--redesign .tag {
  background: var(--chip-all);
  color: #1c213b;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.rating-row--redesign {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: var(--space-3);
}

.rating-row--redesign .rating-num {
  font-weight: 700;
  color: var(--color-text);
  font-size: 14px;
}

.rating-row--redesign .stars svg {
  width: 14px;
  height: 14px;
  fill: var(--color-star);
}

.rating-row--redesign .reviews-link {
  color: var(--color-green);
  text-decoration: none;
  font-size: 13px;
}

/* Review snippet */
.review-snippet {
  font-style: italic;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 var(--space-4) 0;
  padding-left: 12px;
  border-left: 3px solid var(--color-green);
}

/* =========================================================
   Directory Page - Responsive Overrides
   ========================================================= */

@media (max-width: 768px) {
  .filter-panel {
    min-width: calc(100vw - 48px);
    left: 50%;
    right: auto;
  }
  .search-field--location {
    min-width: 140px;
  }
  .search-field--radius {
    width: 95px;
  }
}

@media (max-width: 600px) {
  .search-field {
    padding: 12px 14px;
    font-size: 14px;
  }
  .search-field--location {
    min-width: 100px;
  }
  .search-field--radius {
    width: 85px;
    font-size: 13px;
  }
  .search-btn,
  .filter-toggle-btn {
    width: 42px;
    height: 42px;
  }
  .filter-panel {
    padding: 16px;
    min-width: calc(100vw - 32px);
  }
  .filter-pills {
    gap: 6px;
  }
  .filter-pill {
    padding: 8px 12px;
    font-size: 11px;
  }
  .community-cta {
    flex-direction: column;
  }
}
