/* ==========================================================================
   THE WATER PROJECT DESIGN SYSTEM 2025 - CTA SECTIONS
   ========================================================================== */

/* 
 * Call-to-action section layouts extracted from 2025 redesigned pages
 * Provides consistent CTA styling with theme-aware gradients and
 * optimal conversion-focused design patterns.
 */

/* ========================================
   BASE CTA SECTION
   ======================================== */

.motif-2025 .cta-section {
  background: var(--gradient-primary);
  color: var(--gradient-text-primary);
  padding: 60px 40px;
  text-align: center;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-lg); /* Restored border radius */
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.motif-2025 .cta-section__container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: var(--z-raised);
}

.motif-2025 .cta-section h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  color: var(--gradient-text-primary);
  margin-bottom: 12px;
  line-height: var(--line-height-snug);
}

.motif-2025 .cta-section__subtitle {
  font-size: var(--font-size-xl);
  color: var(--gradient-text-secondary);
  margin-bottom: 24px;
  font-style: italic;
  font-weight: var(--font-weight-light);
}

.motif-2025 .cta-section p {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--gradient-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.motif-2025 .cta-section__buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   CTA SECTION VARIANTS
   Using new solid gradient system
   ======================================== */

/* Donate CTA - Orange gradient */
.motif-2025 .cta-section--donate {
  background: var(--gradient-donate);
}

/* Success CTA - Green gradient */
.motif-2025 .cta-section--success {
  background: var(--gradient-success);
}

/* Orange CTA - Action/Urgency */
.motif-2025 .cta-section--orange {
  background: var(--gradient-orange);
}

/* Green CTA - Environmental/Sustainability */
.motif-2025 .cta-section--green {
  background: var(--gradient-green);
}

/* Blue CTA - Trust/Information */
.motif-2025 .cta-section--blue {
  background: var(--gradient-blue);
}

/* Brown CTA - Earth/Community */
.motif-2025 .cta-section--brown {
  background: var(--gradient-brown);
}

/* Info CTA - Updates/Information */
.motif-2025 .cta-section--info {
  background: var(--gradient-info);
}

/* Warning CTA - Urgent attention */
.motif-2025 .cta-section--warning {
  background: var(--gradient-warning);
}

/* Light CTA - Subtle background */
.motif-2025 .cta-section--light {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.motif-2025 .cta-section--light h2 {
  color: var(--heading-color);
}

.motif-2025 .cta-section--light p {
  color: var(--body-color);
  opacity: 1;
}

/* Ensure all text in colored CTA sections uses theme gradient text colors */
.motif-2025 .cta-section h2,
.motif-2025 .cta-section h3,
.motif-2025 .cta-section h4 {
  color: var(--gradient-text-primary) !important;
}

.motif-2025 .cta-section p,
.motif-2025 .cta-section div,
.motif-2025 .cta-section span {
  color: var(--gradient-text-secondary) !important;
}

/* Override any inherited text colors that might create contrast issues */
.motif-2025 .cta-section * {
  color: inherit;
}

.motif-2025 .cta-section .cta-section__subtitle {
  color: var(--gradient-text-secondary) !important;
}

/* Accent CTA - Theme-specific accent color */
.motif-2025 .cta-section--accent {
  background: var(--gradient-accent, var(--gradient-primary));
}

/* ========================================
   CTA CONTENT PATTERNS
   ======================================== */

/* Statistics CTA - Numbers with context */
.motif-2025 .cta-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2xl);
  margin: 40px 0;
}

.motif-2025 .cta-stats__item {
  text-align: center;
}

.motif-2025 .cta-stats__number {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  display: block;
  margin-bottom: 8px;
  color: var(--gradient-text-primary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.motif-2025 .cta-stats__label {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--font-weight-medium);
  color: var(--gradient-text-muted);
}

/* Quote CTA - Testimonial style */
.motif-2025 .cta-quote {
  max-width: 700px;
  margin: 0 auto 40px;
  position: relative;
}

.motif-2025 .cta-quote__text {
  font-size: var(--font-size-xl);
  font-style: italic;
  line-height: var(--line-height-relaxed);
  margin-bottom: 16px;
  position: relative;
}

.motif-2025 .cta-quote__text::before {
  content: '"';
  font-size: var(--font-size-4xl);
  position: absolute;
  left: -20px;
  top: -10px;
  opacity: 0.5;
}

.motif-2025 .cta-quote__text::after {
  content: '"';
  font-size: var(--font-size-4xl);
  position: absolute;
  right: -20px;
  bottom: -20px;
  opacity: 0.5;
}

.motif-2025 .cta-quote__attribution {
  font-size: var(--font-size-base);
  color: var(--gradient-text-muted);
  font-weight: var(--font-weight-medium);
}

/* ========================================
   WHITE BUTTON PATTERN
   For use on colored CTA backgrounds
   ======================================== */

.motif-2025 .btn--white {
  background: #FFFFFF;
  color: var(--primary);
  border: 2px solid #FFFFFF;
  padding: 14px 28px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--duration-normal) ease;
}

.motif-2025 .btn--white:hover {
  background: transparent;
  color: var(--gradient-text-primary);
  border-color: var(--gradient-text-primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

/* ========================================
   TRUST ELEMENTS
   Certification badges and social proof
   ======================================== */

.motif-2025 .trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  margin-top: 40px;
}

.motif-2025 .trust-logos a {
  display: flex;
  align-items: center;
  opacity: 0.95;
  transition: all var(--duration-normal) ease;
}

.motif-2025 .trust-logos a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.motif-2025 .trust-logos img {
  max-height: 80px;
  width: auto;
  /* Removed filter to show original logo colors */
}

/* Special handling for logos that need backgrounds */
.motif-2025 .trust-logos .logo-with-bg {
  background: #FFFFFF;
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ========================================
   RESPONSIVE CTA BEHAVIOR
   ======================================== */

@media (max-width: 767px) {
  .motif-2025 .cta-section {
    margin: 0 auto;
    padding: 40px 20px; /* Consistent mobile padding */
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-md); /* Smaller radius on mobile */
  }
  
  .motif-2025 .cta-section h2 {
    font-size: var(--font-size-2xl);
  }
  
  .motif-2025 .cta-section__subtitle {
    font-size: var(--font-size-base);
  }
  
  .motif-2025 .cta-section p {
    font-size: var(--font-size-base);
    max-width: 500px;
  }
  
  .motif-2025 .cta-section__buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .motif-2025 .cta-section__buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .motif-2025 .cta-stats {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin: 32px 0;
  }
  
  .motif-2025 .cta-stats__number {
    font-size: var(--font-size-3xl);
  }
  
  .motif-2025 .trust-logos {
    gap: var(--space-lg);
  }
  
  .motif-2025 .trust-logos img {
    max-height: 60px;
  }
  
  .motif-2025 .cta-quote__text::before,
  .motif-2025 .cta-quote__text::after {
    display: none; /* Remove quote marks on mobile for cleaner layout */
  }
}

@media (max-width: 480px) {
  .motif-2025 .trust-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    justify-items: center;
  }
  
  .motif-2025 .trust-logos img {
    max-height: 50px;
  }
  
  .motif-2025 .cta-quote__text {
    font-size: var(--font-size-lg);
  }
}

/* ========================================
   THEME-SPECIFIC CTA VARIATIONS
   ======================================== */

/* Warm Earth CTA variations */
[data-theme="warm-earth"] .motif-2025 .cta-section {
  background: var(--gradient-cta);
}

[data-theme="warm-earth"] .motif-2025 .cta-section--donate {
  background: var(--gradient-cta);
}

[data-theme="warm-earth"] .motif-2025 .cta-section--light {
  background: var(--surface);
  border-color: var(--border);
}

/* Bold Impact CTA variations */
[data-theme="bold-impact"] .motif-2025 .cta-section {
  background: var(--gradient-cta);
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(6, 182, 212, 0.3);
}

[data-theme="bold-impact"] .motif-2025 .cta-section__buttons {
  gap: var(--space-lg);
}

[data-theme="bold-impact"] .motif-2025 .btn--white {
  font-weight: var(--font-weight-bold);
}

/* Field & Map CTA variations */
[data-theme="field-map"] .motif-2025 .cta-section {
  background: var(--gradient-cta);
}

[data-theme="field-map"] .motif-2025 .cta-section--warning {
  background: var(--gradient-warning);
}

/* ========================================
   ANIMATION ENHANCEMENTS
   ======================================== */

/* Subtle background animation for enhanced CTAs */
.motif-2025 .cta-section--enhanced {
  position: relative;
}

.motif-2025 .cta-section--enhanced::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: shimmer 8s ease-in-out infinite;
  z-index: var(--z-base);
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Pulse animation for urgent CTAs */
.motif-2025 .cta-section--urgent {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: var(--shadow-lg);
  }
  50% { 
    box-shadow: var(--shadow-xl), 0 0 30px rgba(45, 100, 132, 0.3);
  }
}

/* Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .motif-2025 .cta-section--enhanced::before {
    animation: none;
  }
  
  .motif-2025 .cta-section--urgent {
    animation: none;
  }
}

/* ========================================
   LEGACY COMPATIBILITY
   ======================================== */

/* Support for existing CTA patterns from 2025 pages */
.motif-2025 .cta-gifts {
  background: var(--gradient-orange);
}

.motif-2025 .cta-professional {
  background: var(--gradient-green);
}

.motif-2025 .cta-fundraising {
  background: var(--gradient-brown);
}

/* Legacy button group pattern */
.motif-2025 .cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .motif-2025 .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }
  
  .motif-2025 .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}
