/* Small additions on top of main.css (the original compiled Tailwind stylesheet)
   for the pieces that were previously rendered by React components. */

/* Services dropdown in the desktop navbar */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: -8px;
  z-index: 50;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: top left;
  transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-dropdown::before { /* hover bridge so the menu doesn't close while moving the mouse into it */
  content: "";
  position: absolute;
  inset: -14px 0 auto 0;
  height: 14px;
}
.nav-dropdown.is-open { opacity: 1; transform: scale(1); }

/* Mobile menu close button */
.sheet-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
}
.sheet-close:hover { background: var(--accent); color: var(--accent-foreground, inherit); }
.sheet-close:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
html.menu-open { overflow: hidden; }
#mobile-menu { position: relative; z-index: 60; } /* above the cookie banner */

/* FAQ accordion */
.accordion-panel { transition: height 0.25s ease; }
[data-slot=accordion-trigger][aria-expanded=true] [data-slot=accordion-trigger-icon]:first-of-type { display: none; }
[data-slot=accordion-trigger][aria-expanded=true] [data-slot=accordion-trigger-icon]:last-of-type { display: inline; }

/* Native form controls styled to match the original custom widgets */
.native-select {
  appearance: none;
  -webkit-appearance: none;
  color: var(--foreground);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  cursor: pointer;
}
.native-select:invalid, .native-select.is-placeholder { color: var(--muted-foreground); }
.native-select option { color: var(--foreground); background: var(--background); }
.native-checkbox {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  cursor: pointer;
}
.field-error { font-size: 0.875rem; color: var(--destructive); }
.form-alert { font-size: 0.875rem; color: var(--destructive); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
form[data-form-id] { position: relative; }
.btn-spinner { width: 1rem; height: 1rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Fix from the original site: long CTA labels on the service pages could not wrap,
   which made those pages wider than a phone screen. */
@media (max-width: 639px) {
  [data-slot=button] {
    white-space: normal;
    height: auto;
    min-height: var(--btn-h, 2.5rem);
    padding-block: 0.5rem;
    text-align: center;
    max-width: 100%;
    flex-shrink: 1;
  }
}

/* Header logo: a little larger than the original 48px, with a short pop-in and gold glow on page load */
#site-header a[href="/"] > img {
  height: 3.25rem; /* 52px on phones */
  animation: logo-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both, logo-glow 1.6s ease-out 0.5s both;
  transform-origin: left center;
}
@media (min-width: 768px) {
  #site-header > div { height: 4.5rem; } /* 72px, was 64px */
  #site-header a[href="/"] > img { height: 3.75rem; } /* 60px */
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.88); }
  to { opacity: 1; transform: none; }
}
@keyframes logo-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(235, 193, 108, 0)); }
  40% { filter: drop-shadow(0 0 10px rgba(235, 193, 108, 0.55)); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none !important; opacity: 1 !important; translate: none !important; }
  .nav-dropdown, .accordion-panel { transition: none; }
  #site-header a[href="/"] > img { animation: none; }
}

/* Header spans the full screen width (like most consultancy sites): logo near the left edge, menu near the
   right, instead of following the narrower centred content column used by the page sections below. */
#site-header > div { max-width: 1920px; }
@media (min-width: 1024px) {
  #site-header > div { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ---------- Footer: brand, two short link columns and a contact box, then one bottom line ---------- */
.site-footer .sf-top { display: grid; gap: 2.5rem 1.5rem; padding: 3.5rem 0 3rem; grid-template-columns: 1fr 1fr; }
.site-footer .sf-brand, .site-footer .sf-cta { grid-column: 1 / -1; } /* phones and tablets: link columns side by side */
@media (min-width: 1024px) {
  .site-footer .sf-top { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
  .site-footer .sf-top--cta { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; }
  .site-footer .sf-brand, .site-footer .sf-cta { grid-column: auto; }
}
.site-footer .sf-logo { display: block; height: 2.75rem; width: auto; }
.site-footer .sf-tagline { margin-top: 1rem; max-width: 20rem; }
.site-footer .sf-links { margin-top: 1rem; display: grid; gap: 0.625rem; }
.site-footer .sf-cta-text { margin-top: 1rem; max-width: 18rem; }
.site-footer .sf-cta-button { margin-top: 1.25rem; }
.site-footer .sf-bottom { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
@media (min-width: 768px) { .site-footer .sf-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer .sf-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
