/* ============================================================
   SERVICE AREA PAGE TEMPLATE CSS - Davidson Law Offices
   /_templates/service-area.html
   All values use design tokens from /css/base.css
   NOTE: No background-image on .location-hero - set via inline
         style in the template so each city uses its own image.
============================================================ */

/* ========================
   HERO SECTION
======================== */
.location-hero {
  /* background-image is set via inline style in the template HTML */
  background-color: var(--color-secondary); /* fallback */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: var(--space-24) var(--section-padding-x);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Subtle dot-grid texture over the image */
.location-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.location-hero .container {
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.location-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.location-breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.location-breadcrumb a:hover {
  color: var(--color-accent);
}

.location-breadcrumb span[aria-current="page"] {
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
}

/* Accent line in hero */
.location-hero .accent-line {
  background: var(--color-accent);
  margin: 0 auto var(--space-5);
}

/* Heading */
.location-hero h1 {
  color: #fff;
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Subtitle */
.location-hero p {
  color: rgba(255,255,255,0.85);
  font-size: var(--font-size-lg);
  max-width: 620px;
  margin: 0 auto var(--space-8);
  line-height: var(--line-height-relaxed);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* CTA button row */
.location-hero-btns {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================
   LOCAL CONTEXT SECTION
======================== */
.location-context {
  background: var(--color-bg);
}

/* Default: text left (3fr), image right (2fr) */
.location-context-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-16);
  align-items: start;
}

/* image-left modifier: image first (2fr), text second (3fr) */
.location-context-inner.image-left {
  grid-template-columns: 2fr 3fr;
}

/* Text column */
.location-context-text .section-label {
  margin-bottom: var(--space-3);
}

.location-context-text h2 {
  margin-bottom: var(--space-4);
}

.location-context-text .accent-line {
  margin-bottom: var(--space-6);
}

.location-context-text p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

/* Image column */
.location-context-image {
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-8));
  margin: 0; /* reset figure margin */
}

.location-context-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--img-radius);
  display: block;
}

.location-context-image figcaption {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-3);
  font-style: italic;
}

/* ========================
   SERVICES SECTION
======================== */
.location-services {
  background: var(--color-bg-secondary);
}

.location-services .section-label,
.location-services h2 {
  text-align: center;
}

.location-services .accent-line {
  margin: var(--space-3) auto var(--space-10);
}

/* 3-column grid, 2 rows = 6 cards */
.location-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

/* Individual service card */
.location-service-card {
  background: var(--color-bg);
  border: var(--card-border);
  border-top: 3px solid transparent;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all var(--duration-normal) var(--ease-default);
}

.location-service-card:hover {
  border-top-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Square icon block */
.location-service-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.location-service-icon svg {
  width: 22px;
  height: 22px;
}

.location-service-card h3 {
  font-size: var(--font-size-lg);
  margin: 0;
}

.location-service-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
  flex: 1;
  line-height: var(--line-height-relaxed);
}

/* "Learn More" link */
.location-service-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-decoration: none;
  margin-top: auto;
  transition: gap var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
}

.location-service-link:hover {
  color: var(--color-primary-dark);
  gap: var(--space-3);
}

.location-service-link svg {
  width: 14px;
  height: 14px;
}

/* ========================
   WHY CHOOSE SECTION
======================== */
.location-why {
  background: var(--color-secondary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Blob is positioned via the shared .blob classes;
   these rules add its placement inside this section */
.location-why .blob {
  top: -100px;
  right: -100px;
}

.location-why .container {
  position: relative;
  z-index: 1;
}

.location-why h2 {
  color: #fff;
  text-align: center;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.location-why .accent-line {
  background: var(--color-accent);
  margin: 0 auto var(--space-10);
}

/* 2-column grid for the 4 reasons */
.location-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

/* Each reason row: icon + text */
.location-why-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

/* Square icon block, semi-transparent on the dark bg */
.location-why-icon {
  width: 48px;
  height: 48px;
  background: rgba(44, 129, 46, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}

.location-why-icon svg {
  width: 22px;
  height: 22px;
}

.location-why-item h4 {
  color: #fff;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

.location-why-item p {
  color: rgba(255,255,255,0.75);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* ========================
   FAQ SECTION
======================== */
.location-faq {
  background: var(--color-bg);
}

.location-faq .section-label,
.location-faq h2 {
  text-align: center;
}

.location-faq .accent-line {
  margin: var(--space-3) auto 0;
}

/* Accordion styles are defined in /css/components.css.
   These rules handle FAQ-specific layout adjustments only. */
.location-faq .accordion {
  /* max-width and margin are set via inline style in the template
     so they don't need to be repeated here, but we reinforce them */
  width: 100%;
}

/* ========================
   CTA SECTION
======================== */
.location-cta {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle decorative circle */
.location-cta::before {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 320px;
  height: 320px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  pointer-events: none;
  z-index: 0;
}

.location-cta .container {
  position: relative;
  z-index: 1;
}

.location-cta h2 {
  color: #fff;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.location-cta p {
  color: rgba(255,255,255,0.9);
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: var(--line-height-relaxed);
}

/* Button row */
.location-cta-btns {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

/* Contact detail row */
.location-cta-details {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
}

.location-cta-detail {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.8);
}

.location-cta-detail svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* ========================
   RESPONSIVE
======================== */

/* Tablet: stack context columns */
@media (max-width: 1024px) {
  .location-context-inner,
  .location-context-inner.image-left {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  /* Un-stick the image when stacked */
  .location-context-image {
    position: static;
  }

  /* Ensure correct source order when stacked:
     image-left pages render image first in DOM, which is correct for mobile */
}

/* Large mobile: collapse from 3-col to 2-col on service grid */
@media (max-width: 768px) {
  .location-hero h1 {
    font-size: var(--font-size-4xl);
  }

  .location-hero p {
    font-size: var(--font-size-base);
  }

  .location-hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .location-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-why-grid {
    grid-template-columns: 1fr;
  }

  .location-cta-details {
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }
}

/* Small mobile: single-column service cards */
@media (max-width: 480px) {
  .location-hero h1 {
    font-size: var(--font-size-3xl);
  }

  .location-hero-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .location-services-grid {
    grid-template-columns: 1fr;
  }

  .location-cta-btns {
    flex-direction: column;
    align-items: center;
  }

  .location-cta-btns .btn {
    width: 100%;
    justify-content: center;
  }
}
