/**
 * Evangiz Restaurant - Structural Layouts
 */

/* 1. Global Wrapper */
#site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. Topbar Navigation Banner */
.topbar-wrapper {
    background-color: var(--color-accent);
    color: var(--color-white);
    font-size: 0.85rem;
    padding: var(--space-sm) 0;
    font-family: var(--font-heading);
    font-weight: 500;
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-info-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.topbar-icon {
    opacity: 0.95;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-white);
    white-space: nowrap;
}

.topbar-link:hover {
    color: rgba(255, 255, 255, 0.85);
}

.topbar-divider {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 992px) {
    .topbar-container {
        flex-direction: column;
        gap: var(--space-xs);
        text-align: center;
        padding: var(--space-xs) var(--space-md);
    }
    .topbar-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-xs) var(--space-md);
    }
    .topbar-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .topbar-wrapper {
        display: none; /* Hide topbar on mobile for maximum viewport efficiency */
    }
}

/* 3. Primary Navbar Header */
.navbar-wrapper {
    background-color: var(--color-bg-cream);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-subtle);
    border-bottom: 1px solid var(--color-border);
    height: 70px; /* Thin, professional, and clean height */
    display: flex;
    align-items: center;
    padding: 0;
    transition: height 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.navbar-wrapper.is-stuck {
    height: 58px;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(11, 19, 37, 0.08);
    backdrop-filter: blur(12px);
}

.navbar-container {
    display: flex;
    justify-content: center; /* Center navigation block on desktop */
    align-items: center;
    height: 100%;
    position: relative;
    width: 100%;
}

.navbar-logo-mobile {
    display: none; /* Hidden on desktop */
}

.navbar-logo-sticky {
    display: none;
    align-items: center;
    flex: 0 0 auto;
    line-height: 1;
}

.navbar-logo-sticky img {
    width: auto;
    height: 42px;
    max-width: 170px;
    object-fit: contain;
}

.mobile-menu-brand {
    display: none; /* Hidden on desktop */
}

.navbar-logo-desktop-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 120px;
    height: 130px;
    background-color: var(--color-bg-cream);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    border-bottom-left-radius: 45px;
    border-bottom-right-radius: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.navbar-logo-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    transition: var(--transition-fast);
}

.navbar-logo-desktop:hover {
    transform: scale(1.05);
}

.navbar-logo-desktop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 160px;
    height: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    height: 100%;
    align-items: center;
    gap: 50px;
}

.nav-list-left,
.nav-list-right {
    padding: 0;
    margin: 0;
}

/* Desktop Split Layout Symmetry */
@media (min-width: 993px) {
    .navbar-menu {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 0; /* Remove gap to rely on 50% split width */
    }
    
    .nav-list-left,
    .nav-list-right {
        width: 50%;
    }
    
    .nav-list-left {
        justify-content: flex-end;
        padding-right: 80px; /* Exact half of logo spacer width */
    }
    
    .nav-list-right {
        justify-content: flex-start;
        padding-left: 80px; /* Exact half of logo spacer width */
    }

    .navbar-wrapper.is-stuck .navbar-container {
        justify-content: center;
    }

    .navbar-wrapper.is-stuck .navbar-logo-sticky {
        display: flex;
        position: absolute;
        left: var(--space-lg);
    }

    .navbar-wrapper.is-stuck .navbar-logo-desktop-wrapper {
        display: none;
    }

    .navbar-wrapper.is-stuck .navbar-menu {
        width: auto;
        flex: 0 1 auto;
        justify-content: center;
        gap: 32px;
        margin: 0 auto;
    }

    .navbar-wrapper.is-stuck .nav-list-left,
    .navbar-wrapper.is-stuck .nav-list-right {
        width: auto;
        padding: 0;
    }

    .navbar-wrapper.is-stuck .nav-list {
        gap: 32px;
    }
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--color-text-dark);
    letter-spacing: 0.08em;
    padding: var(--space-xs) 0;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu Styles (Desktop Hover & Styling) */
.dropdown-caret {
    font-size: 0.65rem;
    margin-left: 6px;
    display: inline-block;
    transition: var(--transition-fast);
    vertical-align: middle;
}

.nav-dropdown-toggle {
    display: none;
}

@media (min-width: 993px) {
    .nav-item.dropdown:hover .dropdown-caret {
        transform: rotate(180deg);
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left:100%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--color-bg-cream);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
    padding: var(--space-sm) 0;
    list-style: none;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 1000;
}

@media (min-width: 993px) {
    .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-item-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-text-dark);
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.dropdown-item-link:hover {
    background-color: var(--color-bg-warm);
    color: var(--color-accent);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--color-primary);
    border-radius: var(--radius-round);
    transition: var(--transition-smooth);
}

/* Mobile Navbar Styles */
@media (max-width: 992px) {
    .navbar-wrapper {
        height: 75px;
    }

    .navbar-wrapper.is-stuck {
        height: 64px;
    }

    .navbar-container {
        justify-content: space-between;
    }

    .navbar-logo-sticky {
        display: none;
    }

    .navbar-logo-mobile {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .navbar-logo-mobile img {
        height: 50px;
        width: 50px;
        object-fit: contain;
        border-radius: 50%;
        background-color: var(--color-white);
        border: 2px solid var(--color-accent);
    }

    .mobile-logo-text {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--color-primary);
        letter-spacing: -0.01em;
        font-family: var(--font-serif);
    }
    
    .navbar-logo-desktop-wrapper {
        display: none; /* Hide center logo badge on mobile */
    }
    
    .navbar-toggle {
        display: flex;
        z-index: 101;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(82vw, 320px);
        max-width: calc(100vw - 56px);
        height: 100vh;
        height: 100dvh;
        background-color: var(--color-bg-cream);
        box-shadow: var(--shadow-premium);
        z-index: 100;
        transform: translate3d(105%, 0, 0);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 5.5rem 1rem 1rem;
        display: block;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        will-change: transform;
    }
    
    .navbar-menu.active {
        transform: translate3d(0, 0, 0);
    }

    .mobile-menu-brand {
        display: block;
        margin-bottom: var(--space-sm);
        padding-bottom: var(--space-xs);
        border-bottom: 1px solid var(--color-border);
    }
    
    .mobile-menu-logo {
        font-size: 1.7rem;
        font-weight: 700;
        color: var(--color-primary);
        letter-spacing: -0.02em;
        transition: var(--transition-fast);
        display: inline-block;
    }
    
    .mobile-menu-logo:hover {
        color: var(--color-accent);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0.65rem;
        height: auto;
        align-items: flex-start;
    }
    
    .nav-list-left,
    .nav-list-right {
        padding: 0;
        margin: 0;
    }
    
    .nav-list-right {
        margin-top: 0.5rem;
    }
    
    .nav-item {
        height: auto;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1rem;
        display: block;
        width: 100%;
        padding: 0.35rem 0;
    }

    .nav-item.dropdown {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link-row {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        width: 100%;
    }

    .nav-link-row .nav-link {
        flex: 1;
        padding-right: 0;
    }

    .nav-dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border: 1px solid transparent;
        background: transparent;
        color: var(--color-text-dark);
        border-radius: var(--radius-round);
        cursor: pointer;
        transition: var(--transition-fast);
    }

    .nav-dropdown-toggle:hover,
    .nav-dropdown-toggle:focus-visible {
        background-color: rgba(231, 86, 42, 0.08);
        color: var(--color-accent);
    }

    .dropdown-caret {
        margin-left: 0;
        font-size: 0.85rem;
        transition: var(--transition-fast);
    }

    /* Mobile Dropdown Menu Accordion Style overrides */
    .nav-item.dropdown.open .dropdown-caret {
        transform: rotate(180deg);
    }
    
    .nav-item.dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        left: auto;
        top: auto;
        width: 100%;
        min-width: 0;
        padding: 0 0 0 1.35rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        background: transparent;
        margin-top: 0;
        pointer-events: none;
    }
    
    .nav-item.dropdown.open .dropdown-menu {
        max-height: 120px;
        margin-top: 0.25rem;
        pointer-events: auto;
    }
    
    .nav-item.dropdown .dropdown-item-link {
        font-size: 0.88rem;
        padding: 0.5rem 0;
        color: var(--color-text-muted);
        display: block;
        line-height: 1.35;
    }
    
    .nav-item.dropdown .dropdown-item-link:hover {
        background: transparent;
        color: var(--color-accent);
    }
    
    /* Hamburger Active Animation */
    .navbar-toggle.active .hamburger-bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    
    .navbar-toggle.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle.active .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* 4. Common Grid Structures */
.section {
    padding: var(--space-xxl) 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-xl) 0;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* 5. Footer Layout Styles */
.footer-wrapper {
    background-color: #3f1800;
    color: var(--color-text-light);
    padding: 4rem 0 0;
    margin-top: auto;
    font-family: var(--font-body);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: 1rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    display: inline-block;
}

.footer-brand-desc {
    color: rgba(245, 246, 248, 0.7);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}

.footer-socials {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    color: var(--color-text-light);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

.footer-title {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-accent);
}

.footer-links-list,
.footer-hours-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links-list a {
    color: rgba(245, 246, 248, 0.7);
    font-size: 0.95rem;
}

.footer-links-list a:hover {
    color: var(--color-accent);
    padding-left: var(--space-xs);
}

.footer-hours-list li {
    font-size: 0.95rem;
    color: rgba(245, 246, 248, 0.7);
    display: flex;
    flex-direction: column;
}

.footer-hours-list .day {
    font-weight: 700;
    color: var(--color-white);
}

.footer-address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-contact-item {
    font-size: 0.95rem;
    color: rgba(245, 246, 248, 0.7);
}

.footer-contact-item a {
    color: inherit;
}

.footer-contact-item a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    font-size: 0.85rem;
    color: rgba(245, 246, 248, 0.5);
    font-family: var(--font-heading);
}

.footer-bottom-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
    .footer-bottom-container {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}
