/* Universal site header — loaded on every public page (incl. service detail pages) */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    box-sizing: border-box;
}

.site-header__bar {
    width: 100%;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid rgba(20, 18, 42, 0.07);
    box-shadow: 0 2px 12px rgba(20, 18, 42, 0.06);
    overflow: visible;
    box-sizing: border-box;
}

.site-header.is-scrolled .site-header__bar {
    box-shadow: 0 2px 16px rgba(20, 18, 42, 0.1);
}

.header-shell {
    max-width: var(--max-width);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 0.5rem;
    gap: 1rem;
    overflow: visible;
}

/* Logo wrapper — circular, sized to fit neatly in 68px header */
.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: transparent;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    overflow: hidden;
    z-index: 2;
    box-sizing: border-box;
}

.brand:hover {
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5d9ff 0%, #c9f3e4 55%, #ffd6c9 100%);
    flex-shrink: 0;
}

.logo-img,
.brand-logo {
    position: static;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.brand-text {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
    min-width: 0;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu,
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.35rem 1rem;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-color);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35rem 0.2rem;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0;
}

.nav-link:hover {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.nav-item.has-dropdown .dropdown-toggle {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid #000000;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    margin-left: 0.25rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-item.has-dropdown:hover .dropdown-toggle {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 280px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 2px solid rgba(20, 18, 42, 0.12);
    background: #fff;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.btn-header-search:hover {
    background: #fafafa;
    border-color: rgba(20, 18, 42, 0.2);
    text-decoration: none;
    color: var(--text-color);
}

.btn-header-search__icon {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2.5rem;
    height: 2.5rem;
    background: #fff;
    border: 2px solid rgba(20, 18, 42, 0.12);
    border-radius: 10px;
    cursor: pointer;
    padding: 0.45rem;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle .hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Dropdown typography — shared by About menu + Services mega menu */
.site-header .dropdown-menu,
.site-header .fd-nav-mega-pop,
.site-header .submenu {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-header .dropdown-menu li a,
.site-header .submenu li a {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.5;
    color: inherit;
    white-space: nowrap;
}

.site-header .dropdown-menu li a:hover,
.site-header .submenu li a:hover {
    color: inherit;
}

.fd-nav-mega-li {
    position: relative;
    list-style: none;
}

.fd-nav-mega-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fd-nav-mega-acc {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    color: inherit;
}

.fd-nav-mega-pop {
    z-index: 1100;
}

.fd-nav-mega-pop[hidden] {
    display: none !important;
}

.fd-nav-mega-grid {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.fd-nav-mega-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fd-nav-mega-cat {
    width: 100%;
    text-align: left;
    font: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    cursor: pointer;
    color: inherit;
}

.fd-nav-mega-cat.is-active,
.fd-nav-mega-cat[aria-selected="true"] {
    background: rgba(0, 113, 227, 0.1);
    border-color: var(--primary-color);
}

.fd-nav-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fd-nav-mega-links a {
    display: block;
    padding: 0.4rem 0.15rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    color: inherit;
}

.fd-nav-mega-links a:hover {
    background: rgba(0, 113, 227, 0.08);
    text-decoration: none;
}

.fd-nav-mega-all {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fd-nav-mega-all a {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 999;
}

.mobile-nav-backdrop:not([hidden]) {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .mobile-nav-backdrop {
    display: block;
}

@media (min-width: 901px) {
    .fd-nav-mega-acc {
        display: none !important;
    }

    .fd-nav-mega-pop {
        position: absolute;
        left: 0;
        top: calc(100% + 0.35rem);
        min-width: min(100vw - 2rem, 28rem);
        max-width: min(100vw - 2rem, 36rem);
        padding: 1.25rem;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 14px;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-4px);
        transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
    }

    .fd-nav-mega-pop:not([hidden]) {
        display: block;
    }

    .fd-nav-mega-li.fd-nav-mega-open .fd-nav-mega-pop,
    .fd-nav-mega-li:hover .fd-nav-mega-pop,
    .fd-nav-mega-li:focus-within .fd-nav-mega-pop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .fd-nav-mega-grid {
        grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .fd-nav-mega-acc {
        display: inline-flex;
    }

    .fd-nav-mega-li {
        width: 100%;
    }

    .fd-nav-mega-bar {
        width: 100%;
        justify-content: space-between;
    }

    .fd-nav-mega-pop {
        margin-top: 0.35rem;
        padding-left: 0.25rem;
    }

    .fd-nav-mega-grid {
        grid-template-columns: 1fr;
    }

    .fd-nav-mega-cats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .fd-nav-mega-cat {
        width: auto;
    }
}

@media (max-width: 1024px) {
    .header-right {
        gap: 0.5rem;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: #fffdf8;
        box-shadow: 2px 0 16px rgba(20, 18, 42, 0.12);
        transition: left 0.3s ease;
        padding: 0;
        overflow-y: auto;
        z-index: 1000;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions .btn-header-search,
    .header-actions .btn-header-cta,
    .header-actions .btn-whatsapp {
        display: none;
    }

    .main-nav.active {
        left: 0;
    }

    body.menu-open {
        overflow: hidden;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 80px 0 20px;
        margin: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        color: #000000;
        font-weight: 500;
        width: 100%;
        text-decoration: none;
    }

    .nav-link:hover {
        background: var(--bg-secondary);
        color: #000000;
        text-decoration: none;
    }

    .dropdown-toggle {
        width: 20px;
        height: 20px;
        position: relative;
        display: inline-block;
        margin-left: auto;
        border: none;
    }

    .dropdown-toggle::before,
    .dropdown-toggle::after {
        content: '';
        position: absolute;
        background: var(--text-color);
        transition: all 0.3s ease;
    }

    .dropdown-toggle::before {
        width: 10px;
        height: 2px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .dropdown-toggle::after {
        width: 2px;
        height: 10px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .nav-item.has-dropdown.active .dropdown-toggle::after {
        opacity: 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: var(--bg-secondary);
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        max-height: 1000px;
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu li a {
        display: block;
        padding: 0.875rem 1.5rem 0.875rem 3rem;
        color: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
    }

    .dropdown-menu li a:hover {
        background: rgba(0, 0, 0, 0.05);
        color: inherit;
        text-decoration: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        height: 60px;
    }

    .brand {
        width: 48px;
        height: 48px;
    }
}
