/* ============================================================
   LIVEAIWIRE — CUSTOM THEME
   Palette: #0A0A0A (near-black), #FFFFFF (white),
            #CC2200 (red accent), #1A1A1A (card bg),
            #B0B0B0 (muted text), #F5F5F5 (light bg)
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #F5F5F5;
  color: #0A0A0A;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #CC2200; outline-offset: 2px; }

main, article, section, div { margin: 0; }

/* --- CONTAINER (used only for header/footer/article pages) --- */
.law-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */
.law-header {
  background: #0A0A0A;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #CC2200;
}

.law-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.law-logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.law-logo__img {
  height: 48px;
  width: auto;
  display: block;
}

.law-logo__img--footer {
  height: 36px;
}

.law-logo__text {
  font-size: 1.7rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1;
}

.law-logo__text span { color: #CC2200; }

.law-logo__tagline {
  font-size: 0.65rem;
  color: #B0B0B0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

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

.law-nav a {
  color: #B0B0B0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.law-nav a:hover { color: #FFFFFF; background: #1A1A1A; }

.law-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #B0B0B0;
  padding: 8px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
  margin-left: 8px;
}

.law-search-btn:hover { color: #FFFFFF; }

.law-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.law-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   HERO CAROUSEL — full viewport width, no container
   ============================================================ */
.law-carousel {
  position: relative;
  background: #0A0A0A;
  width: 100%;
  height: calc(100vh - 76px);
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
}

.law-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.law-carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.law-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Image panel — left 55% */
.law-carousel__image-wrap {
  flex: 0 0 55%;
  position: relative;
  overflow: hidden;
}

.law-carousel__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Text panel — right 45% — fills ALL vertical space */
.law-carousel__text {
  flex: 0 0 45%;
  background: #0A0A0A;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px;
  border-left: 1px solid #1A1A1A;
}

.law-carousel__cat {
  display: inline-block;
  background: #CC2200;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  margin-bottom: 24px;
  width: fit-content;
}

.law-carousel__title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.law-carousel__title a { color: inherit; }
.law-carousel__title a:hover { color: #CC2200; }

.law-carousel__excerpt {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: #B0B0B0;
  line-height: 1.7;
  margin-bottom: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.law-carousel__meta {
  font-size: 0.8rem;
  color: #999999;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.law-carousel__meta time { color: #B0B0B0; }

.law-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #CC2200;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  width: fit-content;
  transition: background 0.15s;
}

.law-btn:hover { background: #AA1800; color: #FFFFFF; }
.law-btn svg { transition: transform 0.15s; }
.law-btn:hover svg { transform: translateX(3px); }

/* Carousel controls */
.law-carousel__controls {
  position: absolute;
  bottom: 28px;
  right: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}

.law-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #444;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.law-carousel__dot.is-active {
  background: #CC2200;
  transform: scale(1.35);
}

.law-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  border: 1px solid #333;
  color: #FFFFFF;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s, border-color 0.15s;
  opacity: 0.85;
}

.law-carousel__arrow:hover { background: #CC2200; border-color: #CC2200; opacity: 1; }
.law-carousel__arrow--prev { left: 16px; }
.law-carousel__arrow--next { right: 16px; }

/* Progress bar */
.law-carousel__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #CC2200;
  width: 0%;
  transition: width linear;
  z-index: 10;
}

/* ============================================================
   ARTICLE BLOCKS — full viewport width, edge to edge
   No container, no side padding, no gaps between blocks
   ============================================================ */
.law-feed {
  width: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

.law-block {
  width: 100%;
  display: block;
  border-top: 1px solid #DDDDE0;
  margin: 0;
  padding: 0;
}

.law-block:first-child {
  border-top: none;
}

/* Lead story — full width, fixed height to match carousel feel */
.law-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 480px;
  margin: 0;
}

.law-lead--flipped .law-lead__image-wrap { order: 2; }
.law-lead--flipped .law-lead__text       { order: 1; }

.law-lead__image-wrap {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.law-lead__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.law-lead:hover .law-lead__image-wrap img { transform: scale(1.03); }

.law-lead__text {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #FFFFFF;
  height: 100%;
}

.law-cat-label {
  display: inline-block;
  background: #CC2200;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  margin-bottom: 16px;
  width: fit-content;
}

.law-lead__title {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #0A0A0A;
}

.law-lead__title a:hover { color: #CC2200; }

.law-lead__excerpt {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.law-meta {
  font-size: 0.75rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.law-meta__author { font-weight: 600; color: #555; }
.law-meta__sep { color: #CCC; }

.law-btn--lead {
  margin-top: 24px;
}

/* 4-up grid — full width, no gaps */
.law-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid #DDDDE0;
  line-height: 0;
}

.law-card {
  background: #FFFFFF;
  overflow: hidden;
  border-right: 1px solid #DDDDE0;
  display: flex;
  flex-direction: column;
  line-height: normal;
}

.law-card:last-child { border-right: none; }

.law-card__image-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.law-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.law-card:hover .law-card__image-wrap img { transform: scale(1.04); }

.law-card__body { padding: 18px 20px 22px; }

.law-card__cat {
  font-size: 0.62rem;
  font-weight: 700;
  color: #CC2200;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.law-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: #0A0A0A;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.law-card__title a:hover { color: #CC2200; }

.law-card__excerpt {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.law-card__date {
  font-size: 0.7rem;
  color: #999;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.law-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 36px 20px 24px;
}

.law-pagination a,
.law-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #DDD;
  background: #FFFFFF;
  color: #0A0A0A;
  transition: all 0.15s;
}

.law-pagination a:hover { background: #0A0A0A; color: #FFFFFF; border-color: #0A0A0A; }
.law-pagination .current { background: #CC2200; color: #FFFFFF; border-color: #CC2200; }

/* ============================================================
   FOOTER
   ============================================================ */
.law-footer {
  background: #0A0A0A;
  border-top: 2px solid #CC2200;
  padding: 40px 0 28px;
}

.law-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}

.law-footer__brand .law-logo__text { font-size: 1.2rem; }

.law-footer__tagline {
  font-size: 0.78rem;
  color: #999999;
  margin-top: 8px;
  line-height: 1.5;
}

.law-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.law-footer__nav a {
  font-size: 0.8rem;
  color: #B0B0B0;
  transition: color 0.15s;
}

.law-footer__nav a:hover { color: #FFFFFF; }

.law-footer__nav-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CC2200;
  margin-bottom: 4px;
}

.law-footer__copy {
  border-top: 1px solid #1A1A1A;
  padding-top: 20px;
  font-size: 0.73rem;
  color: #555;
  text-align: center;
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.law-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.law-search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.law-search-overlay__inner { width: 100%; max-width: 640px; padding: 0 20px; }

.law-search-overlay__form {
  display: flex;
  border-bottom: 2px solid #CC2200;
}

.law-search-overlay__input {
  flex: 1;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #FFFFFF;
  padding: 12px 0;
  outline: none;
  font-family: inherit;
}

.law-search-overlay__input::placeholder { color: #444; }

.law-search-overlay__submit {
  background: none;
  border: none;
  color: #CC2200;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
}

.law-search-overlay__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #888;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.law-search-overlay__close:hover { color: #FFFFFF; }

/* ============================================================
   VISUALLY HIDDEN SEO H1
   ============================================================ */
.law-seo-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .law-grid { grid-template-columns: repeat(2, 1fr); }
  .law-carousel__text { padding: 40px 44px; }
  .law-lead { height: 420px; }
  .law-lead__text { padding: 36px 40px; }
}

@media (max-width: 768px) {
  .law-nav { display: none; }
  .law-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #0A0A0A;
    padding: 16px;
    border-bottom: 2px solid #CC2200;
    gap: 2px;
    z-index: 999;
  }
  .law-nav.is-open a { padding: 10px 12px; border-radius: 4px; }
  .law-mobile-toggle { display: flex; }

  /* Mobile carousel stacks */
  .law-carousel {
    height: auto;
    max-height: none;
    min-height: auto;
  }
  .law-carousel__slide {
    flex-direction: column;
    position: relative;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }
  .law-carousel__slide.is-active { display: flex; }
  .law-carousel__image-wrap { flex: none; aspect-ratio: 16/9; width: 100%; }
  .law-carousel__text { flex: none; padding: 28px 24px 36px; }
  .law-carousel__controls { position: static; width: 100%; padding: 16px 0; }
  .law-carousel__arrow { display: none; }

  /* Mobile blocks stack */
  .law-lead { grid-template-columns: 1fr; height: auto; }
  .law-lead--flipped .law-lead__image-wrap { order: 0; }
  .law-lead--flipped .law-lead__text { order: 0; }
  .law-lead__image-wrap { aspect-ratio: 16/9; height: auto; }
  .law-lead__text { height: auto; padding: 24px 20px; }

  .law-grid { grid-template-columns: repeat(2, 1fr); }
  .law-card { border-right: none; border-bottom: 1px solid #DDDDE0; }

  .law-footer__inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .law-grid { grid-template-columns: 1fr; }
  .law-carousel__title { font-size: 1.5rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .law-carousel__slide { transition: none; }
  .law-carousel__progress { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
