/* Scroll-reveal re-implementation (see clone-website skill) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slow zoom for hero background images (replaces animate-slow-zoom keyframes from source bundle) */
@keyframes evergreen-slow-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.animate-slow-zoom {
  animation: evergreen-slow-zoom 20s ease-in-out infinite alternate;
}

/* Inline background-image sections (Tailwind arbitrary bg-[url()] trap workaround) */
.bg-cover-custom {
  background-size: cover;
  background-position: center;
}

/* Tighter section spacing — overrides the compiled Tailwind bundle's py, pt, pb
   utility values (site-wide, since custom.css loads after style.css and wins by source order) */
.py-12 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.py-24 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.pt-16 {
  padding-top: 3rem;
}
.pb-20 {
  padding-bottom: 3rem;
}
@media (min-width: 768px) {
  .md\:py-20 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .md\:py-24 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  .md\:py-32 {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
  .md\:pt-20 {
    padding-top: 3.5rem;
  }
  .md\:pb-32 {
    padding-bottom: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .animate-slow-zoom {
    animation: none;
  }
}

/* Floating "Message Us" popup (bottom-right chat widget) */
.evg-chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease-out;
}
.evg-chat-toggle:hover {
  transform: translateY(-2px);
}
.evg-chat-toggle svg {
  width: 28px;
  height: 28px;
}
.evg-chat-toggle img.evg-chat-icon-open {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.evg-chat-toggle .evg-chat-icon-close {
  display: none;
}
.evg-chat-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.45);
  border: 2px solid #fff;
}
.evg-chat-toggle[aria-expanded="true"] .evg-chat-icon-open {
  display: none;
}
.evg-chat-toggle[aria-expanded="true"] .evg-chat-icon-close {
  display: block;
}
.evg-chat-toggle[aria-expanded="true"] .evg-chat-badge {
  display: none;
}

.evg-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 60;
  width: min(360px, calc(100vw - 40px));
  max-height: min(520px, calc(100vh - 120px));
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.evg-chat-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.evg-chat-panel__header {
  background: hsl(var(--primary));
  color: #fff;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.evg-chat-panel__logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
}
.evg-chat-panel__title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 2px;
}
.evg-chat-panel__subtitle {
  font-size: 0.85rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}
.evg-chat-panel__close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
}
.evg-chat-panel__body {
  padding: 20px;
}
.evg-chat-panel__body form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.evg-chat-panel__body input,
.evg-chat-panel__body textarea {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: hsl(var(--primary) / 0.08);
  padding: 14px;
  font-size: 16px;
  font-family: inherit;
  color: #1f2a20;
  resize: none;
  box-sizing: border-box;
}
.evg-chat-panel__body input::placeholder,
.evg-chat-panel__body textarea::placeholder {
  color: #6b7a6d;
}
.evg-chat-panel__body input:focus,
.evg-chat-panel__body textarea:focus {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 1px;
}
.evg-chat-panel__submit {
  width: 100%;
  border: none;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  cursor: pointer;
  min-height: 44px;
}
.evg-chat-panel__submit:hover {
  background: hsl(var(--primary) / 0.9);
}
.evg-chat-panel__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.evg-chat-panel__success,
.evg-chat-panel__error {
  font-size: 0.9rem;
  padding: 4px 2px 0;
  margin: 0;
}
.evg-chat-panel__error {
  color: #b91c1c;
}
.evg-chat-panel__success a,
.evg-chat-panel__error a {
  color: inherit;
  font-weight: 700;
}

@media (max-width: 400px) {
  .evg-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
  }
  .evg-chat-toggle {
    right: 16px;
    bottom: 16px;
  }
}

/* Mobile tap-target fixes (44px minimum per Apple/Google guidelines) */
#mobile-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}
.h-9[href^="tel:"] {
  min-height: 44px;
}
.mt-8.text-center.md\:hidden > a {
  min-height: 44px;
}
.text-primary.font-semibold.flex.items-center.gap-1 {
  display: inline-flex;
  padding: 10px 0;
}
footer a {
  display: inline-block;
  padding: 11px 0;
}
.bg-muted\/50 a[href^="tel:"],
.bg-muted\/50 a[href^="mailto:"] {
  display: inline-block;
  padding: 11px 0;
}
.evg-chat-panel__close {
  min-width: 44px;
  min-height: 44px;
}
