/* ============================================================
   MOBILE OPTIMIZATION FOR hdbiryani.com
   ============================================================
   HOW TO USE:

   1. Upload this file to your server at: css/mobile-fixes.css

   2. Add this line in your <head> AFTER your existing CSS:
      <link rel="stylesheet" href="css/mobile-fixes.css">

   3. Add the hamburger button + script (see companion file)

   This ONLY activates on mobile. Desktop stays the same.
   ============================================================ */


/* =============================================
   FIX #1: HAMBURGER MENU

   Hides all nav links behind a ☰ button on
   screens smaller than 960px. Tapping the
   button slides the menu open/closed.
   ============================================= */

/* Hamburger button (hidden on desktop) */
.hdb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

.hdb-hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate bars to X when open */
.hdb-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hdb-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hdb-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Mobile: hide nav, show hamburger ---- */
@media (max-width: 959px) {

  .hdb-hamburger {
    display: flex;
  }

  /*
     Hide nav links by default.
     IMPORTANT: The selectors below cover common patterns.
     If your site uses a custom class, add it here too.
  */
  .navbar-nav,
  nav ul,
  .nav-menu,
  .main-nav ul,
  header nav > ul,
  .navbar ul,
  .nav-links {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    padding: 0;
    margin: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    list-style: none;
  }

  /* Show menu when body has .hdb-nav-open class */
  .hdb-nav-open .navbar-nav,
  .hdb-nav-open nav ul,
  .hdb-nav-open .nav-menu,
  .hdb-nav-open .main-nav ul,
  .hdb-nav-open header nav > ul,
  .hdb-nav-open .navbar ul,
  .hdb-nav-open .nav-links {
    display: flex !important;
  }

  /* Style each link as a full-width tap row */
  .navbar-nav a,
  .navbar-nav li a,
  nav ul a,
  nav ul li a,
  .nav-menu a,
  .main-nav ul a,
  header nav ul a,
  header nav ul li a,
  .nav-links a {
    display: block !important;
    color: #fff !important;
    padding: 15px 24px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none !important;
    min-height: 48px;
    line-height: 1.4;
  }

  .navbar-nav a:hover,
  nav ul a:hover,
  .nav-menu a:hover,
  .nav-links a:hover {
    background: rgba(184, 134, 11, 0.2) !important;
  }

  /* Keep header relative for dropdown positioning */
  header, .navbar, nav {
    position: relative;
  }
}

/* ---- Desktop: everything normal, hamburger hidden ---- */
@media (min-width: 960px) {
  .hdb-hamburger {
    display: none !important;
  }
}


/* =============================================
   FIX #2: STICKY MOBILE ORDER BAR
   ============================================= */
.mobile-order-sticky {
  display: none;
}

@media (max-width: 768px) {
  .mobile-order-sticky {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    background: #1a1a1a;       /* dark bar background */
    padding: 6px 8px;          /* padding around the buttons */
    gap: 8px;                  /* gap between the two buttons */
  }

  .mobile-order-sticky a {
    flex: 1;
    text-align: center;
    padding: 13px 8px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: #fff;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;        /* rounded corners */
    transition: filter 0.15s;
  }

  .mobile-order-sticky a:active {
    filter: brightness(0.85);  /* press feedback */
  }

  /*
     COLOR RECOMMENDATIONS:

     Option A (Current - Brand Gold + Green):
       Pickup  = #B8860B (your brand gold — familiar, trustworthy)
       Delivery = #2D7A3A (deep green — "go", action, complements gold)

     Option B (Gold + Dark contrast):
       Pickup  = #B8860B
       Delivery = #D35400 (burnt orange — energetic, urgency)

     Option C (Both gold, different shades):
       Pickup  = #B8860B
       Delivery = #8B6508 (darker gold — cohesive single-brand feel)

     AVOID: Red (#C0392B) next to orange — they bleed together
     and look like one big block (which is what you're seeing now).

     Using Option A below (Gold + Green):
  */
  .mobile-order-sticky .pickup-btn {
    background: #B8860B;       /* brand gold */
  }

  .mobile-order-sticky .delivery-btn {
    background: #2D7A3A;       /* deep green — clear contrast from gold */
  }

  body {
    padding-bottom: 56px;
  }

  footer {
    padding-bottom: 70px !important;
  }
}


/* =============================================
   FIX #3: GENERAL MOBILE IMPROVEMENTS
   ============================================= */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* Lazy load fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* Tap-to-call styling */
@media (max-width: 768px) {
  a[href^="tel:"] {
    display: inline-block;
    padding: 10px 16px;
    min-height: 44px;
    font-weight: 600;
    color: #B8860B;
  }
}

/* Mobile typography */
@media (max-width: 480px) {
  h1 { font-size: clamp(24px, 6vw, 40px) !important; line-height: 1.2; }
  h2 { font-size: clamp(20px, 5vw, 32px) !important; }
  h3 { font-size: clamp(16px, 4vw, 24px) !important; }
}

/* Carousel/banner height limit */
@media (max-width: 768px) {
  .carousel, .carousel-inner, .carousel .item,
  .carousel-item, .slider, .banner {
    max-height: 45vh;
    overflow: hidden;
  }
  .carousel img, .carousel-item img,
  .slider img, .banner img {
    object-fit: cover;
    width: 100%;
    height: 45vh;
  }
}

/* Testimonials swipeable */
@media (max-width: 768px) {
  .testimonials-container, .testimonials .row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 10px;
  }
  .testimonials-container::-webkit-scrollbar,
  .testimonials .row::-webkit-scrollbar { display: none; }
  .testimonial-card, .testimonials .col-md-4 {
    flex-shrink: 0;
    width: 80vw;
    max-width: 300px;
    scroll-snap-align: start;
  }
}

/* Footer stacking */
@media (max-width: 768px) {
  footer .row, footer .footer-grid {
    flex-direction: column !important;
  }
}

/* Focus styles */
a:focus-visible, button:focus-visible {
  outline: 3px solid #B8860B;
  outline-offset: 2px;
}

/* Print */
@media print {
  .mobile-order-sticky, .hdb-hamburger { display: none !important; }
}
