*,
*:before,
*:after {
    box-sizing: border-box;
}

html {
    font-size: 1rem;
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: #f1efdc;
    font-family: 'Alegreya Sans', sans-serif;
    color: #5E3A1E;
}

h1 {
    text-align: center;
    margin-bottom: 4rem;
}

h1,
h2,
h3,
.nav-links a {
    font-family: 'Tenor Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Header & Nav --- */

header {
    width: 100%;
    position: fixed;
    background-color: #ffffff;
    z-index: 10000;
    top: 0;
    left: 0;
}

.main-header {
    width: 100%;
}

.header-box {
    background-color: #5E3A1E;
    color: #f1efdc;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

ul {
    display: flex;
    gap: 4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav a {
    text-decoration: none;
    color: #E8E0B0;
    font-weight: 600;
    font-size: 1.2rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    letter-spacing: 0.1rem;
}

header nav a:hover {
    background-color: #E8E0B0;
    color: #1D705B;
    text-decoration: underline;
    text-underline-offset: 0.5rem;
}

#logo {
    height: 6rem;
    width: auto;
    display: block;
}

.close-icon {
    display: none;
}

#nav-toggle.active .hamburger-icon {
    display: none;
}

#nav-toggle.active .close-icon {
    display: block;
}

#nav-toggle {
    display: none;
    border: none;
}

#home {
    scroll-margin-top: 6rem;
}

#about-us,
#gallery,
#private-events,
#menu,
#mercatino,
#map-location,
#wine-club {
    scroll-margin-top: 4rem;
}

/* --- Main Content --- */
main {
    margin-top: 8rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 90vh;
    min-height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-container {
    position: relative;
    z-index: 3;
    max-width: 75rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.hero-image {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hero-image img {
    max-width: 35rem;
    width: 80%;
    height: auto;
}

.green-btn,
.hero-btn {
    display: inline-block;
    background-color: #1D705B;
    color: white;
    margin-top: 2rem;
    text-decoration: none;
    font-family: 'Tenor Sans', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.green-btn {
    padding: 0.75rem 1.5rem;
    letter-spacing: 0.125rem;
}

.white-btn {
    padding: 0.75rem 1.5rem;
    letter-spacing: 0.125rem;
    display: inline-block;
    background-color: white;
    color: #5E3A1E;
    margin-top: 2rem;
    margin-left: 1rem;
    text-decoration: none;
    font-family: 'Tenor Sans', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-btn {
    padding: 1.125rem 2rem;
    letter-spacing: 0.125rem;
}

.green-btn:hover,
.hero-btn:hover {
    background-color: #E8E0B0;
    color: #1D705B;
}

.white-btn:hover {
    background-color: #1D705B;
    color: white;
}

/* About Section */
.about-section {
    width: 100%;
    padding: 5rem 1.25rem;
    display: flex;
    justify-content: center;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.about-content h2 {
    font-size: 2.8rem;
    color: #1D705B;
    margin-bottom: 1.25rem;
}

.txt-content {
    flex: 1;
    text-align: center;
    max-width: 45rem;
    margin-inline: auto;
}

.txt-content h2 {
    font-size: 2.4rem;
    color: #1D705B;
    margin-bottom: 1.25rem;
}

.txt-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.txt-content p {
    line-height: 1.6;
    font-size: 1.15rem;
}

/* --- Phone Pop-Up Modal Styles --- */
.phone-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    /* Controlled via JS */
    justify-content: center;
    align-items: center;
    z-index: 11000;
    /* Sits completely on top of fixed headers */
    backdrop-filter: blur(4px);
}

.phone-modal-overlay.is-visible {
    display: flex;
}

.phone-modal-content {
    background: #f1efdc;
    width: 90%;
    max-width: 28rem;
    position: relative;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(94, 58, 30, 0.3);
    animation: phoneModalFade 0.3s ease-out;
}

.phone-modal-inner h3 {
    color: #1D705B;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.phone-modal-inner p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #5E3A1E;
}

.phone-display-link {
    display: inline-block;
    font-size: 2.2rem;
    font-family: 'Tenor Sans', sans-serif;
    color: #1D705B;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.phone-display-link:hover {
    color: #5E3A1E;
    text-decoration: underline;
}

.phone-modal-subtext {
    font-size: 0.9rem !important;
    font-style: italic;
    opacity: 0.7;
    margin: 0;
}

.close-phone-modal {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #5E3A1E;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.close-phone-modal:hover {
    opacity: 1;
}

@keyframes phoneModalFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gallery Section */
/* --- New Gallery Layout Strip Styles --- */

.gallery-section {
    width: 100%;
    padding: 1rem 0;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
    background-color: #f1efdc;
    background-image:
        linear-gradient(to right, rgba(241, 239, 220, 0.9), rgba(241, 239, 220, 0.9)),
        url('../assets/images/rosetta-textured-background.jpg');
    background-repeat: repeat;
    background-size: 10rem;
}

.gallery-container {
    max-width: 75rem;
    width: 100%;
    margin: 4rem auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem;
    padding-inline: 1.25rem;
}

/* Horizontal Track Container */
.gallery-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-slider {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* Custom momentum track dragging logic for mobile viewport panels */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

/* Hide native ugly scrollbars across browsers but retain mousewheel and track drag */
.gallery-slider::-webkit-scrollbar {
    height: 4px;
}

.gallery-slider::-webkit-scrollbar-track {
    background: rgba(94, 58, 30, 0.05);
}

.gallery-slider::-webkit-scrollbar-thumb {
    background: #1D705B;
    border-radius: 10px;
}

/* Thumbnails */
.slider-thumb {
    flex: 0 0 calc(20% - 0.4rem);
    /* Exactly 5 items visible per screen slice view on desktop */
    min-width: 140px;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
    border-radius: 0.25rem;
    overflow: hidden;
    opacity: 0.6;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
}

.slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Highlight Selected/Active State */
.slider-thumb:hover,
.slider-thumb.active {
    opacity: 1;
    border-color: #1D705B;
    transform: scale(0.98);
}

/* Large Main Feature View Block */
.gallery-main-viewport {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 550px;
    background-color: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(94, 58, 30, 0.15);
}

#gallery-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease-in-out;
}

/* Bottom Floating Counter Badge */
.selection-counter-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background-color: rgba(45, 45, 45, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-family: 'Tenor Sans', sans-serif;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 62rem) {
    .slider-thumb {
        flex: 0 0 calc(33.333% - 0.4rem);
        /* 3 items visible on tablet */
    }
}

@media (max-width: 48rem) {
    .slider-thumb {
        flex: 0 0 calc(50% - 0.25rem);
        /* 2 items visible on mobile devices */
        min-width: 120px;
    }

    .gallery-main-viewport {
        aspect-ratio: 4 / 3;
    }

    .selection-counter-badge {
        bottom: 0.75rem;
        left: 0.75rem;
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
    }
}



/* --- Menu Section --- */
.menu-section {
    padding: 1rem 1.25rem;
    background-color: #f1efdc;
    display: flex;
    justify-content: center;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.menu-shell {
    max-width: 85rem;
    width: 100%;
}

.menu-header {
    text-align: center;
    margin-bottom: 2rem;
}

.menu-header h2 {
    font-size: 2.4rem;
    color: #1D705B;
    margin: 0 0 0.75rem;
}

.menu-header p {
    margin: 0;
    font-size: 1.1rem;
    max-width: 40rem;
    margin-inline: auto;
}

.menu-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin: 2rem auto 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.menu-nav a {
    text-decoration: none;
    color: #5E3A1E;
    font-weight: 600;
    letter-spacing: 0.05rem;
    padding: 0.4rem 0.6rem;
    border-bottom: 0.125rem solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.menu-nav a:hover,
.menu-nav a.active {
    color: #1D705B;
    border-color: #1D705B;
}

.menu-category {
    padding: 2.5rem 0;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
    display: none;
}

.menu-category.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-category h3 {
    font-size: 1.4rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
    color: #1D705B;
    width: 100%;
    max-width: 70rem;
    text-align: left;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 70rem;
}

.menu-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}

.item-title {
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.02rem;
}

.item-desc {
    line-height: 1.5;
    max-width: 49rem;
}

.item-title::after {
    content: " -";
    margin-right: 0.25rem;
    font-weight: 400;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 70rem;
}

.menu-column h4 {
    margin: 1.5rem 0 0.5rem;
    line-height: 1.5;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06rem;
    color: #5E3A1E;
}

.menu-column p {
    margin: 0.2rem 0 0.6rem;
}

.menu-note {
    font-style: italic;
    opacity: 0.7;
    line-height: 1.5;
    overflow-wrap: anywhere;
    width: 100%;
    max-width: 70rem;
}

/* .menu-note+.menu-note {
    margin-top: 0.35rem;
} */

.menu-category.is-drinks .menu-grid,
.menu-category.is-wine .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 2rem;
}

.menu-category.is-drinks .menu-column,
.menu-category.is-wine .menu-column {
    padding-right: 1.5rem;
    border-right: 0.0625rem solid rgba(94, 58, 30, 0.18);
}

.menu-category.is-drinks .menu-column:last-child,
.menu-category.is-wine .menu-column:last-child {
    border-right: none;
    padding-right: 0;
}

.menu-category.is-drinks .menu-note,
.menu-category.is-wine .menu-note {
    font-style: normal;
    opacity: 0.85;
}

.menu-category.is-wine .menu-note strong {
    display: block;
    margin-top: 0.75rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08rem;
    color: #5E3A1E;
}

/* Double Section Layouts */
.double-section {
    width: 100%;
    padding: 5rem 1.25rem;
    display: flex;
    justify-content: center;
    background-color: #f1efdc;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.double-container {
    max-width: 75rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.double-image-wrapper {
    flex: 1.2;
}

.double-feature-img {
    width: 100%;
    max-width: 30rem;
    height: auto;
    display: block;
    margin: 0 auto;
    border: #f1efdc 0.0625rem solid;
    border-radius: 0.5rem;
    box-shadow: 0 0.625rem 1.875rem rgba(94, 58, 30, 0.15);
    object-fit: cover;
}

#mercatino {
    background-color: #5E3A1E;
    background-image:
        linear-gradient(to right, rgba(94, 58, 30, 0.9), rgba(94, 58, 30, 0.9)),
        url('../assets/images/rosetta-textured-background.jpg');
    background-repeat: repeat;
    background-size: 10rem;

    h2 {
        color: #f1efdc;
    }

    p {
        color: #f1efdc;
    }
}

/* Map & Contact Section */
.map-section {
    padding: 3.75rem 1.25rem;
    background-color: #f1efdc;
    border-top: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.map-section h2 {
    color: #5E3A1E;
    text-align: center;
    margin-bottom: 2.5rem;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 25rem;
    position: relative;
    height: 0;
    max-width: 75rem;
    margin: 0 auto;
    border: 0.0625rem solid rgba(94, 58, 30, 0.25);
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 5.625rem;
    max-width: 75rem;
    margin: 2rem auto 2.5rem auto;
    flex-wrap: wrap;
}

.contact-column h3 {
    font-size: 1.5rem;
    margin-bottom: 0.9375rem;
    color: #1D705B;
    border-bottom: 0.0625rem solid rgba(232, 224, 176, 0.3);
    padding-bottom: 0.3125rem;
}

.contact-column p {
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0;
}

.social-icons {
    margin-top: 1rem;
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    font-size: 1.4rem;
}

.social-icons a {
    color: #5E3A1E;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #1D705B;
}

#wine-club {
    background-color: #f1efdc;
    background-image:
        linear-gradient(to right, rgba(241, 239, 220, 0.9), rgba(241, 239, 220, 0.9)),
        url('../assets/images/rosetta-textured-background.jpg');
    background-repeat: repeat;
    background-size: 10rem;
}

/* Footer */
footer {
    background-color: #5E3A1E;
    color: #f1efdc;
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Media Queries --- */

@media (max-width: 84rem) {
    #logo {
        height: 4rem;
    }

    #nav-toggle {
        display: block;
        background: none;
        cursor: pointer;
        padding: 0;
    }

    #nav-toggle img {
        height: 1.3rem;
        filter: invert(96%) sepia(26%) saturate(601%) hue-rotate(329deg) brightness(98%) contrast(93%);
    }

    #primary-nav {
        display: flex;
        position: fixed;
        background-color: #E8E0B0;
        top: 4.5rem;
        left: 100%;
        height: auto;
        width: 100%;
        justify-content: center;
        transition: ease 500ms;
        z-index: 2000;
    }

    #primary-nav a {
        color: #1D705B;
    }

    #primary-nav.active {
        left: 0;
    }

    ul {
        display: flex;
        flex-direction: column;
        line-height: 2rem;
        text-align: center;
        gap: 1rem;
        padding: 2rem 0;
    }

    main {
        margin-top: 6rem;
    }

    .hero {
        height: 35vh;
        min-height: 250px;
    }

    .hero-image img {
        max-width: 20rem;
    }

    .menu-section {
        padding: 4rem 1.25rem;
    }
}

@media (max-width: 62rem) {
    #logo {
        height: 2rem;
    }

    main {
        margin-top: 4rem;
    }

    .menu-category.is-drinks .menu-grid,
    .menu-category.is-wine .menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 48rem) {

    .gallery-container,
    .double-container {
        flex-direction: column-reverse;
    }

    .hero {
        height: 30vh;
        min-height: 150px;
    }

    .hero-image img {
        max-width: 12rem;
    }

    .about-section {
        padding: 4rem 1.25rem;
    }

    #menu {
        scroll-margin-top: 23rem;
    }

    .menu-section {
        padding: 0rem;
    }

    .menu-shell {
        padding: 2rem 1.25rem 3rem;
    }

    .menu-header h2 {
        font-size: 1.4rem;
    }

    .menu-header p {
        font-size: 0.95rem;
    }

    .menu-nav {
        gap: 0.4rem 0.8rem;
        margin: 1.5rem auto 2rem;
        position: sticky;
        top: 4rem;
        z-index: 5;
        background-color: rgba(241, 239, 220, 0.96);
        backdrop-filter: blur(6px);
        padding-top: 1.1rem;
        padding-bottom: 0.75rem;
    }

    .menu-nav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.4rem;
    }

    .menu-line {
        flex-direction: column;
        gap: 0.4rem;
    }

    .item-title {
        font-size: 1rem;
    }

    .item-title::after {
        display: none;
    }

    .item-desc {
        text-align: left;
        font-size: 0.85rem;
    }

    .menu-category h3 {
        font-size: 1.1rem;
    }

    .menu-grid,
    .menu-category.is-drinks .menu-grid,
    .menu-category.is-wine .menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-category.is-drinks .menu-column,
    .menu-category.is-wine .menu-column {
        border-right: none;
        padding-right: 0;
        border-bottom: 0.0625rem solid rgba(94, 58, 30, 0.18);
        padding-bottom: 1.5rem;
    }

    .menu-category.is-drinks .menu-column:last-child,
    .menu-category.is-wine .menu-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .menu-column h4 {
        font-size: 0.95rem;
    }

    .menu-note {
        font-size: 0.85rem;
    }
}

@media (max-width: 32rem) {
    #menu {
        scroll-margin-top: 4rem;
    }

    .menu-shell {
        padding: 1.5rem 1rem 2.5rem;
    }

    .menu-nav {
        gap: 0.35rem 0.6rem;
    }

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