/* ==========================================
   Mobile Firefox + cross-browser Bootstrap fix
   ========================================== */

/* Target Firefox only */
@-moz-document url-prefix() {
    /* Apply only on mobile widths */
    @media (max-width: 768px) {
        /* Ensure viewport and containers don’t overflow */
        html,
        body {
            overflow-x: hidden; /* prevent horizontal scroll */
            width: 100%;
        }

        .container,
        .container-fluid {
            width: 100% !important;
            padding-left: 15px !important;
            padding-right: 15px !important;
            box-sizing: border-box; /* ensures padding doesn't break width */
        }

        /* Reset row margins to prevent extra spacing */
        .row {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }

        /* Reset column padding */
        [class*="col-"] {
            padding-left: 0 !important;
            padding-right: 0 !important;
            box-sizing: border-box;
        }

        /* Fix flex gap quirks on mobile Firefox */
        .d-flex {
            gap: 10px; /* adjust if needed */
            flex-wrap: wrap; /* prevents overflow on small screens */
        }
    }
}

/* General cross-browser safety for mobile */
@media (max-width: 768px) {
    * {
        box-sizing: border-box; /* prevent padding/margin issues */
    }

    /* Replace 100vw widths with 100% to avoid overflow */
    .full-width {
        width: 100% !important;
    }
}

html {
    scroll-behavior: smooth;
}

body,
footer {
    font-family: "Lato", sans-serif;
    font-weight: 300; /* Light weight */
}

body {
    font-size: larger;
}

section {
    scroll-margin-top: 100px; /* adjust to your header height */
}

@font-face {
    font-family: "Brewsky";
    src:
        url("/fonts/BrewskiOriginalRegular.woff2") format("woff2"),
        url("/fonts/BrewskiOriginalRegular.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* shows fallback immediately, swaps in Brewsky when loaded */
}

h2 {
    font-family: "Brewsky", sans-serif;
    font-size: 3em;
}

@media (max-width: 991px) {
    body p,
    footer {
        font-size: 0.9em;
    }

    body a,
    footer a {
        font-size: 0.9em;
    }
}

a {
    color: white;
    text-decoration: none;
}

.parallax-section,
.parallax-section-2 h2 {
    color: #895b20;
}

@media (max-width: 991px) {
    /* Bootstrap collapse breakpoint */
    h2 {
        font-size: 2.5em;
    }
}

a:hover {
    color: white;
}

.navbar {
    background-color: #7692aa;
}

/* Initial big navbar */
.navbar-scroll {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition:
        padding 0.3s ease,
        background-color 0.3s ease;
}

/* Compact navbar when scrolled */
.navbar-scroll.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-scroll img {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}

.navbar-scroll.scrolled img {
    height: 40px;
}

.nav-link {
    color: #e4ded2;
}

.nav-item {
    color: #e4ded2;
}

.navbar .nav-link {
    position: relative;
    padding-bottom: 6px; /* space for underline */
}

.nav-divider {
    color: #e4ded2;
    position: relative;
    line-height: 1;
    align-self: center;
}

@media (max-width: 991px) {
    /* Bootstrap collapse breakpoint */
    .nav-divider {
        display: none !important;
    }
}

.hero {
    background: url("img/fugassette-foc-genova.webp") center center / cover no-repeat;
    height: 100vh;
}

/* Mobile: override with smaller image */
@media (max-width: 575px) {
    .hero {
        background: url("img/fugassette-foc-genova-1200w.webp") center center / cover no-repeat;
    }
}

.logo {
    width: 60vw;
}

@media (max-width: 991px) {
    /* Bootstrap collapse breakpoint */
    .logo {
        width: 80vw;
    }
}

/* Make both sides perfect squares */
.square-box {
    aspect-ratio: 1 / 1; /* works in all modern browsers */
    background: #7692aa; /* light background for text box visibility */
    color: white;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
}

.dotted-line {
    position: absolute;
    bottom: 5%;

    left: 50%;
    transform: translateX(-50%);

    width: 100%;
    height: 2px;

    background-image: repeating-linear-gradient(to right, #ffffff 0 6px, transparent 6px 9px);
}

.dotted-line-contatti {
    position: absolute;
    bottom: 15%;

    left: 50%;
    transform: translateX(-50%);

    width: 100%;
    height: 2px;

    background-image: repeating-linear-gradient(to right, #ffffff 0 6px, transparent 6px 9px);
}

@media (max-width: 991px) {
    .dotted-line-contatti {
        bottom: 5%;
    }
}

/* If you want justified text in Bootstrap 5 */
.text-justify {
    text-align: justify;
    text-justify: inter-word; /* more stable */
}

@media (max-width: 991px) {
    /* Bootstrap collapse breakpoint */
    .text-justify {
        text-align: center;
    }
}

.object-fit-cover {
    object-fit: cover;
}

/* ===============================
   PARALLAX SECTIONS
   =============================== */

.parallax-section,
.parallax-section-2 {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* ===============================
   PARALLAX BACKGROUND LAYERS
   (extra less zoom)
   =============================== */

.parallax-bg,
.parallax-bg-2 {
    position: absolute;
    top: -25%; /* ⬅️ reduced offset */
    left: 0;
    width: 100%;
    height: 140%; /* ⬅️ reduced height */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(0);
    will-change: transform;
    z-index: 0;
}

/* Overlay + background images (slightly darker) */
.parallax-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("img/food.webp");
}

.parallax-bg-2 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("img/lo-chef.webp");
}

/* Mobile: smaller images */
@media (max-width: 575px) {
    .parallax-bg {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("img/food-1200w.webp");
    }

    .parallax-bg-2 {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url("img/lo-chef-1200w.webp");
    }
}

/* ===============================
   CONTENT ABOVE BACKGROUND
   =============================== */

.parallax-section > .container,
.parallax-section-2 > .container {
    position: relative;
    z-index: 2;
}

/* ===============================
   MOBILE OPTIMIZATION
   =============================== */

@media (max-width: 768px) {
    .parallax-section,
    .parallax-section-2 {
        min-height: 85vh;
    }

    .parallax-bg,
    .parallax-bg-2 {
        top: -30%;
        height: 150%;
        background-position: center;
    }
}

.white-rectangle-wrapper {
    position: relative;
    z-index: 0; /* creates stacking context */
}

.white-rectangle {
    position: relative;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    width: 90%;
    max-width: 90%;
    box-sizing: border-box;
    z-index: 2;
}

/* Tablet & up */
@media (min-width: 768px) {
    .white-rectangle {
        width: 100%;
        max-width: 900px;
        padding: 3rem;
    }
}

.chef {
    position: absolute;
    left: 0;
    top: 90%;
    z-index: 3;
}

@media (min-width: 768px) {
    .chef {
        left: -8%;
        top: -10%;
        z-index: 1; /* behind white-rectangle, visible */
    }
}

/* OPTIONAL: mobile refinement */
@media (max-width: 767px) {
    .chef {
        max-width: 200px; /* scale image down on mobile */
        height: auto;
    }
}
.contatti-box {
    background-color: #7692aa;
    position: relative; /* required so the dotted line positions correctly */
}

#contatti svg {
    flex-shrink: 0; /* Prevent icon from shrinking */
}

@media (max-width: 767.98px) {
    .contatti-box .d-flex {
        justify-content: center; /* center columns on small screens */
        text-align: center; /* center text on small screens */
    }
}

.icon svg {
    color: white;
}

.maps-section {
    margin: 0;
    padding: 0;
    width: 100%;
}

.maps-section iframe {
    width: 100%;
    height: 533px; /* adjust as needed */
    border: 0;
    display: block; /* removes any inline spacing */
}

footer {
    font-size: medium;
    padding-top: 25px;
    padding-bottom: 25px;
}
