/* ============================================================
   BuscaVenezuela — Registro de Personas Desaparecidas
   Terremoto Venezuela · Mobile-first · Dark Theme
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------- */
:root {
  /* ---- Palette: Dark Background ---- */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-tertiary:   #1a1a26;
  --bg-card:       #161622;
  --bg-card-hover: #1e1e30;

  /* ---- Palette: Venezuelan Flag Accents ---- */
  --flag-yellow:   #FFCC00;
  --flag-blue:     #0033A0;
  --flag-red:      #CE1126;

  /* ---- Palette: Semantic ---- */
  --whatsapp-green: #25D366;
  --success:        #2ecc71;
  --warning:        #f39c12;
  --error:          #e74c3c;

  /* ---- Palette: Text ---- */
  --text-primary:    #e8e8ec;
  --text-secondary:  #a0a0b0;
  --text-muted:      #6a6a7a;
  --text-on-accent:  #0a0a0f;

  /* ---- Palette: Borders & Dividers ---- */
  --border-color:    #2a2a3a;
  --border-light:    #333348;

  /* ---- Ad Placeholder ---- */
  --ad-bg:      #1c1c28;
  --ad-border:  #3a3a4a;
  --ad-text:    #5a5a6a;

  /* ---- Typography ---- */
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial,
                sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono:  "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
                Menlo, Courier, monospace;

  /* ---- Spacing Scale (4px base) ---- */
  --space-1:  0.25rem;   /*  4px */
  --space-2:  0.5rem;    /*  8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.5rem;    /* 24px */
  --space-6:  2rem;      /* 32px */
  --space-7:  3rem;      /* 48px */
  --space-8:  4rem;      /* 64px */
  --space-9:  6rem;      /* 96px */

  /* ---- Radii ---- */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* ---- Shadows ---- */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.6);
  --shadow-glow-yellow: 0 0 20px rgba(255,204,0,0.15);
  --shadow-glow-blue:   0 0 20px rgba(0,51,160,0.2);

  /* ---- Transitions ---- */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* ---- Layout ---- */
  --max-width:     1200px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--flag-yellow);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: #ffda33;
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 4vw, 2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  max-width: 70ch;
}

.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-small  { font-size: 0.875rem; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* ----------------------------------------------------------
   Layout: Container
   ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* ----------------------------------------------------------
   Header / Navbar
   ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
}

.site-logo .logo-stripe {
  display: inline-block;
  width: 4px;
  height: 24px;
  border-radius: 2px;
}

.site-logo .logo-stripe--yellow { background: var(--flag-yellow); }
.site-logo .logo-stripe--blue   { background: var(--flag-blue); }
.site-logo .logo-stripe--red    { background: var(--flag-red); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  text-decoration: none;
}

/* ----------------------------------------------------------
   Hero Section (index.html)
   ---------------------------------------------------------- */
.hero {
  padding: var(--space-7) 0 var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%,
      rgba(255, 204, 0, 0.06) 0%,
      transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 80%,
      rgba(0, 51, 160, 0.08) 0%,
      transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 60%,
      rgba(206, 17, 38, 0.05) 0%,
      transparent 70%);
  pointer-events: none;
}

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

.hero-title {
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 800;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-title .accent-yellow { color: var(--flag-yellow); }
.hero-title .accent-blue   { color: #4d7cff; }
.hero-title .accent-red    { color: var(--flag-red); }

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

/* ---- Hero CTA Buttons ---- */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

/* ---- Hero Search Bar ---- */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.hero-search:focus-within {
  border-color: var(--flag-yellow);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12), var(--shadow-glow-yellow);
}

.hero-search__icon {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-left: var(--space-3);
  margin-right: var(--space-2);
  transition: color var(--transition-normal);
}

.hero-search:focus-within .hero-search__icon {
  color: var(--flag-yellow);
}

.hero-search__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  padding: var(--space-3) var(--space-2);
  min-width: 0;
}

.hero-search__input::placeholder {
  color: var(--text-muted);
  font-size: 1rem;
}

.hero-search__btn {
  flex-shrink: 0;
  background: var(--flag-red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: var(--space-3) var(--space-5);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.hero-search__btn:hover {
  background: #e0152b;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(206, 17, 38, 0.4);
}

.hero-search__btn:active {
  transform: translateY(0);
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--flag-yellow);
  outline-offset: 2px;
}

/* Primary — Reportar desaparecido (red, urgent) */
.btn-primary {
  background: var(--flag-red);
  color: #fff;
  border-color: var(--flag-red);
}

.btn-primary:hover {
  background: #e0152b;
  border-color: #e0152b;
  box-shadow: 0 4px 20px rgba(206, 17, 38, 0.35);
}

/* Secondary — Estoy bien (blue, reassuring) */
.btn-secondary {
  background: var(--flag-blue);
  color: #fff;
  border-color: var(--flag-blue);
}

.btn-secondary:hover {
  background: #003db8;
  border-color: #003db8;
  box-shadow: 0 4px 20px rgba(0, 51, 160, 0.35);
}

/* Outline variant */
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

/* WhatsApp share button */
.btn-whatsapp {
  background: var(--whatsapp-green);
  color: #fff;
  border-color: var(--whatsapp-green);
}

.btn-whatsapp:hover {
  background: #20b858;
  border-color: #20b858;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

/* Large variant */
.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Small variant */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Full width on mobile */
.btn-block {
  width: 100%;
}

/* ----------------------------------------------------------
   Section Titles
   ---------------------------------------------------------- */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: var(--space-2);
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--flag-yellow),
    var(--flag-blue),
    var(--flag-red)
  );
}

/* ----------------------------------------------------------
   Cards
   ---------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   MISSING PERSONS CAROUSEL (index.html)
   Netflix-style horizontal scroll with scroll-snap
   ============================================================ */
.carousel-section {
  padding: var(--space-4) 0 var(--space-6);
}

.carousel-section .section-title {
  padding-left: 0;
}

.carousel-section__empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: var(--space-6) 0;
}

.carousel {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: var(--space-2) 0 var(--space-4);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

/* Each card takes predictable width, snaps into place */
.carousel-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal),
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.carousel-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.carousel-card:focus-visible {
  outline: 2px solid var(--flag-yellow);
  outline-offset: 2px;
}

/* Photo / Avatar area */
.carousel-card__photo {
  width: 100%;
  height: 180px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.carousel-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, #202040 100%);
}

.carousel-card__initials {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

/* Status badge overlaid on photo */
.carousel-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(206, 17, 38, 0.9);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
}

/* Card body below photo */
.carousel-card__body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.carousel-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.carousel-card__meta svg {
  flex-shrink: 0;
}

/* ============================================================
   Person result card (buscar.html)
   ============================================================ */
.person-card {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.person-card__photo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  object-fit: cover;
  overflow: hidden;
}

.person-card__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.person-card__info {
  flex: 1;
  min-width: 0;
}

.person-card__name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.person-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.person-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.person-card__status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.person-card__status--missing {
  background: rgba(206, 17, 38, 0.15);
  color: var(--flag-red);
}

.person-card__status--found {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}

.person-card__status--unknown {
  background: rgba(160, 160, 176, 0.12);
  color: var(--text-secondary);
}

.person-card__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.person-card:hover .person-card__arrow {
  transform: translateX(3px);
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   Forms & Search (buscar.html)
   ---------------------------------------------------------- */
.search-section {
  padding: var(--space-6) 0;
}

.search-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.search-form__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--flag-yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.12);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a6a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-6);
  cursor: pointer;
}

/* Filter chips / active filters */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--flag-yellow);
  font-weight: 500;
}

.filter-chip__remove {
  background: none;
  border: none;
  color: var(--flag-yellow);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.filter-chip__remove:hover {
  opacity: 1;
}

/* Results count */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-primary);
}

/* Person list */
.person-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state__title {
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.empty-state__text {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   Person Detail Page (persona.html)
   ---------------------------------------------------------- */
.person-detail {
  padding: var(--space-6) 0;
}

.person-detail__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.person-detail__photo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  object-fit: cover;
  flex-shrink: 0;
}

.person-detail__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
}

.person-detail__info h1 {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.person-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.person-detail__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* Detail sections */
.detail-section {
  margin-bottom: var(--space-6);
}

.detail-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(42, 42, 58, 0.4);
}

.detail-field:last-child {
  border-bottom: none;
}

.detail-field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-field__value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Report timeline */
.report-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  border-left: 3px solid var(--flag-blue);
}

.report-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.report-card__author {
  font-weight: 600;
  font-size: 0.9rem;
}

.report-card__date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.report-card__body {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.report-card__photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.report-card__photos img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.report-card__photos img:hover {
  border-color: var(--flag-yellow);
}

/* Share section */
.share-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  margin-bottom: var(--space-6);
}

.share-section__title {
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.share-section__text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

/* ----------------------------------------------------------
   Ad Banner Placeholders
   ---------------------------------------------------------- */
.ad-placeholder {
  background: var(--ad-bg);
  border: 2px dashed var(--ad-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  min-height: 90px;
}

.ad-placeholder__label {
  color: var(--ad-text);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

/* Horizontal banner */
.ad-banner {
  min-height: 90px;
  width: 100%;
}

/* Sidebar rectangle */
.ad-sidebar {
  min-height: 250px;
}

/* Inline / between content */
.ad-inline {
  min-height: 100px;
}

/* ----------------------------------------------------------
   Pagination
   ---------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) 0;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.pagination__btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
}

.pagination__btn--active {
  background: var(--flag-blue);
  border-color: var(--flag-blue);
  color: #fff;
}

.pagination__btn--active:hover {
  background: #003db8;
  color: #fff;
}

.pagination__btn--disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ----------------------------------------------------------
   Stats Bar (index.html — live counters)
   ---------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  padding: var(--space-5) 0;
  margin-bottom: var(--space-6);
}

.stat-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stat-item__number {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.stat-item__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-item--yellow .stat-item__number { color: var(--flag-yellow); }
.stat-item--blue   .stat-item__number { color: #4d7cff; }
.stat-item--red    .stat-item__number { color: var(--flag-red); }

/* ----------------------------------------------------------
   Steps / How It Works (index.html)
   ---------------------------------------------------------- */
.steps-section {
  padding: var(--space-6) 0;
  margin-bottom: var(--space-6);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.step-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal);
}

.step-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.step-card__number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-on-accent);
}

.step-card__number--yellow { background: var(--flag-yellow); }
.step-card__number--blue   { background: var(--flag-blue); }
.step-card__number--red    { background: var(--flag-red); }

.step-card__content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.step-card__content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-6) 0;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

.footer-stripes {
  display: flex;
  gap: 3px;
  margin-bottom: var(--space-2);
}

.footer-stripes span {
  display: block;
  width: 32px;
  height: 4px;
  border-radius: 2px;
}

.footer-stripes span:nth-child(1) { background: var(--flag-yellow); }
.footer-stripes span:nth-child(2) { background: var(--flag-blue); }
.footer-stripes span:nth-child(3) { background: var(--flag-red); }

.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ----------------------------------------------------------
   Status Banner (emergency alert bar)
   ---------------------------------------------------------- */
.emergency-banner {
  background: var(--flag-red);
  color: #fff;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.emergency-banner a {
  color: #fff;
  text-decoration: underline;
}

/* ----------------------------------------------------------
   Loading States
   ---------------------------------------------------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton--text {
  height: 16px;
  width: 100%;
  margin-bottom: var(--space-2);
}

.skeleton--text-short {
  width: 60%;
}

.skeleton--avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
}

.skeleton--card {
  height: 120px;
  width: 100%;
}

/* ----------------------------------------------------------
   Toast / Notification
   ---------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toast-in var(--transition-normal);
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error   { border-left: 3px solid var(--error); }
.toast--warning { border-left: 3px solid var(--warning); }

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ----------------------------------------------------------
   Page-load Animations
   ---------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Staggered carousel card entrance */
.carousel-card {
  animation: carouselCardIn 0.5s ease forwards;
  opacity: 0;
}

.carousel-card:nth-child(1)  { animation-delay: 0.05s; }
.carousel-card:nth-child(2)  { animation-delay: 0.10s; }
.carousel-card:nth-child(3)  { animation-delay: 0.15s; }
.carousel-card:nth-child(4)  { animation-delay: 0.20s; }
.carousel-card:nth-child(5)  { animation-delay: 0.25s; }
.carousel-card:nth-child(6)  { animation-delay: 0.30s; }
.carousel-card:nth-child(7)  { animation-delay: 0.35s; }
.carousel-card:nth-child(8)  { animation-delay: 0.40s; }
.carousel-card:nth-child(9)  { animation-delay: 0.45s; }
.carousel-card:nth-child(10) { animation-delay: 0.50s; }

@keyframes carouselCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----------------------------------------------------------
   Utilities
   ---------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-6) 0;
}

/* ----------------------------------------------------------
   Responsive: Tablet (≥ 640px)
   ---------------------------------------------------------- */
@media (min-width: 640px) {
  .stats-bar {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps-list {
    flex-direction: row;
  }

  .step-card {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .form-row {
    flex-direction: row;
  }

  .person-detail__header {
    flex-direction: row;
    align-items: flex-start;
  }

  .hero {
    padding: var(--space-8) 0 var(--space-7);
  }

  .hero-ctas {
    gap: var(--space-5);
  }

  .search-form {
    padding: var(--space-6);
  }

  /* Wider carousel cards on tablet */
  .carousel-card {
    flex: 0 0 200px;
  }
}

/* ----------------------------------------------------------
   Responsive: Desktop (≥ 1024px)
   ---------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-9) 0 var(--space-8);
  }

  .hero-search {
    max-width: 680px;
  }

  .hero-search__input {
    font-size: 1.15rem;
  }

  .person-detail__photo {
    width: 160px;
    height: 160px;
  }

  /* Two-column layout for detail page */
  .person-detail__grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-6);
    align-items: start;
  }

  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* Slightly larger carousel cards on desktop */
  .carousel-card {
    flex: 0 0 240px;
  }

  .carousel-card__photo {
    height: 200px;
  }

  .carousel {
    gap: var(--space-5);
  }
}

/* ----------------------------------------------------------
   Responsive: Large Desktop (≥ 1280px)
   ---------------------------------------------------------- */
@media (min-width: 1280px) {
  .carousel-card {
    flex: 0 0 260px;
  }

  .carousel-card__photo {
    height: 220px;
  }
}

/* ----------------------------------------------------------
   Focus visible (accessibility)
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--flag-yellow);
  outline-offset: 2px;
}

/* ----------------------------------------------------------
   Print Styles
   ---------------------------------------------------------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .ad-placeholder,
  .share-section,
  .emergency-banner,
  .carousel-section {
    display: none;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
