* {
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    color: #fff;
    background: #1c2123;
    margin: 0;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #0a0a0a;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: #1c1c1c;
}

.opening-hours {
    font-size: 14px;
    text-align: center;
    width: 100%;
    color: white;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar input {
    padding: 5px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease;
}

.search-bar button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 240px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/img/medina.jpeg');
    background-size: cover;
    background-position: center 47%;
    background-repeat: no-repeat;
    flex: 1 0 auto;
    height: 320px;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 5px;
    padding: 0 20px;
    position: relative;
    padding-top: 20px;
}

.nav-links a, .nav-links button {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-links a:hover, .nav-links button:hover {
    color: #ccc;
}

.dropdown {
    position: relative;
    color: white;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle i {
    font-size: 12px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0a0a0a;
    border-radius: 5px;
    padding: 10px 0;
    min-width: 200px;
    z-index: 101;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-transform: none;
    font-size: 13px;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: rgba(231, 92, 168, 0.2);
    color: #e75ca8;
}

/* Restaurant Section */
.restaurant-section {
    padding: 40px 0;
    margin: 0;
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.restaurant-image {
    flex: 1;
    width: 50%;
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changé de cover à contain pour afficher l'image entière */
    border-radius: 10px 0 0 10px;
    max-height: 600px;
    transition: transform 0.5s ease;
    border-radius: 12px; 
}



.restaurant-details {
    flex: 1;
    width: 50%;
    background: #1c2123;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.logo {
    max-width: 180px; /* Increased from 120px to make the logo larger */
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    border-radius: 12px; 
   
   
}

.logo:hover {
    transform: scale(1.1);
}

.restaurant-details h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.restaurant-details h2 span {
    font-family: 'Dancing Script', cursive;
    font-size: 3.2rem;
}

.restaurant-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 10px 0;
}

.restaurant-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
    margin: 15px 0;
    max-width: 80%;
}

.menu-btn {
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu-qr-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
    justify-items: center;
}

.location-info {
    padding: 20px;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #0a0a0a, #1c2123);
}

.location-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.location-info p {
    margin: 0;
    line-height: 1.4;
}

.location-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.qr-code {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #0a0a0a, #1c2123);
}

.qr-code h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.qr-code img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.qr-code img:hover {
    transform: scale(1.1);
}

/* Modal Book Styles */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal-content {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    z-index: 1050;
}

.book {
    width: 900px;
    height: 550px;
    position: relative;
    perspective: 1500px;
    margin: 80px auto 20px;
    background: linear-gradient(to bottom, #f4f4f4, #e0e0e0);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.book-page {
    width: calc(50% - 4px);
    height: 100%;
    position: absolute;
    top: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.7s ease-in-out, width 0.7s ease-in-out;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    border: 2px solid #d4af37;
    cursor: pointer;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
}

.cover-front {
    right: 0;
    transform-origin: left;
    transform: rotateY(0deg);
    background: linear-gradient(135deg, #8a133b, #6b0f2e);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f6d529;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 3px solid #d4af37;
}

.cover-back {
    left: 0;
    transform-origin: right;
    transform: rotateY(0deg);
    background: linear-gradient(135deg, #8a133b, #6b0f2e);
    z-index: 1;
    border: 3px solid #d4af37;
}

.page-left {
    left: 0;
    transform-origin: right;
    transform: rotateY(3deg);
}

.page-right {
    right: 0;
    transform-origin: left;
    transform: rotateY(-3deg);
}

.page-1, .page-2, .page-3, .page-4, .page-5 {
    z-index: 10;
}

.page-5.full-width {
    width: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: rotateY(0deg);
    border-radius: 5px;
}

.flipped {
    transform: rotateY(180deg) !important;
}

.flipped-right {
    transform: rotateY(-180deg) !important;
}

.hidden-page {
    opacity: 0;
    pointer-events: none;
}

.book-open .page-left {
    box-shadow: inset 5px 0 10px rgba(0, 0, 0, 0.2), 0 0 8px rgba(0, 0, 0, 0.15);
    transform: rotateY(3deg);
}

.book-open .page-right {
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.2), 0 0 8px rgba(0, 0, 0, 0.15);
    transform: rotateY(-3deg);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: background 0.3s;
    z-index: 1100;
}

.close-button:hover {
    background: #e03e3e;
}

.image-error {
    background: #f4f4f4 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    color: #8a133b;
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
    flex-direction: column;
}

.image-error::after {
    content: 'Menu image failed to load. Please check the image path.';
}

/* Related Section */
.related-section {
    padding: 50px 20px;
    background: #2a2f33;
}

.related-section h2 {
    color: #fff;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.related-card {
    text-align: center;
    background: #1c2123;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.related-card img {
    width: 100%;
    max-width: 180px;
    height: 180px;
    object-fit: contain; /* Changed from cover to contain */
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #1c2123; /* Match the card background to fill empty space */
}
.related-card h5 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.related-card p {
    color: #ccc;
    font-size: 0.95rem;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .restaurant-section {
        flex-direction: column;
        padding: 20px 0;
        height: auto;
    }

    .restaurant-image, .restaurant-details {
        width: 100%;
    }

    .restaurant-details {
        padding: 20px 15px;
    }

     .banner-image {
        max-height: 400px;
        border-radius: 10px; /* Ajusté pour les écrans plus petits */
        object-fit: contain; /* Assure que l'image entière est visible */
    }

    .menu-qr-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        padding: 0 25px;
    }

    .dropdown-menu {
        left: 0;
        transform: translateX(0);
        width: 100%;
        text-align: center;
    }

    .dropdown-menu a {
        text-align: center;
    }

    .book {
        width: 100%;
        height: 450px;
        margin-top: 60px;
    }

    .cover-front {
        font-size: 2rem;
    }

    .book-page {
        width: calc(50% - 2px);
    }

    .page-5.full-width {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 150px;
    }

    .restaurant-details h2 {
        font-size: 2rem;
    }

    .restaurant-details h2 span {
        font-size: 2.5rem;
    }

    .restaurant-details h3 {
        font-size: 1rem;
    }

    .menu-qr-container {
        gap: 10px;
    }

    .menu-btn {
        width: 100%;
    }

    .qr-code {
        padding: 10px;
        width: 100%;
    }

  .banner-image {
        max-height: 300px;
        object-fit: contain; /* Assure que l'image entière est visible */
    }
}