:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --accent: #0f766e;
}

/* small utility for inline green text highlights used in headings */
.text-green {
  color: var(--accent);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* when the mobile nav is open, prevent page scroll */
body.nav-open {
  overflow: hidden
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 1px solid #eef2f5;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95));
  z-index: 90;
  /* raised so the header and its slide-over menu sit above the overlay */
  backdrop-filter: blur(6px);
}

/* mobile menu toggle button */
.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  transition: transform .18s ease, background-color .12s ease;
}

.menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.06)
}

.menu-toggle[aria-expanded="true"] {
  color: var(--accent);
  transform: translateY(-2px)
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  padding: 6px;
  border-radius: 8px;

  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, background-color .18s ease;
  will-change: transform, box-shadow, background-color;
}

.brand:focus-visible {
  outline: none;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
  transform: translateY(-4px);
  background: rgba(15, 118, 110, 0.03);
  border-radius: 10px;
}

.brand:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.06);
  background: rgba(15, 118, 110, 0.03);
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease;
  transform-origin: center;
  will-change: transform, box-shadow;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 18px;
  color: var(--fg);
  line-height: 1;
  transition: color .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
  will-change: color, transform;
}

.brand-tagline {
  font-size: 12px;
  line-height: 1.1;
  color: var(--muted);
  white-space: nowrap;
  transition: color .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

.brand:hover .brand-name,
.brand:focus-visible .brand-name {
  color: var(--accent);
  transform: translateY(-2px);
}

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

/* Navigation links */
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), background-color .14s ease, color .12s ease;
  will-change: transform;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--accent);
  background: rgba(15, 118, 110, 0.06);
  outline: none;
  transform: translateY(-4px) scale(1.02);
}

/* Primary call-to-action */
.adopt-btn {
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.adopt-btn:hover,
.adopt-btn:focus {
  background: #0b5e50;
  color: #fff;
  transform: translateY(-1px);
  outline: none;
  border-color: transparent;
}

/* Mobile styles: collapse nav into a slide-over drawer */
@media (max-width:820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* hide original nav until toggled open */
  .header-actions {
    position: fixed;
    top: 64px;
    right: 0;
    height: 100vh;
    width: 320px;
    max-width: 80%;
    transform: translateX(100%);
    background: linear-gradient(180deg, #ffffff, #fbfbfb);
    box-shadow: -10px 20px 60px rgba(15, 118, 110, 0.08);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    transition: transform .36s cubic-bezier(.2, .8, .2, 1);
    z-index: 110;
    /* ensure the open drawer stacks above overlays and other page elements */
    border-left: 1px solid rgba(17, 24, 39, 0.04);
  }

  .header-actions.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* make CTA prominent in mobile menu */
  .nav-link.adopt-btn {
    margin-top: 6px;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* small device header adjustments */
  .site-header {
    padding: 0 10px;
    height: 64px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-tagline {
    font-size: 11px;
  }
}

/* when nav is open show a subtle overlay (use a real element so it can receive pointer events) */
@media (max-width:820px) {
  .nav-overlay {
    position: fixed;
    inset: 64px 0 0 0;
    /* sit below the header */
    background: rgba(0, 0, 0, 0.28);
    z-index: 65;
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
    -webkit-tap-highlight-color: transparent;
  }

  /* when nav is open enable interactions on the overlay */
  body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Desktop: ensure header-actions are inline */
@media (min-width:821px) {
  .header-actions {
    position: static;
    height: auto;
    transform: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-left: 0;
  }
}

/* hero, buttons, etc. */

/* Hero */
.hero {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;

  /* Reserve space for the fixed header so hero content never sits under it,
     and keep the hero prominent while reducing excess vertical space. */
  padding: calc(64px + 6px) 12px 8px;
  min-height: calc(75vh - 64px);
}

.hero-inner {
  max-width: 1200px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  width: 100%;
}

/* left column (text) */
.hero-left {
  flex: 1 1 48%;
  text-align: left;
  min-width: 260px;
}

.hero h1 {
  margin: 0 0 12px 0;
  font-size: 40px;
  line-height: 1.05;
  color: var(--fg);
  font-weight: 700;
}

.hero-sub {
  margin: 0 0 20px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  max-width: 680px;
}

/* right column (image) */
.hero-right {
  flex: 1 1 52%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
}

.hero-image {
  width: 100%;
  max-width: 560px;
  height: auto;
  max-height: 448px;
  /* limit image height to 80% of previous 560px */
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(15, 118, 110, 0.08);

  /* subtle lift for hero image */
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease;
  will-change: transform, box-shadow;
}

.hero-right:hover .hero-image,
.hero-image:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 70px rgba(15, 118, 110, 0.10);
}

/* Responsive: stack on narrow screens */
@media (max-width:820px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-left {
    width: 100%
  }

  .hero-right {
    width: 100%;
    margin-top: 16px
  }

  .hero h1 {
    font-size: 28px
  }

  .hero-sub {
    font-size: 15px;
    margin-left: auto;
    margin-right: auto
  }
}

/* Buttons inside hero */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.06);
  font-weight: 600;
  font-size: 15px;
  min-height: 44px;
  cursor: pointer;
  margin: 0 6px;

  /* smooth motion and shadow changes */
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s cubic-bezier(.2, .8, .2, 1), background-color .12s ease;
  will-change: transform, box-shadow;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08)
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.08);
}

.btn.primary:hover {
  background: #0b5e50;
  /* darker green on hover */
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11, 94, 80, 0.16);
  border-color: transparent;
}

.btn:hover {
  background: rgba(15, 118, 110, 0.06);
  color: var(--fg);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

/* Mobile: ensure header fits in one screen height and touch targets are adequate */
@media (max-width:420px) {
  .site-header {
    height: 64px;
    padding: 0 10px
  }

  .brand-name {
    font-size: 16px
  }

  .brand-logo {
    width: 44px;
    height: 44px
  }

  .icon-btn {
    height: 44px;
    min-width: 44px
  }

  .nav-links {
    gap: 6px
  }

  .nav-link {
    padding: 10px 8px;
    font-size: 13px
  }

  .adopt-btn {
    padding: 10px 10px
  }

  /* Responsive hero sizing */
  .hero h1 {
    font-size: 22px
  }

  .hero-sub {
    font-size: 14px
  }

  .hero-inner {
    padding: 16px
  }

  .btn {
    padding: 10px 12px;
    font-size: 14px;
    margin: 6px 4px
  }
}

/* Green banner below main content */
.green-banner {
  width: 100%;
  background: linear-gradient(90deg, #047857 0%, #059669 100%);
  color: #fff;
  padding: 16px 12px;
  /* increased vertical padding to raise divider height */
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.green-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* center the inner content horizontally */
  gap: 12px;
  padding: 10px;
  /* slightly larger inner padding for better balance */
  flex-wrap: wrap;
}

/* ensure the stats block centers its items when using inline styles in HTML */
.green-banner-stats {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.green-banner-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.green-banner-content .banner-text {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
}

.green-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.banner-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: transparent;
  padding: 10px 14px;
  border-radius: 10px;
}

.banner-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px)
}

/* Mobile: compact banner layout */
@media (max-width:540px) {
  .green-banner-inner {
    padding: 12px;
    align-items: flex-start
  }

  .green-banner-actions {
    width: 100%;
    justify-content: flex-start
  }

  .green-banner-content {
    width: 100%
  }
}

/* Pets section */
.pets-section {
  width: 100%;
  padding: 12px 12px;
  /* reduced top/bottom padding to close gap under hero */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.pets-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px;
}

.pets-inner h2 {
  margin: 0 0 14px 0;
  font-size: 44px;
  /* enlarged for stronger emphasis */
  line-height: 1.03;
  color: var(--fg);
  font-weight: 700;
}

/* Responsive: scale the heading down on narrow viewports so layout stays balanced */
@media (max-width:540px) {
  .pets-inner h2 {
    font-size: 32px;
  }
}

/* header for pets section with "View All" link */
.pets-header {
  margin-bottom: 6px;
}

.view-all {
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

.view-all:hover,
.view-all:focus {
  background: rgba(15, 118, 110, 0.06);
  outline: none;
  text-decoration: none;
}

/* Make filter controls responsive at all sizes: allow wrapping and let controls flex */
.pets-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  /* allow controls to wrap to new lines */
  width: auto;
}

/* give selects and buttons a flexible basis so they can grow/shrink */
.pets-filters select,
.pets-filters .btn {
  flex: 0 1 180px;
  /* preferred width but allow shrinking */
  min-width: 120px;
  max-width: 100%;
  box-sizing: border-box;
}

/* when space is tight make controls stretch full width for touch-friendliness */
@media (max-width:640px) {

  .pets-filters select,
  .pets-filters .btn {
    flex: 1 1 100%;
    min-width: 0;
  }
}

/* Ensure the header stacks nicely on small screens */
@media (max-width:540px) {
  .pets-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px
  }

  .view-all {
    align-self: flex-start
  }
}

/* Grid layout */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
}

/* When filters leave exactly one visible pet, keep that card at normal size
   and center it instead of letting the grid stretch it across the viewport. */
.pets-grid.single {
  justify-content: center;
  /* center the single column */
  grid-template-columns: 1fr;
  /* keep a single column so card width is controlled */
}

.pets-grid.single .pet-card {
  max-width: 420px;
  /* cap width so it doesn't stretch too wide on large viewports */
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: block;
}

/* Message shown when filters return no matching pets */
.no-results {
  margin: 18px 0 6px;
  padding: 12px;
  text-align: center;
  background: #ffffff;
  color: var(--muted);
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.03);
}

/* Pet card */
.pet-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  /* Pronounced border to better define card edges while keeping the existing soft shadow */
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.pet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(15, 118, 110, 0.08);
  /* slightly intensify border on hover for a subtle interactive cue */
  border-color: rgba(15, 118, 110, 0.18);
}

.photo-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: block;
  background: #f0f0f0;
}

.pet-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;

  /* smooth scaling on hover via parent */
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), filter .28s ease;
  will-change: transform, filter;
}

/* species badge positioned upper-left on the photo */
.pet-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffffff;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.10);
  z-index: 3;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  border: 1px solid rgba(15, 118, 110, 0.08);
}

/* slightly smaller badge on very small screens */
@media (max-width:420px) {
  .pet-badge {
    font-size: 11px;
    padding: 5px 7px;
    top: 8px;
    left: 8px;
  }
}

.pet-card:hover .pet-photo {
  transform: scale(1.04);
  filter: brightness(1.02);
}

.pet-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pet-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pet-name {
  margin: 0;
  font-size: 16px;
  color: var(--fg);
  font-weight: 700;
}

.pet-age {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  background: rgba(15, 118, 110, 0.06);
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.pet-meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.2;
  flex: 1;
}

.pet-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

/* Ensure buttons inside cards are full-width on small screens */
@media (max-width:540px) {
  .pets-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px
  }

  .pet-photo {
    height: 140px
  }

  .pet-actions .btn {
    flex: 1
  }
}

/* Center the post text below the adoptable pets (desktop) and provide layout for contact + form */
.pets-post {
  text-align: center;
}

/* Intro panel above adoption steps: light gray background and padding so the intro text stands out */
.adopt-intro {
  background: #f3f4f6;
  /* light gray */
  padding: 12px;
  border-radius: 10px;
  display: block;
  width: 100%;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.03);
  margin-bottom: 10px;
  text-align: center;
}

/* Larger, responsive heading for the adoption path intro */
#adoption-path-heading {
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  margin: 0;
  color: var(--fg);
}

/* Scale the adoption-path heading down on small viewports so it fits cleanly */
@media (max-width:540px) {
  #adoption-path-heading {
    font-size: 20px;
    line-height: 1.08;
  }
}

/* New independent adoption path section: full-bleed panel that aligns with viewport edges */
.adoption-path-section {
  /* make the section span the full viewport width while keeping its content padded */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #f3f4f6;
  /* light gray */
  padding: 18px 12px;
  border-radius: 0;
  /* flush to edges */
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.03);
}

/* keep adopt-steps and step cards light gray (already set), ensure the section doesn't double up visual padding on small screens */
@media (max-width:820px) {
  .adoption-path-section {
    padding: 14px 10px;
  }
}

/* two-column contact + form layout */
.contact-form-wrapper {
  padding: 12px 8px;
  max-width: 1200px;
  width: 100%;
  margin: 18px auto;
  box-sizing: border-box;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 480px;
  /* widened form column so inputs are longer */
  gap: 20px;
  align-items: start;
  max-width: 100%;
  margin: 0 auto;
}

/* contact details */
.contact-details {
  text-align: left;
  padding: 8px 12px;
}

.contact-details .details-block {
  margin-bottom: 8px;
  color: var(--muted);
}

/* new: align small icons with contact text */
.contact-details .details-item {
  display: flex;
  gap: 10px;
  align-items: center;
}

.contact-details .details-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
}

/* ensure inline SVGs scale to fill the larger icon container */
.contact-details .details-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contact-details .details-text {
  flex: 1;
  min-width: 0;
}

/* form styles */
.contact-form {
  background: linear-gradient(180deg, #fff, #fbfbfb);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field-label {
  font-size: 13px;
  color: var(--fg);
  font-weight: 600;
  text-align: left;
  display: block;
  width: 100%;
}

/* inputs */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  background: #ffffff;
  /* white fill for input interiors */
  font-size: 14px;
  color: var(--fg);
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.06);
  border-color: rgba(15, 118, 110, 0.12);
}

/* small devices: stack columns and keep full width */
@media (max-width:820px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-details {
    order: 2;
  }

  /* show form first on narrow screens */
  .adopt-steps {
    margin-top: 12px;
  }
}


/* Adoption steps: horizontal row with compact cards */
.adopt-steps {
  display: flex;
  gap: 40px;
  /* increased spacing between steps */
  margin-top: 14px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  /* give the steps section a light-gray panel background with padding and rounded corners */
  background: #f3f4f6;
  padding: 16px;
  border-radius: 12px;
  /* ensure the steps container fully contains its child cards and aligns with surrounding content */
  width: 100%;
  margin: 0;
  max-width: 100%;
}

.adopt-steps .step {
  background: transparent;
  /* step cards now let the parent light-gray panel show through */
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.04);
  flex: 1 1 200px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  /* center contents horizontally so the number sits above the title */
  text-align: center;
  transition: transform .18s ease;
  /* smooth slide for first/last adjustments */
}

/* remove desktop nudges so each step sits fully inside the parent container */
.adopt-steps .step:first-child,
.adopt-steps .step:last-child {
  transform: none;
}

.adopt-steps .step-index {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  /* lift the number above the decorative line and ensure it sits visually on top */
  position: relative;
  z-index: 2;
  margin: -8px auto 8px;
  /* negative top margin pulls the badge above the line */
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.12);
}

.adopt-steps .step-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
}

.adopt-steps .step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  /* remove flex so descriptions wrap naturally when centered */
}

/* Stack steps vertically on narrow screens while keeping spacing consistent */
@media (max-width:540px) {

  /* On narrow screens keep the steps full-width and remove negative margins to fit the viewport */
  .adopt-steps {
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin: 0;
  }

  .adopt-steps .step {
    min-width: unset
  }

  .adopt-steps .step {
    align-items: center;
    text-align: center
  }

  .adopt-steps .step-desc {
    width: 100%
  }

  .adopt-steps .step-index {
    margin: 0 auto 6px
  }

  /* cancel desktop nudges on small viewports */
  .adopt-steps .step:first-child,
  .adopt-steps .step:last-child {
    transform: none;
  }
}

/* decorative horizontal line behind step numbers */
.adopt-steps {
  position: relative;
}

.adopt-steps::before {
  content: "";
  position: absolute;
  height: 6px;
  background: #bbf7d0;
  /* light green */
  /* nudge the decorative line down so the step numbers sit visually above it */
  top: 37px;
  z-index: 0;
  border-radius: 4px;

  /* span between step 1 and step 3 using CSS variables set from JS; fall back to sensible insets */
  left: var(--adopt-line-left, 80px);
  right: var(--adopt-line-right, 80px);
  width: auto;
  max-width: none;
}

/* reduce the left/right inset on narrower viewports so the line scales naturally */
@media (max-width:820px) {
  .adopt-steps::before {
    left: 48px;
    right: 48px;
    top: 34px;
  }
}

.adopt-steps .step {
  position: relative;
  z-index: 1;
  /* ensure cards appear above the line */
}

/* hide the decorative line on narrow screens (stacked layout) */
@media (max-width:540px) {
  .adopt-steps::before {
    display: none
  }
}

/* Footer styles */
.site-footer {
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 18px 12px 28px;
  margin-top: 18px;
}

/* force the entire footer subtree to render at full opacity
   (prevents any inherited/inline opacity from making footer content look faded) */
.site-footer,
.site-footer * {
  opacity: 1 !important;
  filter: none !important;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  min-width: 220px;
  padding: 6px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, background-color .18s ease;
  will-change: transform, box-shadow, background-color;
}

.footer-brand:focus-visible {
  outline: none;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
  transform: translateY(-4px);
  background: rgba(15, 118, 110, 0.03);
  border-radius: 10px;
}

.footer-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform .36s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease;
  transform-origin: center;
  will-change: transform, box-shadow;
}

.footer-logo:hover,
.footer-logo:focus-visible {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.08);
}

.footer-name {
  transition: color .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
  will-change: color, transform;
}

.footer-name:hover,
.footer-brand:focus-visible .footer-name {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent
}

.footer-name {
  display: flex;
  flex-direction: column;
  line-height: 1
}

/* make footer tagline bright */
.footer-tagline {
  font-size: 13px;
  color: #ffffff;
  font-weight: 500
}

/* Social links under brand name */
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  /* increased spacing to separate social icons from logo/name */
  align-items: center;
}

.social-link {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
  transition: background-color .12s ease, transform .12s ease;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

.social-link:hover,
.social-link:focus {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-3px);
  outline: none;
  border-color: transparent;
}

/* columns */
.footer-columns {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-col {
  min-width: 160px;
  max-width: 260px
}

.footer-col-title {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px
}

/* make footer links bright */
.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none
}

/* contact & actions */
/* make contact/hours bright */
.footer-contact {
  font-style: normal;
  color: #ffffff;
  font-size: 14px;
  margin: 0
}

.footer-contact a {
  color: #ffffff;
  text-decoration: none;
}

.footer-contact a:hover,
.footer-contact a:focus {
  color: var(--accent);
  text-decoration: none;
  outline: none;
}

.footer-hours {
  color: #ffffff;
  font-size: 14px;
  margin: 0 0 8px 0
}

.footer-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px
}

.site-footer .btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px
}

/* adapt button styles for dark footer */
.site-footer .btn.primary {
  background: #0f766e;
  color: #fff;
  border-color: transparent;
}

.site-footer .btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Donate button (global) make outside-footer donate orange */
.btn.donate {
  background: #f59e0b;
  /* amber */
  color: #0b0b0b;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
}

.btn.donate:hover,
.btn.donate:focus {
  background: #d97706;
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

/* Donate button in footer: high-contrast amber variant */
.site-footer .btn.donate {
  background: #f59e0b;
  /* amber */
  color: #0b0b0b;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
}

.site-footer .btn.donate:hover,
.site-footer .btn.donate:focus {
  background: #d97706;
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}


/* Donate modal: make the submit "Donate" button amber (same as site Donate button) */
.donate-modal #donate-submit.btn.primary {
  background: #f59e0b;
  /* amber */
  color: #0b0b0b;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.12);
}

.donate-modal #donate-submit.btn.primary:hover,
.donate-modal #donate-submit.btn.primary:focus {
  background: #d97706;
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}


/* keep non-primary footer buttons subtle, but make primary footer CTA darker on hover */
.site-footer .btn:hover {
  filter: brightness(1.05);
  transform: none;
}

/* darken primary footer CTA on hover to match site primary behavior */
.site-footer .btn.primary:hover {
  background: #0b5e50;
  color: #fff;
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11, 94, 80, 0.16);
}

/* bottom row */
.footer-bottom {
  max-width: 1200px;
  margin: 12px auto 0;
  padding-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 6px;
}

.footer-legal {
  display: flex;
  gap: 12px;
  align-items: center
}

/* make legal links bright */
.footer-legal a {
  color: #ffffff;
  text-decoration: none;
  font-size: 13px
}

.footer-legal a:hover {
  color: var(--accent);
  text-decoration: none
}

/* make copyright bright */
.copyright {
  font-size: 13px;
  color: #ffffff;
  margin: 0
}

/* Responsive footer: stack on small screens */
@media (max-width:820px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start
  }

  .footer-columns {
    justify-content: flex-start
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px
  }
}

/* container for form fields inside the contact form: distinct background and padding */
.form-fields {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(17, 24, 39, 0.04);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.03);
}

/* Pagination styles */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
  flex-wrap: wrap;
}

.pagination .per-page-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  min-width: 120px;
}

.page-numbers {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.06);
  font-weight: 700;
  cursor: pointer;
}

.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
}

.page-btn:disabled,
.page-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* make the pagination compact on very small screens */
@media (max-width:420px) {
  .pagination {
    gap: 6px;
    margin: 12px 0;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 6px 8px;
    font-size: 13px
  }

  .pagination .per-page-select {
    min-width: 100px;
  }
}

/* slightly reduce internal padding on very small screens to maintain fit */
@media (max-width:420px) {
  .form-fields {
    padding: 10px;
    gap: 8px;
  }
}


/* Fit-based navigation, independent of fixed device-width breakpoints. */
.site-header { position: fixed; height:64px; min-height:64px; padding:0 12px; }
.site-header .brand { flex: 0 0 auto; }
.site-header .header-actions { min-width:0; }
.site-header .nav-links { flex-wrap:nowrap; white-space:nowrap; }
.site-header .nav-link { white-space:nowrap; }
/* A measuring copy is unaffected by whether the real links are in the drawer. */
.site-header .nav-fit-ruler {
  position:absolute !important; display:flex !important; flex-direction:row !important;
  align-items:center !important; flex-wrap:nowrap !important; gap:8px !important;
  width:max-content !important; max-width:none !important;
  height:auto !important; top:-10000px !important; left:0 !important;
  padding:0 !important; margin:0 !important; visibility:hidden !important;
  pointer-events:none !important; white-space:nowrap !important;
}
.site-header .nav-fit-ruler .nav-link {
  width:auto !important; padding:8px 12px !important; font-size:14px !important;
  justify-content:center !important; margin:0 !important;
}
/* Prevent a momentary overflow before the first viewport measurement. */
body:not(.nav-fit-ready) .site-header .header-actions { visibility:hidden !important; transition:none !important; }
body.compact-nav .site-header .menu-toggle {
  display:inline-flex !important; justify-content:center; align-items:center;
  margin-left:auto;
}
body.compact-nav .site-header .header-actions {
  position:fixed !important; top:64px !important; right:0 !important;
  height:calc(100dvh - 64px) !important; width:320px !important; max-width:80% !important;
  transform:translateX(100%) !important; display:flex !important;
  align-items:flex-start !important; overflow-y:auto !important;
  padding:20px !important; border-left:1px solid rgba(17,24,39,.04) !important;
  background:#fff !important; box-shadow:-10px 20px 60px rgba(15,118,110,.08) !important;
  z-index:110 !important; transition:transform .36s cubic-bezier(.2,.8,.2,1) !important;
}
body.compact-nav .site-header .header-actions.open { transform:translateX(0) !important; }
body.compact-nav .site-header .header-actions > .nav-links {
  flex-direction:column !important; gap:12px !important; align-items:flex-start !important; width:100% !important;
}
body.compact-nav .site-header .header-actions .nav-link {
  width:100% !important; justify-content:flex-start !important; padding:12px 14px !important;
  font-size:16px !important;
}
body.compact-nav .site-header .header-actions .adopt-btn { justify-content:center !important; }
body.compact-nav .nav-overlay {
  position:fixed; inset:64px 0 0; background:rgba(0,0,0,.28);
  z-index:65; opacity:0; pointer-events:none; transition:opacity .24s ease;
}
body.compact-nav.nav-open .nav-overlay { opacity:1; pointer-events:auto; }
/* Neutralize the original fixed-width mobile drawer when links actually fit. */
body:not(.compact-nav) .site-header .menu-toggle { display:none !important; }
body:not(.compact-nav) .site-header .header-actions {
  position:static !important; display:flex !important; height:auto !important;
  width:auto !important; max-width:none !important; transform:none !important;
  padding:0 !important; background:transparent !important; box-shadow:none !important;
  border:0 !important; overflow:visible !important;
}
body:not(.compact-nav) .site-header .header-actions > .nav-links { flex-direction:row !important; width:auto !important; gap:8px !important; }
body:not(.compact-nav) .site-header .header-actions .nav-link { width:auto !important; font-size:14px !important; padding:8px 12px !important; }
.pets-filters { flex-wrap:wrap; }
.pets-grid .pet-name, .pets-grid .pet-age, .pets-grid .pet-meta, .pets-grid .pet-badge {
  max-width:100%; overflow-x:auto; overflow-y:hidden; white-space:nowrap; scrollbar-width:thin;
}
.pets-grid .pet-actions .btn { flex:1; margin:0; }
.pets-loading { padding:22px; }
/* The header remains fixed at all widths. Keep the page heading below it. */
.pets-section { padding-top:84px !important; }

/* Temporarily hide all pet Details links without deleting their functionality. */
.pets-grid .pet-details-btn {
  display: none !important;
}


/* Keep the hamburger reachable on narrow screens when the shelter name is long. */
@media (max-width:820px) {
  .site-header .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 60px);
  }
  .site-header .brand-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .site-header .brand-tagline {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.compact-nav .site-header .menu-toggle {
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* All Pets presentation moved from HTML inline styles to support a strict style-src CSP. */
.pets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#pets-heading { margin: 0; }
.pets-filters select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(17,24,39,0.06);
  background: #fff;
  font-weight: 600;
}
.pets-filters #clear-filters { padding: 8px 10px; font-size: 14px; border-radius: 8px; }
