/* =========================================
   WHD / ATH Header + Navigation (TEXT LOGO)
   - Sticky header (no layout shift)
   - Clean flex alignment (no transform hacks)
   - Mobile hamburger + slide-down nav
   - Mobile search slide-down panel
   - Desktop: text logo left, nav + socials right
   ========================================= */

/* ---------- TUNABLE VARIABLES ---------- */
:root {
    --header-height-mobile: 124px;
    --header-height-desktop: 167px;
	
    --header-pad-x-mobile: 1rem;
    --header-pad-x-desktop: 2rem;

    --header-text: #ffffff;
    --header-accent: #ffc90a;
    --header-panel: #545454;
}

/* ---------- HEADER SHELL (STICKY) ---------- */
#top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Skyline container */
#top-menu {
    position: relative;
    z-index: 1001;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;

    height: var(--header-height-mobile);

    background-image: url("../../images/DRO-skyline-sm.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-color: #3d3b3c;
}

/* Overlay wrapper */
.top-menu {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Main row */
.top-menu-inner {
	position: relative;
    display: flex;
    align-items: center; /* 🔥 vertical alignment FIX */
    justify-content: space-between;
    gap: 0.75rem;

    height: 100%;
	padding-top: 88px;
    box-sizing: border-box;
}

/* ---------- SITE LOGO ---------- */
.site-logo {
    font-family: var(--defaultFont, system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 600;

	display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--header-text);
	
    margin-left: 150px;
    line-height: 1.2;

    transition: color 0.25s ease-in-out;
}

.site-logo:hover,
.site-logo:focus {
    color: var(--header-accent);
    text-decoration: none;
}

/* Prevent image overflow */
.logo-img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 1024px) {

    .logo-img {
        display: none;
    }

    .logo-text {
        display: inline-block;
        font-size: 1.1rem;
        font-weight: 600;
    }
}

@media (min-width: 1025px) {

    .logo-text {
        display: none;
    }

    .logo-img {
        display: block;
		margin-top: 46px;
        width: 243px;
        height: 92px;
    }
}

/* ---------- MOBILE ACTIONS ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-toggle,
.search-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    width: 40px;
    height: 34px;

    border: none;
    background: transparent;
    cursor: pointer;

    color: var(--header-text);
}

.nav-toggle {
    font-size: 1.5rem;
}

.search-toggle {
    font-size: 1.25rem;
}

.nav-toggle:focus-visible,
.search-toggle:focus-visible {
    outline: 2px solid var(--header-text);
    outline-offset: 2px;
}

/* Hamburger animation */
.nav-toggle i {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle.is-open i {
    transform: rotate(90deg) scale(0.8);
    opacity: 0;
}

.nav-toggle::after {
    content: "\f00d";
    font: var(--fa-font-solid);
    font-size: 1.8rem;

    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle.is-open::after {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ---------- NAV BASE ---------- */
.main-nav {
	position: static; /* 🔥 THIS FIXES DESKTOP */
    font-family: var(--defaultFont, system-ui, sans-serif);
    font-size: 0.95rem;
}

.mobile-only {
    display: none;
}

.social-icons {
    display: none;
}

.social-icons a {
    color: var(--header-text);
    font-size: 1.1rem;
    text-decoration: none;
	transition: color 0.25s ease-in-out;
}

/* ---------- SEARCH PANEL ---------- */
.search-panel {
    position: absolute;
    z-index: 1003;
    left: 0;
    right: 0;
    background-color: var(--header-panel);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border-radius: 3px;
    border: none;
    background-color: #ffffff;
	height: 40px;
}

.search-form button {
	height: 40px;
    border: 1px solid #fff;
    border-radius: 3px;
    padding: 0.4rem 0.75rem;
	color: #fff;
    background-color: var(--header-accent);
	background-color: var(--brand-base);
}

/* =========================================
   MOBILE (<= 767px)
   ========================================= */
@media (max-width: 767px) {

    .site-logo {
        margin-left: 10px;
        font-size: 1.1rem;
    }

    .main-nav {
        position: absolute;
        z-index: 1002;
        top: 100%;
        left: 0;
        right: 0;

        background-color: var(--header-panel);

        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition: max-height 0.3s ease, opacity 0.25s ease;
        border-top: 1px solid #ffffff;
    }

	.main-nav.is-open {
        max-height: 800px;
        opacity: 1;
        padding: 0.75rem 1rem 1rem;
    }

    .main-nav a {
        display: block;
        padding: 0.5rem 0;
        color: var(--header-text);
        text-decoration: none;
        border-bottom: 1px solid #aaaaaa;
    }
	
    .main-nav a:last-child {
        border-bottom: none;
    }
	
    .mobile-only {
        display: block;
    }

    .search-panel {
        top: 100%;

        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition: max-height 0.3s ease, opacity 0.25s ease;
    }

    .search-panel.is-open {
        max-height: 1000px;
        opacity: 1;
        padding: 0.75rem 1rem;
    }
	
	#search-panel .dropdown {
		visibility: visible;
		height: auto;
		margin-top: 20px;
	}
	
	#search-panel .dropdown-content {
		position: relative;
		width: 100%;
		margin-top: 5px;
	}
}

/* =========================================
   TABLET (768px - 1024px)
   ========================================= */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Keep the compact/mobile-style header */
    #top-header {
        height: var(--header-height-mobile);
    }

    #top-menu {
        height: var(--header-height-mobile);

        background-image: url("../../images/DRO-skyline-sm.jpg");
        background-repeat: no-repeat;
        background-position: center top;
    }

    .top-menu-inner {
        top: 0;
        padding-top: 88px;
    }

    .site-logo {
        margin-left: 10px;
        margin-top: 0;
        font-size: 1.1rem;
    }

    /* Show search + hamburger */
    .header-actions {
        display: flex;
        margin-right: 10px;
    }

    .nav-toggle,
    .search-toggle {
        display: inline-flex;
    }

    /* Mobile-style slide-down navigation */
    .main-nav {
        position: absolute;
        z-index: 1002;
        top: 100%;
        left: 0;
        right: 0;

        display: block;

        background-color: var(--header-panel);

        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition: max-height 0.3s ease, opacity 0.25s ease;
        border-top: 1px solid #ffffff;
    }

    .main-nav.is-open {
        max-height: 800px;
        opacity: 1;
        padding: 0.75rem 1rem 1rem;
    }

    .main-nav a {
        display: block;
        padding: 0.5rem 0;
        color: var(--header-text);
        text-decoration: none;
        border-bottom: 1px solid #aaaaaa;
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .mobile-only {
        display: block;
    }

    /* Hide desktop social icons */
    .social-icons {
        display: none;
    }

    /* Hide full desktop category bar */
    .category-nav {
        display: none;
    }

    /* Tablet search panel */
    .search-panel {
        display: block;
        top: 100%;

        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition: max-height 0.3s ease, opacity 0.25s ease;
    }

    .search-panel.is-open {
        max-height: 1000px;
        opacity: 1;
        padding: 0.75rem 1rem;
    }

    #search-panel .dropdown {
        visibility: visible;
        height: auto;
        margin-top: 20px;
    }

    #search-panel .dropdown-content {
        position: relative;
        width: 100%;
        margin-top: 5px;
    }
}

/* =========================================
   DESKTOP (>= 1025px)
   ========================================= */
@media (min-width: 1025px) {
	
    #top-header {
        height: var(--header-height-desktop);
        background-image: url("../../images/DRO-skyline-lg-bkg.jpg");
        background-repeat: repeat-x;
        background-position: center top;
    }

    #top-menu {
        height: var(--header-height-desktop);
        max-width: 1960px;

        background-image: url("../../images/DRO-skyline-lg.jpg");
        background-repeat: no-repeat;
        background-position: center top;
    }
	
	.top-menu-inner {
		top: -110px; /* 👈 move UP */
	}

	.site-logo {
		margin-top: 20px;
	}
    .nav-toggle,
    .search-toggle,
    .header-actions,
    .search-panel {
        display: none !important;
    }

    .main-nav {
        display: flex;
        align-items: center;
        gap: 1.2rem;

        margin-left: auto;
        background: transparent !important;
        white-space: nowrap;
    }

    .main-nav a {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
		
		color: var(--header-text);
        text-decoration: none;
		transition: color 0.25s ease-in-out;
    }
	
	.main-nav a:hover {
		color: var(--header-accent);
	}
	
    .social-icons {
        display: flex;
        align-items: center;
        gap: 1rem;

        margin-left: 1.25rem;
        margin-right: 150px;
    }

    .social-icons a:hover {
        color: var(--header-accent);
    }
}

/* =====================================
   CATEGORY BAR
===================================== */

.category-nav {

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 22px;

    height: 38px;

    background: #76746d;

    border-top: 3px solid #57d500;
    border-bottom: 6px solid #000;

    font-size: .95rem;
    font-weight: 500;
    text-transform: uppercase;
}

.category-nav a {

    color: #fff;
    text-decoration: none;

    transition: .2s;
}

.category-nav a:hover {

    color: #ffd300;
}

.category-nav a.active {
    color: #ffd300;
    /* font-weight: 600; */
}

@media (max-width: 1024px) {
    .category-nav{
        display: none;
    }
}

/* ================================
   TOAST SYSTEM
================================ */

#toast-container {
    position: fixed;
    top: 190px;
    right: 20px;
    z-index: 99999;
}

.toast {
    min-width: 260px;
    max-width: 350px;

    padding: 12px 16px;
    border-radius: 6px;

    font-size: 0.95rem;
    line-height: 1.4;

    box-shadow: 0 6px 18px rgba(0,0,0,0.15);

    opacity: 0;
    transform: translateY(-10px);

    animation: toastIn 0.25s ease forwards;
}

/* Types */
.toast-success {
    background: #e6f7e6;
    border: 1px solid #8bc98b;
    color: #245c24;
}

.toast-error {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #7a1c1c;
}

/* Entrance */
@keyframes toastIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Exit */
.toast.fade-out {
    animation: toastOut 0.4s ease forwards;
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (max-width:700px){

    #toast-container{
        top:140px;   /* push below header */
        right:10px;
        left:10px;   /* optional: full width feel */
    }

    .toast{
        width:100%;
        justify-content:center;
    }

}