/* Global Realtor Header Styles */

:root {
    --grh-primary: #5A7BBF;
    --grh-dark: #000000;
    --grh-light: #ffffff;
    --grh-accent: #f8fafc;
    --grh-border: #e2e8f0;
}

.grh-header {
    background-color: var(--grh-light);
    border-bottom: 1px solid var(--grh-border);
    position: sticky;
    top: 0;
    z-index: 10000;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Scroll Sticky state */
.grh-header.grh-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
}

.grh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.3s ease;
}

.grh-header.grh-scrolled .grh-container {
    height: 65px;
}

/* Branding */
.grh-branding {
    flex-shrink: 0;
}

.grh-logo-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.grh-logo-txt {
    color: var(--grh-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.grh-tagline {
    color: var(--grh-primary);
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Desktop Navigation */
.grh-nav-desktop {
    display: flex;
    align-items: center;
    height: 100%;
}

.grh-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.grh-menu-list > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.grh-menu-list > li > a {
    color: var(--grh-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    transition: color 0.2s ease;
}

.grh-menu-list > li > a:hover {
    color: var(--grh-primary);
}

.grh-arrow {
    font-size: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Dropdown Menu */
.grh-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--grh-light);
    border: 1px solid var(--grh-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1001;
}

.grh-has-dropdown:hover .grh-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.grh-dropdown a {
    color: var(--grh-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    padding: 10px 20px;
    display: block;
    transition: background 0.2s, color 0.2s;
}

.grh-dropdown a:hover {
    background-color: var(--grh-accent);
    color: var(--grh-primary);
}

/* Right Actions */
.grh-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.grh-phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--grh-dark);
    font-weight: 600;
    font-size: 14px;
}

.grh-phone-icon {
    color: var(--grh-primary);
}

.grh-cta-btn {
    background-color: var(--grh-primary);
    color: var(--grh-light);
    text-decoration: none;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 11px;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(90, 123, 191, 0.2);
}

.grh-cta-btn:hover {
    background-color: #4866a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(90, 123, 191, 0.3);
}

/* Hamburger */
.grh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.grh-hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--grh-dark);
    transition: all 0.25s ease;
}

/* Offcanvas Overlay Menu */
.grh-offcanvas {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--grh-light);
    z-index: 20000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.grh-offcanvas.active {
    right: 0;
}

.grh-offcanvas-header {
    padding: 24px;
    border-bottom: 1px solid var(--grh-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grh-offcanvas-logo {
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    color: var(--grh-dark);
}

#grh-offcanvas-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: var(--grh-dark);
}

.grh-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.grh-mobile-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grh-mobile-list a {
    text-decoration: none;
    color: var(--grh-dark);
    font-weight: 600;
    font-size: 16px;
    display: block;
}

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

.grh-submenu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.grh-mobile-submenu {
    list-style: none;
    padding-left: 15px;
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.grh-mobile-submenu a {
    font-size: 14px;
    font-weight: 500;
}

.grh-offcanvas-footer {
    padding: 24px;
    border-top: 1px solid var(--grh-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grh-mobile-phone-btn, .grh-mobile-cta-btn {
    text-decoration: none;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.grh-mobile-phone-btn {
    border: 1px solid var(--grh-border);
    color: var(--grh-dark);
}

.grh-mobile-cta-btn {
    background-color: var(--grh-primary);
    color: var(--grh-light);
}

/* Sticky Bottom Mobile Bar */
.grh-mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--grh-light);
    border-top: 1px solid var(--grh-border);
    padding: 12px 16px;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    z-index: 10000;
}

.grh-sticky-phone-btn, .grh-sticky-cta-btn {
    text-decoration: none;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.grh-sticky-phone-btn {
    border: 1px solid var(--grh-border);
    color: var(--grh-dark);
}

.grh-sticky-cta-btn {
    background-color: var(--grh-primary);
    color: var(--grh-light);
}

/* Offset for admin bar & bottom sticky bar on mobile */
body.admin-bar .grh-header {
    top: var(--wp-admin--admin-bar--height, 32px);
}

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

/* Responsive Breakpoints */
@media screen and (max-width: 1024px) {
    .grh-nav-desktop, .grh-phone-link, .grh-cta-btn {
        display: none;
    }
    .grh-hamburger {
        display: flex;
    }
    .grh-mobile-sticky-bar {
        display: grid;
    }
    /* Add padding to page bottom so footer doesn't get covered */
    body {
        padding-bottom: 70px;
    }
}
