/* ==========================================================================
   Header revamp — mirrors adoption-wp-demo (adoption.com) look & feel
   Scoped to .arr-header so rest of app CSS (admin/profile) is untouched.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Page background — override legacy $body-bg (#f5f7f2) so margins around .container are white */
html, body { background: #fff !important; }
/* Neutralize legacy body{margin-top:55px} from compiled app.css (was fixed-nav offset; new header is static) */
body { margin-top: 0 !important; }

.arr-header {
    --arr-red: #eb505f;
    --arr-ink: #333333;
    --arr-black: #000000;
    --arr-line: #e5e5e5;
    --arr-soft: #f2f2f2;
    --arr-shadow: 0 2px 10px rgba(0,0,0,0.08);
    --arr-menu-shadow: 0 4px 12px rgba(13,10,44,0.20);
    background: #ffffff;
    width: 100%;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--arr-ink);
    position: relative;
    z-index: 1000;
    box-shadow: var(--arr-shadow);
}
.arr-header *, .arr-header *::before, .arr-header *::after { box-sizing: border-box; }
.arr-header a { text-decoration: none; color: inherit; }
.arr-header ul { list-style: none; margin: 0; padding: 0; }
.arr-header button { font-family: inherit; cursor: pointer; background: transparent; border: 0; padding: 0; color: inherit; }
.arr-header .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.arr-header__bar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 88px;
}

/* Logo */
.arr-header__logo { flex-shrink: 0; display: inline-flex; align-items: center; }
.arr-header__logo img { height: 28px; width: auto; max-height: 32px; display: block; }

/* Desktop nav */
.arr-nav { display: flex; align-items: center; margin-left: auto; }
.arr-nav__list { display: flex; align-items: center; gap: 24px; }
.arr-nav__item { position: relative; }
.arr-nav__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
    line-height: 1;
    color: var(--arr-ink);
    text-transform: uppercase;
    border-radius: 8px;
    white-space: nowrap;
}
.arr-nav__btn:hover { color: var(--arr-black); }
.arr-nav__chev { display: none; }

/* Single-column dropdown */
.arr-nav__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 300px;
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--arr-menu-shadow);
    display: none;
    z-index: 1001;
}
/* Invisible bridge — covers 8px gap so cursor stays in hover zone and links stay clickable */
.arr-nav__menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}
.arr-nav__menu > li > a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--arr-ink);
    border-radius: 8px;
    line-height: 1.3;
}
.arr-nav__menu > li > a:hover { background: var(--arr-soft); }
.arr-nav__menu-cta { margin-top: 4px; }
.arr-nav__menu-cta a {
    display: inline-block;
    margin: 6px 12px;
    padding: 10px 14px !important;
    border: 1px solid var(--arr-red);
    color: var(--arr-red);
    font-weight: 600;
    border-radius: 8px;
}
.arr-nav__menu > li.arr-nav__menu-cta > a:hover { background: var(--arr-red); color: #fff !important; }

/* Mega menu (3 columns) */
.arr-nav__mega {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 780px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--arr-menu-shadow);
    display: none;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
    z-index: 1001;
}
/* Invisible bridge — same purpose as .arr-nav__menu::before */
.arr-nav__mega::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}
.arr-nav__mega-col { display: flex; flex-direction: column; }
.arr-nav__mega-col a,
.arr-nav__mega-head {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--arr-ink);
    border-radius: 8px;
    line-height: 1.3;
}
.arr-nav__mega-head { font-weight: 600; }
.arr-nav__mega-head a { padding: 0; font-weight: inherit; }
.arr-nav__mega-col a:hover { background: var(--arr-soft); }
.arr-nav__mega-cta {
    margin-top: 4px;
    border: 1px solid var(--arr-red);
    color: var(--arr-red) !important;
    font-weight: 600;
    align-self: flex-start;
}
.arr-nav__mega-col a.arr-nav__mega-cta:hover { background: var(--arr-red); color: #fff !important; }

/* Open state: hover + click */
.arr-nav__item:hover .arr-nav__menu,
.arr-nav__item.is-open .arr-nav__menu { display: block; }
.arr-nav__item:hover .arr-nav__mega,
.arr-nav__item.is-open .arr-nav__mega { display: grid; }

/* Right cluster */
.arr-header__right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search (desktop) */
.arr-search {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--arr-line);
    border-radius: 999px;
    padding: 2px 4px 2px 14px;
    height: 40px;
    transition: border-color 0.15s ease;
}
.arr-search:focus-within { border-color: var(--arr-ink); }
.arr-search__input {
    border: 0;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--arr-ink);
    width: 160px;
    padding: 0 6px;
    height: 100%;
}
.arr-search__input::placeholder { color: #888; }
.arr-search__btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--arr-ink);
    background: transparent;
}
.arr-search__btn:hover { background: var(--arr-soft); }

/* User */
.arr-user { position: relative; }
.arr-user__btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--arr-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--arr-ink);
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.arr-user__btn:hover { background: var(--arr-soft); border-color: var(--arr-ink); }
.arr-user__btn img { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
.arr-user__initials { font-size: 13px; font-weight: 600; }
.arr-user__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--arr-menu-shadow);
    display: none;
    z-index: 1001;
}
.arr-user.is-open .arr-user__menu { display: block; }
.arr-user__menu a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--arr-ink);
    border-radius: 8px;
}
.arr-user__menu a:hover { background: var(--arr-soft); }
.arr-user__menu .fa { margin-right: 8px; color: var(--arr-ink); }

/* Burger (tablet/mobile) */
.arr-burger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    height: 40px;
    background: var(--arr-red);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.6px;
}
.arr-burger span {
    display: block;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    margin: 0;
}
.arr-burger span + span { margin-top: 3px; }
.arr-burger__label { font-style: normal; margin-left: 6px; }
.arr-burger > span {
    position: relative;
}
/* Stack hamburger bars inside button */
.arr-burger { position: relative; }
.arr-burger span:nth-child(1),
.arr-burger span:nth-child(2),
.arr-burger span:nth-child(3) { display: block; }
.arr-burger {
    display: none;
}

/* Mobile menu panel */
.arr-mobile {
    border-top: 1px solid var(--arr-line);
    background: #fff;
    padding: 12px 20px 20px;
}
.arr-mobile ul { display: flex; flex-direction: column; gap: 4px; }
.arr-mobile a {
    display: block;
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--arr-ink);
    text-transform: uppercase;
    border-radius: 8px;
    letter-spacing: 0.3px;
}
.arr-mobile a:hover { background: var(--arr-red); color: #fff; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .arr-header__bar { padding: 12px 24px; gap: 16px; min-height: 72px; }
    .arr-nav { display: none; }
    .arr-search__input { display: none; }
    .arr-search { padding: 0; border: 1px solid var(--arr-line); width: 40px; height: 40px; justify-content: center; }
    .arr-search__btn { width: 38px; height: 38px; }
    .arr-burger { display: inline-flex; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .arr-header__bar { padding: 10px 16px; min-height: 64px; }
    .arr-header__logo img { height: 30px; }
    .arr-search { display: none; }
    .arr-burger__label { display: none; }
    .arr-burger { padding: 10px 12px; min-width: 40px; }
}

/* ---------- Reset legacy bootstrap header ad row padding so new header sits flush ---------- */
.arr-header + .dfp-ad { margin-top: 0; }

/* ---------- Hide legacy second-level (Reunion Registry tabs) menu ---------- */
.secondLevel-menu { display: none !important; }
