:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #10b981;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
}

.hd-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

/* Sticky Header styling */
.hd-wrapper.hd-sticky-enabled {
    position: sticky;
    top: 0;
}

/* Compensate for WP Admin Bar when logged in */
body.admin-bar .hd-wrapper.hd-sticky-enabled {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .hd-wrapper.hd-sticky-enabled {
        top: 46px;
    }
}

.hd-wrapper.hd-is-sticky {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.hd-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Visual Styles */
.style-minimal {
    border: none;
}

.style-glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.style-bordered {
    border-bottom: 1px solid var(--border-color);
}

.style-boxed {
    margin: 16px auto;
    max-width: calc(100% - 32px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Layout Formats */
.layout-left .hd-nav-desktop {
    margin-left: auto;
    margin-right: 32px;
}

.layout-right .hd-inner {
    flex-direction: row-reverse;
}
.layout-right .hd-nav-desktop {
    margin-right: auto;
    margin-left: 32px;
}

.layout-center .hd-inner {
    flex-direction: column;
    gap: 16px;
}
.layout-center .hd-nav-desktop {
    justify-content: center;
    width: 100%;
}
.layout-center .hd-actions {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.layout-split .hd-inner {
    justify-content: space-between;
}
.layout-split .hd-nav-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex: 1;
    padding: 0 40px;
}
.layout-split .hd-split-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Vertical Sidebar Layout Style */
@media screen and (min-width: 992px) {
    .hd-wrapper.layout-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        border-right: 1px solid var(--border-color);
        box-shadow: 4px 0 15px rgba(0,0,0,0.03);
        z-index: 9999;
    }
    body.admin-bar .hd-wrapper.layout-sidebar {
        top: var(--wp-admin--admin-bar--height, 32px);
        height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
    }
    .hd-wrapper.layout-sidebar .hd-inner {
        flex-direction: column;
        height: 100%;
        padding: 40px 24px;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 40px;
    }
    .hd-wrapper.layout-sidebar .hd-nav-desktop {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 16px;
    }
    .hd-wrapper.layout-sidebar .hd-link {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    .hd-wrapper.layout-sidebar .hd-link::after {
        bottom: 0;
        height: 1px;
    }
    .hd-wrapper.layout-sidebar .hd-actions {
        margin-top: auto;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    .hd-wrapper.layout-sidebar .hd-cta-desktop {
        width: 100%;
        text-align: center;
    }
}

/* Navigation items */
.hd-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hd-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.hd-logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-color);
}

.hd-nav-desktop {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hd-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none !important;
    transition: color 0.2s;
    position: relative;
    padding: 8px 0;
}

.hd-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease-out;
}

.hd-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hd-link-accent {
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--primary-color) !important;
    padding: 6px 14px;
    border-radius: 6px;
}
.hd-link-accent::after {
    display: none;
}

/* Actions and Buttons */
.hd-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hd-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.1s;
}

.hd-cta-btn:active {
    transform: scale(0.97);
}

/* Responsive Mobile Trigger */
.hd-mobile-trigger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.hd-mobile-trigger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.2s, opacity 0.2s;
}

/* Mobile Off-canvas drawer styles */
.hd-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: opacity 0.3s;
}

.hd-mobile-overlay.hd-mobile-active {
    opacity: 1;
    visibility: visible;
}

.hd-mobile-menu {
    position: absolute;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hd-mobile-overlay.hd-mobile-active .hd-mobile-menu {
    right: 0;
}

.hd-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hd-mobile-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.hd-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex-grow: 1;
}

.hd-mobile-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none !important;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.hd-mobile-link-accent {
    color: var(--primary-color) !important;
}

.hd-cta-full {
    width: 100%;
}

/* Responsiveness breakpoint styling */
@media screen and (max-width: 991px) {
    .hd-nav-desktop {
        display: none !important;
    }
    
    .hd-cta-desktop {
        display: none !important;
    }

    .hd-mobile-trigger {
        display: flex !important;
    }

    .layout-center .hd-actions {
        position: static;
        transform: none;
    }

    .layout-center .hd-inner {
        flex-direction: row;
        justify-content: space-between;
    }

    .layout-right .hd-inner {
        flex-direction: row;
    }
}
