@media (max-width: 768px) {

  .footer-container {
    flex-direction: column;
    align-items: center;
    /* يخلي الأعمدة في الوسط */
    text-align: center;
    /* يخلي النصوص بالوسط */
  }

  .footer-column {
    align-items: center !important;
    text-align: center;
  }

  .footer-column ul {
    padding: 0;
    list-style: none;
  }

  .footer-column ul li {
    margin: 5px 0;
  }

  .margin_top {
    margin-top: 290px;
  }

  .hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .hero-title-wrapper {
    position: static;
    width: 100%;
    /* background: rgba(91, 0, 23, 0.85); */
    padding: 15px;
    margin-bottom: 20px;
  }

  .padding_top {
    padding-top: 0 !important;
  }

  .responsive-frame {
    width: 80%;
    margin-top: 20px;
  }

  .hero-section p {
    margin-top: 20px !important;
    font-size: 16px;
    padding: 0 10px;
  }

  .btn-custom {
    margin-top: 15px;
  }

  .navbar-nav .nav-link::before {
    height: 2px;
    border-radius: 2px;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    letter-spacing: normal;
    transform: none;
  }

  .hero-title-wrapper {
    background-color: transparent;
  }

  .card_index {
    flex: 0 0 45%;
  }

  .card_index.active {
    flex: 0 0 50%;
    transform: scale(1.05, 1.2);
  }

  .card_index.active img {
    width: 50%;
  }

  .filter-buttons .filter-btn,
  .filter-buttons .btn.dropdown-toggle {
    margin: 4px 6px;
    padding: 10px 18px;
    font-size: 14px;
  }

  .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .btn-request {
    height: 50px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .card-container {
    perspective: 1000px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
  }

  .card-inner {
    width: 100% !important;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
  }

  .card-container.flipped .card-inner {
    transform: rotateY(-180deg);
  }

  .card-face {
    position: absolute;
    width: 100% !important;
    min-height: auto !important;
    padding: 15px !important;
    backface-visibility: hidden;
    overflow: hidden;
    top: 0;
    left: 0;
  }

  .card-back {
    transform: rotateY(180deg);
  }

  .custom-input,
  .btn-custom {
    width: 90% !important;
    max-width: 90% !important;
    height: 50px;
    font-size: 14px;
    margin: 5px auto;
    display: block !important;
  }

  .col-12.col-md-6.d-flex.justify-content-start,
  .col-12.col-md-6.d-flex.justify-content-end {
    justify-content: center !important;
  }

  .col-12.col-md-4.menu-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .menu-card {
    height: auto !important;
    min-height: 165px !important;
  }

  .menu-card img {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover;
    display: block;
  }

  .menu-card .overlay {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px;
    padding: 10px !important;
  }

  .overlay .qty {
    justify-content: flex-start;
    margin-top: 5px;
  }

  .overlay .middle h5 {
    font-size: 15px;
  }

  .overlay .middle p {
    font-size: 13px;
  }

  .overlay .middle small {
    font-size: 12px;
  }

  .menu-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
  }

  .menu-header select {
    width: 100% !important;
  }

  .card-back {
    display: none;
  }

  .card-container.flipped .card-back {
    display: block;
  }

}

@media (max-width: 576px) {
  .card_index {
    flex: 0 0 90%;
    margin: 0 auto;
    transform: scale(1);
  }

  .card_index.active {
    flex: 0 0 90%;
    transform: scale(1);
  }

  .card_index img {
    width: 60%;
    margin: 0 auto;
  }

  .card_body {
    padding: 10px 5px;
    text-align: center;
  }

  .card-text,
  .card_title {
    font-size: 14px;
  }

  .card_index:not(.active) {
    display: none;
  }

  .testimonial_text {
    font-size: 1rem;
    padding-left: 0px;
  }

  .testimonial_text::before {
    font-size: 40px;
    left: -20px;
    top: -10px;
  }

  section.testimonials {
    background: url("/images/group.svg") no-repeat center top;
    background-size: cover;
  }
}

@media (max-width: 600px) {
  .slider_gallery {
    height: 300px;
  }

  .card_gallery {
    width: 80%;
    height: auto;
    aspect-ratio: 1/1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    z-index: 1;
    transition: transform 0.8s ease, opacity 0.8s ease, filter 0.8s ease;
    border-radius: 20px;
    filter: brightness(0.8);
  }

  .card_gallery.galleryActive {
    transform: translate(-50%, -50%) scale(1) rotateX(0deg);
    opacity: 1;
    z-index: 5;
    filter: brightness(1);
  }

  .card_gallery.galleryNext {
    transform: translate(-50%, -45%) scale(0.9) rotateX(-5deg);
    opacity: 0.85;
    z-index: 4;
  }

  .card_gallery.galleryPrev {
    transform: translate(-50%, -55%) scale(0.9) rotateX(5deg);
    opacity: 0.85;
    z-index: 4;
  }
}

/* our_menu */
/* Fix mobile layout issues */
@media (max-width: 768px) {
  .our_menu_card {
    width: 100% !important;
    /* Make our_menu card full width on mobile */
  }

  .search_bar {
    width: 100% !important;
    /* Make search bar responsive */
    max-width: 348px;
    /* But limit maximum width */
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Fix potential overflow issues */
  .our_menu-col,
  .content-col {
    overflow-x: hidden;
  }

  /* Adjust animation for mobile */
  .our_menu_card_dish {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    animation: mobileCardReveal 0.8s ease forwards;
  }

  @keyframes mobileCardReveal {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }

    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Adjust text sizes for mobile */
  .text_title {
    font-size: 36px;
  }

  .our_menu_item.active {
    padding-left: 35px;
  }
}

/* Additional general fixes */
.our_menu-col {
  overflow: hidden;
}

.row.g-3 {
  margin-left: 0;
  margin-right: 0;
}

/* Ensure all elements are contained properly */
.our_menu_body {
  overflow-x: hidden;
}

/* our_menu */
/* reservations */
@media (max-width: 768px) {


  .external {
    position: relative;
    overflow: hidden;
    height: 90vh;

  }

  .owl-nav button.owl-prev {
    right: -15px;
    top: 170px;
  }

  .owl-nav button.owl-next {
    left: -15px;
    top: 170px;
  }

  .owl-nav button.owl-prev,
  .owl-nav button.owl-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  /* reservations end*/

  /* contact start */
  .map_wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  .map_bg {
    width: 100%;
    height: auto;
    z-index: 2;
  }

  /* contact end */
}


/* استجابة للشاشات المتوسطة والصغيرة */
@media (max-width: 992px) {
  .btn-close-back {
    width: 45px;
    height: 45px;
    font-size: 26px;
  }

  .btn-confirm {
    padding: 10px 20px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .btn-close-back {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .btn-confirm {
    padding: 8px 15px;
    font-size: 14px;
    width: 100%;
  }

  .menu-header .d-flex {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* dish_info */
  .dish_info .more_dish_mobile {
    flex-wrap: wrap;
  }

  /* dish_info */

}

/* //// about page start ////////////////////// */
/* Mobile view: limit text read more */
@media (max-width: 768px) {
  .short_text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* show only 4 lines */
    -webkit-box-orient: vertical;
  }

  .read_more {
    display: inline-block;
    color: #AC7B53;
    transition: color 0.3s;
  }

  .read_more:hover {
    color: #9e7559;
  }

  .titles {
    font-size: 35px;
  }

  .about .right_background_svg {
    position: absolute;
    top: 40px;
    right: 0;
    width: 100%;
    height: 85%;
    z-index: 0;
    pointer-events: none;
  }

  .vh_mobile_auto {
    height: auto !important;
  }
}

/* Larger screens: show full text, hide read more */
@media (min-width: 769px) {
  .short_text {
    -webkit-line-clamp: unset !important;
  }

  .read_more {
    display: none;
  }
}

/* about page end  */
/* reservation */
@media (max-width: 912px) {


  .img-wrapper {
    min-height: 30vh;
  }

  .img-wrapper img {

    max-height: 35vh;
  }
}

@media (min-width: 992px) {
  .external {
    margin-top: 200px;
  }
}














/* 1) وجّه القطع لفوق بدل تحت على الموبايل */
@media (max-width: 576px) {
  .menu-card img,
  .our_menu .our_menu_card_dish img,
  .slider_gallery .card_gallery,   /* لو فيها <img> بدّل selector لـ .slider_gallery .card_gallery img */
  .dish_info .images {
    object-fit: cover;
    object-position: center top;   /* يبعد القصّ عن الأسفل */
  }
}

/* 2) خفّف القيود اللي تسبب القصّ */
@media (max-width: 576px) {
  /* ارتفاعات ثابتة = قصّ. خلّها مرنة أو بنسبة أبعاد */
  .menu-card { height: auto; min-height: 140px; }  /* إن كان عندك 129px/160px ثابتة */
  .slider_gallery { height: 75vh; }                 /* بدل 600px ثابت */
  .dish_info .images { width: 100%; height: auto; } /* تمنع قصّ الجزء السفلي */

  /* لو لاحظت الكارد تتقص من حدودها، خفف overflow */
  figure.snip1157 { overflow: visible; }            /* كان عندك overflow:hidden */
}

/* 3) بديل أنظف: نسبة أبعاد بدل ارتفاعات ثابتة (اختياري) */
@media (max-width: 576px) {
  .menu-card { aspect-ratio: 16/9; height: auto; }
  .menu-card img { position: absolute; inset: 0; width: 100%; height: 100%; }
}
