/* =============================================================
   NAVBAR — Brandscapers Africa  |  Shared across all pages
   ============================================================= */

/* ---- Header shell ---- */
#header,
header:not(.blog-header) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(33, 117, 185, 0.07);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled,
header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 24px rgba(33, 117, 185, 0.08);
}

/* ---- Nav row ---- */
#header nav,
header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}

/* ---- Logo ---- */
.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-logo {
    height: 44px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
    opacity: 0.82;
    transform: scale(0.97);
}

/* ---- Nav links ---- */
#header .nav-items,
header .nav-items {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

#header .nav-items a,
header .nav-items a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 7px 12px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    position: relative;
}

#header .nav-items a:hover,
header .nav-items a:hover {
    color: #2175b9;
    background: rgba(33, 117, 185, 0.06);
}

#header .nav-items a.active,
header .nav-items a.active {
    color: #2175b9;
    font-weight: 600;
}

/* active indicator dot */
#header .nav-items a.active::after,
header .nav-items a.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #2175b9;
    border-radius: 50%;
}

/* ---- Nav actions ---- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ---- CTA Button ---- */
.nav-actions .btn-outline,
.nav-actions .btn.btn-outline {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #2175b9;
    border: 1.5px solid #2175b9;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.4;
}

.nav-actions .btn-outline:hover,
.nav-actions .btn.btn-outline:hover {
    background: #2175b9;
    color: #fff;
    box-shadow: 0 4px 14px rgba(33, 117, 185, 0.25);
    transform: translateY(-1px);
}

/* ---- Dark mode toggle ---- */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.22s ease;
    color: #475569;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.dark-mode-toggle:hover {
    border-color: #2175b9;
    color: #2175b9;
    background: rgba(33, 117, 185, 0.06);
}

.dark-mode-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dark-mode-toggle .fa-moon {
    opacity: 1;
    transform: scale(1) rotate(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.dark-mode .dark-mode-toggle .fa-sun  { opacity: 1; transform: scale(1) rotate(0); }
body.dark-mode .dark-mode-toggle .fa-moon { opacity: 0; transform: scale(0.5) rotate(-90deg); }

/* ---- Hamburger ---- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #334155;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.ham-line { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: background 0.25s ease, width 0.25s ease; }
.ham-line-1 { width: 22px; }
.ham-line-2 { width: 13px; }
.ham-line-3 { width: 18px; }

.hamburger:hover {
    background: rgba(33, 117, 185, 0.08);
    color: #2175b9;
}

/* ---- Mobile slide-in menu ---- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -110%;
    width: min(300px, 90vw);
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid rgba(33, 117, 185, 0.08);
    z-index: 2000;
    padding: 72px 24px 40px;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

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

.mobile-menu-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(33, 117, 185, 0.08);
    color: #2175b9;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu-items a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 14px;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-menu-items a:hover {
    color: #2175b9;
    background: rgba(33, 117, 185, 0.06);
}

.mobile-menu-items a.active {
    color: #2175b9;
    font-weight: 600;
}

.mobile-menu-items .btn-outline {
    display: block;
    margin-top: 16px;
    text-align: center;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1.5px solid #2175b9;
    color: #2175b9;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.22s ease, color 0.22s ease;
}

.mobile-menu-items .btn-outline:hover {
    background: #2175b9;
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 1060px) {
    #header .nav-items,
    header .nav-items {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-actions .btn-outline,
    .nav-actions .btn.btn-outline {
        display: none;
    }
}

@media (max-width: 640px) {
    #header nav, header nav {
        height: 60px;
    }

    .navbar-logo {
        height: 36px;
    }
}

/* ---- Dark mode ---- */
body.dark-mode #header,
body.dark-mode header {
    background: rgba(15, 23, 42, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode #header.scrolled,
body.dark-mode header.scrolled {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

body.dark-mode #header .nav-items a,
body.dark-mode header .nav-items a {
    color: #cbd5e1;
}

body.dark-mode #header .nav-items a:hover,
body.dark-mode header .nav-items a:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

body.dark-mode #header .nav-items a.active,
body.dark-mode header .nav-items a.active {
    color: #60a5fa;
}

body.dark-mode .hamburger { color: #cbd5e1; }

body.dark-mode .mobile-menu {
    background: rgba(15, 23, 42, 0.98);
    border-left-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .mobile-menu-items a { color: #cbd5e1; }
body.dark-mode .mobile-menu-items a:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.08);
}

body.dark-mode .mobile-menu-items a.active {
    color: #60a5fa;
    font-weight: 600;
}

body.dark-mode .dark-mode-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* =============================================================
   HERO-PAGE: Transparent navbar (transparent over hero image,
   reverts to glassmorphic after scroll). Add class="hero-page"
   to <body> on any page that has a full-bleed hero.
   ============================================================= */

/* Default (over hero): fully transparent */
body.hero-page #header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
}

/* Nav links → white over dark hero */
body.hero-page #header .nav-items a {
    color: rgba(255, 255, 255, 0.88);
}
body.hero-page #header .nav-items a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
body.hero-page #header .nav-items a.active {
    color: #fff;
}
body.hero-page #header .nav-items a.active::after {
    background: #fff;
}

/* CTA button → white outlined */
body.hero-page .nav-actions .btn-outline,
body.hero-page .nav-actions .btn.btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
}
body.hero-page .nav-actions .btn-outline:hover,
body.hero-page .nav-actions .btn.btn-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: #fff;
    box-shadow: none;
}

/* Dark mode toggle → white tint */
body.hero-page .dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.85);
}
body.hero-page .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    color: #fff;
}

/* Hamburger → white */
body.hero-page .hamburger {
    color: rgba(255, 255, 255, 0.88);
}
body.hero-page .hamburger:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ---- Scrolled: revert to full glassmorphic style ---- */
body.hero-page #header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(33, 117, 185, 0.07);
    box-shadow: 0 2px 24px rgba(33, 117, 185, 0.08);
}
body.hero-page #header.scrolled .nav-items a {
    color: #334155;
}
body.hero-page #header.scrolled .nav-items a:hover {
    color: #2175b9;
    background: rgba(33, 117, 185, 0.06);
}
body.hero-page #header.scrolled .nav-items a.active {
    color: #2175b9;
}
body.hero-page #header.scrolled .nav-items a.active::after {
    background: #2175b9;
}
body.hero-page #header.scrolled .nav-actions .btn-outline,
body.hero-page #header.scrolled .nav-actions .btn.btn-outline {
    color: #2175b9;
    border-color: #2175b9;
}
body.hero-page #header.scrolled .dark-mode-toggle {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}
body.hero-page #header.scrolled .hamburger {
    color: #334155;
}

/* Dark mode: transparent state */
body.dark-mode.hero-page #header {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}
body.dark-mode.hero-page #header.scrolled {
    background: rgba(15, 23, 42, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}
body.dark-mode.hero-page #header.scrolled .nav-items a {
    color: #cbd5e1;
}
body.dark-mode.hero-page #header.scrolled .nav-items a.active {
    color: #60a5fa;
}
body.dark-mode.hero-page #header.scrolled .nav-items a.active::after {
    background: #60a5fa;
}
