/* Custom utilities and overrides */
.font-serif { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Responsive brand name: prevent overflow on small screens */
.brand-name {
  display: inline-block;
  max-width: 90vw;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal; /* allow wrap */
}

.brand-name-full { visibility: visible; }
.brand-name-short { visibility: visible; }

@media (max-width: 767.98px) {
  /* Reserve space for left logo so centered brand doesn't overlap */
  .has-logo .brand-name {
    padding-left: 88px; /* approx logo width on mobile */
    display: inline-block;
    max-width: calc(100vw - 16px - 88px - 16px); /* screen - paddings - logo */
  }
}

@media (max-width: 375px) {
  .has-logo .brand-name { padding-left: 76px; max-width: calc(100vw - 16px - 76px - 16px); }
  .brand-name { letter-spacing: 0.2em; }
}

@media (max-width: 320px) {
  .has-logo .brand-name { padding-left: 68px; max-width: calc(100vw - 12px - 68px - 12px); }
  .brand-name { letter-spacing: 0.14em; }
}


/* Enhanced mobile menu styles to prevent FOUC */
#mobileMenu {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Ensure proper mobile menu visibility */
@media (max-width: 767px) {
  #mobileMenu {
    display: none;
  }
  
  #mobileMenu.show {
    display: block;
  }
}

/* Prevent layout shift */
.md\\:hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\\:hidden {
    display: none;
  }
  
  .md\\:flex {
    display: flex;
  }
}

/* Global readability and airiness */
body { background-color: #f9fafb; line-height: 1.7; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; font-size: 16.5px; color: #111827; }
p { line-height: 1.8; }

/* Links: accessible focus, subtle hover */
a { color: #0f172a; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: #0b1220; }
a:focus-visible { outline: 3px solid rgba(16,185,129,.4); outline-offset: 2px; border-radius: 6px; }

/* Forms: modern inputs/selects/textareas */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], input[type="password"], textarea, select {
  width: 100%;
  padding: .65rem .8rem;
  border-radius: .6rem;
  border: 1px solid rgba(2,6,23,.12);
  background: #fff;
  color: #0f172a;
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(16,185,129,.5);
  box-shadow: 0 0 0 4px rgba(16,185,129,.18);
}
label { display: inline-block; margin-bottom: .4rem; font-weight: 600; color: #0f172a; }
button:focus-visible { outline: 3px solid rgba(16,185,129,.4); outline-offset: 2px; border-radius: .6rem; }

/* Mobile circular thumbnails alignment */
@media (max-width: 640px) {
  .circle-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* Hero responsive behavior: mobile = circular avatars, tablet/desktop = original tiles */
#hero #heroGrid .hero-item { position: relative; }
@media (max-width: 639.98px) {
  #hero #heroGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  #hero #heroGrid .hero-item { width: 96px; height: 96px; border-radius: 9999px; }
}

/* Subtle float animation for lively feel */
@keyframes floatSlow {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
.animate-float-slow { animation: floatSlow 6s ease-in-out infinite; }

/* Slight stagger using nth-child for variety */
#hero #heroGrid .hero-item:nth-child(2n) { animation-delay: 0.8s; }
#hero #heroGrid .hero-item:nth-child(3n) { animation-delay: 1.6s; }
#hero #heroGrid .hero-item:nth-child(4n) { animation-delay: 2.4s; }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .animate-float-slow { animation: none; }
}

/* Modern gradients and glass */
.bg-gradient-hero { background: radial-gradient(1200px 600px at 80% -10%, rgba(99,102,241,.12), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(16,185,129,.12), transparent 60%); }
.glass-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.5); }

/* Section divider */
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.08), transparent); }

/* Card hover overlay */
.card-media { position: relative; overflow: hidden; }
.card-media img, .card-media video { transition: transform .6s cubic-bezier(.2,.65,.3,1); }
.card-media:hover img, .card-media:hover video { transform: scale(1.06); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.0)); opacity: 0; transition: opacity .35s ease; }
.card-media:hover .card-overlay { opacity: 1; }

/* Card badges and shine */
.card-badge { position: absolute; top: .5rem; left: .5rem; z-index: 10; padding: .20rem .5rem; font-size: .75rem; line-height: 1rem; border-radius: 9999px; color: #0b0b0b; background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.06); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.badge-new { background: linear-gradient(90deg, #e0ffe8, #d1fae5); border-color: rgba(16,185,129,.25); color: #065f46; }
.badge-popular { background: linear-gradient(90deg, #e0e7ff, #e0f2fe); border-color: rgba(59,130,246,.25); color: #1e40af; }
.shine { position:absolute; inset:0; background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.35) 40%, transparent 60%); transform: translateX(-100%); transition: transform .7s ease; pointer-events:none; }
.card-media:hover .shine { transform: translateX(100%); }

/* Scroll reveal animations */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.reveal-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(16px); }
.reveal-stagger.reveal-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.reveal-in > * { transition: opacity .6s ease, transform .6s ease; }
.reveal-stagger.reveal-in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.reveal-in > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.reveal-in > *:nth-child(3) { transition-delay: .18s; }
.reveal-stagger.reveal-in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.reveal-in > *:nth-child(5) { transition-delay: .30s; }
.reveal-stagger.reveal-in > *:nth-child(6) { transition-delay: .36s; }

/* Modern animations for puppies page */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Stagger animation for grid items */
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 0.6s ease-out forwards;
}

/* Hover lift effect for cards */
.hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
  transition: transform 0.3s ease;
}

/* Gradient border animation */
@keyframes borderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-border {
  background: linear-gradient(45deg, #10b981, #059669, #047857, #065f46, #064e3b);
  background-size: 400% 400%;
  animation: borderGradient 3s ease infinite;
}

/* Pulse animation for active indicators */
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.animate-gentle-pulse {
  animation: gentlePulse 2s ease-in-out infinite;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Loading shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}


/* Hero CTA bubbles */
@keyframes bubblePulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: .9; }
  50% { transform: translateY(-8px) scale(1.04); opacity: 1; }
}
.bubble { position: absolute; border-radius: 9999px; filter: blur(0.2px); animation: bubblePulse 5.5s ease-in-out infinite; }
.bubble-1 { width: 14px; height: 14px; background: rgba(16,185,129,.25); left: 8%; top: -6px; animation-delay: .2s; }
.bubble-2 { width: 10px; height: 10px; background: rgba(99,102,241,.22); left: 42%; top: -10px; animation-delay: .8s; }
.bubble-3 { width: 18px; height: 18px; background: rgba(236,72,153,.20); left: 76%; top: -14px; animation-delay: 1.1s; }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem; border-radius: 9999px; background: rgba(255,255,255,.8); border: 1px solid rgba(0,0,0,.05); box-shadow: 0 2px 10px rgba(0,0,0,.06); }

/* Buttons and hover lift */
.btn { display:inline-flex; align-items:center; justify-content:center; border-radius:.75rem; padding:.75rem 1.25rem; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; }
.btn-primary { background:#111827; color:#fff; box-shadow: 0 8px 18px -6px rgba(17,24,39,0.25); }
.btn-primary:hover { background:#0b1220; box-shadow: 0 14px 32px -12px rgba(17,24,39,0.35); transform: translateY(-2px); }
.btn-soft { background: #fff; color:#111; border:1px solid rgba(0,0,0,.08); box-shadow: 0 8px 16px -10px rgba(0,0,0,.25); }
.btn-soft:hover { background:#fff; box-shadow:0 16px 28px -12px rgba(0,0,0,.25); transform: translateY(-2px); }
.btn-outline { background: #fff; color:#0f172a; border:1px solid rgba(2,6,23,.14); }
.btn-outline:hover { background:#f8fafc; border-color: rgba(2,6,23,.25); transform: translateY(-2px); }
.btn-ghost { background: transparent; color:#0f172a; }
.btn-ghost:hover { background: rgba(2,6,23,.04); }
.lift { transition: transform .25s ease, box-shadow .25s ease; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -18px rgba(0,0,0,.25); }

/* Section subtle gradient */
.bg-gradient-section { background: linear-gradient(180deg, rgba(249,250,251,1) 0%, rgba(249,250,251,0) 100%); }

/* Surfaces to visually separate sections */
.surface { background: #ffffff; border: 1px solid rgba(0,0,0,.04); box-shadow: 0 8px 20px -16px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05); border-radius: 1rem; }
.surface-alt { background: #f9fafb; border: 1px solid rgba(0,0,0,.05); box-shadow: 0 12px 28px -18px rgba(2,6,23,.3), 0 1px 2px rgba(2,6,23,.06); border-radius: 1rem; }
.surface-inner { background:#fff; border:1px solid rgba(0,0,0,.04); box-shadow: 0 6px 18px -10px rgba(0,0,0,.25); border-radius:.75rem; }

/* Containers: ensure max-width and padding consistency for non-Tailwind areas */
.container { width: 100%; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

/* Tables: clean responsive look */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .85rem; border-bottom: 1px solid #e5e7eb; }
thead th { text-align: left; font-weight: 700; color: #0f172a; background: #f8fafc; }
tbody tr:hover { background: #f9fafb; }


/* Hover lift and shadow for modern feel on larger screens */
@media (min-width: 640px) {
  #hero #heroGrid .hero-item { transition: transform 300ms ease, box-shadow 300ms ease; }
  #hero #heroGrid .hero-item:hover { transform: translateY(-6px); box-shadow: 0 20px 30px -10px rgba(0,0,0,0.25); }
}

/* Card rounding for softer look */
.card-media { border-radius: .75rem; }

/* Increase breathing room in grids where reveal-stagger is used */
@media (min-width: 640px) {
  .reveal-stagger .grid { gap: 1.75rem; }
}
@media (min-width: 1024px) {
  .reveal-stagger .grid { gap: 2rem; }
}


/* Header and footer polish */
header a { transition: color .2s ease, opacity .2s ease; }
header nav a { padding: .25rem .25rem; border-radius: .5rem; }
header nav a.active { color: #0b1220; position: relative; }
header nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.5rem; margin: 0 auto; width: 20px; height: 2px; background: #10b981; border-radius: 2px; }
@media (max-width: 767.98px) { #mobileMenu a.active { color: #10b981; font-weight: 600; } }
header nav a:focus-visible { outline: 3px solid rgba(16,185,129,.35); outline-offset: 2px; }
footer a:focus-visible { outline: 3px solid rgba(255,255,255,.35); outline-offset: 2px; border-radius: .5rem; }

/* Sticky header shadow state, toggled by JS */
.is-stuck { box-shadow: 0 10px 30px -20px rgba(2,6,23,.6), 0 1px 0 rgba(2,6,23,.08); }


/* Medium-like typography for blog content rendered from Quill */
.quill-content { color: #111827; line-height: 1.75; }
.quill-content h1 { font-size: 2rem; line-height: 1.2; font-weight: 700; margin: 1.25em 0 .6em; font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }
.quill-content h2 { font-size: 1.5rem; line-height: 1.3; font-weight: 700; margin: 1.2em 0 .6em; font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }
.quill-content h3 { font-size: 1.25rem; line-height: 1.4; font-weight: 600; margin: 1.1em 0 .5em; }
.quill-content p { margin: 1em 0; }
.quill-content strong { font-weight: 700; }
.quill-content em { font-style: italic; }
.quill-content ul { list-style: disc; padding-left: 1.5rem; margin: .75em 0; }
.quill-content ol { list-style: decimal; padding-left: 1.5rem; margin: .75em 0; }
.quill-content li { margin: .35em 0; }
.quill-content a { color: #2563eb; text-decoration: underline; }
.quill-content blockquote { border-left: 4px solid #e5e7eb; padding-left: 1rem; color: #4b5563; margin: 1.25em 0; }
.quill-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.quill-content hr { border: 0; border-top: 1px solid #e5e7eb; margin: 2rem 0; }

/* Modern FAQ Styles */
.faq-item {
  position: relative;
  overflow: hidden;
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #059669, #047857);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.faq-item:hover::before {
  transform: scaleX(1);
}

.faq-details[open] .faq-item::before {
  transform: scaleX(1);
}

.faq-summary {
  list-style: none;
  position: relative;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::marker {
  display: none;
}

.faq-icon {
  position: relative;
  overflow: hidden;
}

.faq-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.faq-summary:hover .faq-icon::before {
  width: 100%;
  height: 100%;
}

.faq-content {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced FAQ hover effects */
.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.faq-details[open] .faq-item {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth transitions for FAQ content */
.faq-details {
  transition: all 0.3s ease;
}

.faq-details[open] .faq-summary {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
}

/* Modern prose styling for FAQ answers */
.faq-content .prose {
  color: #374151;
  line-height: 1.7;
}

.faq-content .prose p {
  margin-bottom: 1rem;
}

.faq-content .prose p:last-child {
  margin-bottom: 0;
}

.faq-content .prose strong {
  color: #111827;
  font-weight: 600;
}

.faq-content .prose a {
  color: #10b981;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.faq-content .prose a:hover {
  color: #059669;
  text-decoration: underline;
}

/* Responsive FAQ improvements */
@media (max-width: 640px) {
  .faq-summary {
    padding: 1rem;
  }
  
  .faq-content {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
  }
  
  .faq-icon {
    width: 2rem;
    height: 2rem;
  }
}

/* Focus states for accessibility */
.faq-summary:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Loading state for FAQ items */
.faq-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.faq-item.loading .faq-icon {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

