/* =========================
   War Paws Europe (WPE)
   styles.css (project-wide)
   Desktop-first, mobile overrides last
========================= */

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

:root {
  --brand: #00b4d8;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #111;
}

/* Footer stability */
html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* =========================
   BUTTONS
========================= */
.btn {
  background: #fff;
  border: 1px solid #111;
  cursor: pointer;
  display: inline-block;
  font-size: 0.95rem;
  padding: 10px 16px;
}

.btn:hover {
  background: #111;
  color: #fff;
}

/* =========================
   HEADER (DESKTOP DEFAULT)
========================= */
.site-header {
  border-bottom: 1px solid #e5e5e5;
  position: relative;
  z-index: 9999;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1100px;
  padding: 12px 16px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
}

.brand-mark {
  height: 48px;
  width: auto;
}

.brand-name {
  display: none;
  font-weight: 700;
}

/* Desktop nav on by default */
.main-nav {
  display: flex;
}

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

.nav-link {
  padding: 6px 6px;
}

.nav-link.active {
  border-bottom: 2px solid #111;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

/* Desktop: burger hidden */
.menu-btn {
  background: none;
  border: 1px solid #ccc;
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
  padding: 6px 10px;
}

/* =========================
   HERO IMAGES (DESKTOP DEFAULT)
========================= */
.hero {
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

/* Base hero images */
.hero-photos {
  height: 420px;
  overflow: hidden;
  position: relative;
}

.hero-photos img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* Overlay container */
.hero-overlay {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, 1fr);
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

/* Overlay tiles (animated) */
.hero-overlay-photos {
  height: 420px;
  opacity: 0;
  overflow: hidden;
  position: relative;
  transform: translateY(-105%);
  transition: transform 5s ease, opacity 0.8s ease;
  will-change: transform;
}

.hero-overlay-photos img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-overlay-photos.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   HERO CONTENT (DESKTOP DEFAULT)
========================= */
.hero-content {
  padding: 40px 16px 24px;
}

.hero-content-inner {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 320px;
  margin: 0 auto;
  max-width: 1100px;
}

.hero-copy h1 {
  color: #686e6f;
  font-size: 3rem;
  font-weight: normal;
  margin-bottom: 10px;
}

.hero-copy p {
  margin-bottom: 14px;
  max-width: 84ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions a:hover,
.hero-actions a:active,
.hero-actions button:hover,
.hero-actions button:active {
  background-color: #515659;
  color: #fff;
}

/* =========================
   LIVE PANEL (DESKTOP DEFAULT)
========================= */
.live-panel {
  border: 1.5px solid var(--brand);
  box-sizing: border-box;
  margin-top: 7px;
  max-width: 320px;
  padding-bottom: 15px;
  position: relative;
  text-align: center;
}

.live-label {
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  left: 50%;
  padding: 8px 18px;
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  width: max-content;
}

.live-number {
  color: #000;
  font-family: "roboto", sans-serif;
  font-size: 8.2rem;
  font-weight: 500;
  line-height: 1;
  margin-top: 50px;
  padding: 15px;
}

.live-line {
  color: var(--brand);
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 1px;
  margin-top: 6px;
  opacity: 0.85;
}

/* =========================
   SECTIONS / STORY
========================= */
.story-image img {
  height: 60vh;
  margin: 0 auto;
  object-fit: cover;
  width: 100%;
}

.story-text {
  box-sizing: border-box;
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 1130px;
  padding: 40px 16px 24px;
  text-align: left;
}

.story-text h1 {
  color: #686e6f;
  font-size: 2rem;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 100%;
  text-align: center;
}

.story-text p {
  line-height: 1.5;
  margin-bottom: 24px;
}

/* STORY IMAGE SWAP: base + overlay */
.story-swap {
  overflow: hidden;
  position: relative;
}

.story-swap .story-base,
.story-swap .story-overlay {
  height: 60vh;
  object-fit: cover;
  width: 100%;
}

.story-swap .story-overlay {
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
  transition: transform 5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.story-swap .story-overlay.is-revealed {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .story-swap .story-overlay {
    transition: none;
    transform: translateX(0);
  }
}

/* =========================
   HERO STATS (DESKTOP DEFAULT)
========================= */
.hero-stats {
  padding: 24px 16px;
}

.hero-stats-inner {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  max-width: 1100px;
}

.hero-stat {
  border: 1.5px solid var(--brand);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  justify-content: center;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease;
}

.hero-stat:hover {
  transform: scale(1.1);
}

.hero-stat:active {
  transform: scale(1.04);
}

.stat-number {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-text {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.85;
}

/* =========================
   FAQ (DESKTOP DEFAULT)
========================= */
.qa-preview {
  border-top: 1px solid #eee;
  padding: 40px 16px;
}

.qa-inner {
  margin: 0 auto;
  max-width: 1100px;
}

.qa-inner-h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
}

.qa-item {
  border: 1.5px solid var(--brand);
  margin-top: 12px;
  padding: 16px;
}

.qa-item h3 {
  margin-bottom: 20px;
}

/* =========================
   FOOTER (DESKTOP DEFAULT)
========================= */
.site-footer {
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

.footer-inner {
  align-items: center;
  display: grid;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1100px;
  padding: 24px 16px;
}

.footer-brand {
  align-items: center;
  display: flex;
  gap: 10px;
}

.footer-brand-mark {
  height: 48px;
}

.footer-search {
  display: flex;
  justify-content: center;
}

.footer-search input {
  border: 1px solid #ccc;
  max-width: 280px;
  padding: 6px 8px;
  width: 100%;
}

.footer-nav-list {
  display: grid;
  gap: 10px 32px;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
}

.footer-nav-link {
  padding: 4px 0;
}

.footer-bottom {
  margin: 0 auto;
  max-width: 1100px;
  padding: 20px 16px;
  text-align: center;
}

.copy {
  color: #999;
  font-size: 0.95rem;
}

/* =========================================================
   MOBILE OVERRIDES (ALL MOBILE RULES HERE)
========================================================= */

/* ---------- Tablet & Mobile (<=1023px) ---------- */
@media (max-width: 1023px) {
  /* Burger visible, nav hidden unless opened */
  .menu-btn {
    background: #fff;
    border: 2px solid var(--brand);
    border-radius: 12px;
    color: rgb(75, 75, 71);
    cursor: pointer;
    display: grid;
    height: 56px;
    padding: 1px;
    place-items: center;
    width: 56px;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    background: #fff;
    border: 1px solid #e5e5e5;
    display: block;
    left: 12px;
    padding: 18px 30px;
    position: absolute;
    top: 68px;
    width: 40%;
    z-index: 9999;
  }

  .main-nav.is-open .nav-list {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .nav-link {
    line-height: 1.2;
    padding: 4px 2px;
  }

  /* Hero: single column for tablet widths */
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-overlay {
    grid-template-columns: 1fr;
  }

  .hero-photos,
  .hero-overlay-photos {
    height: 260px;
  }
}

/* ---------- Phones (<=768px) ---------- */
@media (max-width: 768px) {
  /* Header tighter + bigger burger */
  .header-inner {
    gap: 2px;
  }

  .menu-btn {
    font-size: 2.4rem;
    padding: 8px 14px;
  }

  /* Hero: 2x2 grid on phones */
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-photos,
  .hero-overlay-photos {
    height: 330px;
  }

  /* Mobile slide from sides toward center */
  .hero-overlay .hero-overlay-photos:nth-child(odd) {
    opacity: 0;
    transform: translateX(-110%);
  }

  .hero-overlay .hero-overlay-photos:nth-child(even) {
    opacity: 0;
    transform: translateX(110%);
  }

  .hero-overlay .hero-overlay-photos.is-revealed {
    opacity: 1;
    transform: translateX(0);
  }

  /* Hero content: stack + live panel first */
  .hero-content-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .live-panel {
    justify-self: center;
    order: -1;
  }

  /* Hero stats: 2 per row */
  .hero-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; /* slightly tighter spacing */
  }

  .hero-stat {
    padding: 14px 10px; /* reduce padding so content fits */
  }

  .stat-number {
    font-size: clamp(2.6rem, 10vw, 3.4rem);
    line-height: 1.1;
    word-break: keep-all;
  }

  .stat-text {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  /* Story images: avoid cropping on phones */
  .story-swap .story-base,
  .story-swap .story-overlay,
  .story-image img {
    background: #fff;
    height: 42vh;
    object-fit: contain;
  }

  /* Footer stack */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-nav-list {
    align-items: center;
  }

  .footer-search {
    justify-content: center;
  }
}

/* =========================
   DOCUMENTS PAGE (WPE)
========================= */
.full-bleed {
  left: 50%;
  margin-left: -50vw;
  overflow: hidden;
  position: relative;
  width: 100vw;
}

.lab-card {
  background: #eaf7fb;
  border: 1.5px solid var(--brand);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.lab-card a {
  color: var(--brand);
  font-weight: 700;
  margin-top: auto;
  text-decoration: underline;
}

.lab-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.lab-card ul {
  line-height: 1.6;
  margin-bottom: 14px;
  padding-left: 18px;
}

.lab-desc {
  line-height: 1.6;
  margin-bottom: 12px;
}

.labs-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1100px;
}

.labs-section {
  padding: 40px 16px;
}

.labs-title {
  color: #686e6f;
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-align: center;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* Transport cards */
.transport-card {
  background: #fff;
  border: 1.5px solid var(--brand);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.transport-card a {
  color: var(--brand);
  font-weight: 700;
  margin-top: auto;
  text-decoration: underline;
}

.transport-card h2 {
  color: #111;
  font-size: 1.1rem;
}

.transport-desc {
  line-height: 1.6;
}

.transport-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1100px;
}

.transport-section {
  padding: 40px 16px;
}

/* Volunteers */
.volunteer-card {
  background: rgba(171, 235, 198, 0.18);
  border: 1.5px solid var(--brand);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  padding: 1.1rem 1.1rem 1rem;
}

.volunteer-meta {
  display: grid;
  font-size: 0.95rem;
  gap: 0.45rem;
  line-height: 1.4;
  list-style: none;
  margin: 0;
  padding: 0;
}

.volunteer-meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.volunteer-name {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.volunteers-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1100px;
}

.volunteers-section {
  padding: 3rem 1.25rem;
}

/* Documents responsiveness */
@media (max-width: 1023px) {
  .labs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 980px) {
  .volunteers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .labs-grid {
    grid-template-columns: 1fr;
  }

  .labs-title {
    font-size: 1.6rem;
  }

  .story-base,
  .story-overlay {
    height: 42vh;
  }

  .transport-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .volunteers-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   SHELTERS PAGE
========================= */
.shelters {
  padding: 28px 0;
}

.shelters-inner {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 auto;
  max-width: 820px;
  padding: 0 16px;
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--brand);
  border-radius: 10px;
  box-sizing: border-box;
  padding: 16px;
}

.info-card .card-title {
  color: #111;
  font-size: 17px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.info-card p {
  color: #222;
  font-size: 14px;
  margin: 0 0 7px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.info-card strong {
  color: #111;
}

.info-card a {
  color: #0f1010;
  text-decoration: underline;
  word-break: break-word;
}

.info-card a:hover {
  text-decoration: none;
}

/* Shelters responsive */
@media (max-width: 900px) {
  .shelters-inner {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .shelters-inner {
    padding: 0 12px;
  }

  .info-card {
    padding: 14px;
  }
}

/* =========================
   BLOG PAGE
========================= */
.blog {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
}

.blog-inner {
  margin: 0 auto;
  max-width: 1200px;
  padding: 2rem 1rem;
}

.blog-post {
  background: #f7f7f7;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 360px 1fr;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.blog-image img {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  height: 240px;
  object-fit: cover;
  width: 100%;
}

.blog-content h2 {
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
}

.blog-meta {
  color: #555;
  font-size: 0.9rem;
  margin: 0 0 0.8rem;
}

.blog-excerpt {
  color: #333;
  margin: 0 0 1rem;
  max-width: 80ch;
}

.blog-note {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
}

.blog-note p {
  background: #f7f7f7;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  color: #444;
  margin: 0;
  padding: 1.25rem;
}

@media (max-width: 980px) {
  .blog-post {
    grid-template-columns: 1fr;
  }

  .blog-image img {
    height: 260px;
  }
}

@media (max-width: 640px) {
  .blog-inner {
    padding: 1.6rem 0.9rem;
  }

  .blog-post {
    padding: 1rem;
  }

  .blog-content h2 {
    font-size: 1.2rem;
  }

  .blog-image img {
    height: 220px;
  }
}

/* =========================
   CONTACT PAGE
========================= */
.contact-intro {
  margin: 3rem auto 2rem;
  max-width: 900px;
  padding: 0 1rem;
}

.contact-intro p {
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
}

.contact-intro .notice {
  font-size: 0.95rem;
  opacity: 0.9;
}

.form-switch {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem auto;
}

.switch-btn {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 999px;
  cursor: pointer;
  padding: 0.7rem 1.2rem;
}

/* Use brand for active */
.switch-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.contact-forms {
  margin: 0 auto 4rem;
  max-width: 900px;
  padding: 0 1rem;
}

.contact-form {
  border: 1px solid var(--brand);
  border-radius: 16px;
  padding: 1.5rem;
}

.contact-form h2 {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 0.3rem;
  padding: 0.6rem;
  width: 100%;
}

.contact-form button {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
}

.hidden {
  display: none;
}

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