* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 80px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    animation: fadeInDown 0.5s ease-in-out;
}

.logo {
    display: flex;
    align-items: center;
    animation: slideInLeft 0.5s ease-in-out;
}

.logo img {
    width: auto;
    height: 60px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0 auto;
    animation: fadeInUp 0.7s ease-in-out;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1.6em;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ff6b6b;
    transform: scale(1.1);
}

.nav-links a:before {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #ff6b6b;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.nav-links a:hover:before {
    visibility: visible;
    width: 100%;
}

.language-switch {
    display: flex;
    align-items: center;
    animation: slideInRight 0.5s ease-in-out;
    justify-content: space-between;
    flex-wrap: nowrap; /* Ensure the items stay on one line */
    overflow: hidden;  /* Prevent overflow */
}

.language-switch a {
    margin-left: 5px;
    text-decoration: none;
    font-size: 1em;   /* Ensure the font size is appropriate for small screens */
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.language-switch a:hover {
    color: #ff6b6b;
    transform: translateY(-3px);
}

.language-switch a.active {
    color: #2e8b57;
    text-decoration: underline;
    animation: bounce 1s infinite;
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.2s ease-in-out; /* Match the timeout in JS */
    z-index: 1;
    opacity: 0; /* Initially hidden */
}

.background-layer.layer1 {
    z-index: 2; /* Initial z-index for the first layer */
    opacity: 1; /* Initially visible */
}

.background-layer.layer2 {
    z-index: 1;
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 100px;
    overflow: hidden;
    background-color: #333; /* Default background color */
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    background-size: 200% 200%;
    z-index: 1;
    pointer-events: none; /* Prevent any interaction with this layer */
}

/* Keyframes for subtle animation */
@keyframes subtleBackgroundAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
    background-color: #ffffff; /* White background for the cloud */
    color: #333; /* Darker text color */
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-radius: 50px; /* General rounding for cloud effect */
    font-family: 'Poppins', sans-serif;
}

.hero-content::after {
    content: '';
    position: absolute;
    width: 150px; /* Adjust width for smaller screens */
    height: 150px;
    bottom: -75px;
    right: -75px;
    background-color: #ffffff;
    background-image: url('./image/pigusto_logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: none;
    border-radius: 50%;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333; /* Dark text color for better contrast */
    text-shadow: none; /* Removed shadow for a cleaner look */
}

.hero p {
    font-size: 1.7em;
    margin-bottom: 20px;
    color: #666; /* Slightly lighter text for the subtitle */
}

.btn {
    background-color: #da1010;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.7em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background-color: #e55a5a;
    transform: translateY(-5px);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.4);
}

section {
    padding: 60px 20px;
    text-align: center;
}
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    width: 100%;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around; /* Adjust spacing to center */
    align-items: center;
    text-align: center;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    gap: 10px; /* Space between items */
    padding: 0 20px; /* Add padding for better alignment */
}

.footer-content p {
    margin: 0;
    font-size: 1em;
    flex: 1 1 auto; /* Allow text to take necessary width */
    text-align: left;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex: 1 1 auto; /* Flex grow for centering on large screens */
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    text-decoration: none;
    color: #fff;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 5px; /* Space between icon and text */
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff6b6b;
}

.social-media {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex: 1 1 auto; /* Flex grow for aligning to the right on large screens */
}

.social-icon {
    margin: 0;
    display: inline-block;
}

.social-icon img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.social-icon img:hover {
    transform: scale(1.2);
}

/* Add dividers */
.footer-content > *:not(:last-child):after {
    content: '';
    width: 1px;
    height: 20px;
    background-color: #777;
    margin: 0 20px;
    display: inline-block;
    vertical-align: middle;
}

/* Keyframes for animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ------------------------ Menu Part ----------------------------  */

.menu-section {
    padding: 100px 20px 60px 20px; /* Increase padding-top to 100px */
    background-color: #f8f8f8;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.section-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1.2em;
    color: #777;
    margin-bottom: 40px;
}

.menu-category {
    margin-bottom: 50px;
}

.category-title {
    font-size: 2em;
    color: #333;
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: flex-start; /* Align items at the start */
    margin-bottom: 40px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: scale(1.02);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-item-img {
    width: 100%; /* Adjust this value based on your design */
    height: 350px; /* Adjust this value based on your design */
    object-fit: cover; /* Ensures image fills the space without distortion */
    border-radius: 8px; /* Optional: Rounds the corners of images */
}

.menu-item-details {
    flex: 1;
}

.dish {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Increase space between dishes */
    font-size: 1.2em;
    font-weight: bold;
}

.menu-item-name {
    flex: 0 1 auto; /* Adjust to fit content */
    font-size: 1.2em;
    color: #333;
    white-space: nowrap; /* Prevent wrapping */
}

.menu-item-price {
    flex-shrink: 0; /* Prevent the price from shrinking */
    font-size: 1.2em;
    font-weight: bold;
    color: #ff6b6b;
    white-space: nowrap; /* Prevent line break in price */
}


.menu-item-description {
    font-size: 1em;
    color: #777;
    margin-bottom: 20px;
}

.menu-item-prices {
    display: flex;
    flex-direction: column; /* Stack the description above the price */
    align-items: flex-end; /* Align items to the right */
    margin-right: 15px; /* Add space between the prices */
    margin-bottom: 5px; /* Space between different price options */
}

.menu-item-price-description {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 2px; /* Small space between the description and the price */
    text-align: right;
}
.dot-leader {
    flex: 1; /* Take up the remaining space */
    border-bottom: 1px dotted #333; /* Creates the dotted line */
    margin: 0 10px; /* Spacing between name and price */
    overflow: hidden; /* Hide overflow */
}

/* Contact section */

.contact {
    padding: 100px 20px;
    background-color: #fff;
    text-align: left;
}

.contact h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
}

.contact-details {
    margin-bottom: 40px;
    line-height: 1.6em;
    font-size: 1.1em;
}

.contact-details p {
    margin-bottom: 10px;
}

#map {
    margin-bottom: 40px;
}

/* Form Styling */
form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

button.btn {
    background-color: #ff6b6b;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

button.btn:hover {
    background-color: #e55a5a;
    transform: translateY(-3px);
}

/* About Us Section */


.about {
    background-color: #fff;
    text-align: left;
    margin-top: 100px;
}

.about h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin-bottom: 40px;
}

.about-text {
    flex: 2;
}

.about-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-images img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

.about-values {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.about-values h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #ff6b6b;
    text-align: center;
}

.about-values ul {
    list-style: none;
    padding: 0;
}

.about-values ul li {
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
}

/* Common Styling for Small Screens */
@media only screen and (max-width: 480px) {
    .hero-content {
        padding: 20px;
        border-radius: 20px;
        max-width: 90%;
    }

    .hero-content::after {
        width: 80px;
        height: 80px;
        bottom: -20px;
        right: -20px;
    }

    .btn {
        font-size: 1em;
        padding: 10px 20px;
    }

    .menu-item-name, .menu-item-price, .menu-item-description {
        font-size: 0.8em;
    }

    .menu-item {
        padding: 5px;
    }

    .section-title, .category-title {
        font-size: 1.4em;
    }

    .category-nav a {
        font-size: 0.8em;
        padding: 5px 10px;
    }

    .category-navigation-wrapper {
        margin: 10px 0;
    }

    .nav-button {
        width: 30px;
        height: 30px;
    }

    .logo img {
        height: 60px;
    }

    .language-switch a {
        font-size: 0.9em;
        padding: 0 10px;
    }

    header {
        padding: 10px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile Styles (screens less than or equal to 768px wide) */
@media only screen and (max-width: 768px) {

    /* Adjust header for smaller screens */
    header {
        flex-direction: column;
        align-items: center;
        height: auto;
        padding: 10px 0;
    }

    /* Adjust logo size */
    .logo img {
        height: 40px;
    }

    /* Stack navigation items vertically */
    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .nav-links li {
        margin: 5px 0;
    }

    .nav-links a {
        font-size: 1.4em;
    }

    .language-switch {
        margin-top: 10px;
    }

    /* Adjust hero section */
    .hero {
        flex-direction: column;
        padding-top: 80px;
        height: 100vh;
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero p {
        font-size: 1.2em;
    }

    /* Adjust button size */
    .btn {
        font-size: 1.2em;
        padding: 10px 20px;
    }

    /* Ensure .hero-content fits smaller screens */
    .hero-content {
        padding: 20px;
        border-radius: 20px;
        max-width: 90%;
    }

    .hero-content::after {
        width: 150px; /* Even smaller size for phones */
        height: 150px;
        bottom: -30px; /* Adjust position */
        right: -40px;
    }

    /* Footer adjustments */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .footer-content > *:not(:last-child):after {
        display: none;          /* Remove dividers on mobile for cleaner look */
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .social-media {
        margin-top: 10px;
        justify-content: center; /* Center the social media icons */
    }

    /* Ensure menu items stack correctly */
    .menu-item {
        flex-direction: column; /* Stack image and details vertically */
        align-items: center;
        text-align: center; /* Center text for better readability */
    }

    .contact {
        margin-top: 60px;
    }

    .menu-section {
        padding-top: 150px; /* Adjust this value if needed */
    }
    .menu-category {
        margin-bottom: 30px; /* Reduce space between categories */
    }

    .menu-item-img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .menu-item-details {
        text-align: center; /* Center the text content */
    }

    /* Adjust text sizes */
    .section-title {
        font-size: 2em;
        margin-bottom: 10px; /* Reduce space below the title */
    }

    .section-subtitle {
        font-size: 1.2em;
        margin-bottom: 20px; /* Reduce space below the subtitle */
    }

    section {
        padding: 40px 10px; /* Reduce padding on mobile */
    }

    .category-title {
        font-size: 1.5em; /* Smaller title for better fit */
        margin-bottom: 15px; /* Reduce space below the title */
    }

    .dish {
        justify-content: center; /* Center dish name and price */
        flex-direction: column; /* Stack name and price vertically */
    }

    .dot-leader {
        display: none; /* Remove the dot leader on small screens */
    }

    .menu-item-name, .menu-item-price {
        font-size: 1em; /* Increase the font size slightly for readability */
        margin-bottom: 5px; /* Space between name and price */
    }

    .menu-item-description {
        font-size: 1em; /* Make description text a bit larger */
        margin-bottom: 10px; /* Reduce space below descriptions */
    }

    .about {
        margin-top: 100px;
    }

    .background-layer {
        background-size: cover;
        height: 100vh;
    }

    /* About Us Section */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-text {
        flex: 1;
        text-align: left;
    }

    .about-images {
        margin-top: 20px;
    }

}

/* Adjust circle size for tablets */
@media only screen and (max-width: 1024px) {
    .hero-content::after {
        width: 100px; /* Smaller size for tablets */
        height: 100px;
        bottom: -50px; /* Adjust position */
        right: -50px;
    }

    .footer-content p, .footer-links, .social-media {
        flex: 1 1 100%; /* Full width for all elements */
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-content > *:not(:last-child):after {
        display: none;
    }

    .social-media {
        margin-top: 10px;
    }
}

.category-navigation-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.category-navigation {
    overflow: hidden; /* Hide overflowing categories */
    width: 80%; /* Adjust the width based on your design */
    white-space: nowrap; /* Prevent items from wrapping */
    display: flex;
}

.category-nav {
    display: flex;
    padding: 12px;
    margin: 12px;
    list-style-type: none;
    transition: transform 0.5s ease-in-out; /* Smooth scrolling */
}

.category-nav li {
    margin-right: 15px;
}

.category-nav a {
    text-decoration: none;
    padding: 10px 20px;
    background-color: white;
    border-radius: 30px;
    font-size: 16px;
    color: green;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.category-nav a:hover {
    background-color: red;
    color: white;
    box-shadow: 0 3px 8px rgba(255, 0, 0, 0.2);
}

.category-nav a.active {
    background-color: green;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 255, 0, 0.2);
}

.nav-button {
    background-color: #ff6b6b;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 50%; /* Make the button circular */
    font-size: 1em; /* Adjust the size of the text */
    margin: 0 10px;
    cursor: pointer;
    width: 40px; /* Set a fixed width for the button */
    height: 40px; /* Set a fixed height for the button */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.nav-button:hover {
    background-color: #e55a5a;
    transform: translateY(-3px);
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Back to Top Button */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 30px; /* 30px from the bottom */
    right: 30px; /* 30px from the right */
    z-index: 99; /* Ensure it stays above other elements */
    width: 50px; /* Width and height should be the same for a perfect circle */
    height: 50px; /* Width and height should be the same for a perfect circle */
    border: none;
    outline: none;
    background-color: #ff6b6b; /* Button background color */
    color: white;
    border-radius: 50%; /* Makes the button circular */
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    line-height: 50px; /* Vertically centers the arrow within the circle */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Optional: Adds a subtle shadow */
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#backToTopBtn:hover {
    background-color: #e55a5a; /* Button color on hover */
    transform: translateY(-5px); /* Add a small hover effect */
}

/* Tablet Styles (1024px to 769px) */
@media only screen and (max-width: 1024px) and (min-width: 769px) {
    .hero-content {
        padding: 20px;
        border-radius: 20px;
        max-width: 90%;
    }

    .hero-content::after {
        width: 80px;
        height: 80px;
        bottom: -40px;
        right: -40px;
    }

    .footer-content {
        flex-direction: row;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .footer-content p {
        font-size: 0.9em;
    }

    .footer-links {
        flex-direction: row;
        gap: 15px;
    }

    .social-media {
        justify-content: flex-end;
    }

    .social-icon img {
        width: 20px;
        height: 20px;
    }
}

/* For 810px Width */
@media only screen and (max-width: 810px) {
    .hero-content {
        padding: 20px;
        border-radius: 20px;
        max-width: 90%;
    }

    .menu-item-name {
        font-size: 0.7em;
    }

    .menu-item-description {
        font-size: 0.7em;
    }

    .menu-item-price {
        font-size: 0.8em;
    }

    .hero-content::after {
        width: 60px;
        height: 60px;
        bottom: -20px;
        right: -20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    .footer-content p, .footer-links, .social-media {
        flex: 1 1 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .social-media {
        margin-top: 10px;
        justify-content: center;
    }

    .footer-content > *:not(:last-child):after {
        display: none;
    }

    .logo img {
        height: 60px; /* Keep the logo size the same */
        width: auto;  /* Ensure the aspect ratio is maintained */
    }

    .dish {
        margin-bottom: 0;
    }
}

/* Additional Tweaks for Very Small Screens (360px) */
@media only screen and (max-width: 360px) {
    .hero-content::after {
        width: 80px;
        height: 80px;
        bottom: -20px;
        right: -20px;
    }

    .menu-item-name, .menu-item-price {
        font-size: 0.64em;
    }

    .menu-item-description {
        font-size: 0.5em;
    }

    .dish {
        margin-bottom: 0;
    }
}