html {
  margin: 0;
  overflow-x: hidden;
}

.wow {
  visibility: hidden;
}

.animate__animated {
  --animate-distance: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .wow {
    visibility: visible !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
}

.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.56) 45%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

.hero-title {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.courses-hero {
  min-height: 18rem;
}

.courses-hero__media {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.courses-hero__overlay {
  background:
    linear-gradient(
      160deg,
      rgba(20, 13, 13, 0.78) 0%,
      rgba(74, 53, 51, 0.62) 48%,
      rgba(143, 83, 73, 0.55) 100%
    ),
    radial-gradient(ellipse at 70% 20%, rgba(185, 114, 98, 0.35), transparent 55%);
}

@media (min-width: 768px) {
  .courses-hero {
    min-height: 22rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .courses-hero__media {
    animation: courses-hero- ken 18s ease-in-out infinite alternate;
  }
}

@keyframes courses-hero-ken {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

.soft-divider {
  width: 90px;
  height: 2px;
  background: rgba(255, 235, 230, 0.55);
}

.footer-bg {
  background-size: cover;
  background-position: center;
}

.footer-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* Service cards: uniform frame, full-bleed crop (reads well on mobile) */
.service-thumb-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: #ebe4e1;
  aspect-ratio: 3 / 4;
}

@media (min-width: 640px) {
  .service-thumb-frame {
    aspect-ratio: 4 / 3;
  }
}

.service-thumb-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Service grid cards (match course card look) */
article.service-card .service-thumb-frame {
  border-radius: 0.75rem 0.75rem 0 0;
}

article.service-card {
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

article.service-card:hover {
  box-shadow:
    0 12px 28px -8px rgba(74, 53, 51, 0.14),
    0 4px 8px -4px rgba(74, 53, 51, 0.08);
}

.service-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 0.75rem 0.5rem 0.875rem;
}

@media (min-width: 640px) {
  .service-card-body {
    padding: 0.875rem 0.625rem 1rem;
  }
}

@media (min-width: 768px) {
  .service-card-body {
    padding: 1rem 0.75rem 1.125rem;
  }
}

/* Brand palette — rose gold / copper from logo (not yellow-brown) */
:root {
  --brand-copper: #b97262;
  --brand-copper-hover: #a46052;
  --brand-copper-muted: #c4897c;
  --brand-copper-deep: #8f5349;
  --brand-copper-shadow: #6b433d;
  --brand-heading: #4a3533;
  --brand-body: #5c4f4d;
  --brand-muted: #756764;
  --brand-brown: #5c4542;
  --brand-cream: #faf6f4;
  --brand-blush: #f4eae7;
  --brand-ivory: #fdfbf9;
  --brand-border: #e8d9d4;
  --brand-gold: var(--brand-copper);
  --brand-gold-hover: var(--brand-copper-hover);
}

/* Site nav: white bar (beats Tailwind .bg-black on inner pages) */
header.site-header {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid var(--brand-border);
  box-sizing: border-box;
}

header.site-header nav a {
  color: var(--brand-brown) !important;
}

header.site-header nav a:hover {
  color: var(--brand-gold) !important;
}

#mobile-menu-button {
  color: var(--brand-brown) !important;
}

#mobile-menu-panel {
  background: #ffffff !important;
  color: var(--brand-brown) !important;
  border-color: var(--brand-border) !important;
}

#mobile-menu-close {
  color: var(--brand-brown) !important;
  border-color: var(--brand-border) !important;
}

#mobile-menu-panel a:hover {
  background: var(--brand-blush) !important;
  color: var(--brand-copper-deep) !important;
}

/* Map legacy yellow utilities → logo copper */
.bg-yellow-500 {
  background-color: var(--brand-copper) !important;
  color: #fdfbf9 !important;
}

.hover\:bg-yellow-400:hover {
  background-color: var(--brand-copper-hover) !important;
  color: #fdfbf9 !important;
}

a.bg-yellow-500,
button.bg-yellow-500 {
  color: #fdfbf9 !important;
}

.text-yellow-400 {
  color: var(--brand-copper-deep) !important;
}

.hover\:text-yellow-400:hover {
  color: var(--brand-copper) !important;
}

.hover\:text-yellow-600:hover {
  color: var(--brand-copper-deep) !important;
}

.border-yellow-500\/30 {
  border-color: rgba(185, 114, 98, 0.35) !important;
}

.hover\:border-yellow-400:hover {
  border-color: var(--brand-copper) !important;
}

.border-yellow-500 {
  border-color: var(--brand-copper-muted) !important;
}

.focus\:border-yellow-500:focus {
  border-color: var(--brand-copper) !important;
}

.hover\:border-yellow-500:hover {
  border-color: var(--brand-copper) !important;
}

/* Copper CTAs: beat Tailwind text-black on gold buttons */
a.bg-yellow-500.text-black,
button.bg-yellow-500.text-black {
  color: #fdfbf9 !important;
}

/* Footer: white bar aligned with header / light sections */
footer#contact {
  background-color: #ffffff !important;
  background-image: none !important;
  border-top: 1px solid var(--brand-border) !important;
  color: var(--brand-heading) !important;
}

footer#contact p.max-w-md.leading-relaxed {
  color: var(--brand-muted) !important;
}

footer#contact ul.space-y-2,
footer#contact ul.space-y-3 {
  color: var(--brand-body) !important;
}

footer#contact ul.space-y-2 a,
footer#contact ul.space-y-3 a {
  color: inherit !important;
}

footer#contact a.inline-flex.h-10.w-10.rounded-full.border {
  border-color: var(--brand-border) !important;
  color: var(--brand-heading) !important;
}

footer#contact div.mx-auto.mt-10.border-t {
  border-top-color: var(--brand-border) !important;
}

footer#contact div.mx-auto.mt-10.border-t > div {
  color: #8a7a77 !important;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.contact-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(20, 13, 13, 0.62);
  backdrop-filter: blur(4px);
}

.contact-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  border-radius: 1rem;
  background: #fdfbf9;
  color: #4a3533;
  box-shadow:
    0 24px 48px rgba(74, 53, 51, 0.22),
    0 8px 16px rgba(74, 53, 51, 0.1);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.contact-modal--open .contact-modal__panel {
  transform: translateY(0) scale(1);
}

.contact-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.contact-modal--success .contact-modal__icon {
  color: #166534;
  background: #dcfce7;
}

.contact-modal--error .contact-modal__icon {
  color: #991b1b;
  background: #fee2e2;
}

.contact-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #4a3533;
}

.contact-modal__message {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #756764;
}

.contact-modal__close {
  display: inline-block;
  min-width: 7rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 0.125rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fdfbf9;
  cursor: pointer;
  background: #8f5349;
  transition: background 0.2s ease;
}

.contact-modal__close:hover {
  background: #7a4540;
}

.contact-modal__close:focus-visible {
  outline: 2px solid #eab308;
  outline-offset: 2px;
}

.contact-form--invalid input:invalid,
.contact-form--invalid textarea:invalid {
  border-color: #c45c5c;
}

.contact-form--invalid input:focus:invalid,
.contact-form--invalid textarea:focus:invalid {
  border-color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.15);
}

/* Mobile bottom nav — under 765px (matches header/footer brand) */
.mobile-bottom-nav {
  display: none;
}

@media screen and (max-width: 765px) {
  body {
    padding-bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    padding: 0 0.15rem env(safe-area-inset-bottom, 0px);
    margin: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--brand-border);
    box-shadow: 0 -8px 28px rgba(74, 53, 51, 0.1);
  }

  .mobile-bottom-nav__item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 0;
    height: 100%;
    padding: 0.4rem 0.15rem 0.45rem;
    text-decoration: none;
    color: var(--brand-brown);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.1;
    transition:
      color 0.2s ease,
      background-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-bottom-nav__item svg {
    width: 1.28rem;
    height: 1.28rem;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
  }

  .mobile-bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav__item.is-active:not(.mobile-bottom-nav__item--center) {
    color: var(--brand-copper-deep);
  }

  .mobile-bottom-nav__item.is-active:not(.mobile-bottom-nav__item--center)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.2rem;
    width: 1.1rem;
    height: 2px;
    border-radius: 999px;
    background: var(--brand-copper);
    transform: translateX(-50%);
  }

  /* Center Services — large raised tab (sample style, brand copper) */
  .mobile-bottom-nav__item--center {
    z-index: 1;
    height: calc(100% + 0.85rem);
    margin-bottom: 0;
    padding: 0.65rem 0.35rem 0.5rem;
    color: #fdfbf9;
    font-size: 0.72rem;
    font-weight: 600;
    background: linear-gradient(165deg, #d4a091 0%, var(--brand-copper) 45%, var(--brand-copper-deep) 100%);
    border-radius: 14px 14px 0 0;
    box-shadow:
      0 -4px 18px rgba(185, 114, 98, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .mobile-bottom-nav__item--center svg {
    width: 1.7rem;
    height: 1.7rem;
    stroke: #fdfbf9;
  }

  .mobile-bottom-nav__item--center span {
    color: #fdfbf9;
  }

  .mobile-bottom-nav__item--center.is-active {
    box-shadow:
      0 -6px 22px rgba(143, 83, 73, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  #whatsapp-float {
    bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px)) !important;
    right: max(1rem, env(safe-area-inset-right, 0px)) !important;
  }
}
