/* ==========================================================================
   DPD Custom Header v3.0 - Premium Healthcare Design
   Sticky, glassmorphism, state-aware
   ========================================================================== */

:root {
    --dpd-h-height: 72px;
    --dpd-h-blue:   #1A73B5;
    --dpd-h-green:  #0FA573;
    --dpd-h-text:   #0F172A;
    --dpd-h-muted:  #64748B;
    --dpd-h-bg:     rgba(255,255,255,.72);
    --dpd-h-bg-scrolled: rgba(255,255,255,.92);
    --dpd-h-border: rgba(15,23,42,.06);
    --dpd-h-shadow: 0 4px 24px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.03);
    --dpd-h-shadow-lg: 0 20px 48px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.04);
    --dpd-h-radius: 12px;
    --dpd-h-ease:   cubic-bezier(.16,1,.3,1);
}

/* ===== Verberg Blocksy / generic theme header ===== */
header[data-id="header"],
.ct-header,
.ct-header-template,
header[data-device="desktop"],
header[data-device="mobile"],
body:not(.wp-admin) > #header,
.site-header { display: none !important; }

/* ===== Header wrapper ===== */
.dpd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--dpd-h-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: background .35s var(--dpd-h-ease),
                border-color .35s var(--dpd-h-ease),
                box-shadow .35s var(--dpd-h-ease);
    font-family: var(--dpd-font, 'DM Sans', 'Segoe UI', sans-serif);
}
.dpd-header.is-scrolled {
    background: var(--dpd-h-bg-scrolled);
    border-bottom-color: var(--dpd-h-border);
    box-shadow: var(--dpd-h-shadow);
}
.dpd-header__spacer {
    height: var(--dpd-h-height);
}
.dpd-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: var(--dpd-h-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ===== Logo ===== */
.dpd-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: var(--dpd-h-height);
    text-decoration: none;
}
.dpd-header__logo img {
    height: 42px;
    width: auto;
    display: block;
    transition: transform .3s var(--dpd-h-ease),
                opacity .3s ease;
}
.dpd-header__logo:hover img {
    transform: scale(1.02);
}

/* ===== Desktop nav ===== */
.dpd-header__nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}
.dpd-header__nav a {
    position: relative;
    padding: 10px 18px;
    color: var(--dpd-h-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: color .25s var(--dpd-h-ease),
                background .25s var(--dpd-h-ease);
    letter-spacing: -.01em;
}
.dpd-header__nav a:hover {
    color: var(--dpd-h-blue);
    background: rgba(26,115,181,.05);
}
.dpd-header__nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--dpd-h-blue), var(--dpd-h-green));
    border-radius: 2px;
    transition: width .3s var(--dpd-h-ease);
}
.dpd-header__nav a:hover::after,
.dpd-header__nav a.is-active::after {
    width: 24px;
}
.dpd-header__nav a.is-active {
    color: var(--dpd-h-blue);
    font-weight: 600;
}

/* ===== Right actions ===== */
.dpd-header__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Inloggen tekstlink */
.dpd-header__login {
    padding: 9px 18px;
    color: var(--dpd-h-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: background .25s var(--dpd-h-ease),
                color .25s var(--dpd-h-ease);
    letter-spacing: -.01em;
}
.dpd-header__login:hover {
    background: rgba(26,115,181,.06);
    color: var(--dpd-h-blue);
}

/* Registreren primary button */
.dpd-header__register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--dpd-h-green);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: background .2s var(--dpd-h-ease);
    letter-spacing: -.01em;
}
.dpd-header__register:hover {
    background: #0C8A5F;
}
.dpd-header__register svg {
    transition: transform .25s var(--dpd-h-ease);
}
.dpd-header__register:hover svg {
    transform: translateX(2px);
}

/* ===== User menu (ingelogd) ===== */
.dpd-header__user {
    position: relative;
}
.dpd-header__user-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    background: rgba(26,115,181,.04);
    border: 1px solid rgba(26,115,181,.10);
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--dpd-h-text);
    cursor: pointer;
    transition: background .25s var(--dpd-h-ease),
                border-color .25s var(--dpd-h-ease);
}
.dpd-header__user-btn:hover,
.dpd-header__user.is-open .dpd-header__user-btn {
    background: rgba(26,115,181,.08);
    border-color: rgba(26,115,181,.18);
}
.dpd-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dpd-h-blue) 0%, var(--dpd-h-green) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(26,115,181,.24);
}
.dpd-header__user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dpd-header__user-chevron {
    opacity: .50;
    transition: transform .25s var(--dpd-h-ease);
}
.dpd-header__user.is-open .dpd-header__user-chevron {
    transform: rotate(180deg);
}

/* Dropdown */
.dpd-header__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--dpd-h-shadow-lg), 0 0 0 1px rgba(15,23,42,.04);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.97);
    transform-origin: top right;
    transition: opacity .25s var(--dpd-h-ease),
                transform .25s var(--dpd-h-ease),
                visibility .25s var(--dpd-h-ease);
}
.dpd-header__user.is-open .dpd-header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dpd-header__dropdown-head {
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(15,23,42,.05);
    margin-bottom: 6px;
}
.dpd-header__dropdown-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dpd-h-text);
    line-height: 1.3;
}
.dpd-header__dropdown-mail {
    font-size: 12px;
    color: var(--dpd-h-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dpd-header__dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--dpd-h-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: background .15s ease, color .15s ease;
}
.dpd-header__dropdown a svg {
    color: var(--dpd-h-blue);
    flex-shrink: 0;
}
.dpd-header__dropdown a:hover {
    background: rgba(26,115,181,.06);
    color: var(--dpd-h-blue);
}
.dpd-header__dropdown hr {
    border: 0;
    height: 1px;
    background: rgba(15,23,42,.05);
    margin: 6px 4px;
}
.dpd-header__dropdown-logout svg {
    color: #dc2626 !important;
}
.dpd-header__dropdown-logout:hover {
    background: rgba(220,38,38,.06) !important;
    color: #dc2626 !important;
}

/* ===== Burger ===== */
.dpd-header__burger {
    display: none;
    width: 42px;
    height: 42px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 11px;
    border-radius: 10px;
    transition: background .2s var(--dpd-h-ease);
}
.dpd-header__burger:hover {
    background: rgba(15,23,42,.04);
}
.dpd-header__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--dpd-h-text);
    border-radius: 2px;
    margin: 4px auto;
    transition: transform .3s var(--dpd-h-ease),
                opacity .3s var(--dpd-h-ease);
}
.dpd-header__burger.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.dpd-header__burger.is-active span:nth-child(2) {
    opacity: 0;
}
.dpd-header__burger.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== Mobile menu overlay ===== */
.dpd-header__mobile {
    position: fixed;
    top: var(--dpd-h-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.97);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s var(--dpd-h-ease),
                transform .3s var(--dpd-h-ease),
                visibility .3s var(--dpd-h-ease);
    overflow-y: auto;
}
.dpd-header__mobile.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dpd-header__mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 24px 40px;
    gap: 4px;
    max-width: 480px;
    margin: 0 auto;
}
.dpd-header__mobile-nav a {
    padding: 16px 18px;
    color: var(--dpd-h-text);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px;
    transition: background .2s var(--dpd-h-ease),
                color .2s var(--dpd-h-ease);
}
.dpd-header__mobile-nav a:hover,
.dpd-header__mobile-nav a:active {
    background: rgba(26,115,181,.06);
    color: var(--dpd-h-blue);
}
.dpd-header__mobile-nav hr {
    border: 0;
    height: 1px;
    background: rgba(15,23,42,.06);
    margin: 14px 0;
}
.dpd-header__mobile-cta {
    background: linear-gradient(135deg, var(--dpd-h-blue) 0%, var(--dpd-h-green) 100%);
    color: #fff !important;
    text-align: center;
    margin-top: 8px;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(26,115,181,.24);
}
.dpd-header__mobile-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(26,115,181,.04);
    border-radius: 12px;
    margin-bottom: 8px;
}
.dpd-header__mobile-user > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.dpd-header__mobile-user strong {
    font-size: 15px;
    color: var(--dpd-h-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dpd-header__mobile-user span:not(.dpd-header__avatar) {
    font-size: 12px;
    color: var(--dpd-h-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dpd-header__mobile-user .dpd-header__avatar {
    color: #fff;
}
.dpd-header__mobile-logout {
    color: #dc2626 !important;
}
.dpd-header__mobile-logout:hover,
.dpd-header__mobile-logout:active {
    background: rgba(220,38,38,.06) !important;
    color: #dc2626 !important;
}

/* ===== Responsive breakpoints ===== */
@media (max-width: 1024px) {
    .dpd-header__nav,
    .dpd-header__login,
    .dpd-header__user {
        display: none;
    }
    .dpd-header__burger {
        display: block;
    }
}
@media (max-width: 720px) {
    .dpd-header__register,
    .dpd-header__user-name {
        display: none;
    }
}
@media (max-width: 600px) {
    .dpd-header__inner {
        padding: 0 16px;
        gap: 12px;
    }
    .dpd-header__logo img {
        height: 34px;
    }
}

/* ==========================================================================
   DPD Page Hero - gradient topbar voor content pagina's
   (Over ons, Contact, Algemene voorwaarden, Privacy)
   ========================================================================== */
.dpd-page-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 24px 84px;
    background: linear-gradient(135deg, #0B3658 0%, #155F96 45%, #0FA573 100%);
    color: #fff;
    margin: 0 0 48px;
}
.dpd-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0);
    background-size: 28px 28px;
    pointer-events: none;
}
.dpd-page-hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.dpd-page-hero__inner {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    z-index: 1;
}
.dpd-page-hero__title {
    font-family: var(--dpd-font, 'DM Sans', 'Segoe UI', sans-serif);
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: #fff;
    margin: 0;
}
.dpd-page-hero__subtitle {
    font-family: var(--dpd-font, 'DM Sans', 'Segoe UI', sans-serif);
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255,255,255,.80);
    max-width: 640px;
    margin: 16px 0 0;
}

/* Zorg dat Blocksy's standaard entry-header verborgen is als page hero gebruikt wordt */
body:has(.dpd-page-hero) .entry-header,
body:has(.dpd-page-hero) .page-header {
    display: none !important;
}
body:has(.dpd-page-hero) .ct-container,
body:has(.dpd-page-hero) .ct-container-narrow {
    padding-top: 0 !important;
}

/* Responsive */
@media (max-width: 900px) {
    .dpd-page-hero {
        padding: 56px 20px 64px;
        margin-bottom: 40px;
    }
    .dpd-page-hero__title {
        font-size: 36px;
    }
    .dpd-page-hero__subtitle {
        font-size: 16px;
    }
}
@media (max-width: 600px) {
    .dpd-page-hero {
        padding: 44px 18px 52px;
        margin-bottom: 32px;
    }
    .dpd-page-hero__title {
        font-size: 28px;
    }
    .dpd-page-hero__subtitle {
        font-size: 15px;
        margin-top: 10px;
    }
}

/* ===== WP admin bar fix ===== */
.admin-bar .dpd-header {
    top: 32px;
}
.admin-bar .dpd-header__mobile {
    top: calc(var(--dpd-h-height) + 32px);
}
@media (max-width: 782px) {
    .admin-bar .dpd-header {
        top: 46px;
    }
    .admin-bar .dpd-header__mobile {
        top: calc(var(--dpd-h-height) + 46px);
    }
}
