/* OceanWP core sets html{overflow-x:hidden}, which silently disables position:sticky
   for every element on the page (any ancestor with non-visible overflow on either axis
   breaks it). overflow-x:clip keeps the same "no horizontal scrollbar" behavior without
   breaking sticky. */
html, body { overflow-x: clip; }

:root {
    --plum: #7E5195;
    --plum-dark: #7E5195;
    --ink: #241A20;
    --sub: #6B5E63;
    --muted: #B7A9AF;
    --line: #F1E9EC;
    --hover-bg: #F6EFF2;
    --hover-bg-2: #FAF3F5;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font-family: 'Poppins', -apple-system, 'Segoe UI', sans-serif; }
  a { text-decoration: none; color: inherit; }

  /* ---------- Top bar ---------- */
  .topbar {
    background: var(--plum);
    overflow: hidden;
    max-height: 44px;
    opacity: 1;
    transition: max-height .25s ease, opacity .2s ease;
  }
  .topbar-inner {
    width: 100%;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .topbar-contact { display: flex; align-items: center; gap: 28px; }
  .topbar-item { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 400; }
  .topbar-item i { opacity: .75; font-size: 13px; width: 14px; text-align: center; }
  .topbar-socials { display: flex; align-items: center; gap: 10px; }
  .social-circle {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #F0E6EA;
  }
  .topbar-mobile {
    align-items: center; justify-content: center; gap: 8px;
    background: var(--plum); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .01em;
    padding: 12px 20px;
  }
  .topbar-mobile:active { background: var(--plum-dark); }

  /* ---------- Main nav ---------- */
  .site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: none; transition: box-shadow .2s ease; }
  .site-header.is-scrolled { box-shadow: 0 4px 16px rgba(40,20,30,0.10); }
  .site-header.is-scrolled .topbar { max-height: 0; opacity: 0; }

  .navbar {
    width: 100%;
    padding: 10px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
  }

  .logo img { display: block; width: 76px; height: 76px; object-fit: contain; }

  .nav-links { display: flex; align-items: center; gap: 6px; position: relative; }
  .nav-link {
    padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 400;
    color: var(--ink); white-space: nowrap; cursor: pointer;
  }
  .nav-link:hover { background: var(--hover-bg); }

  .has-dropdown { position: relative; }
  .dd-trigger { display: flex; align-items: center; gap: 5px; }
  .dd-trigger.open { background: var(--hover-bg); }
  .dd-chevron { transition: transform .15s; }
  .dd-trigger.open .dd-chevron { transform: rotate(180deg); }

  .dropdown-panel {
    position: absolute; top: calc(100% + 10px); left: 0;
    width: 230px; background: #fff; border-radius: 12px;
    box-shadow: 0 20px 50px rgba(40,20,30,0.22); border: 1px solid var(--line);
    padding: 8px; z-index: 40; display: none; animation: fadeIn .15s ease;
  }
  .dropdown-panel.open { display: block; }
  .dropdown-panel a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #3E2E36; }
  .dropdown-panel a:hover { background: var(--hover-bg-2); }
  .dropdown-section-label {
    padding: 6px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted);
  }
  .dropdown-divider { height: 1px; background: var(--line); margin: 6px 4px; }

  /* Mega menu */
  .mega-panel {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    width: 1040px; background: #fff; border-radius: 14px;
    box-shadow: 0 20px 50px rgba(40,20,30,0.22); border: 1px solid var(--line);
    padding: 30px 32px; display: none; column-count: 4; column-gap: 32px;
    column-rule: 1px solid var(--line);
    overflow: hidden;
    z-index: 40; animation: fadeIn .15s ease;
  }
  .mega-panel.open { display: block; }
  .mega-panel a { display: block; padding: 8px 20px 8px 10px; margin: 0 -14px; border-radius: 6px; font-size: 13.5px; color: #3E2E36; white-space: nowrap; break-inside: avoid; }
  .mega-panel a:hover { background: var(--hover-bg-2); }

  .cta-btn {
    flex-shrink: 0; padding: 10px 22px; border-radius: 9px; background: var(--plum);
    color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap;
    display: flex; align-items: center; gap: 8px;
  }
  .cta-btn:hover { background: #FBF2ED; color: var(--plum-dark); }

  .cta-arrow { display: inline-flex; font-size: 12px; animation: arrowNudge 1.4s ease-in-out infinite; }

  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
  @keyframes arrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
  }

  /* OceanWP core defines a bare `a:hover{color:#13aff0}` (blue). A pseudo-class beats our
     plain `a{color:inherit}` on specificity, so it wins on hover/active regardless of load
     order. Re-declare the intended color per link context so nothing here turns blue. */
  #siteHeader .nav-link:hover { color: var(--ink); }
  #siteHeader .dropdown-panel a:hover,
  #siteHeader .mega-panel a:hover { color: #3E2E36; }
  #siteHeader .topbar-item a:hover,
  #siteHeader .topbar-item a:focus { color: #F0E6EA; }
  #siteHeader .topbar-socials .social-circle:hover { color: #F0E6EA; }
  #siteHeader .topbar-mobile:hover,
  #siteHeader .topbar-mobile:focus { color: #fff; }
  .drawer .drawer-submenu a:hover { color: #5A4A50; }
  .drawer .drawer-footer-row a:hover { color: #5A4A50; }

  /* ---------- Mobile ---------- */
  /* Scoped + prefixed (hdr-*) so these never collide with a WP theme's own .mobile-only/.desktop-only utility classes */
  #siteHeader .hdr-mobile-only { display: none; }
  #siteHeader .hdr-desktop-only { display: flex; align-items: center; gap: 10px; }

  /* Drawer must default to hidden at every screen size — it was only hidden inside the
     max-width:960px query below, so on desktop it fell back to the browser default
     (display:block) and rendered inline on the page. */
  .drawer-backdrop { display: none; }
  .drawer { display: none; }

  @media (max-width: 960px) {
    #siteHeader .hdr-desktop-only { display: none !important; }
    #siteHeader .hdr-mobile-only { display: flex; }

    .navbar { padding: 14px 18px; }
    .logo img { width: 64px; height: 64px; }

    .hamburger {
      width: 40px; height: 40px; border-radius: 10px; background: var(--hover-bg);
      display: flex; align-items: center; justify-content: center; cursor: pointer;
      flex-direction: column; gap: 4px;
    }
    .hamburger span { width: 18px; height: 2px; background: var(--plum); border-radius: 2px; }

    .drawer-backdrop {
      position: fixed; inset: 0; background: rgba(20,10,15,0.35); z-index: 200;
      display: none; animation: fadeIn .2s ease;
    }
    .drawer-backdrop.open { display: block; }

    .drawer {
      position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 360px;
      background: #fff; z-index: 210; display: none; flex-direction: column;
      box-shadow: -8px 0 30px rgba(0,0,0,0.15); animation: slideIn .22s ease;
    }
    .drawer.open { display: flex; }

    .drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px; border-bottom: 1px solid var(--line); }
    .drawer-header img { width: 64px; height: 64px; object-fit: contain; }
    .drawer-close {
      width: 34px; height: 34px; border-radius: 9px; background: var(--hover-bg);
      display: flex; align-items: center; justify-content: center; cursor: pointer;
    }

    .drawer-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
    .drawer-row {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 12px; border-bottom: 1px solid #F5EFF1; cursor: pointer;
    }
    .drawer-row-label { display: flex; align-items: center; gap: 14px; font-size: 15.5px; font-weight: 500; color: var(--ink); }
    .drawer-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
    .drawer-row a.drawer-row-label { width: 100%; }
    .drawer-chevron { transition: transform .15s; }
    .drawer-row.open .drawer-chevron { transform: rotate(180deg); }

    .drawer-submenu { padding: 0 12px 12px 34px; display: none; flex-direction: column; gap: 2px; }
    .drawer-submenu.open { display: flex; }
    .drawer-submenu a { padding: 8px 6px; font-size: 13.5px; color: #5A4A50; }
    .drawer-submenu-label {
      font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
      color: var(--muted); padding: 6px 6px 2px;
    }

    .drawer-footer {
      padding: 16px 18px 22px; border-top: 1px solid var(--line); background: #FAF7F8;
      display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center;
    }
    .drawer-footer-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #5A4A50; }
    .drawer-footer-row i { opacity: .7; font-size: 12.5px; width: 14px; text-align: center; }
    .drawer-footer-socials { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
    .drawer-footer-socials .social-circle { background: var(--plum); color: #fff; border: none; width: 28px; height: 28px; font-size: 12px; }
  }

  /* ========== Site footer (merged from footer.css) ========== */
  .site-footer {
    /* Scoped to .site-footer (not :root) so these never collide with the header's own
       --plum/--muted/--line variables defined above */
    --f-plum: #7E5195;
    --f-plum-darker: #7E5195;
    --f-line: rgba(255,255,255,0.08);
    --f-accent: #8B5F76;
    --f-icon: #C79BB0;
    --f-text: #CBB2BF;
    --f-muted: #B79AA8;
    background: var(--f-plum);
  }

  .footer-grid {
    display: grid; grid-template-columns: 1.15fr 0.95fr 1fr 0.9fr 0.95fr; gap: 40px;
    padding: 60px 56px 0;
  }
  .footer-col { display: flex; flex-direction: column; gap: 22px; }
  .footer-col-first { display: flex; flex-direction: column; gap: 22px; }
  .footer-logo {
    width: 60px; height: 60px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 10px;
    color: var(--f-muted); text-align: center; line-height: 1.3;
  }
  .footer-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
  .footer-blurb { font-size: 14px; line-height: 1.7; color: #fff; max-width: 250px; }

  .footer-heading-block { display: flex; flex-direction: column; gap: 6px; }
  .footer-heading { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin: 0; }
  .footer-rule { width: 26px; height: 2px; background: #fff; }

  .icon-circle {
    width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .address-row { display: flex; gap: 12px; font-size: 13.5px; line-height: 1.75; color: #fff; }
  .contact-block { display: flex; flex-direction: column; gap: 14px; }
  .contact-row { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #fff; }
  /* Same OceanWP core `a:hover{color:#13aff0}` (blue) issue fixed in the header — this is
     the only footer link that had no explicit hover color of its own to outrank it. */
  .site-footer .contact-row a:hover,
  .site-footer .contact-row a:focus { color: var(--f-text); }

  .social-row { display: flex; align-items: center; gap: 10px; }
  /* Scoped to .site-footer: this file already defines a bare .social-circle for the
     header's topbar icons (26x26px) — without this scope, whichever rule loads last
     would silently win for both header and footer icons. */
  .site-footer .social-circle {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
    color: #fff; cursor: pointer; transition: background .15s, border-color .15s;
  }
  .site-footer .social-circle:hover { background: var(--f-accent); border-color: var(--f-accent); }

  .link-list { display: flex; flex-direction: column; gap: 7px; }
  .link-list a { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #fff; }
  .link-list a:hover { color: #FBF2ED; }
  .link-list a i { flex-shrink: 0; color: inherit; }

  .footer-rule-full { height: 1px; background: var(--f-line); margin: 48px 56px 0; }

  .footer-bar {
    background: #391631; margin-top: 32px; padding: 18px 56px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; color: #fff; flex-wrap: wrap; gap: 10px;
  }
  .footer-bar-links { display: flex; align-items: center; gap: 16px; }
  .footer-bar a { color: #fff; }
  .footer-bar a:hover { color: #C7AEB9; }

  @media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 28px 22px 0; }
    .footer-heading-block, .footer-col { gap: 14px; }
    .footer-col-first { display: flex; gap: 10px; align-items: center; justify-content: center; }
    .footer-blurb { max-width: none; text-align: center; }
    .footer-rule-full { margin: 28px 22px 0; }
    .footer-bar { flex-direction: column; text-align: center; padding: 16px 22px; }

    /* Services column becomes a 2-col wrap on mobile */
    .services-wrap { column-count: 2; column-gap: 16px; display: block !important; }
    .services-wrap a { display: flex; align-items: center; gap: 8px; break-inside: avoid; padding: 5px 0 12px; }
  }
