/* Navigation Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Frosted glass: translucent bar with content blurred beneath it */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    z-index: 1000;
    padding: 0.75rem 0;
    min-height: 75px; /* Fixed minimum height to prevent jumping */
}

/* Fallback: keep a solid bar where backdrop-filter isn't supported */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .header {
        background: #ffffff;
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
        border-bottom: none;
    }
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    height: 100%;
    min-height: 61px; /* Ensures consistent container height */
}

.logo {
    flex-shrink: 0;
    height: 45px; /* Fixed height to match logo height */
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 1;
    height: 45px; /* Fixed height for logo anchor */
}

.logo img {
    height: 45px !important; /* Enforce consistent logo height */
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #555555;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

.nav-link.active {
    color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    color: #555555;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button.nav-dropdown-toggle {
    background: none;
    border: 0;
    font: inherit;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

.nav-dropdown-toggle.active {
    color: #2a2a2a;
    border-bottom-color: #2a2a2a;
}

.nav-dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
    z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    color: #555555;
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background-color: #f8f8f8;
    color: #2a2a2a;
}

.nav-dropdown-item.active {
    background-color: #f8f8f8;
    color: #2a2a2a;
}

/* Mobile Navigation */
.hamburger-nav {
    display: none;
    position: relative;
}

.hamburger-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background: #555555;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hamburger-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.11);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.hamburger-menu.active {
    display: block;
}

.hamburger-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #555555;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid #f3f3f3;
}

.hamburger-link:last-child {
    border-bottom: none;
}

.hamburger-link:hover,
.hamburger-link.active {
    background-color: #fafafa;
    color: #2a2a2a;
}

/* Hamburger Menu Sections for Services/Projects */
.hamburger-section {
    border-bottom: 1px solid #e9ecef;
}

.hamburger-section:last-of-type {
    border-bottom: none;
}

.hamburger-section-title {
    display: block;
    padding: 1rem 1.5rem 0.5rem;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hamburger-section .hamburger-link {
    padding-left: 2.5rem;
    font-size: 0.95rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger-nav {
        display: block;
        flex-shrink: 0;
        position: relative;
    }

    .nav-container {
        flex-wrap: nowrap;
        align-items: center;
        padding: 0 1rem;
    }

    /* Improve hamburger menu positioning and size */
    .hamburger-menu {
        position: fixed;
        top: 75px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 75px);
        overflow-y: auto;
        margin-top: 0;
        border-radius: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    /* Larger touch targets for mobile */
    .hamburger-link {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .hamburger-section .hamburger-link {
        padding: 1rem 2.5rem;
        min-height: 44px;
    }

    /* Better visual feedback */
    .hamburger-link:active {
        background-color: #f0f0f0;
        transform: scale(0.98);
    }

    /* Hamburger icon improvements */
    .hamburger-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .hamburger-line {
        transition: all 0.3s ease;
    }

    .hamburger-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Skip Links - Accessibility Feature */
.skip-links {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10000;
}

.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: #1a1a1a;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    white-space: nowrap;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    left: 0;
    outline: 3px solid white;
    outline-offset: 2px;
}

/* Centered skip-link bar (same behavior as index / video / photography pages) */
.skip-links.skip-links--bar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
}

.skip-links.skip-links--bar .skip-link {
    position: absolute;
    left: -100vw;
    top: auto;
    width: auto;
    height: auto;
    overflow: visible;
    background: #1a1a1a;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    white-space: nowrap;
}

.skip-links.skip-links--bar .skip-link:focus {
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 0 !important;
    outline: 3px solid white !important;
    outline-offset: 2px !important;
    z-index: 10001 !important;
}

.skip-links.skip-links--bar .skip-link:first-child:focus {
    margin-left: -8rem;
}

.skip-links.skip-links--bar .skip-link:last-child:focus {
    margin-left: 8rem;
}

/* Screen reader only (e.g. footer newsletter label) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================================================
   GLOBAL LAYOUT OVERRIDES (site-wide)
   Loaded on every page via navigation.css. Left-aligned layout + square
   corners. Uses !important to beat inline text-align:center across pages.
   ========================================================================= */

/* Square corners everywhere — no rounded buttons/cards/images/inputs/chips */
*, *::before, *::after { border-radius: 0 !important; }

/* Left-align: catch every inline-centered hero/section/footer, plus classes */
[style*="text-align: center"],
[style*="text-align:center"] { text-align: left !important; }

.hero-content,
.home-head,
.home-cta,
.video-section-header,
.video-section-subtitle,
.services-header,
.gallery-section-title,
.ed-full,
.themes-header,
.text-center,
.footer { text-align: left !important; }

/* Hero blocks sit to the left rather than centered */
.hero,
.video-hero,
.project-hero,
.hero-slideshow { justify-content: flex-start !important; }
.hero { padding-left: clamp(1rem, 5vw, 4rem); }
.hero-content { margin-left: 0 !important; }

/* Navigation: cluster the menu beside the logo on the left */
.nav-container { justify-content: flex-start !important; gap: clamp(1.5rem, 4vw, 3.5rem); }
.nav-links { margin-right: auto; }

/* Keep mobile bar as logo-left / hamburger-right */
@media (max-width: 768px) {
    .nav-container { justify-content: space-between !important; gap: 0; }
    .nav-links { margin-right: 0; }
}

/* Accessibility: clear keyboard focus ring on all interactive elements.
   Two-tone (dark ring + white halo) so it's visible on light pages AND
   over dark hero images. Mouse clicks don't show it (:focus-visible only). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}