/**
 * CHARAC Marketing - Component Library
 * Reusable components matching home page design
 * Uses the primary theme color token
 */

/* ============================================
   CARD COMPONENTS (Matching Home Page Style)
   ============================================ */

/* Service Card (from home page) */
.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  border: 2px solid transparent;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: var(--primary-color);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.service-description {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.service-features {
  list-style: none;
  padding: 0;
}

.service-features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-dark);
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Floating Card (from hero section) */
.floating-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

.card-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 50%;
  right: 10%;
  animation-delay: 1s;
}

.card-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.25rem;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  background: none;
  color: var(--primary-color);
  -webkit-text-fill-color: currentColor;
}

/* ============================================
   STATS COMPONENTS (From Hero)
   ============================================ */

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 120px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   SECTION COMPONENTS
   ============================================ */

.section-header {
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-description {
  font-size: 1.125rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ============================================
   HERO COMPONENTS
   ============================================ */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.875rem;
  color: white;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.gradient-text {
  background: none;
  color: var(--accent-color);
  -webkit-text-fill-color: currentColor;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--white);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   GRADIENT ORBS (Background Effect)
   ============================================ */

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: drift 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-color);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-color);
  bottom: -250px;
  right: -250px;
  animation-delay: 5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--secondary-color);
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-50px, 50px) scale(0.9);
  }
}

/* ============================================
   FEATURE COMPONENTS
   ============================================ */

.feature-card-alt {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border-left: 4px solid var(--primary-color);
}

.feature-card-alt:hover {
  box-shadow: var(--shadow-xl);
  transform: translateX(10px);
}

.feature-number {
  font-size: 3rem;
  font-weight: 800;
  background: none;
  color: var(--primary-color);
  -webkit-text-fill-color: currentColor;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ============================================
   TESTIMONIAL COMPONENTS
   ============================================ */

.testimonial-card-modern {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.testimonial-card-modern::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 5rem;
  color: var(--primary-color);
  opacity: 0.1;
  font-family: Georgia, serif;
}

.testimonial-content {
  position: relative;
  z-index: 1;
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.testimonial-author-modern {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.author-info h5 {
  margin-bottom: 0.25rem;
  color: var(--dark);
  font-size: 1rem;
}

.author-info span {
  color: var(--gray);
  font-size: 0.875rem;
}

/* ============================================
   CTA COMPONENTS
   ============================================ */

.cta-section {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.9);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="white" opacity="0.1"/></svg>');
  opacity: 0.5;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
}

.cta-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* ============================================
   PRICING CARD
   ============================================ */

.pricing-card {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  border: 2px solid transparent;
  text-align: center;
}

.pricing-card:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2);
}

.pricing-card.featured {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.pricing-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pricing-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pricing-price span {
  font-size: 1.5rem;
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-card.featured .pricing-features li {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   PROCESS/TIMELINE
   ============================================ */

.process-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

.process-number {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.process-content h4 {
  margin-bottom: 0.5rem;
}

.process-content p {
  color: var(--gray);
  margin-bottom: 0;
}

/* ============================================
   UTILITY CLASSES (Matching Home Style)
   ============================================ */

.text-gradient-red {
  background: none;
  color: var(--primary-color);
  -webkit-text-fill-color: currentColor;
}

.bg-light-section {
  background: var(--light);
}

.bg-dark-section {
  background: var(--dark);
  color: white;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   MODALS + FORMS (Public)
   ============================================ */

.modal-backdrop.show {
  opacity: 0.62;
}

.modal-content {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.modal-header,
.modal-footer {
  border-color: var(--border-color);
}

.modal-header {
  background: rgba(var(--primary-rgb), 0.08);
}

.modal-title {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal .btn-close {
  opacity: 0.7;
}

.modal .btn-close:hover {
  opacity: 1;
}

.modal .form-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.modal .form-control,
.modal .form-select {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.modal .form-control:focus,
.modal .form-select:focus {
  border-color: rgba(var(--primary-rgb), 0.72);
  box-shadow: var(--focus-ring);
}

.modal .form-check-input {
  border-color: var(--border-color);
}

.modal .form-check-input:focus {
  box-shadow: var(--focus-ring);
}

.modal .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-stats {
    gap: 1.5rem;
  }

  .stat-item {
    min-width: 100px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  .process-item {
    flex-direction: column;
    gap: 1rem;
  }

  .pricing-card {
    margin-bottom: 1.5rem;
  }
}
