/* ==========================================================================
   AI Services Page Styles - Matching existing page patterns
   ========================================================================== */

/* General Text Visibility Fix */
.ai-hero-section *,
.ai-service-section *,
.ai-service-nav *,
.ai-cta-section *,
.ai-tech-section * {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fix for animation classes */
.ai-hero-section .tp_fade_anim,
.ai-service-section .tp_fade_anim,
.ai-cta-section .tp_fade_anim,
.ai-tech-section .tp_fade_anim {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Hero Section → base in service-common.css */
/* Page-specific overrides */
.ai-hero-top {
  display: block;
}

.ai-hero-subtitle {
  display: block;
  font-family: p_r !important;
  font-size: 18px;
  font-weight: 400 !important;
  line-height: 1.7;
  color: #636368 !important;
  max-width: 600px;
  text-align: center;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin: 0 auto;
}

.ai-hero-bottom {
  align-items: center;
}

.ai-hero-image-col {
  flex: 1;
}

.ai-hero-svg-container {
  max-width: 500px;
  margin: 0 auto;
}

.ai-hero-content-col {
  flex: 1;
}

.ai-hero-content-title {
  color: #141414 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.ai-hero-description {
  color: #636368 !important;
  margin-bottom: 15px;
  opacity: 1 !important;
  visibility: visible !important;
}

.ai-hero-features {
  margin: 30px 0;
}

.ai-hero-feature-icon svg {
  width: 14px;
  height: 14px;
  color: #ce403d;
}

.ai-hero-feature-text {
  color: #141414;
  font-weight: 500;
}

/* ==================== Service Navigation ==================== */
.ai-service-nav {
  background: #fff;
  padding: 15px 0;
  z-index: 99;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #eee;
}

.ai-nav-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-nav-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f8f9fb;
  border-radius: 8px;
  color: #141414;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.ai-nav-item a:hover,
.ai-nav-item a.active {
  background: rgba(206, 64, 61, 0.1);
  border-color: #ce403d;
  color: #ce403d;
}

.ai-nav-item a svg {
  width: 18px;
  height: 18px;
}

/* ==================== Service Sections ==================== */
.ai-service-section {
  scroll-margin-top: 100px;
  padding-top: 80px;
}

.ai-section-alt {
  background: #f8f9fb;
}

.ai-services-header {
  text-align: center;
  margin-bottom: 50px;
}

/* Matching landing.css .tp-section-title */
.ai-section-title {
  font-family: var(--tp-ff-platform);
  letter-spacing: 1px;
  font-weight: 500;
  font-size: 50px;
  line-height: normal;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 15px;
  background-image: linear-gradient(90deg,
      #ce403d 0%,
      #ce403d 40%,
      #2a2f36 50%,
      #ce403d 60%,
      #ce403d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  opacity: 1 !important;
  visibility: visible !important;
}

.ai-services-subtitle {
  font-size: 18px;
  color: #636368 !important;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ==================== Service Cards Grid ==================== */
.ai-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.ai-service-card {
  background: #fff;
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%;
}

.ai-section-alt .ai-service-card {
  background: #fff;
}

.ai-service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #ce403d 0%, #e85a57 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.ai-service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.ai-service-card:hover::before {
  transform: scaleX(1);
}

.ai-service-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.ai-service-icon {
  width: 64px;
  height: 64px;
  background: rgba(206, 64, 61, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.ai-service-card:hover .ai-service-icon {
  background: linear-gradient(135deg, #ce403d 0%, #e85a57 100%);
}

.ai-service-icon svg {
  width: 30px;
  height: 30px;
  color: #ce403d;
  transition: all 0.3s ease;
}

.ai-service-card:hover .ai-service-icon svg {
  color: #fff;
}

/* ==================== Animation B - Subtle Lift Effect (cs-challenge-card style) ==================== */
.ai-service-card.animation-b {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #eef0f4;
}

.ai-service-card.animation-b::before {
  display: none;
}

.ai-service-card.animation-b:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(206, 64, 61, 0.1);
  border-color: rgba(206, 64, 61, 0.2);
}

.ai-service-card.animation-b:hover .ai-service-icon {
  background: #ce403d;
}

.ai-service-card.animation-b:hover .ai-service-icon svg {
  color: #fff;
}

/* ==================== Animation C - Lift & Border Glow Effect ==================== */
.ai-service-card.animation-c {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #eef0f4;
}

.ai-service-card.animation-c::before {
  height: 100%;
  background: radial-gradient(ellipse at center bottom, rgba(206, 64, 61, 0.08) 0%, transparent 70%);
  transform: scale(0);
  transform-origin: center;
  border-radius: 16px;
}

.ai-service-card.animation-c:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(206, 64, 61, 0.2);
  border-color: rgba(206, 64, 61, 0.5);
}

.ai-service-card.animation-c:hover::before {
  transform: scale(1);
}

.ai-service-card.animation-c:hover .ai-service-icon {
  background: #ce403d;
  transform: scale(1.1);
}

.ai-service-card.animation-c:hover .ai-service-icon svg {
  color: #fff;
}

/* ==================== Animation D - Gradient Overlay & Rotate Effect ==================== */
.ai-service-card.animation-d {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ai-service-card.animation-d::before {
  height: 100%;
  background: linear-gradient(135deg, rgba(206, 64, 61, 0.08) 0%, transparent 100%);
  opacity: 0;
  transform: none;
  border-radius: 16px;
}

.ai-service-card.animation-d:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: 0 15px 40px rgba(206, 64, 61, 0.12);
  border-color: rgba(206, 64, 61, 0.3);
}

.ai-service-card.animation-d:hover::before {
  opacity: 1;
}

.ai-service-card.animation-d:hover .ai-service-icon {
  background: linear-gradient(135deg, #ce403d 0%, #e85a57 100%);
  transform: rotate(-10deg) scale(1.1);
}

.ai-service-card.animation-d:hover .ai-service-icon svg {
  color: #fff;
}

.ai-service-card.animation-d:hover .ai-service-title {
  color: #ce403d !important;
}

/* N8N Icon - larger text */
.ai-service-icon.n8n-icon svg {
  width: 40px;
  height: 40px;
}

.ai-service-title {
  font-size: 20px;
  font-weight: 600;
  color: #141414 !important;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
  line-height: 1.4;
}

.ai-service-description {
  font-size: 15px;
  color: #636368 !important;
  line-height: 1.7;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
  flex-grow: 1;
}

/* ==================== Process Steps ==================== */
.ai-process-wrapper {
  margin-top: 60px;
}

.ai-process-header {
  text-align: center;
  margin-bottom: 40px;
}

.ai-process-title {
  font-size: 28px;
  font-weight: 700;
  color: #141414;
}

.ai-process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
}

/* Continuous line from step 1 to step 4 */
.ai-process-steps::before {
  content: '';
  position: absolute;
  top: 35px;
  left: calc(12.5% + 35px);
  right: calc(12.5% + 35px);
  height: 2px;
  background: linear-gradient(90deg, #ce403d, #e85a57);
  opacity: 0.3;
  z-index: 0;
}

.ai-process-step {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.ai-process-number {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #ce403d 0%, #e85a57 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
}

.ai-process-step h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #141414;
}

.ai-process-step p {
  font-size: 14px;
  color: #636368;
  line-height: 1.6;
  margin: 0;
}

/* ==================== Use Cases ==================== */
.ai-use-cases-wrapper {
  margin-top: 60px;
}

.ai-use-cases-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #141414;
  margin-bottom: 30px;
}

.ai-use-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ai-use-case {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.ai-use-case:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-color: #ce403d;
}

.ai-use-case svg {
  width: 22px;
  height: 22px;
  color: #ce403d;
  flex-shrink: 0;
}

.ai-use-case span {
  font-size: 15px;
  color: #141414;
  font-weight: 500;
}

/* ==================== CTA Section ==================== */
.ai-cta-section {
  background: linear-gradient(135deg, #ce403d 0%, #e85a57 50%, #b33835 100%);
  position: relative;
  overflow: hidden;
}

.ai-cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.ai-cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.ai-cta-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.ai-cta-text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 35px;
  line-height: 1.7;
}

.ai-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 40px;
  background: #fff;
  color: #ce403d;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ai-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  color: #b33835;
}

.ai-cta-btn svg {
  width: 20px;
  height: 20px;
}

/* ==================== Technology Section ==================== */
.ai-tech-section {
  background: #f8f9fb;
}

.ai-tech-header {
  text-align: center;
  margin-bottom: 40px;
}

.ai-tech-subtitle {
  font-size: 18px;
  color: #636368;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ==================== Responsive Styles ==================== */
@media (max-width: 1199px) {
  .ai-hero-title {
    font-size: 56px;
  }

  .ai-section-title {
    font-size: 42px;
  }

  .ai-process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-process-steps::before {
    display: none;
  }

  .ai-use-cases {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1199px) {
  .ai-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .ai-hero-section {
    padding: 120px 0 60px;
  }

  .ai-hero-title {
    font-size: 48px;
  }

  .ai-hero-bottom {
    flex-direction: column;
    gap: 40px;
  }

  .ai-hero-image-col {
    order: -1;
  }

  .ai-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-nav-list {
    gap: 8px;
  }

  .ai-nav-item a {
    padding: 10px 14px;
    font-size: 13px;
  }

  .ai-cta-title {
    font-size: 32px;
  }
}

@media (max-width: 767px) {
  .ai-hero-title {
    font-size: 36px;
  }

  .ai-hero-subtitle {
    font-size: 16px;
  }

  .ai-hero-content-title {
    font-size: 26px;
  }

  .ai-hero-features {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-section-title {
    font-size: 32px;
  }

  .ai-services-grid {
    grid-template-columns: 1fr;
  }

  .ai-process-steps {
    grid-template-columns: 1fr;
  }

  .ai-use-cases {
    grid-template-columns: 1fr;
  }

  .ai-cta-title {
    font-size: 26px;
  }

  .ai-nav-item a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .ai-nav-item a svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .ai-hero-section {
    padding: 100px 0 50px;
  }

  .ai-hero-title {
    font-size: 32px;
  }

  .ai-section-title {
    font-size: 28px;
  }

  .ai-cta-btn {
    padding: 14px 30px;
    font-size: 15px;
  }

  .ai-service-card {
    padding: 25px 20px;
  }

  .ai-service-icon {
    width: 56px;
    height: 56px;
  }

  .ai-service-icon svg {
    width: 26px;
    height: 26px;
  }

  .ai-service-title {
    font-size: 18px;
  }

  .ai-service-description {
    font-size: 14px;
  }
}