/* ========================================
   Stella Barnes - Unified Navigation
   Clean, Centered Mobile Design
   ======================================== */

/* Navigation Variables */
:root {
    --nav-height: 70px;
    --nav-height-mobile: 60px;
    --nav-bg: rgba(250, 247, 242, 0.98);
    --nav-bg-scrolled: rgba(250, 247, 242, 0.98);
    --nav-text: #3D3D3D;
    --nav-accent: #C4704F;
    --nav-dark-bg: #1a3a38;
}

/* Main Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-nav.scrolled {
    height: calc(var(--nav-height) - 10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.site-nav.dark-mode {
    background: var(--nav-dark-bg);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

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

/* Logo */
.nav-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #2C2C2C;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.15em;
    transition: all 0.3s ease;
    z-index: 10001;
}

.nav-logo span {
    color: var(--nav-accent);
    font-style: italic;
}

.site-nav.dark-mode .nav-logo {
    color: white;
}

.nav-logo:hover {
    opacity: 0.8;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--nav-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0.4rem;
    left: 1.1rem;
    right: 1.1rem;
    height: 2px;
    background: var(--nav-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-menu a:hover {
    color: var(--nav-accent);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-menu a.active {
    color: var(--nav-accent);
}

.site-nav.dark-mode .nav-menu a {
    color: rgba(255, 255, 255, 0.9);
}

.site-nav.dark-mode .nav-menu a:hover,
.site-nav.dark-mode .nav-menu a.active {
    color: var(--nav-accent);
}

/* Contact Button in Nav */
.nav-menu .nav-cta a {
    background: var(--nav-accent);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.nav-menu .nav-cta a::after {
    display: none;
}

.nav-menu .nav-cta a:hover {
    background: #A85A3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 112, 79, 0.3);
}

/* Mobile Toggle Button */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10001;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.site-nav.dark-mode .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 16px;
}

.nav-toggle-icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2C2C2C;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav.dark-mode .nav-toggle-icon span {
    background: white;
}

.nav-toggle-icon span:nth-child(1) { top: 0; }
.nav-toggle-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle-icon span:nth-child(3) { bottom: 0; }

/* Toggle Animation */
.nav-toggle.active .nav-toggle-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-toggle.active .nav-toggle-icon span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) translateX(-10px);
}

.nav-toggle.active .nav-toggle-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MOBILE MENU - CLEAN CENTERED DESIGN
   Matching reference site style
   ============================================ */

.nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--nav-dark-bg);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.nav-mobile.active {
    transform: translateX(0);
}

/* Header */
.nav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(196, 112, 79, 0.2);
}

.nav-mobile-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    color: #FAF7F2;
    letter-spacing: -0.02em;
}

.nav-mobile-logo span {
    color: var(--nav-accent);
    font-style: italic;
}

.nav-mobile-close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0.5rem;
}

.nav-mobile-close:hover {
    transform: rotate(90deg);
}

.nav-mobile-close svg {
    width: 28px;
    height: 28px;
    stroke: #FAF7F2;
    stroke-width: 1.5;
}

/* Main Menu - Centered Large Links */
.nav-mobile-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 1rem 2rem;
    margin: 0;
    gap: 0.25rem;
    overflow-y: auto;
    min-height: 0;
}

.nav-mobile-menu li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.nav-mobile.active .nav-mobile-menu li {
    opacity: 1;
    transform: translateY(0);
}

.nav-mobile.active .nav-mobile-menu li:nth-child(1) { transition-delay: 0.1s; }
.nav-mobile.active .nav-mobile-menu li:nth-child(2) { transition-delay: 0.15s; }
.nav-mobile.active .nav-mobile-menu li:nth-child(3) { transition-delay: 0.2s; }
.nav-mobile.active .nav-mobile-menu li:nth-child(4) { transition-delay: 0.25s; }
.nav-mobile.active .nav-mobile-menu li:nth-child(5) { transition-delay: 0.3s; }
.nav-mobile.active .nav-mobile-menu li:nth-child(6) { transition-delay: 0.35s; }

.nav-mobile-menu a {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: #FAF7F2;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
    color: var(--nav-accent);
}

/* Remove icons from mobile menu */
.nav-mobile-menu .nav-icon,
.nav-mobile-menu svg {
    display: none !important;
}

/* Footer with CTA */
.nav-mobile-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(196, 112, 79, 0.2);
    flex-shrink: 0;
}

.nav-mobile-cta {
    display: block;
    width: 100%;
    padding: 1.25rem 2rem;
    background: transparent;
    border: 1px solid var(--nav-accent);
    color: var(--nav-accent);
    text-align: center;
    text-decoration: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.nav-mobile-cta:hover {
    background: var(--nav-accent);
    color: white;
}

/* Body Lock when Mobile Menu Open */
body.nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .site-nav {
        height: var(--nav-height-mobile);
    }

    .site-nav.scrolled {
        height: calc(var(--nav-height-mobile) - 5px);
    }

    .nav-container {
        padding: 0 1.25rem;
    }

    .nav-logo {
        font-size: 1.4rem;
    }

    .nav-mobile-menu a {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-mobile-header {
        padding: 1rem 1.5rem;
    }

    .nav-mobile-menu {
        padding: 0.5rem 1.5rem;
        gap: 0;
    }

    .nav-mobile-menu a {
        font-size: 1.35rem;
        padding: 0.5rem 0.75rem;
    }

    .nav-mobile-footer {
        padding: 1rem 1.5rem;
    }

    .nav-mobile-cta {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

@media (max-height: 600px) {
    .nav-mobile-menu a {
        font-size: 1.25rem;
        padding: 0.4rem 0.75rem;
    }

    .nav-mobile-header {
        padding: 0.75rem 1.25rem;
    }

    .nav-mobile-footer {
        padding: 0.75rem 1rem;
    }

    .nav-mobile-cta {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Prevent FOUC */
.site-nav {
    animation: navFadeIn 0.3s ease;
}

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

/* ============================================
   BOTTOM TAB NAVIGATION - Mobile
   Modern thumb-friendly navigation
   ============================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #2C2C2C;
    z-index: 10000;
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.bottom-nav .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s ease;
    padding: 0.25rem;
}

.bottom-nav .tab-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
    transition: all 0.2s ease;
}

.bottom-nav .tab-item span {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bottom-nav .tab-item.active,
.bottom-nav .tab-item:hover {
    color: var(--nav-accent);
}

.bottom-nav .tab-item.active svg {
    stroke-width: 2;
    transform: scale(1.1);
}

/* Show bottom nav on mobile */
@media (max-width: 1024px) {
    .bottom-nav {
        display: flex;
    }
}

@media (max-width: 480px) {
    .bottom-nav {
        height: 65px;
    }

    .bottom-nav .tab-item svg {
        width: 20px;
        height: 20px;
    }

    .bottom-nav .tab-item span {
        font-size: 0.6rem;
    }
}

/* Safe area for iPhone notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        height: calc(70px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }
}
