/* =============================================================================
   Walker Bay Painters -- testimonials-contact.css
   Covers: Testimonials, Contact, Footer sections
   Design: "Quiet Luxury" by Elena Vasquez
   =============================================================================
   All animations use GPU-compositable properties (transform, opacity).
   Base components are in styles.css. Section grid/token patterns in sections.css.
   ============================================================================= */


/* =============================================================================
   1. TESTIMONIALS SECTION
   Deep Slate (#3A4F5C) background creates a visual "pause" in the page rhythm.
   Featured testimonial above, 3-column card grid below.
   Mobile: horizontal scroll snap carousel.
   ============================================================================= */

.testimonials {
  background: var(--color-deep-slate);
  position: relative;
  overflow: hidden;
}

/* Subtle radial gradient for depth -- not a flat slab of color */
.testimonials::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(
    ellipse at 30% 50%,
    rgba(91, 123, 138, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
}

/* Heading: white on dark */
.testimonials__heading {
  color: var(--color-white);
  max-width: 18ch;
  margin-inline: auto;
}

/* .overline--light and .overline-rule--light are in styles.css */

/* --- Featured Testimonial (largest, above grid) --- */
.testimonial-featured {
  position: relative;
  max-width: 720px;
  margin: 0 auto var(--space-8);
  text-align: center;
  padding: 0;
  border: none;
}

/* Decorative umber rule above featured quote */
.testimonial-featured__rule {
  width: 48px;
  height: 2px;
  background: var(--color-umber);
  margin: 0 auto var(--space-5);
}

/* Large opening quotation mark */
.testimonial-featured .testimonial__quote-mark {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 0.5;
  color: var(--color-umber);
  opacity: 0.35;
  display: block;
  margin-bottom: var(--space-5);
}

/* Featured quote text */
.testimonial-featured__text {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  font-style: italic;
}

/* --- Testimonial Card Grid --- */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Individual Testimonial Card --- */
.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  margin: 0;
  display: flex;
  flex-direction: column;
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Card opening quote mark */
.testimonial-card .testimonial__quote-mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.5;
  color: var(--color-umber);
  opacity: 0.30;
  display: block;
  margin-bottom: var(--space-4);
}

/* Card quote text */
.testimonial-card__text {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}

/* --- Shared testimonial footer (featured + cards) --- */
.testimonial__footer {
  margin-top: var(--space-6);
}

.testimonial__divider {
  width: 32px;
  height: 2px;
  background: var(--color-umber);
  margin-bottom: var(--space-3);
}

/* Featured divider: wider and centered */
.testimonial-featured .testimonial__divider {
  width: 48px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.testimonial__attribution {
  font-style: normal;
  display: block;
}

.testimonial__name {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
}

/* Featured name: slightly larger */
.testimonial-featured .testimonial__name {
  font-size: 15px;
}

.testimonial__location {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

/* Featured: center the attribution */
.testimonial-featured .testimonial__attribution {
  text-align: center;
}

/* --- Testimonial Card Elements (card-specific class names) --- */
.testimonial-card__quote-mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.5;
  color: var(--color-umber);
  opacity: 0.30;
  display: block;
  margin-bottom: var(--space-4);
}

.testimonial-card__divider {
  width: 32px;
  height: 2px;
  background: var(--color-umber);
  margin-bottom: 12px;
}

.testimonial-card__attribution {
  margin-top: 28px;
  font-style: normal;
}

.testimonial-card__name {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
}

.testimonial-card__location {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* --- Featured Testimonial Attribution (element-specific) --- */
.testimonial-featured__attribution {
  margin-top: 32px;
  font-style: normal;
}

.testimonial-featured__attribution .testimonial__name {
  color: var(--color-umber);
}

/* --- Testimonials Responsive --- */

/* Tablet: 2-column grid */
@media (max-width: 1279px) and (min-width: 768px) {
  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: horizontal scroll snap carousel */
@media (max-width: 767px) {
  .testimonial-featured .testimonial__quote-mark {
    font-size: 72px;
  }

  .testimonial-featured__text {
    font-size: 18px;
  }

  .testimonials__grid {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-4);
    /* Extend past container to allow peek at next card */
    margin-inline: calc(-1 * var(--container-padding));
    padding-inline: var(--container-padding);
  }

  .testimonials__grid::-webkit-scrollbar {
    display: none;
  }

  .testimonial-card {
    flex: 0 0 85vw;
    min-width: 280px;
    max-width: 340px;
    scroll-snap-align: center;
    padding: 32px 24px;
  }
}


/* =============================================================================
   2. CONTACT SECTION
   White background, 2-column layout: contact details left, map right.
   WhatsApp CTA below contact details. CTA banner below both columns.
   ============================================================================= */

.contact {
  background: var(--color-surface);
}

/* --- Two-Column Grid --- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 6vw, 80px);
  }
}

/* --- Contact Details List --- */
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: var(--space-6);
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

/* Icon container: rounded square */
.contact__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-stone-blue-50);
  border-radius: var(--radius-md);
  color: var(--color-stone-blue);
}

.contact__icon svg {
  width: 20px;
  height: 20px;
}

.contact__content {
  min-width: 0; /* Prevent text overflow on small screens */
}

.contact__label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.contact__value {
  display: block;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Clickable contact values (phone, email) */
.contact__value--link {
  text-decoration: none;
  color: var(--color-charcoal);
  transition: color 200ms var(--ease-out);
}

.contact__value--link:hover {
  color: var(--color-stone-blue);
}

.contact__value--link:focus-visible {
  outline: 2px solid var(--color-stone-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- WhatsApp CTA --- */
.contact__whatsapp {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-mist);
}

.contact__whatsapp-label {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-secondary);
}

/* btn-whatsapp is defined in styles.css */

/* --- Map --- */
.contact__map {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-mist);
}

.contact__map img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.contact__map-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.contact__map-badge strong {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-charcoal);
}

.contact__map-badge span {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-slate);
}

/* --- Contact Responsive --- */
@media (max-width: 1023px) {
  .contact__map img {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .contact__whatsapp {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .contact__map img {
    height: 240px;
  }
}


/* =============================================================================
   3. FOOTER
   Styles in styles.css already cover the footer grid, brand, links, bottom bar.
   This section extends with any overrides not covered there.

   The footer uses --color-stone-blue-900 (#1A252D) background as defined in
   styles.css. All structural styles (.site-footer, .site-footer__grid, .site-footer__brand,
   .site-footer__heading, .site-footer__links, .site-footer__contact, .site-footer__bottom)
   and their responsive breakpoints are in styles.css.

   Additional refinements below:
   ============================================================================= */

/* Footer grid: desktop spec calls for 2fr 1fr 1fr 1.5fr */
@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
  }
}

/* Footer link hover: add umber underline effect */
.site-footer__links a {
  position: relative;
}

.site-footer__links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-umber);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 300ms var(--ease-out);
}

.site-footer__links a:hover::after,
.site-footer__links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* WhatsApp link hover in footer contact list */
.site-footer__contact a[href*="wa.me"]:hover {
  color: #25D366;
}

/* Footer padding: 72px top, 32px bottom per spec */
.site-footer {
  padding: 72px 0 32px;
}

/* Footer bottom bar: spec says border rgba(255,255,255,0.06) */
.site-footer__bottom {
  margin-top: 56px;
  border-top-color: rgba(255, 255, 255, 0.06);
}


/* =============================================================================
   4. ACCESSIBILITY: REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    transition: none;
  }

  .testimonial-card:hover {
    transform: none;
  }

  .site-footer__links a::after {
    transition: none;
  }
}
