/* Override container for about section to center properly */
#about-us .container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

/* About Services Section - Copied from Frajman */
.services-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "visual list";
  grid-template-rows: auto;
  row-gap: 24px;
  column-gap: 56px;
  align-items: stretch;
  min-height: max(460px, 40vh);
  margin-top: 40px;
}

/* Left: Text Visual (replaces image) */
.service-visual {
  grid-area: visual;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: max(40vh, 460px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  left: 0;
  padding: 60px 80px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 32px;
  backdrop-filter: blur(20px);
}

.about-text-visual {
  position: relative;
  z-index: 2;
}

.about-visual-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.1;
}

.about-visual-accent {
  color: #60a5fa;
}

.about-visual-underline {
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
  margin-bottom: 32px;
  transform-origin: left;
}

.about-visual-desc {
  font-size: 1.25rem;
  color: #cbd5e1;
  line-height: 1.8;
  max-width: 600px;
}

.service-list-prev {
  display: none;
}

/* Right List */
.service-list {
  grid-area: list;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  align-self: stretch;
  padding: 0;
  gap: 8px;
  border-left: none;
  position: static;
  left: 0;
}

.service-list-item {
  background: none;
  border: none;
  padding: 14px 16px;
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.72);
  opacity: 0.82;
  width: 100%;
  border-bottom: 0;
  position: relative;
  text-align: left;
  border-radius: 18px;
  transform: translateX(0) scale(1);
}

.service-list-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(96, 165, 250, 0.32);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 320ms ease;
  pointer-events: none;
}

.service-list-item > * {
  position: relative;
  z-index: 1;
}

.service-list-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: #60a5fa;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms cubic-bezier(0.23, 1, 0.32, 1);
}

.service-list-item .list-num {
  order: 1;
  writing-mode: horizontal-tb;
  transform: none;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.42);
  padding-top: 4px;
}

.service-list-item .list-body {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
}

.service-list-item .list-text {
  display: block;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
  color: #ffffff;
  margin-top: -2px;
}

.service-list-item .list-desc {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.74);
  max-width: 52ch;
}

.service-list-item:last-child {
  border-bottom: 0;
}

.service-list-item:hover,
.service-list-item.is-active {
  color: #ffffff;
  opacity: 1;
  transform: none;
}

.service-list-item:hover::before,
.service-list-item.is-active::before {
  opacity: 1;
  transform: translateY(0);
}

.service-list-item.is-active::after {
  transform: scaleX(1);
}

.service-list-item.is-active .list-num {
  color: #60a5fa;
}

/* ===================================
   CIRCULAR ANIMATION FLOW SYSTEM
   =================================== */

/* Animation states for circular flow */
.service-list-item.flow-active {
  opacity: 1;
  transform: translateX(8px) scale(1.02);
  color: #ffffff;
}

.service-list-item.flow-active::before {
  opacity: 1;
  transform: translateY(0);
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.2);
}

.service-list-item.flow-active::after {
  transform: scaleX(1);
}

.service-list-item.flow-active .list-num {
  color: #60a5fa;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.service-list-item.flow-next {
  opacity: 0.9;
  transform: translateX(4px) scale(1.01);
  color: rgba(255, 255, 255, 0.9);
}

.service-list-item.flow-next::before {
  opacity: 0.6;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.service-list-item.flow-next .list-num {
  color: rgba(96, 165, 250, 0.7);
}

.service-list-item.flow-prev {
  opacity: 0.7;
  transform: translateX(-2px) scale(0.99);
  color: rgba(255, 255, 255, 0.8);
}

.service-list-item.flow-prev::before {
  opacity: 0.3;
  background: rgba(96, 165, 250, 0.05);
}

.service-list-item.flow-prev .list-num {
  color: rgba(96, 165, 250, 0.5);
}

/* Pulse animation for active item */
@keyframes flowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(96, 165, 250, 0.4);
  }
}

.service-list-item.flow-active {
  animation: flowPulse 2s ease-in-out infinite;
}

/* Subtle glow animation for numbers */
@keyframes numberGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.8);
  }
}

.service-list-item.flow-active .list-num {
  animation: numberGlow 1.5s ease-in-out infinite;
}

/* Adjustments for responsive */
@media (max-width: 960px) {
  #about-us .container {
    padding: 0 24px;
  }
  
  .services-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "visual" "list";
    grid-template-rows: auto auto;
    gap: 20px;
    min-height: auto;
  }

  .service-visual {
    min-height: max(35vh, 280px);
    padding: 30px 25px;
    order: -1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .about-visual-title {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 16px;
  }
  
  .about-visual-desc {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
  }
  
  .about-visual-underline {
    width: 80px;
    height: 3px;
    margin-bottom: 20px;
  }
  
  .about-text-visual {
    width: 100%;
    max-width: 100%;
  }

  .service-list-prev {
    display: none;
  }

  .service-list {
    flex-direction: column;
    border-left: none;
    border-top: none;
    padding: 0;
    justify-content: flex-start;
    overflow: visible;
    height: auto;
    margin-top: 0;
  }

  .service-list-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 14px;
    position: relative;
    margin-bottom: 4px;
  }
  
  .service-list-item .list-text {
    font-size: 1.2rem;
    line-height: 1.2;
  }
  
  .service-list-item .list-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 4px;
  }
  
  .service-list-item .list-num {
    font-size: 1.1rem;
    padding-top: 2px;
  }

  .service-list-item .list-text,
  .service-list-item .list-num {
    writing-mode: horizontal-tb;
    transform: none;
    margin: 0;
  }
}
