/**
 * Customer Moments Gallery Stylesheet
 *
 * Scoped stylesheet for the happy-customer-moments bento gallery widget.
 * Converted from a static HTML/CSS/JS design source into a true Elementor widget.
 * Every color, spacing and typography value below is a fallback default —
 * all of it is overridable per-instance via Elementor Style controls, which
 * write to the --ccm-* custom properties scoped under {{WRAPPER}}.
 *
 * @package Universal_Elementor_Engine\Widgets\Customer_Moments
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Elementor container breakout helpers — required for the full-bleed width mode */
.elementor-widget-uwe-customer-moments,
.elementor-widget-uwe-customer-moments .elementor-widget-container {
  overflow: visible !important;
}

/* ============================================================
   ROOT / SECTION
   ============================================================ */

.ccm-section {
  --ccm-blue: #0064c1;
  --ccm-deep: #003463;
  --ccm-orange: #f8753a;
  --ccm-text: #0e2136;
  --ccm-muted: #647386;
  --ccm-border: #e7ebf0;
  --ccm-card-bg: #dfe5eb;

  --ccm-font-display: 'Fraunces', 'Georgia', serif;
  --ccm-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --ccm-gap: 12px;
  --ccm-radius: 12px;
  --ccm-row-h: 245px;
  --ccm-container-max-width: 1240px;

  position: relative;
  background: transparent;
  color: var(--ccm-text);
  font-family: var(--ccm-font-body);
  padding: 42px 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.ccm-section *,
.ccm-section *::before,
.ccm-section *::after {
  box-sizing: border-box;
}

.ccm-section img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   WIDTH MODES (Full-Screen Edge-to-Edge Breakout)
   ============================================================ */

.ccm-section.ccm-width-full,
.ccm-section.ccm-width-viewport {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  overflow-x: clip;
}

.ccm-section.ccm-width-boxed,
.ccm-section.ccm-width-container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: auto !important;
  right: auto !important;
}

.ccm-container {
  width: 100%;
  max-width: var(--ccm-container-max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   HEADER
   ============================================================ */

.ccm-header {
  margin-bottom: 32px;
}

.ccm-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--ccm-orange);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}

.ccm-label span.ccm-label-rule {
  width: 32px;
  height: 1px;
  background: var(--ccm-orange);
  flex: 0 0 auto;
}

.ccm-head-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.ccm-title {
  margin: 0;
  color: var(--ccm-deep);
  font-family: var(--ccm-font-display);
  font-size: clamp(43px, 5.2vw, 68px);
  line-height: .94;
  letter-spacing: -.045em;
  font-weight: 600;
}

.ccm-title em {
  color: var(--ccm-orange);
  font-weight: 500;
  font-style: normal;
}

.ccm-desc {
  max-width: 350px;
  margin: 0 0 2px;
  color: var(--ccm-muted);
  font-size: 12px;
  line-height: 1.75;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */

.ccm-gallery {
  display: grid;
  grid-template-columns: 1.55fr .72fr .72fr;
  grid-auto-rows: var(--ccm-row-h);
  gap: var(--ccm-gap);
}

.ccm-feature {
  grid-column: 1;
  grid-row: 1 / 3;
}

.ccm-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--ccm-radius);
  background: var(--ccm-card-bg);
  cursor: pointer;
}

.ccm-card:focus-visible {
  outline: 2px solid var(--ccm-orange);
  outline-offset: 2px;
}

/* ============================================================
   SLIDE STACK (multi-image autoscroll)
   ============================================================ */

.ccm-media {
  position: absolute;
  inset: 0;
}

.ccm-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity .9s ease, transform .75s cubic-bezier(.2, .8, .2, 1);
  will-change: opacity, transform;
}

.ccm-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.ccm-card:hover .ccm-slide.is-active {
  transform: scale(1.065);
}

/* slide transition mode */
.ccm-gallery.ccm-effect-slide .ccm-slide {
  transition: opacity .55s ease, transform .55s ease;
}

.ccm-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 52, 99, .02) 25%, rgba(0, 30, 60, .72) 100%);
  opacity: .9;
  transition: .35s ease;
  pointer-events: none;
}

.ccm-card:hover .ccm-gradient {
  opacity: 1;
}

/* progress dots for multi-image cards */
.ccm-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.ccm-card.ccm-feature .ccm-dots {
  bottom: 20px;
}

.ccm-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transition: .3s ease;
}

.ccm-dot.is-active {
  background: #fff;
  width: 14px;
  border-radius: 3px;
}

/* ============================================================
   FEATURE CARD DETAILS
   ============================================================ */

.ccm-card-top {
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.ccm-num {
  font-family: var(--ccm-font-display);
  font-size: 20px;
}

.ccm-tag {
  color: rgba(255, 255, 255, .75);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .16em;
}

.ccm-card-info {
  position: absolute;
  z-index: 3;
  left: 21px;
  bottom: 20px;
  color: #fff;
}

.ccm-card-info > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ccm-orange);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .16em;
}

.ccm-feature-heading {
  margin: 0;
  font-family: var(--ccm-font-display);
  font-size: 32px;
  line-height: .97;
  font-weight: 600;
}

.ccm-feature-heading em {
  color: var(--ccm-orange);
  font-weight: 500;
  font-style: normal;
}

/* ============================================================
   SECONDARY CARDS
   ============================================================ */

.ccm-number {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: 14px;
  color: #fff;
  font-family: var(--ccm-font-display);
  font-size: 19px;
}

.ccm-place {
  position: absolute;
  z-index: 3;
  left: 14px;
  bottom: 14px;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .15em;
}

/* ============================================================
   VIEW BUTTON
   ============================================================ */

.ccm-view {
  position: absolute;
  z-index: 4;
  right: 13px;
  bottom: 13px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(5px);
  transition: .3s ease;
}

.ccm-card:hover .ccm-view,
.ccm-card:focus-visible .ccm-view {
  opacity: 1;
  transform: none;
}

.ccm-view:hover,
.ccm-view:focus-visible {
  border-color: var(--ccm-orange);
  background: var(--ccm-orange);
  outline: none;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.ccm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
  opacity: 0;
  visibility: hidden;
  transition: .3s ease;
}

.ccm-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.ccm-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 24, 47, .94);
  backdrop-filter: blur(10px);
}

.ccm-lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  max-height: 84vh;
}

.ccm-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 7px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}

.ccm-lightbox-label {
  margin-top: 12px;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
  text-align: center;
}

.ccm-lightbox-label span {
  color: var(--ccm-orange);
}

.ccm-close {
  position: absolute;
  top: 22px;
  right: 25px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.ccm-close:hover,
.ccm-close:focus-visible {
  background: var(--ccm-orange);
  border-color: var(--ccm-orange);
  outline: none;
}

.ccm-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

.ccm-prev {
  left: 25px;
}

.ccm-next {
  right: 25px;
}

.ccm-nav:hover,
.ccm-nav:focus-visible {
  background: var(--ccm-orange);
  border-color: var(--ccm-orange);
  outline: none;
}

.ccm-nav[hidden],
.ccm-close[hidden] {
  display: none !important;
}

/* ============================================================
   TABLET (max-width: 1024px)
   ============================================================ */

@media (max-width: 1024px) {
  .ccm-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: var(--ccm-gap, 12px);
  }

  .ccm-card.ccm-feature {
    grid-column: 1 / -1;
    grid-row: auto;
    height: 320px;
  }

  .ccm-card:not(.ccm-feature) {
    height: 210px;
  }
}

/* ============================================================
   MOBILE (max-width: 767px)
   ============================================================ */

@media (max-width: 767px) {
  .ccm-section {
    padding: 30px 0;
  }

  .ccm-container {
    padding: 0 18px;
  }

  .ccm-header {
    margin-bottom: 24px;
  }

  .ccm-head-content {
    display: block;
  }

  .ccm-title {
    font-size: clamp(32px, 8.5vw, 42px);
  }

  .ccm-desc {
    margin-top: 17px;
    max-width: 100%;
    font-size: 11.5px;
  }

  .ccm-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: 10px;
  }

  .ccm-card.ccm-feature {
    grid-column: 1 / -1;
    grid-row: auto;
    height: 260px;
  }

  .ccm-card:not(.ccm-feature) {
    height: 170px;
  }

  .ccm-card-info {
    left: 17px;
    bottom: 17px;
  }

  .ccm-feature-heading {
    font-size: 26px;
  }

  .ccm-card-top {
    top: 13px;
    left: 14px;
    right: 14px;
  }

  .ccm-tag {
    font-size: 6px;
  }

  .ccm-number {
    top: 11px;
    left: 12px;
    font-size: 17px;
  }

  .ccm-place {
    left: 12px;
    bottom: 12px;
    font-size: 6.5px;
  }

  .ccm-view {
    opacity: 1;
    right: 10px;
    bottom: 10px;
    width: 31px;
    height: 31px;
    font-size: 11px;
  }

  .ccm-lightbox {
    padding: 15px;
  }

  .ccm-lightbox-content {
    max-width: 94vw;
  }

  .ccm-lightbox-content img {
    max-width: 94vw;
    max-height: 76vh;
  }

  .ccm-prev {
    left: 8px;
  }

  .ccm-next {
    right: 8px;
  }

  .ccm-close {
    top: 12px;
    right: 12px;
  }
}

/* ============================================================
   VERY SMALL (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
  .ccm-container {
    padding: 0 14px;
  }

  .ccm-title {
    font-size: 34px;
  }

  .ccm-gallery {
    gap: 8px;
    grid-template-rows: auto;
    grid-auto-rows: auto;
  }

  .ccm-card.ccm-feature {
    height: 235px;
  }

  .ccm-card:not(.ccm-feature) {
    height: 155px;
  }

  .ccm-feature-heading {
    font-size: 23px;
  }
}

/* ============================================================
   ACCESSIBILITY — REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ccm-section .ccm-slide,
  .ccm-section .ccm-gradient,
  .ccm-section .ccm-view,
  .ccm-section .ccm-dot,
  .ccm-section .ccm-lightbox {
    transition: none !important;
  }

  .ccm-card:hover .ccm-slide.is-active {
    transform: none;
  }
}
