/* Markazus Suffah - Header CSS | Theme: Amber & Charcoal | Floating Bar */
:root {
 --primary: #F5A623;
 --primary-dark: #C17F17;
 --primary-light: #FDF1DD;
 --dark: #3D3D3D;
 --charcoal: #1A1A1A;
 --charcoal-mid: #2E2E2E;
 --white: #ffffff;
 --off-white: #F7F7F7;
 --border: #E0E0E0;
 --transition: all 0.3s ease;

 --font-main: clamp(14px, 1vw, 16px);
 --font-top: clamp(11px, 0.8vw, 13px);
 --logo-height: clamp(36px, 3.6vw, 48px);
 --container-padding: clamp(12px, 1.5vw, 26px);
 --header-gap: clamp(10px, 1.6vw, 18px);
 --header-offset: clamp(78px, 9vw, 96px); /* reserved space = header pill height + top gap, used by pages without a hero image */
}

* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

body {
 font-family: 'Poppins', sans-serif;
 color: var(--dark);
 /* Safe default so any page using this header (without a hero banner)
 doesn't have its content hidden under the fixed floating bar.
 The homepage cancels this via .hero-slider's negative margin below. */
 /* site-wide safety net against accidental horizontal scroll */
}

.container {
}

.flex-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 row-gap: 10px;
 font-size: 15px;
}

/* ================= MAIN HEADER floating rounded bar ================= */
.main-header {
 position: relative;
 z-index: 1000;
}

.main-header .container.flex-header {
 overflow: visible;
 background: #ffffff;
 backdrop-filter: blur(14px);
 border: 1px solid rgb(255 159 0 / 12%);
 /* was a hardcoded 250px on both sides — broke (overflowed / wrapped)
    on every laptop-range width between the 870px mobile breakpoint
    and roughly a 1900px-wide monitor. Scales smoothly instead, and
    only reaches close to the old 250px on very large screens. */
 padding: 13px clamp(16px, 5vw, 120px);

 /* soft floating-card shadow */
 box-shadow: 0 1px 0 rgb(26 26 26 / 10%), 0 8px 20px rgba(0, 0, 0, 0.08), 0 20px 40px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
 transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* ================= LOGO ================= */
.header_logo {
 display: flex;
 align-items: center;
}

.header_logo img {
 height: var(--logo-height);
 width: auto;
 transition: var(--transition);
 filter: drop-shadow(0 2px 4px rgba(0,0,0,0.10));
}

.header_logo img:hover {
 filter: drop-shadow(0 0px 12px rgba(255, 255, 255, 0.8)) drop-shadow(0 4px 10px rgba(245,166,35,0.45)) drop-shadow(0 0px 20px rgba(245,166,35,0.20));
 transform: translateY(-2px);
}

/* ================= NAVBAR ================= */
.navbar ul {
 display: flex;
 list-style: none;
 gap: clamp(10px, 1.6vw, 24px);
 flex-wrap: wrap;
 justify-content: center;
}

.navbar ul li a {
 text-decoration: none;
 color: var(--dark);
 font-weight: 500;
 transition: var(--transition);
 padding-bottom: 3px;
 position: relative;
 font-size: clamp(14px, 1.15vw, 17px);
}

/* animated underline */
.navbar ul li a::after {
 content: '';
 position: absolute;
 bottom: -1px;
 left: 0;
 width: 0;
 height: 2px;
 background: var(--primary);
 border-radius: 2px;
 transition: width 0.3s ease;
}

.navbar ul li a:hover {
 color: var(--primary);
}

.navbar ul li a:hover::after {
 width: 100%;
}

.navbar ul li a.active {
 color: var(--primary);
}

.navbar ul li a.active::after {
 width: 100%;
 box-shadow: 0 2px 8px rgba(245,166,35,0.4);
}

/* Icons + mobile-only "head" bar — inert/hidden on the desktop
   horizontal bar, only shown once the nav becomes the mobile
   dropdown (below, inside the 870px media query) */
.nav-icon { display: none; }

/* ================= LOGIN DROPDOWN (donate-button style CTA) ================= */
.login-dropdown {
 position: relative;
}

.btn-login-trigger {
 background: linear-gradient(135deg, #F5A623 0%, #e38b01 100%);
 color: var(--white) !important;
 padding: clamp(9px, 0.9vw, 11px) clamp(18px, 1.4vw, 24px);
 border-radius: 999px;
 text-decoration: none;
 font-size: clamp(12px, 0.85vw, 13.5px);
 font-weight: 600;
 display: flex;
 align-items: center;
 gap: 8px;
 white-space: nowrap;
 cursor: pointer;
 border: none;
 outline: none;
 transition: var(--transition);
 user-select: none;
 font-family: 'Poppins', sans-serif;
 box-shadow:
 0 2px 0 #7A4E0E,
 0 4px 8px rgba(245, 166, 35, 0.30),
 0 8px 20px rgba(245, 166, 35, 0.15);
}

.btn-login-trigger:hover {
 background: linear-gradient(135deg, #F7B84D 0%, #F5A623 100%);
 transform: translateY(-2px);
 box-shadow:
 0 4px 0 #7A4E0E,
 0 6px 14px rgba(245, 166, 35, 0.40),
 0 12px 28px rgba(245, 166, 35, 0.20);
}

.login-dropdown.open .btn-login-trigger {
 background: linear-gradient(135deg, #C17F17 0%, #A66B12 100%);
 transform: translateY(1px);
 box-shadow:
 0 1px 0 #7A4E0E,
 0 2px 6px rgba(245, 166, 35, 0.25);
}

.btn-login-trigger .a-b-text {
 max-width: 130px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.btn-login-trigger .chevron {
 font-size: 10px;
 transition: transform 0.25s ease;
 margin-left: 2px;
}

.login-dropdown.open .btn-login-trigger .chevron {
 transform: rotate(180deg);
}

/* Dropdown menu */
.login-dropdown-menu {
 position: absolute;
 top: calc(100% + 12px);
 right: 0;
 background: #fff;
 border-radius: 14px;
 box-shadow:
 0 4px 6px rgba(0,0,0,0.06),
 0 10px 30px rgba(0,0,0,0.14),
 0 20px 50px rgba(0,0,0,0.08),
 0 0 0 1px rgba(245,166,35,0.12),
 inset 0 1px 0 rgba(255,255,255,0.80);
 min-width: 210px;
 padding: 8px;
 opacity: 0;
 visibility: hidden;
 transform: translateY(-8px) scale(0.98);
 transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
 z-index: 2000;
 border: 1px solid var(--border);
}

.login-dropdown.open .login-dropdown-menu {
 opacity: 1;
 visibility: visible;
 transform: translateY(0) scale(1);
}

.login-option {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 11px 14px;
 border-radius: 8px;
 text-decoration: none;
 color: var(--dark);
 font-size: 13px;
 font-weight: 500;
 transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.login-option:hover {
 background: var(--primary-light);
 color: var(--charcoal);
 transform: translateX(3px);
}

.login-option .lo-icon {
 width: 34px;
 height: 34px;
 border-radius: 8px;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 15px;
 flex-shrink: 0;
}

.login-option.admin .lo-icon {
 background: rgba(245, 166, 35, 0.12);
 color: var(--primary-dark);
}

.login-option.student .lo-icon {
 background: rgba(245, 166, 35, 0.12);
 color: var(--primary-dark);
}

.login-option .lo-text strong {
 display: block;
 font-size: 13px;
 font-weight: 700;
 line-height: 1.2;
}

.login-option .lo-text span {
 display: block;
 font-size: 11px;
 color: #94a3b8;
 margin-top: 1px;
}

.login-dropdown-menu .divider {
 height: 1px;
 background: var(--border);
 margin: 6px 0;
}

/* ================= MOBILE RESPONSIVE ================= */
.menu-toggle {
 display: none;
 font-size: 22px;
 color: var(--primary);
}

.menu-toggle i {
 display: inline-block;
 transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.is-open i {
 transform: rotate(180deg);
}

@media (max-width: 870px) {

 .header_logo {
 flex: 1;
 }

 .menu-toggle {
 display: block;
 cursor: pointer;
 font-size: 26px;
 margin-right: 6px;
 margin-left: auto;
 }

 .navbar {
 position: absolute;
 top: calc(100% + 10px);
 left: var(--container-padding);
 right: var(--container-padding);
 background: var(--white);
 box-shadow:
 0 12px 32px rgba(0,0,0,0.14),
 0 4px 8px rgba(0,0,0,0.08),
 0 0 0 1px rgba(245,166,35,0.12),
 inset 0 1px 0 rgba(245,166,35,0.08);
 padding: 6px;
 padding-top: 12px;
 border-radius: 18px;
 /* fade + slide instead of a hard display:none/block swap —
    same motion language as .login-dropdown-menu */
 opacity: 0;
 visibility: hidden;
 pointer-events: none;
 transform: translateY(-10px) scale(0.98);
 transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
 }

 /* thin amber accent line across the top, ties it to the
    footer's top accent line / rest of the site's language */
 .navbar::before {
 content: '';
 position: absolute;
 top: 0; left: 14px; right: 14px;
 height: 3px;
 border-radius: 0 0 3px 3px;
 background: linear-gradient(90deg, transparent, #F5A623, transparent);
 }

 /* small "tail" pointing up at the hamburger button, so the
    dropdown visually reads as coming FROM that button —
    horizontal position is set by header.js (--nav-arrow-left),
    since the toggle's exact spot shifts with screen width */
 .navbar::after {
 content: '';
 position: absolute;
 top: -10px;
 left: var(--nav-arrow-left, 85%);
 width: 16px;
 height: 16px;
 background: var(--white);
 box-shadow: -2px -2px 3px rgba(26,26,26,0.05);
 border-top: 1px solid rgba(245,166,35,0.18);
 border-left: 1px solid rgba(245,166,35,0.18);
 transform: translateX(-50%) rotate(45deg);
 border-radius: 4px 0 0 0;
 z-index: 1;
 }

 .navbar.active {
 opacity: 1;
 visibility: visible;
 pointer-events: auto;
 transform: translateY(0) scale(1);
 }

 .navbar ul {
 flex-direction: column;
 gap: 3px;
 text-align: left;
 }

 .navbar ul li a {
 display: flex;
 align-items: center;
 gap: 13px;
 padding: 12px 14px;
 border-radius: 12px;
 font-size: 15px;
 transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
 }
 .navbar ul li a::after { display: none; } /* underline doesn't read well stacked — swapped for a filled row below */

 .navbar ul li a:hover {
 background: var(--primary-light);
 padding-left: 18px;
 }

 .navbar ul li a.active {
 background: linear-gradient(90deg, rgba(245,166,35,0.14), rgba(245,166,35,0.03));
 color: var(--primary-dark);
 font-weight: 600;
 box-shadow: inset 3px 0 0 var(--primary);
 }

 .nav-icon {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 border-radius: 9px;
 flex-shrink: 0;
 background: rgba(26,26,26,0.05);
 color: #999;
 font-size: 14px;
 transition: background 0.18s ease, color 0.18s ease;
 }
 .navbar ul li a:hover .nav-icon { background: rgba(245,166,35,0.16); color: var(--primary-dark); }
 .navbar ul li a.active .nav-icon { background: var(--primary); color: #fff; }

 /* Donation stays a plain row like the rest, but keeps its own
    accent so it still reads as the site's one CTA link */
 .navbar ul li a.donation-link .nav-icon { color: #c0392b; }
 .navbar ul li a.donation-link:hover .nav-icon,
 .navbar ul li a.donation-link.active .nav-icon { background: #c0392b; color: #fff; }
 .navbar ul li a.donation-link.active { box-shadow: inset 3px 0 0 #c0392b; color: #c0392b; }

 .a-b-text {
 display: none !important;
 }

 .login-dropdown-menu {
 right: 0;
 left: auto;
 min-width: 190px;
 }

 .container {
 width: 100%;
 padding: 0 15px;
 }

 .main-header .container.flex-header {
 border-radius: 16px;
 padding: 10px 16px;
 margin-left: 7px;
 margin-right: 7px;
 max-width: 97%;
 }
}