/* ============================================================
   G MIRACLES — overflow-desktop-fix.css
   Fixes: Horizontal white-space / scrollbar on right side
          Desktop sections full-width & proper layout
   ============================================================ */

/* ============================================================
   ROOT FIX — Stop ALL horizontal overflow at source
   ============================================================ */
html {
  overflow-x: hidden;
  max-width: 100%;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ============================================================
   FIX 1 — fade-right / fade-left animation overflow
   Before JS triggers .visible, translateX(40px) pushes content
   40px beyond viewport causing the right-side white strip.
   Clip every section that contains these animated elements.
   ============================================================ */
.about-preview,
.services-highlights,
.why-us,
.bridal-section,
.gallery-preview,
.testimonials,
.booking-section,
.contact-preview,
.story-section,
.mission-vision,
.team-section,
.gallery-section,
.contact-layout,
.about-page-hero,
section {
  overflow-x: clip; /* clip (not hidden) so sticky/fixed children still work */
}

/* ============================================================
   FIX 2 — about-img-accent right: -30px overflow
   ============================================================ */
.about-img-wrap {
  overflow: hidden;       /* clip the protruding accent image */
  padding-bottom: 40px;   /* keep visual space for accent at bottom */
  padding-right: 30px;    /* keep visual space for accent on right */
}

.about-img-accent {
  right: -28px;           /* still peeks out but contained by wrapper padding */
  bottom: -38px;
}

/* On tablet: already hidden via style.css, but also reset wrap */
@media (max-width: 900px) {
  .about-img-wrap {
    overflow: hidden;
    padding-bottom: 0;
    padding-right: 0;
  }
  .about-img-accent {
    display: none;
  }
}

/* ============================================================
   FIX 3 — about-badge left: -20px overflow (left side)
   ============================================================ */
.about-badge {
  left: -10px; /* pull it back from -20px so it doesn't bleed */
}

@media (max-width: 1200px) {
  .about-badge {
    left: 10px;
  }
}

/* ============================================================
   FIX 4 — story-img-badge right: -20px overflow (about.html)
   ============================================================ */
.story-img {
  overflow: hidden;
  padding-bottom: 20px;
  padding-right: 20px;
}

.story-img-badge {
  right: -18px;
  bottom: -18px;
}

@media (max-width: 900px) {
  .story-img {
    overflow: hidden;
    padding-bottom: 0;
    padding-right: 0;
  }
  .story-img-badge {
    right: 0;
    bottom: 0;
  }
}

/* ============================================================
   FIX 5 — service-detail-img::after translate(12px,12px) overflow
   ============================================================ */
.service-detail-img {
  overflow: hidden; /* clip the ::after gold border offset */
}

.service-detail-img::after {
  transform: translate(8px, 8px); /* reduced from 12px to stay inside clip */
}

/* ============================================================
   Gallery columns — ensure no horizontal overflow
   ============================================================ */
.gallery-columns {
  overflow: hidden;
  max-width: 100%;
}
.gcol-item {
  min-width: 0;
}

/* ============================================================
   FIX 7 — hero-stats panel (right: 0, absolute)
   On exactly 1100-1200px it can clip outside viewport
   ============================================================ */
@media (min-width: 1101px) {
  .hero {
    overflow: hidden; /* contain the stats panel */
  }

  .hero-stats {
    max-width: 160px;
    right: 0;
  }
}

/* ============================================================
   DESKTOP LAYOUT — Improve section appearance at full width
   ============================================================ */

/* Reduce the massive 6rem gap on two-column grids */
.about-preview-grid {
  gap: 4rem;
}

.story-grid {
  gap: 4rem;
}

.booking-grid {
  gap: 4rem;
}

/* Services grid — replace gap:2px (thin white lines) with 
   proper card spacing for a more polished desktop look */
.services-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 0;
}

.service-card {
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* Why-Us grid — restore proper spacing instead of 1px gaps */
.why-grid {
  gap: 2px; /* keep as-is, this is intentional design */
}

/* Gallery masonry desktop — fix image heights for natural grid */
.gallery-masonry .gallery-item img {
  min-height: 260px;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* Gallery tiles fill container--wide naturally */
.gallery-preview .container--wide {
  padding: 0 2rem;
}

/* ============================================================
   DESKTOP > 1400px — Full-bleed sections look better
   ============================================================ */
@media (min-width: 1401px) {
  .container--wide {
    max-width: 1500px;
  }

  .gallery-masonry {
    gap: 10px !important;
  }
}

/* ============================================================
   TABLET 901px–1100px — Layout tightening
   ============================================================ */
@media (max-width: 1100px) {
  .about-preview-grid {
    gap: 3rem;
  }

  .story-grid {
    gap: 3rem;
  }

  .booking-grid {
    gap: 3rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  /* Prevent story-img-badge overflow on tablet */
  .story-img {
    padding-bottom: 0;
    padding-right: 0;
  }

  .story-img-badge {
    position: relative;
    bottom: auto;
    right: auto;
    display: inline-block;
    margin-top: 1.5rem;
  }
}

/* ============================================================
   MOBILE — Section overflow prevention
   ============================================================ */
@media (max-width: 900px) {
  /* Reset story badge to flow naturally */
  .story-img-badge {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
    margin-top: 1.5rem;
    text-align: center;
  }

  /* About section no accent, no overflow */
  .about-img-wrap {
    padding: 0;
    overflow: hidden;
  }

  .about-img-main {
    height: 360px;
    width: 100%;
    display: block;
  }

  /* Services: 1 column clean */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Reduce section padding */
  .about-preview-grid,
  .story-grid,
  .booking-grid {
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-img-main {
    height: 260px;
  }

  .service-card-img {
    height: 200px;
  }

  /* Booking form full width */
  .booking-grid {
    gap: 2rem;
  }

  .booking-form {
    padding: 1.75rem 1.25rem;
  }
}

/* ============================================================
   CONTAINER SAFETY — Prevent any child from escaping
   ============================================================ */
.container,
.container--wide {
  position: relative; /* establish stacking context */
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   GALLERY PAGE — Full responsive grid fix
   ============================================================ */
.gallery-section .container {
  overflow: hidden;
}

@media (max-width: 900px) {
  .gallery-section .gallery-grid,
  .gallery-full-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-section .gallery-grid,
  .gallery-full-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ============================================================
   TEAM SECTION — Card image overflow on mobile
   ============================================================ */
.team-card {
  overflow: hidden;
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .team-card-img {
    height: 260px;
  }
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .team-card-img {
    height: 200px;
  }

  .team-card-body {
    padding: 0.85rem;
  }

  .team-card-body h4 {
    font-size: 0.95rem;
  }

  .team-card-body span {
    font-size: 0.65rem;
  }
}

/* ============================================================
   FOOTER — No horizontal overflow
   ============================================================ */
.footer {
  overflow: hidden;
  max-width: 100%;
}

.footer-grid {
  box-sizing: border-box;
}

/* ============================================================
   GLOBAL SAFE IMAGE RULE
   ============================================================ */
img {
  max-width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   CONTACT PAGE — Map and form overflow
   ============================================================ */
.map-section,
.map-section iframe,
.map-wrap,
.map-wrap iframe {
  max-width: 100%;
  display: block;
}

