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

html, body {
    height: 100%; /* Ensures the body takes the full viewport height */
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column; /* Makes body a flex container */
    min-height: 100vh; /* Ensures the body stretches to fill the viewport */
    overflow-x: hidden; /* Prevents horizontal scrolling due to animations */
}

main {
    flex: 1; /* Allows the main content to grow and take available space */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #d9534f;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease; /* Smooth background-color transition */
}

.navbar:hover {
    background-color: #c74242;
}

.navbar .logo {
    height: 50px;
    border-radius: 5px;
    animation: fadeIn 1.5s ease-in-out; /* Fade-in effect for logo */
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Ensures wrapping on smaller screens */
}

.nav-links li {
    margin: 0 15px;
    animation: slideIn 1.5s ease-in-out; /* Slide-in effect for navigation links */
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 8px;
    border-radius: 5px;
}

.nav-links a:hover {
    color: #ffe066;
    background-color: #05052b;
}

/* Section Title */
.section-title {
    text-align: center;
    color: #d9534f;
    font-size: 28px;
    margin: 20px 0;
    padding: 10px;
    background-color: #e8e4e4;
    border-radius: 10px;
    animation: fadeIn 1.5s ease-in-out; /* Fade-in effect for title */
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.menu-item {
    text-align: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: zoomIn 1.5s ease-in-out; /* Zoom-in effect for menu items */
}

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

.menu-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.menu-item p {
    font-size: 18px;
    font-weight: bold;
}

.menu-item .item-link {
    text-decoration: none;
    color: #d9534f;
    transition: color 0.3s ease;
}

.menu-item .item-link:hover {
    color: #ffe066;
}

/* Item Details Section */
#item-details {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s ease-in-out; /* Fade-in effect for item details */
}

.item-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 800px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-container img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    animation: slideIn 1.5s ease-in-out; /* Slide-in effect for images */
}

.item-info {
    flex: 1;
    padding: 20px;
}

.item-info h2 {
    font-size: 24px;
    color: #d9534f;
    margin-bottom: 10px;
    text-align: left;
    animation: slideDown 1.5s ease-out; /* Slide-down effect for heading */
}

.item-info p {
    margin-bottom: 15px;
    font-size: 16px;
    text-align: justify;
    line-height: 1.8;
}

.item-info .btn {
    text-decoration: none;
    background-color: #d9534f;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.item-info .btn:hover {
    background-color: #ffe066;
    color: #d9534f;
    transform: scale(1.1);
}

/* Order Success Section */
#order-success {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: fadeIn 1.5s ease-in-out; /* Fade-in effect for the order success section */
}

.success-container {
    max-width: 600px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    color: #333;
}

.success-container h1 {
    font-size: 28px;
    color: #28a745; /* Green success color */
    margin-bottom: 15px;
    animation: slideDown 1.5s ease-in-out; /* Slide-down effect for heading */
}

.success-container p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
}

.success-container .btn {
    text-decoration: none;
    background-color: #d9534f;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.success-container .btn:hover {
    background-color: #ffe066;
    color: #d9534f;
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: auto; /* Pushes the footer to the bottom */
}

footer h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

footer .social-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

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

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .menu-item img {
        max-width: 200px;
    }

    .item-info h2 {
        font-size: 22px;
    }

    .item-info p {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    /* .navbar {
        flex-direction: column;
    } */

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .item-info h2 {
        font-size: 20px;
    }

    .item-info p {
        font-size: 14px;
    }

    .item-info .btn {
        font-size: 14px;
    }
}

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

    .item-info h2 {
        font-size: 18px;
    }

    .item-info p {
        font-size: 13px;
    }

    .item-info .btn {
        font-size: 12px;
        padding: 8px 15px;
    }
}
