:root {
    --primary-color: #5DBCD2;
    /* Light Blue */
    --secondary-color: #8FD4E2;
    /* Lighter Blue */
    --bg-color: #FFFFFF;
    /* White */
    --text-dark: #2C3E50;
    /* Deep Slate Blue */
    --text-light: #F8F9FA;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Navbar with Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
    user-select: none;
}

.navbar nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.navbar nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.navbar nav ul li a:hover {
    color: var(--primary-color);
}

.navbar nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
#hero {
    height: 100vh;
    background-image: linear-gradient(to right, rgba(44, 62, 80, 0.8), rgba(93, 188, 210, 0.6)), url('../images/location/0M5A8422.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1.5s ease;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content h2 {
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 25px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(93, 188, 210, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(93, 188, 210, 0.5);
    background-color: #4EA3B8;
}

/* Container */
.container {
    padding: 100px 10vw;
}

/* Typography styles */
h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* About Layout */
.split-layout {
    display: flex;
    align-items: center;
    gap: 50px;
}

.image-box {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.image-box:hover img {
    transform: scale(1.05);
    /* Fluid micro-animation */
}

.text-box {
    flex: 1;
}

.text-box h2 {
    text-align: left;
    margin-bottom: 30px;
}

.text-box p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #4a4a4a;
}

/* Ordering Guide */
.ordering-guide {
    background: white;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.ordering-guide h2 {
    font-size: 2.5rem;
}

.ordering-guide>p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 50px;
    color: #666;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-top: 5px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Hover dynamic sweep */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-family: var(--font-heading);
    box-shadow: 0 5px 15px rgba(93, 188, 210, 0.4);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
    text-align: left;
}

.card code {
    background: #E8F4F8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Locations & Maps */
.map-container {
    margin-top: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.map-container:hover {
    transform: scale(1.02);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    font-size: 1rem;
    margin-top: 50px;
}

/* Fluid Intersect Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .navbar {
        padding: 15px 20px;
    }

    .navbar nav ul {
        gap: 15px;
    }
}

/* Page Header */
.page-header {
    background-image: linear-gradient(to right, rgba(44, 62, 80, 0.8), rgba(93, 188, 210, 0.6)), url('../images/location/0M5A8426.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    padding-top: 150px;
    /* Spazio extra per evitare sovrapposizione navbar */
    padding-bottom: 80px;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
    word-break: keep-all;
    /* prevents breaking words in weird ways */
}

.nav-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 18px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #4EA3B8 !important;
}

.nav-btn::after {
    display: none !important;
    /* Hide underline for button */
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.menu-item {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.menu-item img {
    width: 100%;
    max-width: 350px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.menu-item h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.menu-item p {
    color: #666;
    margin-bottom: 15px;
    font-size: 1rem;
}

.menu-item .price {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* TheFork Widget Restyling */
.thefork-widget-container {
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.thefork-widget-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 650px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .navbar nav {
        width: 100%;
        display: none;
    }

    .navbar nav.active {
        display: block;
        animation: fadeInDown 0.3s ease;
    }

    .navbar nav ul {
        flex-direction: column;
        margin-top: 20px;
        gap: 15px;
        align-items: center;
    }

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

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #hero {
        height: auto;
        min-height: auto;
        padding-top: 100px; /* Posiziona il titolo in alto, staccato appena dalla navbar */
        padding-bottom: 50px; /* Taglia enormemente il vuoto inferiore */
        align-items: flex-start;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
        gap: 30px; /* Spazia titolo, testo e bottoni in maniera fissa e ariosa */
        margin-bottom: 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        word-break: keep-all;
        margin-bottom: 0;
    }

    .hero-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0;
        display: none;
    }

    .hero-content p {
        font-size: 1.15rem;
        margin-bottom: 0 !important;
    }

    .page-header {
        height: auto;
        min-height: 180px;
        padding-top: 110px; /* Spazio ridotto ma sufficiente per staccare dalla navbar mobile */
        padding-bottom: 40px;
    }

    .page-header h1 {
        font-size: 1.7rem;
        padding: 0 10px;
        line-height: 1.3;
        word-break: keep-all;
    }

    .split-layout {
        flex-direction: column !important;
        text-align: center;
        gap: 30px;
        /* lower gap on mobile */
    }

    .split-layout .text-box {
        text-align: center !important;
    }

    .split-layout .text-box h2 {
        text-align: center;
    }

    .container {
        padding: 40px 5vw;
        /* reduced empty space */
    }

    h2 {
        font-size: 2rem;
        /* reduce inner titles */
    }

    .cards-grid,
    .menu-grid {
        grid-template-columns: 1fr;
    }

    #reservation.container {
        padding-top: 15px; /* Rimuove lo spazio vuoto in eccesso sotto il titolo */
    }

    .ordering-guide {
        padding: 15px 20px 30px 20px; /* Molto meno padding in alto al box bianco */
    }

    .card {
        padding: 30px 20px !important;
    }

    .btn {
        display: block;
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        box-sizing: border-box;
    }
}

/* ─── Designer credit bar ─────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 40px 20px 0;
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.6);
}

.footer-main {
    padding-bottom: 24px;
}

.footer-credit {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-credit a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-credit a:hover {
    color: var(--primary-color);
}

.footer-credit .dot {
    opacity: 0.3;
}