/* ==========================================================================
   Mahalyaa — Figma Mobile Design System
   Matches the exact Figma mobile layout at ≤ 767px
   ========================================================================== */

/* ====================================================================
   CAROUSEL SHARED COMPONENTS
   ==================================================================== */

/* Dots indicator */
.carousel-dots {
  display: none; /* hidden on desktop */
  justify-content: center;
  gap: 6px;
  padding: 12px 0 4px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(108, 74, 182, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--color-primary);
  width: 20px;
  border-radius: 4px;
}

/* Arrow nav for Featured Mahals */
.section-carousel-nav {
  display: none; /* hidden on desktop */
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 20px;
}

.carousel-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(108, 74, 182, 0.25);
  background: #fff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(108, 74, 182, 0.12);
}

.carousel-arrow-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Occasions nav buttons — styled version */
.occasions-nav-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.occ-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(108, 74, 182, 0.2);
  background: #fff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(108, 74, 182, 0.1);
}

.occ-nav-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(108, 74, 182, 0.3);
}

/* Testimonial carousel base */
.testi-carousel {
  /* Using bootstrap row instead for desktop grid */
}

/* ====================================================================
   MOBILE LAYOUT — ≤ 767px
   ==================================================================== */
@media (max-width: 767px) {

  /* --- Carousel dots / nav visible on mobile --- */
  .carousel-dots {
    display: flex;
  }

  .section-carousel-nav {
    display: none !important;
  }

  .occasions-nav-btns {
    display: none !important;
  }

  /* ============================================================
     HERO SECTION
     ============================================================ */
  .hero-editorial {
    min-height: 100svh;
  }

  /* Make venue image a background feel on mobile */
  .hero-editorial__subject-wrap {
    top: 10% !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 90vw !important;
    height: 45vh !important;
    opacity: 0.55 !important;
    z-index: 2 !important;
  }

  /* Hero text */
  .hero-editorial__title {
    font-size: clamp(2.6rem, 11vw, 3.8rem) !important;
    line-height: 1.05 !important;
    margin-bottom: 14px !important;
  }

  .hero-editorial__desc {
    font-size: 0.95rem !important;
    max-width: 100%;
    color: rgba(255,255,255,0.85) !important;
  }

  .hero-editorial__ctas {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-editorial__inner {
    grid-template-columns: 1fr !important;
    padding: 0 20px !important;
    gap: 20px !important;
  }

  .hero-editorial__stats { display: none !important; }
  .hero-editorial__right-quote { display: none !important; }

  /* ============================================================
     SEARCH SECTION
     ============================================================ */
  .search-section {
    margin-top: -28px;
    padding: 0 14px 40px;
  }

  .search-card {
    border-radius: 20px;
  }

  .search-card__tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px 0;
    scrollbar-width: none;
    gap: 0;
  }

  .search-card__tabs::-webkit-scrollbar { display: none; }

  .search-tab {
    font-size: 0.75rem;
    padding: 9px 14px;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 5px;
  }

  .search-card__body {
    grid-template-columns: 1fr !important;
    gap: 0;
    padding: 8px 20px 16px;
  }

  .search-field {
    padding: 14px 0;
    border-bottom: 1px solid rgba(108, 74, 182, 0.08);
  }

  .search-field:last-of-type { border-bottom: none; }

  .search-field+.search-field::before { display: none; }

  .search-cta {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  /* ============================================================
     STATS BAR — 4 items in 2×2 grid
     ============================================================ */
  .stats-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 16px;
    margin: 16px auto 0;
    border-radius: 16px;
  }

  .stat-bar-divider { display: none; }

  .stat-bar-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 14px 8px;
    border-bottom: 1px solid rgba(108, 74, 182, 0.07);
  }

  .stat-bar-item:nth-child(odd) {
    border-right: 1px solid rgba(108, 74, 182, 0.07);
  }

  .stat-bar-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .stat-bar-icon {
    width: 34px;
    height: 34px;
  }

  .stat-bar-text {
    align-items: center;
  }

  .stat-bar-text strong {
    font-size: 1.05rem;
  }

  .stat-bar-text span {
    font-size: 0.68rem;
    text-align: center;
  }

  /* ============================================================
     OCCASIONS SECTION — Horizontal Scroll Carousel
     ============================================================ */
  .occasions-section {
    padding: 52px 0 40px;
    overflow: hidden;
  }

  .occasions-section__inner {
    padding: 0 !important;
  }

  .occasions-section__header {
    padding: 0 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .occasions-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .occasions-tagline {
    display: none; /* hide on small screens */
  }

  .occasions-carousel-wrap {
    position: relative;
  }

  .occasions-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    gap: 12px !important;
    padding: 4px 20px 16px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .occasions-grid::-webkit-scrollbar { display: none; }

  .occ-card {
    flex: 0 0 130px !important;
    min-width: 130px !important;
    scroll-snap-align: start;
  }

  .occ-card__img {
    width: 130px !important;
    height: 165px !important;
    aspect-ratio: unset !important;
    border-radius: 14px;
  }

  .occ-card__label {
    font-size: 0.75rem;
    text-align: center;
  }

  /* ============================================================
     FEATURED MAHALS — Horizontal Scroll Carousel
     ============================================================ */
  .featured-mahals-section {
    padding: 52px 0 60px;
  }

  .featured-mahals-section__inner {
    padding: 0 !important;
    overflow: hidden;
  }

  .featured-mahals-section__header {
    padding: 0 20px;
    flex-direction: row !important;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .section-carousel-nav {
    padding: 0 20px;
    margin-bottom: 12px;
  }

  .venue-cards-grid {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    gap: 14px !important;
    padding: 4px 20px 12px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .venue-cards-grid::-webkit-scrollbar { display: none; }

  .venue-card {
    flex: 0 0 75vw !important;
    min-width: 240px !important;
    max-width: 300px !important;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
  }

  .venue-card__img-wrap {
    height: 190px !important;
    flex-shrink: 0;
  }

  .venue-card--large .venue-card__img-wrap,
  .venue-card--small .venue-card__img-wrap {
    height: 190px !important;
  }

  /* ============================================================
     INFO ROW (Muhurtham / Why Choose / Story)
     ============================================================ */
  .info-row-section {
    padding: 32px 0 16px;
  }

  .info-row-section__inner {
    grid-template-columns: 1fr !important;
    gap: 16px;
    padding: 0 16px;
  }

  /* Muhurtham card — full-width purple */
  .info-card--muhurtham {
    border-radius: 20px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #4a1faa 0%, #6c4ab6 60%, #8b3a8b 100%) !important;
    position: relative;
    overflow: hidden;
    min-height: 160px;
  }

  .info-card--muhurtham .info-card__icon {
    color: rgba(255,255,255,0.85);
  }

  .info-card--muhurtham .info-card__title {
    color: #fff;
    font-size: 1.3rem;
  }

  .info-card--muhurtham .info-card__title em {
    color: #f6d06e;
  }

  .info-card--muhurtham .info-card__desc {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
  }

  .info-card--muhurtham .info-card__btn {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 100px;
    padding: 9px 20px;
    font-size: 0.82rem;
    display: inline-block;
    text-decoration: none;
    margin-top: 4px;
    backdrop-filter: blur(6px);
  }

  .info-card--muhurtham .info-card__deco {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 130px;
    height: 130px;
    opacity: 0.25;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
  }

  .info-card--muhurtham .info-card__deco img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Why Choose — 2×2 icon grid */
  .info-card--why {
    padding: 24px 16px;
  }

  .why-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .why-list__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(108, 74, 182, 0.05);
    border: 1px solid rgba(108, 74, 182, 0.08);
    border-radius: 14px;
    padding: 16px 12px;
    gap: 8px;
  }

  .why-list__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(108, 74, 182, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
  }

  .why-list__item > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .why-list__item strong {
    font-size: 0.75rem;
    color: var(--color-text);
    line-height: 1.3;
  }

  .why-list__item p {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.4;
  }

  /* Story card — compact */
  .info-card--story {
    border-radius: 16px;
    overflow: hidden;
  }

  /* ============================================================
     SERVICES SECTION — Horizontal Scroll
     ============================================================ */
  .hp-services-wrap {
    padding: 52px 0 48px;
  }

  .hp-services-wrap .container {
    padding: 0 !important;
  }

  .services-header-preview {
    padding: 0 20px;
    margin-bottom: 24px;
  }

  .services-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 12px !important;
    padding: 4px 20px 16px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-template-columns: unset !important;
  }

  .services-grid::-webkit-scrollbar { display: none; }

  .svc-item {
    flex: 0 0 100px !important;
    min-width: 100px !important;
    scroll-snap-align: start;
    text-align: center;
  }

  /* ============================================================
     TESTIMONIALS — Horizontal Scroll Carousel
     ============================================================ */
  .hp-testimonials {
    padding: 52px 0 48px;
  }

  .hp-testimonials .container {
    padding: 0 !important;
  }

  .testi-header {
    padding: 0 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }

  .testi-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 14px !important;
    padding: 4px 20px 16px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-template-columns: unset !important;
  }

  .testi-carousel::-webkit-scrollbar { display: none; }

  .testi-carousel .col-lg-4,
  .testi-carousel .col-md-6,
  .testi-carousel .col-md-12 {
    flex: 0 0 80vw !important;
    min-width: 260px !important;
    max-width: 320px !important;
    scroll-snap-align: start;
    padding: 0 !important;
  }

  /* ============================================================
     OWNER CTA SECTION
     ============================================================ */
  .owner-cta-section {
    padding: 40px 0;
  }

  .owner-cta-section__inner {
    padding: 32px 20px;
    flex-direction: column !important;
    gap: 24px;
    text-align: center;
    border-radius: 20px;
  }

  .owner-cta__title {
    font-size: 1.8rem;
  }

  .owner-cta__stats {
    justify-content: center;
    gap: 24px;
  }

  /* ============================================================
     FOOTER
     ============================================================ */
  .footer-luxury__grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
    padding: 40px 20px 28px;
  }

  .footer-luxury__bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 16px 20px;
  }
}

/* ====================================================================
   VERY SMALL SCREENS ≤ 400px
   ==================================================================== */
@media (max-width: 400px) {
  .occ-card {
    flex: 0 0 116px !important;
    min-width: 116px !important;
  }

  .occ-card__img {
    width: 116px !important;
    height: 148px !important;
  }

  .venue-card {
    flex: 0 0 82vw !important;
  }

  .stat-bar-text strong {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   9. HERO CORNER DECORATIONS — Fix Mobile Overflow
   The ::before (top-left) and ::after (top-right) corner images are 350px
   on desktop but cause horizontal overflow on mobile. Fix by shrinking them
   and ensuring they don't expand the page width.
   ========================================================================== */
@media (max-width: 767px) {
  /* Constrain corner decorations to not overflow */
  .hero-editorial::before,
  .hero-editorial::after {
    width: 160px !important;
    height: 160px !important;
    opacity: 0.55 !important;
  }

  /* Ensure hero itself clips any overflow from ::before/::after */
  .hero-editorial {
    overflow: hidden !important;
  }

  /* Fix bg-text "MAHALYA" — it's nowrap and causes horizontal scroll */
  .hero-editorial__bg-text span {
    font-size: clamp(3.5rem, 20vw, 6rem) !important;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    display: block;
  }

  /* Move mask so corners look natural at smaller size */
  .hero-editorial::before {
    -webkit-mask-image: radial-gradient(circle at top left, black 30%, transparent 75%) !important;
    mask-image: radial-gradient(circle at top left, black 30%, transparent 75%) !important;
  }

  .hero-editorial::after {
    -webkit-mask-image: radial-gradient(circle at top right, black 30%, transparent 75%) !important;
    mask-image: radial-gradient(circle at top right, black 30%, transparent 75%) !important;
  }
}

@media (max-width: 400px) {
  /* On very small screens, hide corners entirely */
  .hero-editorial::before,
  .hero-editorial::after {
    display: none !important;
  }
}
