/* Dog Rescue Manager — global Header & Footer */

body.drm-custom-layout {
    --drm-global-red: #b3002d;
    --drm-global-red-dark: #8c0023;
    --drm-global-ink: #111114;
    --drm-global-muted: #6b6870;
    --drm-global-header-height: 92px;
}

/* Hide Kadence/theme chrome only when the Manager layout is enabled. */
body.drm-custom-layout #masthead:not(.drm-site-header),
body.drm-custom-layout .site-header:not(.drm-site-header),
body.drm-custom-layout #colophon:not(.drm-site-footer),
body.drm-custom-layout .site-footer:not(.drm-site-footer) {
    display: none !important;
}

body.drm-custom-layout:not(.drm-layout-transparent) {
    padding-top: var(--drm-global-header-height);
}

.drm-site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    height: var(--drm-global-header-height);
    color: var(--drm-global-ink);
    background: #fff;
    border-bottom: 1px solid rgba(17,17,20,.07);
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

body.admin-bar .drm-site-header {
    top: 32px;
}

body.drm-layout-sticky .drm-site-header {
    position: fixed;
}

body.drm-layout-transparent .drm-site-header:not(.is-scrolled) {
    background: transparent;
    border-color: transparent;
}

.drm-site-header.is-scrolled {
    background: rgba(255,255,255,.96);
    border-color: rgba(17,17,20,.07);
    box-shadow: 0 8px 28px rgba(17,17,20,.08);
    backdrop-filter: blur(12px);
}

.drm-site-header__inner {
    width: min(1240px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
}

.drm-site-brand {
    display: flex;
    align-items: center;
    width: 118px;
    height: 84px;
    color: var(--drm-global-ink);
    text-decoration: none !important;
}

.drm-site-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drm-site-brand span {
    font-weight: 900;
    line-height: 1.05;
}

.drm-site-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.65vw, 26px);
}

.drm-site-nav__link {
    position: relative;
    padding: 12px 0;
    color: var(--drm-global-ink);
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
}

.drm-site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 0;
    height: 2px;
    background: var(--drm-global-red);
    transition: width .2s ease;
}

.drm-site-nav__link:hover,
.drm-site-nav__link.is-current {
    color: var(--drm-global-red);
}

.drm-site-nav__link:hover::after,
.drm-site-nav__link.is-current::after {
    width: 100%;
}

.drm-site-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.drm-social-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(17,17,20,.08);
    color: var(--drm-global-ink);
    text-decoration: none !important;
}

.drm-social-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.drm-header-donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 21px;
    border-radius: 7px;
    background: var(--drm-global-red);
    color: #fff !important;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none !important;
    transition: background .2s ease, transform .2s ease;
}

.drm-header-donate:hover {
    background: var(--drm-global-red-dark);
    transform: translateY(-1px);
}

.drm-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.drm-mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px auto;
    border-radius: 10px;
    background: var(--drm-global-ink);
}

/* Mobile menu */
.drm-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 10050;
    visibility: hidden;
    pointer-events: none;
    background: rgba(17,17,20,.38);
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
}

.drm-mobile-menu.is-open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.drm-mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(88vw, 420px);
    height: 100%;
    padding: 28px;
    background: #fff;
    transform: translateX(100%);
    transition: transform .28s ease;
    overflow-y: auto;
}

.drm-mobile-menu.is-open .drm-mobile-menu__panel {
    transform: translateX(0);
}

.drm-mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(17,17,20,.08);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.drm-mobile-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #f6f2ef;
    color: var(--drm-global-ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.drm-mobile-nav {
    display: grid;
    padding: 20px 0;
}

.drm-mobile-nav a {
    padding: 15px 2px;
    border-bottom: 1px solid rgba(17,17,20,.07);
    color: var(--drm-global-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    line-height: 1.05;
    text-decoration: none !important;
}

.drm-mobile-menu__actions {
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.drm-mobile-menu__actions a {
    color: var(--drm-global-red);
    font-weight: 800;
    text-decoration: none !important;
}

.drm-mobile-donate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 10px;
    background: var(--drm-global-red);
    color: #fff !important;
}

/* Footer */
.drm-site-footer {
    position: relative;
    z-index: 10;
    background: #0d0d0f;
    color: #fff;
}

.drm-site-footer__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 60px 0 48px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) .7fr .7fr;
    gap: 58px;
}

.drm-site-footer__brand {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.drm-site-footer__logo {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding: 8px;
    border-radius: 22px;
    background: #fff;
}

.drm-site-footer__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.drm-site-footer__brand h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
}

.drm-site-footer__brand p {
    max-width: 420px;
    margin: 0;
    color: rgba(255,255,255,.68);
    line-height: 1.6;
}

.drm-site-footer__col h3 {
    margin: 0 0 15px;
    color: #fff;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.drm-site-footer__links {
    display: grid;
    gap: 10px;
}

.drm-site-footer__links a {
    color: rgba(255,255,255,.72);
    text-decoration: none !important;
}

.drm-site-footer__links a:hover {
    color: #fff;
}

.drm-site-footer__bottom {
    width: min(1180px, calc(100% - 40px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-top: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.drm-site-footer__bottom-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.drm-site-footer__bottom a {
    color: #fff;
    text-decoration: none !important;
}

.drm-site-footer__bottom a:hover {
    color: #ff365f;
}

body.drm-mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 1120px) {
    .drm-site-header__inner {
        grid-template-columns: 108px minmax(0,1fr) auto;
        gap: 18px;
    }

    .drm-site-brand {
        width: 102px;
    }

    .drm-site-nav {
        gap: 15px;
    }

    .drm-site-nav__link {
        font-size: 13px;
    }
}

@media (max-width: 980px) {
    body.drm-custom-layout {
        --drm-global-header-height: 82px;
    }

    .drm-site-header__inner {
        grid-template-columns: 92px 1fr auto;
    }

    .drm-site-brand {
        width: 88px;
        height: 76px;
    }

    .drm-site-nav,
    .drm-social-button,
    .drm-header-donate {
        display: none;
    }

    .drm-mobile-toggle {
        display: block;
    }

    .drm-site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .drm-site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 782px) {
    body.admin-bar .drm-site-header {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .drm-site-header__inner {
        width: min(100% - 24px, 1240px);
    }

    .drm-site-footer__inner {
        width: min(100% - 28px, 1180px);
        padding: 46px 0 34px;
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .drm-site-footer__brand {
        grid-column: auto;
        grid-template-columns: 76px minmax(0,1fr);
    }

    .drm-site-footer__logo {
        width: 76px;
        height: 76px;
    }

    .drm-site-footer__bottom {
        width: min(100% - 28px, 1180px);
        padding: 22px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .drm-site-footer__bottom-links {
        flex-wrap: wrap;
    }
}


/* v0.9 — 9 navigation items */
@media (min-width: 981px) {
    .drm-site-header__inner {
        gap: 22px;
    }

    .drm-site-nav {
        gap: clamp(10px, 1.15vw, 18px);
    }

    .drm-site-nav__link {
        font-size: 13px;
    }

    .drm-header-donate {
        padding-left: 18px;
        padding-right: 18px;
    }
}
