/* ============================================================
   article-layout.css
   Shared styles for all /new-york-law/ article pages.
   Include with: <link rel="stylesheet" href="../src/article-layout.css" />
   ============================================================ */

body {
  overflow-x: hidden;
}

/* ── Two-column page layout ─────────────────────────────────── */
.page-layout {
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .page-layout {
    flex-direction: row;
    align-items: flex-start;
    max-width: 1300px;
    gap: 0;
  }

  .article-main {
    width: 58%;
    flex-shrink: 0;
    min-width: 0;
  }

  .article-sidebar {
    width: 42%;
    flex-shrink: 0;
  }

  .sidebar-inner {
    padding-left: 2rem;
  }
}

@media (max-width: 767px) {
  .sidebar-inner {
    display: flex;
    flex-direction: column;
  }

  .sidebar-contact-card {
    order: 10;
  }
}

/* ── Article hero ───────────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 60%, #374151 100%);
}

.article-hero .img-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.08)
  );
  pointer-events: none;
}

.article-hero .hero-text {
  top: 34%;
}

/* ── Sidebar card (shared wrapper for all sidebar sections) ── */
.sidebar-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ed533d;
}

@media (min-width: 768px) {
  .sidebar-card {
    padding: 2rem;
  }
}

@media (max-width: 767px) {
  .sidebar-card {
    padding: 1.25rem 1.1rem;
  }
}

/* Neutralise sections.css padding/margin overrides when inside a card */
.sidebar-card .sidebar-results {
  padding: 0 !important;
  margin-top: 0 !important;
}

.sidebar-card .sidebar-reviews-section {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: auto !important;
  border-radius: 8px !important;
}

/* ── Callout boxes ──────────────────────────────────────────── */
.callout-box {
  background: #f9fafb;
  border-left: 4px solid #ed533d;
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.callout-box.callout-dark {
  background: #1f2937;
  border-left-color: #ed533d;
  color: #f3f4f6;
}

.callout-box.callout-dark strong,
.callout-box.callout-dark p,
.callout-box.callout-dark li {
  color: #f3f4f6;
}

@media (max-width: 767px) {
  .callout-box {
    padding: 1rem 1.1rem;
    margin-left: 0;
    margin-right: 0;
  }
}

/* ── Table of contents ──────────────────────────────────────── */
.toc-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .toc-nav {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1.5rem;
  }
}

.toc-link {
  color: #ed533d;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.toc-link:hover {
  color: #c0392b;
  background-color: #fff5f3;
  padding-left: 1rem;
}

/* ── Stat grid ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.875rem 0.75rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ed533d;
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
  line-height: 1.3;
}

/* ── FAQ accordion ──────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-item:first-child {
  border-top: 1px solid #e5e7eb;
}

.faq-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

.faq-toggle:hover {
  color: #ed533d;
}

.faq-toggle-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.faq-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: #ed533d;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-body {
  display: none;
  padding: 0 1.25rem 1rem 1.25rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.open .faq-body {
  display: block;
}

/* ── Hide native scrollbar (replaced by custom fixed-size one) ── */
.ny-law-articles-wrapper::-webkit-scrollbar,
.ny-locations-wrapper::-webkit-scrollbar {
  display: none;
}

/* ── Hide desktop-only sidebar cards on mobile ──────────────── */
@media (max-width: 767px) {
  .sidebar-desktop-only {
    display: none !important;
  }
}

/* ── CTA button full-width (mobile) ─────────────────────────── */
@media (max-width: 767px) {
  .cta-btn-full {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}
