*,
*: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,
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;
}

.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;
}

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;
    padding-bottom: 1rem;
    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;
}

button {
    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);
    /* Adjust the opacity (last value) to make the background video lighter or darker */
    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;
    /* Controls the size of the logo */
    width: 80%;
    height: auto;
}

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

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

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

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

/* About Section */
.about-section {
    width: 100%;
    padding: 5rem 13rem;
    display: flex;
    justify-content: center;
    border-top: 0.0625rem solid #5E3A1E40;
}

.about-content {
    text-align: center;
}

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

.about-content p {
    padding-inline: 11rem;
    line-height: 1.4rem;
}

.text-content p {
    padding-inline: 46rem;
}

/* Gallery Section */

.gallery-section {
    width: 100%;
    padding-inline: 1.25rem;
    padding-bottom: 3.75rem;
    display: flex;
    justify-content: center;
    border-top: 0.0625rem solid #5E3A1E40;

    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%;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.gallery-grid-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9375rem;
    margin-top: 4rem;
}

.gallery-grid img {
    border: #1D705B 1px solid;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* --- Menu Section --- */

.menu-section {
    padding: 5rem 1.25rem;
    background-color: #f1efdc;
    display: flex;
    justify-content: center;
    border-top: 0.0625rem solid #5E3A1E40;
}

.menu-container {
    max-width: 75rem;
    width: 100%;
}

.menu-section h2 {
    font-size: 2.4rem;
    color: #1D705B;
    margin-bottom: 3rem;
}

/* Accordion Headers */
.menu-category {
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1.5rem 0;
    border-bottom: 2px solid #5E3A1E;
    transition: all 0.3s ease;
}

.category-header:hover {
    color: #1D705B;
}

.category-header h3 {
    margin: 0;
    font-size: 1.6rem;
    font-family: 'Tenor Sans', sans-serif;
}

.toggle-icon {
    font-size: 1.8rem;
    font-weight: 300;
    transition: transform 0.4s ease;
}

/* Items Wrapper (Hidden State) */
.menu-items-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

/* Active State Styles */
.menu-category.active .menu-items-wrapper {
    max-height: 2000px;
    transition: max-height 0.6s ease-in-out;
    padding-bottom: 2rem;
}

.menu-category.active .toggle-icon {
    transform: rotate(45deg);
    color: #1D705B;
}

/* Individual Item Styles */
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(94, 58, 30, 0.1);
}

.item-title {
    font-family: 'Tenor Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    flex: 1;
}

.item-desc {
    flex: 1.5;
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: right;
    font-style: italic;
    color: #5E3A1E;
}

/* Wine Section */
.double-section {
    width: 100%;
    padding: 5rem 1.25rem;
    display: flex;
    justify-content: center;
    background-color: #f1efdc;
    border-top: 0.0625rem solid #5E3A1E40;
}

.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-radius: 0.5rem;
    box-shadow: 0 0.625rem 1.875rem rgba(94, 58, 30, 0.15);
    object-fit: cover;
}

.txt-content {
    flex: 1;
    text-align: center;
}

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

.txt-content h3 {
    font-size: 0.8rem;
}

.txt-content p {
    padding-inline: 4rem;
}

/* Map & Contact Section */
.map-section {
    padding: 3.75rem 1.25rem;
    background-color: #f1efdc;
    border-top: 0.0625rem solid #5E3A1E40;
}

.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 #5E3A1E40;
}

.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;
}

/* Modal */
#email-modal {
    margin-top: 3rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(0.1875rem);
}

.modal-content {
    background: #f1efdc;
    width: 90%;
    max-width: 50rem;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out;
}

.modal-inner {
    display: flex;
}

.modal-image-side {
    flex: 1;
}

.modal-image-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text-side {
    flex: 1.2;
    padding: 3.125rem 2.5rem;
    text-align: center;
}

.modal-text-side h2 {
    color: #1D705B;
    font-size: 2.2rem;
    margin-bottom: 0.9375rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;


}

.modal-form input {
    padding: 0.75rem;
    border: 0.0625rem solid #5E3A1E40;
    border-radius: 0.25rem;
}

.close-modal {
    position: absolute;
    top: 0.9375rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #f1efdc;
    z-index: 10;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

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

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

@media (max-width: 84rem) {

    #logo {
        height: 4rem;
    }

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

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

    #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: 6.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;
        display: flex;
    }


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

    main {
        margin-top: 6rem;
    }

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

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

    .txt-content h2 {
        font-size: 1.6rem;
    }

    .txt-content p {
        padding-inline: 1rem;
    }

    .menu-section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 62rem) {
    .txt-content p {
        padding-inline: 1rem;
    }

}

@media (max-width: 48rem) {

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

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

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

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

    .about-section {
        padding: 5rem 3rem;
    }

    .about-content p {
        padding-inline: 1.25rem;
    }

    .modal-inner {
        flex-direction: column;
    }

    .modal-content {
        margin-top: 8rem;
        max-width: 24rem;
        max-height: 90vh;
    }

    .modal-image-side {
        height: 160px;
        flex: none;
        /* Prevents the image from trying to "grow" */
    }

    .modal-text-side {
        padding: 1.25rem;
    }

    .modal-text-side h2 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .modal-form {
        gap: 0.6rem;
    }

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

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

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

    .category-header h3 {
        font-size: 0.8rem;
    }

    .toggle-icon {
        font-size: 1.4rem;
    }

    .txt-content h2 {
        font-size: 1.6rem;
    }

    .txt-content p {
        padding-inline: 8rem;
    }
}

@media (max-width: 32rem) {
    .txt-content p {
        padding-inline: 0rem;
    }
}