/*
 * Styles for the Navigation Bar
 * Path: /css/navbar.css
 */

 .site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.0);
    z-index: 100;
    transition: background-color 0.4s ease, border-bottom-color 0.4s ease;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/noise.png');
    background-repeat: repeat;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

/* Style for the header when the user scrolls down */
.site-header.scrolled {
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled::before {
    opacity: 0.1;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    height: 90px;
    padding: 0 15px; /* Add some padding for smaller screens */
}

/* Site Logo and Title */
.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.site-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: -140px;
}

.site-logo {
    max-height: 50px;
    width: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.site-title {
    font-family: var(--primary-font);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    color: var(--gold-color);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 20px;
}

.site-logo-link:hover .site-title {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.7), 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Main Navigation (Desktop) */
.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.main-navigation li {
    margin: 0 15px;
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    font-family: var(--secondary-font);
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.main-navigation a:hover {
    color: var(--gold-color);
    transform: translateY(-2px);
}

/* --- Hamburger Menu Icon --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 15px; /* Increase touch area */
    z-index: 101;
    position: relative;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--gold-color);
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    top: 10px;
}

/* --- Hamburger to "X" Animation --- */
.toggled .hamburger-inner {
    transform: rotate(45deg);
}

.toggled .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.toggled .hamburger-inner::after {
    top: 0;
    transform: rotate(-90deg);
}


/* Mobile Adjustments (max-width: 768px) */
@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 15px;
    }

    .site-branding {
        flex-shrink: 1;
        gap: 10px;
    }

    .site-logo-link {
        margin-left: 0; /* Remove the negative margin on mobile */
    }

    .site-logo {
        max-height: 40px;
    }

    .site-title {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    /* Show the mobile menu button */
    .menu-toggle {
        display: block;
    }

    /* Hide the desktop menu links */
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.98);
        border-top: 1px solid rgba(255, 215, 0, 0.1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        padding: 10px 0;
    }
    
    /* When the menu is toggled, display the list */
    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        padding: 15px 20px;
        text-align: center;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .site-logo-link {
        margin-left: -80px;
    }
    .main-navigation {
        padding-right: 30px;
    }
}

/* Standard WordPress class for screen reader text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
