/* =================================================================
   VISEON — Testimonials Section
   Scoped entirely to #testimonials (set as block anchor on the
   front-page template). Loaded only on is_front_page().
   ================================================================= */

/* -----------------------------------------------------------------
   CARD BASE
   ----------------------------------------------------------------- */
#testimonials .wp-block-column {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 320px;
    max-width: 420px;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--wp--preset--color--brand-orange, #f4711d);
    display: flex;
}

/* Suppress any ::before pseudo-element from base styles */
#testimonials .wp-block-column::before {
    display: none;
}

#testimonials .wp-block-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* Inner group — transparent so the column bg shows through */
#testimonials .wp-block-column .wp-block-group {
    background: transparent;
    position: relative;
}

/* -----------------------------------------------------------------
   LOGOS
   ----------------------------------------------------------------- */
#testimonials .wp-block-column figure.wp-block-image {
    margin-bottom: 20px;
}

#testimonials .wp-block-column figure.wp-block-image img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

#testimonials .wp-block-column:hover figure.wp-block-image img {
    transform: scale(1.05);
}

/* -----------------------------------------------------------------
   TEXT
   ----------------------------------------------------------------- */
#testimonials .wp-block-column p {
    color: #333333;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

#testimonials .wp-block-column p.has-small-font-size {
    color: var(--wp--preset--color--brand-orange, #f4711d);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(244, 113, 29, 0.2);
}

#testimonials .wp-block-column p.has-small-font-size a {
    color: var(--wp--preset--color--brand-orange, #f4711d);
    text-decoration: none;
    transition: color 0.3s ease;
}

#testimonials .wp-block-column p.has-small-font-size a:hover {
    color: var(--wp--preset--color--brand-orange-dark, #e55a0d);
    text-decoration: underline;
}

/* -----------------------------------------------------------------
   CAROUSEL SCROLL CONTAINER
   ----------------------------------------------------------------- */
#testimonials .wp-block-columns {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 24px;
    padding: 20px 10px 40px;
    margin: 0 -10px;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#testimonials .wp-block-columns::-webkit-scrollbar {
    display: none;
}

#testimonials .wp-block-group.alignwide {
    position: relative;
}

/* -----------------------------------------------------------------
   NAVIGATION ARROWS
   ----------------------------------------------------------------- */
.testimonial-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 0 20px;
}

.testimonial-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.testimonial-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: scale(1.1);
}

.testimonial-nav-btn:active { transform: scale(0.95); }

.testimonial-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* -----------------------------------------------------------------
   PAGINATION DOTS
   ----------------------------------------------------------------- */
.testimonial-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.testimonial-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.testimonial-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* -----------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 1024px) {
    #testimonials .wp-block-column {
        flex: 0 0 calc(50% - 12px);
        min-width: 300px;
    }
}

/* WP core fires flex-wrap:wrap and flex-basis:100%!important at 781px.
   Must match that breakpoint and use !important to override. */
@media (max-width: 781px) {
      #testimonials .wp-block-columns {
          flex-wrap: nowrap !important;
          gap: 0 !important;
          padding: 20px 0 60px !important;
          margin: 0 !important;
      }

      #testimonials .wp-block-column {
          flex: 0 0 calc(100vw - 48px) !important;
          width: calc(100vw - 48px) !important;
          min-width: calc(100vw - 48px) !important;
          max-width: calc(100vw - 48px) !important;
          margin: 0 24px !important;
          scroll-snap-align: center;
          scroll-snap-stop: always;
          padding: 24px 20px !important;
      }

      #testimonials .wp-block-column:first-child { margin-left: 24px !important; }
      #testimonials .wp-block-column:last-child  { margin-right: 24px !important; }

      .testimonial-carousel-nav { margin-top: 24px; }
      .testimonial-nav-btn { width: 44px; height: 44px; }
  }

@media (hover: none) {
    #testimonials .wp-block-column:active { transform: scale(0.98); }
}
