/* ============================================================
   GREYCREATURE — MOBILE IMPROVEMENTS (work in progress)
   Paste after your existing stylesheets
   Header fixes are in mobile-header-fixes.css (separate file)
   ============================================================ */


/* ─── BANNER (#featured) ─────────────────────────────────── */

@media (max-width: 991px) {
  #featured {
    padding: 20px !important;
    background-attachment: scroll !important;
    overflow: hidden !important;

    /* OPTION A (active): stretch image to fill full section height */
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    /* OPTION B: swap to a portrait/taller image made for mobile
       Uncomment the line below and comment out OPTION A above
       background-image: url('../uploads/images/banner/back-mobile.png') !important;
       background-size: cover !important;
       background-position: center center !important; */
  }

  .featured-wrapper {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  #featured {
    padding: 20px !important;
  }

  /* breathing room around the image section */
  .featured-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
  }

  /* Stack main image on top, thumbnails below */
  #featured .d-flex {
    flex-direction: column !important;
    gap: 8px;
  }

  #featured .w-75 {
    width: 100% !important;
  }

  #featured .w-25 {
    width: 100% !important;
  }

  /* Thumbnails — equal width horizontal row, no overflow */
  .thumb-track {
    flex-direction: row !important;
    gap: 6px !important;
    overflow-x: hidden !important;
  }

  .thumb {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .thumb img {
    height: 80px !important;
    width: 100% !important;
    object-fit: contain !important;
    padding: 0 !important;
  }

  /* Main image full width */
  #mainImage {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
}


/* ─── HIGHLIGHTS STRIP ───────────────────────────────────── */

@media (max-width: 767px) {
  section.highlights {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }

  .highlight-sec > .row {
    flex-wrap: nowrap !important;
    overflow: visible !important;
    justify-content: center;
  }

  /* show only 2 items — hide 2nd (15+ Countries) and 4th (1.5M Users) */
  .highlight-sec .col-md-3.col-sm-6.col-6:nth-child(2),
  .highlight-sec .col-md-3.col-sm-6.col-6:nth-child(4) {
    display: none !important;
  }

  /* remaining 2 take equal width in one row */
  .highlight-sec .col-md-3.col-sm-6.col-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  .highlight1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }
}


/* ─── TOUR / WORKSHOP CARDS ──────────────────────────────── */

@media (max-width: 767px) {
  /* section itself must not overflow */
  section.workshop {
    overflow: hidden !important;
    margin-top: 40px !important;
  }

  p.workshop-name {
    height: auto !important;
    min-height: 44px;
  }

  .workshop-img img {
    height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .section-text {
    width: 100% !important;
  }

  /* owl carousel must stay within viewport */
  .owl-carousel {
    overflow: hidden !important;
  }

  .photography-slider,
  .workshop-slider {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* remove side-space padding on slider — let owl handle it */
  .photography-slider.side-space,
  .workshop-slider.side-space {
    padding-left: 16px !important;
    padding-right: 16px !important;
    margin: 0 !important;
  }

  /* each card takes full width of slider */
  .photography-slider .owl-item,
  .workshop-slider .owl-item {
    padding: 0 6px !important;
  }

  .inner-item {
    margin: 10px 0 !important;
    min-height: unset !important;
  }

  /* filling-fast badge — prevent right edge clip */
  .filling-fast,
  .seats-full {
    font-size: 12px !important;
    padding: 6px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* testimonial section — clear space, no overlap */
  section.tbody {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 40px !important;
    padding: 0 16px !important;
    clear: both !important;
  }

  /* show 1 testimonial card at a time */
  section.tbody .carousel-section {
    height: auto !important;
    min-height: unset !important;
    display: block !important;
  }

  .carousel-wrapper {
    width: 100% !important;
  }

  /* each page shows 1 card — stack cards vertically inside page */
  .carousel-page {
    flex-direction: column !important;
    gap: 0 !important;
  }

  /* hide all cards except the first in each page */
  .carousel-page .testi-card:nth-child(n+2) {
    display: none !important;
  }

  .testi-card {
    width: 100% !important;
    padding: 1.25rem !important;
  }
}

/* ─── MEMBERSHIP TEASER ──────────────────────────────────── */

@media (max-width: 768px) {
  .teaser-inner {
    flex-direction: column !important;
    gap: 1rem !important;
    padding: 1.25rem !important;
  }

  .teaser-illo,
  .teaser-illor {
    display: none !important;
  }

  .teaser-h {
    font-size: 20px !important;
  }

  .teaser-perks {
    gap: 10px !important;
  }
}


/* ─── CAMERA RENT SECTION ────────────────────────────────── */

@media (max-width: 767px) {
  .camera-rent-text {
    padding: 20px !important;
    text-align: center;
  }

  p.camera-head {
    font-size: 18px !important;
  }

  p.camera-text {
    font-size: 13px !important;
  }
}


/* ─── FOOTER ─────────────────────────────────────────────── */

@media (max-width: 991px) {
  .footer-sec1 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .logo-description {
    width: 100% !important;
    grid-column: 1 / -1;
  }
}

@media (max-width: 576px) {
  .footer-sec1 {
    grid-template-columns: 1fr !important;
  }

  .footer-sec3 {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px;
    text-align: center;
  }

  .social-icon { order: 1; }
  .copy-right-sec { order: 2; }
  .payment-sec { order: 3; }

  .payment-sec img {
    width: 160px !important;
  }
}


/* ─── WHATSAPP BUTTON + POPUP ────────────────────────────── */

@media (max-width: 767px) {
  .whatsapp-icon {
    bottom: 80px !important;
    right: 14px !important;
    width: 42px !important;
    height: 42px !important;
  }

  #myPopup {
    width: calc(100vw - 32px) !important;
    right: 16px !important;
    left: 16px !important;
    bottom: 140px !important;
  }

  .close-icon {
    right: 16px !important;
    top: -30px !important;
    bottom: auto !important;
  }
}


/* ─── SCROLL-TO-TOP BUTTONS ──────────────────────────────── */

@media (max-width: 767px) {
  .progress-wrap1 {
    bottom: 80px !important;
    right: 14px !important;
  }

  .progress-wrap2 {
    bottom: 130px !important;
    right: 14px !important;
  }
}


/* ─── GLOBAL SIDE PADDING ────────────────────────────────── */

@media (max-width: 767px) {
  .side-space {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .side-space2 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


/* ─── SECTION HEADINGS ───────────────────────────────────── */

@media (max-width: 767px) {
  .workshop-head .section-heading,
  .photography-tour-head .section-heading {
    text-align: left !important;
  }

  .workshop-head .section-text,
  .photography-tour-head .section-text {
    text-align: left !important;
    margin-top: 12px;
  }

  h2, h3 {
    font-size: 19px !important;
  }
}


/* ─── TESTIMONIALS CAROUSEL ──────────────────────────────── */

@media (max-width: 560px) {
  .carousel-page {
    flex-direction: column !important;
  }

  .testi-card {
    padding: 1rem !important;
  }

  section.tbody {
    padding: 0 16px !important;
  }
}

/* ==========================================================
   EXTRA MOBILE FIXES FOR TOUR CARDS
   ========================================================== */

@media (max-width: 767px) {

  /* Keep slider inside viewport */
  .owl-stage-outer {
    overflow: hidden !important;
  }

  .owl-stage {
    display: flex !important;
  }

  /* Add breathing room on both sides */
  .photography-slider,
  .workshop-slider {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Card styling */
  .inner-item {
    width: 100% !important;
    margin: 10px 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  /* Image section */
  .workshop-img {
    overflow: hidden !important;
  }

  .workshop-img img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Card body */
  .inner-item-content,
  .tour-content,
  .workshop-content {
    padding: 14px !important;
  }

  /* Tour title */
  p.workshop-name {
    font-size: 16px !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    margin-bottom: 10px !important;
    height: 45px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Date and icons row */
  .date-sec,
  .tour-date {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  /* Price section */
  .price-sec,
  .tour-price {
    margin-top: 12px !important;
  }

  .price-sec p,
  .tour-price p {
    margin-bottom: 0 !important;
  }

  /* Filling fast badge */
  .filling-fast,
  .seats-full {
    width: auto !important;
    display: inline-block !important;
    font-size: 12px !important;
    border-radius: 0 !important;
  }

  .filling-fast {
    padding: 6px 45px 6px 12px !important;
    background: linear-gradient(to right, #1668e3 70%, transparent 100%) !important;
  }

  .seats-full {
    padding: 6px 45px 6px 12px !important;
    background: linear-gradient(to right, #e8b904 70%, transparent 100%) !important;
  }

  /* Whatsapp button inside card */
  .tour-whatsapp,
  .whatsapp-tour,
  .tour-btn {
    width: 42px !important;
    height: 42px !important;
  }

  /* Prevent horizontal scroll */
  body,
  html {
    overflow-x: hidden !important;
  }

  .container,
  .container-fluid,
  .side-space {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* Fix Owl Carousel width issue on mobile */

@media (max-width: 767px) {

  .owl-carousel .owl-item {
    width: 100% !important;
  }

  .owl-carousel .item,
  .owl-carousel .inner-item {
    width: 100% !important;
  }

  .owl-carousel {
    touch-action: pan-y !important;
  }

}

@media (max-width: 767px) {

  .header2-sec {
    min-height: 60px !important;
    padding: 8px 16px !important;
  }

  .logo-link img {
    max-height: 38px !important;
    width: auto !important;
  }

}

@media (max-width: 767px) {

  .photography-slider .owl-item,
  .workshop-slider .owl-item {
      width: 100% !important;
  }

}

@media (max-width: 767px) {

    .photography-slider {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .photo-tours .owl-stage-outer {
        overflow: hidden !important;
    }

    .photo-tours .owl-item {
        padding: 0 !important;
    }

    .photo-tours .item {
        width: 100%;
    }
}
