/* Search engine color scheme: green as the primary color,
   blue/orange held in reserve for species badges. */
:root {
  --bs-primary: #205527;
  --bs-primary-rgb: 32, 85, 39;
  --bs-primary-text-emphasis: #205527;
  --bs-link-color: #205527;
  --bs-link-color-rgb: 32, 85, 39;
  --bs-link-hover-color: #163b1c;
  --bs-link-hover-color-rgb: 22, 59, 28;
  --bs-focus-ring-color: rgba(32, 85, 39, 0.25);
}

/* Sticky-footer layout: header/main/footer stack in a full-height flex
   column so short pages (the landing page) fit header+content+footer in
   one screen without forcing a scrollbar. Taller pages (results list)
   still scroll naturally - only main grows to fill the gap. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

/* Shared site header: dark green, white text, low-height, used on both
   the landing page and the results page. */
.site-header {
  background-color: #205527;
}

.site-header .navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.site-header__brand:hover {
  color: #fff;
  opacity: 0.85;
}

.site-header__logo {
  display: block;
  width: 2.8rem;
  height: 1.45rem;
  margin-right: 0.5rem;
  object-fit: contain;
}

.site-header__links .nav-link {
  color: #fff;
  font-weight: 500;
}

.site-header__links .nav-link:hover,
.site-header__links .nav-link:focus {
  color: #fff;
  text-decoration: underline;
}

.site-header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.site-header .navbar-toggler-icon {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #205527;
  --bs-btn-border-color: #205527;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #008200;
  --bs-btn-hover-border-color: #008200;
  --bs-btn-focus-shadow-rgb: 32, 85, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #008200;
  --bs-btn-active-border-color: #008200;
  --bs-btn-disabled-bg: #205527;
  --bs-btn-disabled-border-color: #205527;
}

.btn-outline-primary {
  --bs-btn-color: #205527;
  --bs-btn-border-color: #205527;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #008200;
  --bs-btn-hover-border-color: #008200;
  --bs-btn-focus-shadow-rgb: 32, 85, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #008200;
  --bs-btn-active-border-color: #008200;
  --bs-btn-disabled-color: #205527;
  --bs-btn-disabled-border-color: #205527;
}

.form-control:focus,
.form-select:focus {
  border-color: #205527;
  box-shadow: 0 0 0 0.25rem rgba(32, 85, 39, 0.25);
}

.pagination {
  --bs-pagination-active-bg: #205527;
  --bs-pagination-active-border-color: #205527;
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(32, 85, 39, 0.25);
}

/* Landing page: Google-style search.
   No forced vh-based min-height here - body's flex column (above) already
   makes <main> fill exactly the space between header and footer, so this
   just centers content within whatever that turns out to be. */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.landing__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 2.75rem;
  font-weight: 600;
  color: #205527;
}

.landing__logo-image {
  display: block;
  width: 6.5rem;
  height: 3.35rem;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  .landing__logo {
    flex-direction: column;
    gap: 0.15rem;
    font-size: 2rem;
  }

  .landing__logo-image {
    width: 5rem;
    height: 2.6rem;
  }
}

.landing__tagline {
  color: #6c757d;
  margin-bottom: 2rem;
}

.landing__search {
  width: 100%;
  max-width: 640px;
}

.landing__search-bar {
  border-radius: 2rem;
  transition: box-shadow 0.15s ease-in-out;
}

.landing__search-bar:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(32, 85, 39, 0.25);
}

.landing__search-bar .form-control {
  border-radius: 2rem 0 0 2rem;
  padding-left: 1.25rem;
}

.landing__search-bar .form-control:focus {
  box-shadow: none;
}

.landing__search-bar .btn {
  border-radius: 0 2rem 2rem 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.landing__filters {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.landing__filters .form-select {
  border-radius: 2rem;
}

.landing__quicklinks {
  margin-top: 1.75rem;
  font-size: 0.95rem;
}

.landing__quicklinks-sep {
  color: #c3c3c3;
  margin: 0 0.5rem;
}

.landing__stats {
  margin-top: 1rem;
  color: #6c757d;
  font-size: 0.85rem;
}

/* Landing page: animal of the day */
.landing__aotd {
  margin-top: 2rem;
  width: 100%;
  max-width: 640px;
}

.landing__aotd-badge {
  display: inline-block;
  background-color: #ff7900;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 1rem;
  margin-bottom: 0.6rem;
}

.landing__aotd-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing__aotd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
}

.landing__aotd-photo {
  height: 100%;
  min-height: 150px;
}

/* Animal cards: photo zoom on hover */
.animal-card__photo {
  height: 220px;
  overflow: hidden;
  background-color: #f1f3f5;
}

.animal-card__photo a {
  display: block;
  height: 100%;
}

.animal-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.animal-card__photo:hover .animal-card__img {
  transform: scale(1.15);
}

/* Animal cards: lift on hover */
.animal-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.animal-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12) !important;
}

/* Animal cards: staggered fade-in on scroll.
   The .reveal class is added by JS (progressive enhancement) - without JS
   or with prefers-reduced-motion, cards are fully visible immediately. */
.animal-card-wrap.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animal-card-wrap.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animal-card-wrap.reveal:nth-child(3n+2) {
  transition-delay: 0.08s;
}

.animal-card-wrap.reveal:nth-child(3n+3) {
  transition-delay: 0.16s;
}

/* Landing page welcome overlay: animal counter shown on first visit */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  transition: opacity 2s ease;
}

.welcome-overlay--hidden {
  opacity: 0;
  pointer-events: none;
}

.welcome-overlay__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-overlay__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome-overlay__logo {
  display: block;
  width: 12rem;
  height: 6.2rem;
  object-fit: contain;
}

.welcome-overlay__count {
  font-size: 10rem;
  font-weight: 700;
  line-height: 1;
  color: #205527;
  font-variant-numeric: tabular-nums;
}

.welcome-overlay__label {
  margin-top: 1rem;
  font-size: 2rem;
  letter-spacing: 0.2em;
  color: #205527;
}

@media (max-width: 575.98px) {
  .welcome-overlay__content {
    transform: scale(0.7);
    transform-origin: center;
  }
}

/* Home page footer only - kept off the results page on purpose so it
   doesn't compete with pagination at the bottom of the list. */
.site-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 1.25rem 0 0.75rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1rem;
  color: #205527;
  margin-bottom: 0.25rem;
}

.site-footer__logo {
  display: block;
  width: 2.8rem;
  height: 1.45rem;
  object-fit: contain;
}

.site-footer__text {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.site-footer__text--small {
  font-size: 0.8rem;
}

.site-footer__heading {
  color: #205527;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.site-footer__links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.site-footer__links li {
  margin-bottom: 0.15rem;
}

.site-footer__links a {
  color: #6c757d;
}

.site-footer__links a:hover {
  color: #008200;
}

.site-footer__divider {
  margin: 0.75rem 0 0.5rem;
  border-color: #e9ecef;
}

.site-footer__copyright {
  color: #6c757d;
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* "Dla schronisk" subpage: cream full-bleed background, centered
   title+divider, centered intro, a 3-card row (each with an icon badge),
   and a dark green contact CTA banner at the bottom. */
.for-shelters-main {
  background-color: #faf9f6;
  padding: 3rem 1rem 4rem;
}

.for-shelters {
  max-width: 1100px;
  margin: 0 auto;
}

.for-shelters__title {
  color: #205527;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0;
}

.for-shelters__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0 2.5rem;
}

.for-shelters__divider-line {
  width: 3rem;
  height: 1px;
  background-color: #c8d8c9;
}

.for-shelters__divider-icon {
  font-size: 1.1rem;
}

.for-shelters__intro {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
  color: #495057;
}

.for-shelters__intro p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.for-shelters__cards {
  margin-bottom: 2.5rem;
}

.for-shelters__card {
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  height: 100%;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.04);
  text-align: center;
}

.for-shelters__card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #e6f2e2;
  color: #205527;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.for-shelters__card-title {
  color: #205527;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.for-shelters__card-divider {
  width: 2.5rem;
  height: 2px;
  background-color: #205527;
  opacity: 0.3;
  margin: 0 auto 1.25rem;
}

.for-shelters__card p,
.for-shelters__card ul {
  text-align: left;
  color: #495057;
  line-height: 1.6;
}

.for-shelters__card ul {
  padding-left: 1.1rem;
}

.for-shelters__cta {
  background-color: #205527;
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #fff;
  flex-wrap: wrap;
}

.for-shelters__cta-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.for-shelters__cta-text {
  flex: 1 1 320px;
}

.for-shelters__cta-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #fff;
}

.for-shelters__cta-text p {
  margin-bottom: 0;
  opacity: 0.9;
}

.for-shelters__cta-button {
  background-color: #fff;
  color: #205527;
  font-weight: 600;
  border-radius: 2rem;
  padding: 0.65rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
}

.for-shelters__cta-button:hover,
.for-shelters__cta-button:focus-visible {
  color: #163b1c;
}

/* Contact page. */
.contact-main {
  background-color: #fff;
  /* Phone: 24px below the header and 16px side gutters. */
  padding: 1.5rem 1rem 2.5rem;
}

@media (min-width: 576px) {
  .contact-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .contact-main {
    /* Desktop: 44px below the header. */
    padding-top: 2.75rem;
    padding-bottom: 4rem;
  }
}

.contact {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.contact__title {
  font-size: 2rem;
  color: #205527;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0;
}

.contact__intro {
  color: #495057;
  text-align: center;
  margin-bottom: 1.5rem;
}

.contact__card {
  padding: 0;
}

.contact .for-shelters__divider {
  margin: 1rem 0 1.5rem;
}

/* Calm notice (unavailable / success): soft green, dark green text. */
.contact__notice {
  --bs-alert-color: #205527;
  --bs-alert-bg: #eef5ee;
  --bs-alert-border-color: #cfe0d0;
  margin-bottom: 1.5rem;
}

/* Fields: light background, subtle border. */
.contact__card .form-label {
  color: #2c3a2f;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.contact__card .form-control {
  background-color: #fcfdfc;
  border-color: #d3dbd4;
  border-radius: 0.5rem;
}

.contact__card .form-control:focus {
  background-color: #fff;
  border-color: #205527;
}

.contact__card .form-control.is-invalid {
  border-color: var(--bs-form-invalid-border-color);
}

.contact__card textarea.form-control {
  height: 160px;
  min-height: 160px;
  resize: vertical;
}

/* Disabled fields stay legible without heavy grey blocks. */
.contact__card .form-control:disabled {
  background-color: #f7f9f7;
  border-color: #e1e7e2;
  color: #8a968c;
}

/* Space between the last field and the button. */
.contact__actions {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.contact__actions .btn {
  max-width: 100%;
  white-space: normal;
}

/* Active button stays green (see .btn-primary above); the inactive state
   is clearly different: pale green with muted text, fully opaque. */
.contact__card .btn-primary {
  --bs-btn-disabled-bg: #dbe5dc;
  --bs-btn-disabled-border-color: #dbe5dc;
  --bs-btn-disabled-color: #5f7462;
  --bs-btn-disabled-opacity: 1;
}

/* Honeypot: the markup already carries `hidden`; this repeats it so it
   stays gone even if something restyles [hidden]. */
.contact__hp {
  display: none !important;
}

/* Accessibility: for users with prefers-reduced-motion set (motion sickness,
   vestibular disorders, etc.), disable all animations/transitions site-wide -
   photo hover-zoom, card lift, scroll-reveal, etc. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Language switcher (PL / EN flags) in the header */
.site-header__lang {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .site-header__lang {
    margin-left: 0.75rem;
    padding: 0;
  }
}

.site-header__lang-form {
  margin: 0;
}

.lang-switch__btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

.lang-switch__btn:hover,
.lang-switch__btn:focus-visible,
.lang-switch__btn.is-active {
  opacity: 1;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lang-switch__flag {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}
