/* 1. FONT IMPORT - Ensures Josephina loads */
@import url('https://fonts.googleapis.com/css2?family=Josephina:wght@400;700&display=swap');

/* 2. GLOBAL RESET (Optional but good for consistency) */
* {
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 0;
    /* Apply font globally as a fallback */
    font-family: 'Josephina', 'Josefin Sans', serif; 
}

/* 3. FLEX CONTAINER (The "Two Blocks" Layout) */
.header-container {
    display: flex;
    justify-content: space-between; /* Pushes Title to left, Nav to right */
    align-items: center; /* Vertically centers them */
    width: 95%; /* Leaves a little margin on sides */
    max-width: 1200px;
    margin: 20px auto; /* Centers the whole container on page */
    position: relative;
    flex-wrap: wrap; /* Allows stacking on very tiny screens if needed */
}

/* 4. HEADER TEXT BLOCK (Left Side) */
.site-header {
    flex: 1; /* Takes up available space */
    padding-right: 15px; /* Space between text and hamburger */
    text-align: left;
}

.site-header h1 {
    font-family: 'Josephina', 'Josefin Sans', serif; /* Explicit Font */
    color: #ffffff;
    margin: 0;
    font-size: 24px; /* Adjust size as needed */
    line-height: 1.2;
    white-space: nowrap; /* Prevents breaking unless absolutely necessary */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5. NAVIGATION BLOCK (Right Side) */
.site-navigation {
    flex: 0 0 auto; /* Don't grow, don't shrink, fit content */
    position: relative; /* Changed from absolute to relative */
    z-index: 1000;
    background-color: #000000; /* Match bg */
}

/* Hamburger Icon */
.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle .bar {
    display: block;
    width: 35px;
    height: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease-in-out;
}

/* Drop-down Menu */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #000000;
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    display: none;
    flex-direction: column;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.nav-menu.active {
    display: flex;
}

.nav-menu li {
    border-bottom: 1px solid #222;
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Josephina', 'Josefin Sans', serif; /* Explicit Font */
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.2s;
}

.nav-menu a:hover {
    background-color: #222222;
}

/* Hamburger Animation */
.nav-toggle.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* 6. RESPONSIVE ADJUSTMENTS (Tablet & Mobile) */
@media screen and (max-width: 768px) {
    .header-container {
        width: 98%; /* Use almost full width */
        margin: 10px auto;
    }

    .site-header h1 {
        font-size: 18px; /* Smaller text on tablet */
        white-space: normal; /* Allow wrapping if needed */
    }

    .nav-toggle .bar {
        width: 30px; /* Slightly smaller icon */
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        flex-direction: row; /* Keep side-by-side */
        align-items: center;
    }

    .site-header {
        padding-right: 10px;
    }

    .site-header h1 {
        font-size: 14px; /* Even smaller on phone */
        white-space: nowrap; /* Force single line, ellipsis if too long */
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-menu {
        width: 200px; /* Narrower menu */
        right: -10px; /* Adjust alignment if needed */
    }
}