<style>
    /* --- FLUID BACKGROUND IMAGE WRAPPERS --- */
    .image-container {
        position: relative !important;
        width: 100%;
        max-width: 100%;
        display: block;
        pointer-events: none !important; 
    }
    .bg-image {
        width: 100% !important;
        height: auto !important; 
        display: block !important;
        position: relative !important; 
    }

    /* --- GLOBAL LAYOUT RESET & BASE STYLES --- */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: #f9f9f9;
    }

    /* --- SITE NAVIGATION BAR --- */
    .navbar {
        background-color: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 2rem;
        height: 70px;
        position: relative;
        z-index: 1000 !important; /* Keep above grid layouts */
    }

    .logo {
        font-size: 1.5rem;
        font-weight: bold;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    /* Mobile Menu Toggle Button (Hidden on Desktop) */
    .menu-toggle {
        display: none;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        background: none;
        border: none;
    }
    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #333;
        transition: all 0.3s ease;
    }

    /* Main Menu Links (Desktop Layout Matrix) */
    .nav-links {
        display: flex;
        list-style: none;
        height: 100%;
    }
    .nav-item {
        position: relative;
        height: 70px !important; 
        display: flex;
        align-items: center;
    }
    .nav-link {
        text-decoration: none;
        color: #333;
        padding: 0 1.5rem;
        height: 100%; 
        display: flex;
        align-items: center;
        transition: background 0.3s;
    }
    .nav-link:hover {
        background-color: #f0f0f0;
    }

    /* Desktop Dropdown Level 1 (Portfolio) */
    .dropdown {
        display: none;
        position: absolute;
        top: 100%; 
        left: 0;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        min-width: 280px; /* Widened to fit photography text layout lines */
        list-style: none;
        box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
        z-index: 1001 !important;
        margin-top: -1px; 
    }

    /* Dropdown Text Links */
    .dropdown .nav-link {
        height: 45px !important; 
        width: 100%;
        justify-content: space-between;
        white-space: nowrap !important; /* Keep texts flat */
        padding: 0 1.2rem !important;
    }
    .nav-item:hover > .dropdown {
        display: block;
    }

    /* Desktop Dropdown Level 2 (Events) */
    .nested-item {
        position: relative;
    }
    .nested-dropdown {
        display: none;
        position: absolute;
        top: 0;
        left: 100%;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        min-width: 200px;
        list-style: none;
        box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
        z-index: 1002 !important;
    }
    .nested-item:hover .nested-dropdown {
        display: block;
    }

    /* ==========================================================
       Mobile Styles (Screens under 768px wide ONLY)
       ========================================================== */
    @media (max-width: 768px) {
        .menu-toggle {
            display: flex;
        }

        /* Turn top navigation into a vertical dropdown list on mobile */
        .nav-links {
            display: none; 
            flex-direction: column;
            position: absolute;
            top: 70px;
            left: 0;
            width: 100%; 
            height: auto !important; 
            background-color: #ffffff;
            border-bottom: 2px solid #e0e0e0;
            overflow-y: visible;
            padding-bottom: 0px;
            gap: 0 !important;
            box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
            z-index: 1000 !important;
        }

        /* Active class deployed via JavaScript to show mobile menu drawer */
        .nav-links.active {
            display: flex !important;
        }

        /* Forces individual list elements to stack safely without expanding height bounds */
        .nav-item, 
        .nested-item,
        .nav-links li {
            width: 100% !important;
            height: auto !important; 
            display: block !important;
        }

        /* Shrinks link dimensions safely for clear mobile tap areas */
        .nav-links a,
        .nav-links .nav-link {
            width: 100% !important;
            height: auto !important;         
            min-height: 0 !important;        
            max-height: none !important;
            padding: 12px 2rem !important;   
            border-bottom: 1px solid #f0f0f0;
            justify-content: space-between;
            line-height: 1.2 !important;     
            display: flex !important;
            align-items: center !important;
            box-sizing: border-box !important;
        }

        /* Flatten dropdown layouts for mobile scrolling */
        .dropdown, .nested-dropdown {
            display: none; 
            position: static;
            width: 100%;
            box-shadow: none;
            border: none;
            background-color: #fcfcfc;
            height: auto !important; 
        }

        /* Show the specific dropdown layer ONLY when opened via JavaScript toggle click */
        .nav-links .nav-item.open > .dropdown,
        .nav-links .nested-item.open > .nested-dropdown {
            display: block !important; 
        }

        /* Compresses inner level-1 nested items tightly */
        .dropdown .nav-link {
            padding-left: 3rem !important;
            padding-top: 10px !important;   
            padding-bottom: 10px !important;
            height: auto !important; 
            background-color: #f7f7f7 !important;
        }

        /* Compresses inner level-2 deep nested sub-items tightly */
        .nested-dropdown .nav-link {
            padding-left: 4rem !important;
            padding-top: 10px !important;   
            padding-bottom: 10px !important;
            height: auto !important; 
            background-color: #eeeeee !important;
        }

        /* Disable desktop hovers entirely on mobile layouts */
        .nav-item:hover > .dropdown,
        .nested-item:hover .nested-dropdown {
            display: none;
        }
        
        /* Hide decorative desktop sub-arrows on mobile layout */
        .nav-link span.arrow {
            display: none;
        }

        /* Animation behavior for hamburger icon morphing to an 'X' */
        .menu-toggle.open span:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
        }
        .menu-toggle.open span:nth-child(2) {
            opacity: 0;
        }
        .menu-toggle.open span:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
        }
    } /* FIXED: This media query bracket now cleanly isolates mobile styles */
    
    /* --- FORCE LOGO VISIBILITY OVER EXTERNAL FRAMEWORKS --- */
    .navbar .logo {
        display: block !important;
        visibility: visible !important;
        color: #333333 !important;
        position: relative !important;
        z-index: 1001 !important; 
    }

    /* ==========================================================
       Desktop ONLY Adjustments (Screens wider than 768px)
       ========================================================== */
    @media (min-width: 769px) {
        /* Force the main link container to accept hover triggers */
        .nav-item {
            cursor: pointer !important;
        }

        /* Force display when cursor is hovering over the element */
        .nav-item:hover > .dropdown {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        /* Force display for sub-menus on hover */
        .nested-item:hover > .nested-dropdown {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
    }
</style>