/* Global typography */
body {
  font-family: 'Open Sans', sans-serif;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

:root {
  --section-padding-tight: clamp(2rem, 4vw, 2.75rem);
  --section-gap-tight: clamp(1.25rem, 3vw, 2rem);
}

.tight-spacing main > * + * {
  margin-top: var(--section-gap-tight) !important;
}

.tight-spacing section[class*="py-"],
.tight-spacing header[class*="py-"],
.tight-spacing footer[class*="py-"],
.tight-spacing main[class*="py-"] {
  padding-top: var(--section-padding-tight) !important;
  padding-bottom: var(--section-padding-tight) !important;
}

.tight-spacing section,
.tight-spacing main > section {
  padding-top: var(--section-padding-tight);
  padding-bottom: var(--section-padding-tight);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
}

/* Mobile navigation */
#mobile-menu-shell {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#mobile-menu-shell.is-active {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu-overlay {
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

#mobile-menu-shell.is-active #mobile-menu-overlay {
  pointer-events: auto;
}

#mobile-menu-overlay.is-visible { opacity: 1; }

#mobile-menu {
  background: #ffffff;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  pointer-events: none;
}

#mobile-menu.is-open {
  transform: translateY(0);
  pointer-events: auto;
}

html.mobile-menu-open,
body.mobile-menu-open {
  overflow: hidden;
  height: 100%;
  touch-action: none;
  position: fixed;
  width: 100%;
}

.modal-open {
  overflow: hidden;
  height: 100%;
}

/* Organic visuals */
.blob-shape {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  transition: all 0.3s ease-in-out;
}

.blob-shape:hover {
  border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
}

.bg-icon {
  position: absolute;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

.hero-gradient {
  background: radial-gradient(circle at top right, #eefbf7 0%, #fff 50%, #f7f5d0 100%);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.22s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Waves */
.wave-hero {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.wave-hero svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 30px;
}

@media (min-width: 768px) {
  .wave-hero svg { height: 60px; }
}

.wave-hero .shape-fill {
  fill: #FFFFFF;
}

/* Cards */
.blog-card,
.dog-card {
  transition: all 0.18s ease;
}

.blog-card:hover,
.dog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dog-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Loaders */
.loader {
  border: 3px solid #f3f3f3;
  border-radius: 50%;
  border-top: 3px solid #3767e5;
  width: 40px;
  height: 40px;
  -webkit-animation: spin 0.6s linear infinite;
  animation: spin 0.6s linear infinite;
}

.loader-spin {
  border: 2px solid #f3f3f3;
  border-radius: 50%;
  border-top: 2px solid #3767e5;
  width: 16px;
  height: 16px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  margin-left: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade in keyframes for utility classes */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Form focus state */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3767e5;
  box-shadow: 0 0 0 3px rgba(55, 103, 229, 0.1);
}

/* Utility to hide scrollbars on overflow containers */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Floating donate button */
.donate-fab {
  position: fixed;
  right: 1rem;
  bottom: 0.75rem;
  z-index: 60;
  background: #edab34;
  color: #1f2937;
  border-radius: 9999px;
  padding: 0.85rem 1.15rem;
  border: 2px solid #edab34;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, opacity 0.12s ease;
  opacity: 1;
  visibility: visible;
}

.donate-fab:hover {
  transform: translateY(-1px);
  background: transparent;
  color: #edab34;
}

.donate-fab:active {
  transform: translateY(0);
}

.donate-fab.donate-fab--hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
}

/* Speed up Tailwind transition helpers sitewide */
.transition { transition-duration: 140ms !important; }
.duration-200 { transition-duration: 140ms !important; }
.duration-300 { transition-duration: 180ms !important; }
.duration-500 { transition-duration: 240ms !important; }
.duration-700 { transition-duration: 320ms !important; }

@media (max-width: 640px) {
  .donate-fab {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.95rem;
  }
}

@media (min-width: 768px) {
  .donate-fab {
    bottom: 1.25rem;
    right: 1.5rem;
    padding: 1rem 1.4rem;
  }
}

/* Gallery layout */
.gallery-masonry {
  column-count: 1;
  column-gap: 1.25rem;
}

@media (min-width: 768px) {
  .gallery-masonry { column-count: 2; }
}

@media (min-width: 1024px) {
  .gallery-masonry { column-count: 3; }
}

@media (min-width: 1280px) {
  .gallery-masonry { column-count: 4; }
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: zoom-in;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -12px rgba(55, 103, 229, 0.25);
}

.gallery-thumb {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  padding: 10px;
}

.gallery-thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
