:focus-visible {
  outline: 3px solid #3a3350;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10002;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  border-radius: .65rem;
  background: #3a3350;
  color: #fff;
  font-weight: 800;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

img {
  height: auto;
}

/* Keep the square brand mark consistent in every page footer.
   Explicit min/max sizes prevent old cached utility rules from stretching it. */
footer img[src*="masal-adasi-logo"] {
  display: block !important;
  width: 5rem !important;
  min-width: 5rem !important;
  max-width: 5rem !important;
  height: 5rem !important;
  min-height: 5rem !important;
  max-height: 5rem !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  flex: 0 0 5rem !important;
}

@media (max-width: 639px) {
  footer img[src*="masal-adasi-logo"] {
    width: 4.5rem !important;
    min-width: 4.5rem !important;
    max-width: 4.5rem !important;
    height: 4.5rem !important;
    min-height: 4.5rem !important;
    max-height: 4.5rem !important;
    flex-basis: 4.5rem !important;
  }
}

/* Expandable detail blocks retain useful depth without tiring visitors. */
.content-details {
  border: 1px solid rgba(140, 117, 165, .24);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.content-details > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 800;
  color: #3a3350;
}

.content-details > summary::-webkit-details-marker { display: none; }
.content-details > summary::after { content: "+"; float: right; color: #c9782e; font-size: 1.25rem; }
.content-details[open] > summary::after { content: "−"; }
.content-details[open] > summary { border-bottom: 1px solid rgba(140, 117, 165, .18); }
.content-details .details-body { padding: 1rem 1.15rem 1.25rem; }

/* Fixed header clearance and balanced inner-page title bands. */
header.fixed + main {
  padding-top: 6.5rem !important;
}

header.fixed + main > section:first-child[class*="bg-[var(--lavender)]"] {
  padding-top: 2.5rem !important;
  padding-bottom: 2.5rem !important;
}

@media (min-width: 768px) {
  header.fixed + main > section:first-child[class*="bg-[var(--lavender)]"] {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
  }
}

/* Inline links must remain legible on lavender and other dark color bands. */
section[class*="text-white"] a.underline:not([class*="bg-"]),
section[class*="bg-[var(--lavender)]"][class*="text-white"] a[class*="text-[var(--lavender)]"]:not([class*="bg-white"]) {
  color: #fff !important;
  text-decoration-color: rgba(255, 255, 255, .85);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.cookie-settings-button {
  display: block;
  margin: .75rem auto 0;
  padding: .35rem .7rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: .8rem;
}

#cookie-consent-panel {
  position: fixed;
  z-index: 10001;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e7ddef;
  border-radius: 1rem;
  background: #fff;
  color: #3a3350;
  box-shadow: 0 16px 48px rgba(58, 51, 80, .22);
  font-family: Nunito, system-ui, sans-serif;
}

.cookie-consent-copy { max-width: 44rem; }
.cookie-consent-copy strong { display: block; font-size: 1rem; }
.cookie-consent-copy p { margin: .35rem 0; font-size: .9rem; line-height: 1.45; }
.cookie-consent-copy a { color: #73568f; font-size: .85rem; font-weight: 700; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: .55rem; flex-shrink: 0; }
.cookie-consent-actions button {
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 1px solid #9c82b5;
  border-radius: 999px;
  background: #fff;
  color: #3a3350;
  font-weight: 800;
}
.cookie-consent-actions .cookie-consent-accept { background: #9c82b5; color: #fff; }

@media (max-width: 639px) {
  #cookie-consent-panel {
    bottom: 5rem;
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-consent-actions button { flex: 1; }
}

/* Instagram is a secondary discovery channel in the header. The primary
   call, WhatsApp and directions controls stay unchanged in the bottom bar. */
.instagram-header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #73568f;
  background: #fff;
  border: 1px solid rgba(156, 130, 181, .38);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(58, 51, 80, .10);
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.instagram-header-link:hover {
  color: #fff;
  background: #73568f;
  border-color: #73568f;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(58, 51, 80, .18);
}

.instagram-header-link:focus-visible {
  outline: 3px solid rgba(242, 169, 59, .55);
  outline-offset: 3px;
}

.instagram-header-link svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}

.instagram-header-mobile {
  width: 36px;
  height: 36px;
  margin-left: auto;
  margin-right: .625rem;
  color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(164, 35, 147, .18);
}

/* Keep the mobile homepage focused: the appointment action should be visible
   before the first scroll while the fixed contact bar remains unobstructed. */
@media (max-width: 639px) {
  .home-hero {
    padding-top: 2.5rem !important;
    padding-bottom: 2.75rem !important;
  }

  .home-hero-kicker { margin-bottom: 1rem !important; }
  .home-hero-title {
    font-size: 1.875rem !important;
    line-height: 1.12 !important;
    margin-bottom: .85rem !important;
  }
  .home-hero-story {
    font-size: 2.125rem !important;
    line-height: 1.14 !important;
    margin-bottom: .65rem !important;
  }
  .home-hero-story .script-font { font-size: 2.75rem !important; }
  .home-hero-slogan {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }
  .home-hero-copy {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.25rem !important;
  }
  .home-hero-actions {
    gap: .75rem !important;
    margin-bottom: 1.5rem !important;
  }
  .home-hero-actions button,
  .home-hero-actions a {
    padding: .75rem 1.25rem !important;
  }
  .home-hero-phone { display: none !important; }
}

@media (min-width: 640px) {
  .instagram-header-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
