/* ==========================================================================
   Terra Climatic - Bio-bitumen Page Specific Stylesheet
   ========================================================================== */

:root {
  --accent-red: #A33A31; /* Premium Crimson Red for Problem Section */
  --accent-red-hover: #8C2C23;
  --accent-green: #375E47; /* Premium Forest Green for Solution Section */
  --accent-green-hover: #264632;
  --accent-green-gradient: linear-gradient(135deg, #375E47 0%, #4D7E61 100%);
  --accent-red-gradient: linear-gradient(135deg, #A33A31 0%, #C04E43 100%);
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-dark: rgba(49, 25, 15, 0.05);
  --glass-border: rgba(116, 98, 87, 0.15);
  --glass-border-light: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Hero Section Custom Styling
   ========================================================================== */
.hero-parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 992px) {
  .hero-parallax {
    background-attachment: scroll; /* Disable fixed attachment on mobile for better performance */
  }
}

/* ==========================================================================
   Problem Section (Red Accents)
   ========================================================================== */
.problem-section {
  background-color: var(--bg-primary);
  border-bottom: 1px solid rgba(116, 98, 87, 0.05);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.problem-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.problem-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(163, 58, 49, 0.15);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--accent-red);
  transition: var(--transition-fast);
}

.problem-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-red);
}

.problem-card:hover::before {
  height: 100%;
}

.problem-card .stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent-red);
  margin-bottom: 8px;
}

.problem-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Solution Section (Green Gradients)
   ========================================================================== */
.solution-section {
  background-color: var(--bg-secondary);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.solution-gradient-card {
  background: var(--accent-green-gradient);
  color: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.solution-gradient-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-green) 100%);
  border-radius: var(--border-radius-md);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.solution-gradient-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.solution-gradient-card:hover::after {
  opacity: 1;
}

.solution-gradient-card h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 16px;
  margin-top: 16px;
}

.solution-gradient-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.6;
}

.solution-gradient-card .solution-icon-wrap {
  width: 54px;
  height: 54px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

/* ==========================================================================
   Technology Process Timeline
   ========================================================================== */
.timeline-section {
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.timeline-outer {
  position: relative;
  padding: 60px 0;
  margin-top: 40px;
}

/* Horizontal Timeline Desktop Layout */
.timeline-line-bg {
  position: absolute;
  top: 145px;
  left: 5%;
  width: 90%;
  height: 4px;
  background-color: rgba(116, 98, 87, 0.15);
  z-index: 1;
  border-radius: 2px;
}

.timeline-line-progress {
  position: absolute;
  top: 145px;
  left: 5%;
  width: 0; /* Animated by GSAP on Scroll */
  height: 4px;
  background-color: var(--accent-gold);
  z-index: 2;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.timeline-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}

.timeline-node {
  width: 14.5%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-icon-box {
  width: 70px;
  height: 70px;
  background-color: var(--white);
  border: 4px solid var(--bg-primary);
  box-shadow: var(--shadow-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: var(--transition-slow);
  cursor: pointer;
  z-index: 4;
}

.timeline-node:hover .timeline-icon-box,
.timeline-node.active .timeline-icon-box {
  background-color: var(--text-primary);
  color: var(--white);
  border-color: var(--accent-gold);
  transform: scale(1.15);
  box-shadow: var(--shadow-md);
}

.timeline-content-box {
  margin-top: 24px;
  padding: 16px;
  background-color: var(--accent-light);
  border: 1px solid rgba(116, 98, 87, 0.08);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.timeline-node:hover .timeline-content-box {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
}

.timeline-content-box h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.timeline-content-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Secondary Timelines for outputs */
.coproducts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  position: relative;
}

.coproduct-card {
  background-color: var(--white);
  padding: 32px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(116, 98, 87, 0.08);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition-slow);
}

.coproduct-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.coproduct-card .icon-circle {
  width: 50px;
  height: 50px;
  background-color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.coproduct-card h4 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.coproduct-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Product Section Cards
   ========================================================================== */
.products-section {
  background-color: var(--bg-secondary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-premium-card {
  background: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(116, 98, 87, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-slow);
}

.product-premium-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.product-card-img {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.product-premium-card:hover .product-card-img img {
  transform: scale(1.08);
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.product-card-category {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 12px;
}

.product-card-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.product-card-apps {
  list-style: none;
  margin-bottom: 24px;
  margin-top: auto;
  border-top: 1px solid rgba(116, 98, 87, 0.08);
  padding-top: 16px;
}

.product-card-apps li {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-card-apps li i {
  color: var(--accent-gold);
  font-size: 0.8rem;
}

.btn-card-action {
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* ==========================================================================
   Turnkey Project Services
   ========================================================================== */
.services-section {
  background-color: var(--bg-primary);
  position: relative;
}

.services-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.service-timeline-card {
  background-color: var(--white);
  padding: 36px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(116, 98, 87, 0.08);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition-slow);
}

.service-timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.service-card-step {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-card-step::after {
  content: '';
  height: 2px;
  flex-grow: 1;
  background-color: rgba(177, 154, 122, 0.2);
}

.service-timeline-card h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-timeline-card h4 i {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.service-timeline-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Why Choose Terra
   ========================================================================== */
.why-section {
  background-color: var(--bg-secondary);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.why-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(116, 98, 87, 0.05);
  transition: var(--transition-slow);
}

.why-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.why-card-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  transition: var(--transition-fast);
}

.why-card:hover .why-card-icon {
  background-color: var(--text-primary);
  color: var(--white);
}

.why-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.why-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ==========================================================================
   Industry Applications Section
   ========================================================================== */
.apps-section {
  background-color: var(--bg-primary);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.app-card {
  background-color: var(--white);
  padding: 32px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(116, 98, 87, 0.08);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-card:hover {
  background-color: var(--accent-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.app-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-card-header i.app-icon {
  font-size: 1.75rem;
  color: var(--accent-gold);
}

.app-card-header span.arrow {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  transform: translateX(0);
}

.app-card:hover .app-card-header span.arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

.app-card h4 {
  font-size: 1.2rem;
  margin-top: 8px;
}

.app-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   FAQ Section Accordions
   ========================================================================== */
.faq-section {
  background-color: var(--bg-primary);
  border-top: 1px solid rgba(116, 98, 87, 0.05);
  padding-bottom: 120px;
}

.faq-wrapper {
  max-width: 800px;
  margin: 48px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(116, 98, 87, 0.08);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--accent-gold);
}

.faq-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.faq-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.faq-icon-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.faq-item.active .faq-icon-toggle {
  transform: rotate(45deg);
  background-color: var(--text-primary);
  color: var(--white);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
  padding: 0 24px;
}

.faq-item.active .faq-content {
  padding: 0 24px 24px 24px;
}

.faq-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 992px) {
  .problem-grid, .services-timeline-grid, .why-grid, .apps-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .problem-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .solution-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  /* Timeline Transformation for Mobile (Horizontal -> Vertical) */
  .timeline-line-bg {
    top: 5%;
    left: 24px;
    width: 4px;
    height: 90%;
  }

  .timeline-line-progress {
    top: 5%;
    left: 24px;
    width: 4px;
    height: 0; /* Animated vertically by height in mobile JS */
    transition: height 0.1s linear;
  }

  .timeline-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-left: 50px;
  }

  .timeline-node {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    text-align: left;
  }

  .timeline-icon-box {
    position: absolute;
    left: 8px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .timeline-content-box {
    margin-top: 0;
    width: 100%;
  }
  
  .coproducts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .problem-stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .products-grid, .solution-grid {
    grid-template-columns: 1fr;
  }
  
  .faq-header h4 {
    font-size: 0.95rem;
  }
}
