/* ===== Custom Styles for VEDUTEPLO.RU ===== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Fade-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* Brand logos grayscale */
.brand-logo {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.brand-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Overlay */
.overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Accordion */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-content.open {
  max-height: 500px;
}

.accordion-content.open p.line-clamp-1 {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

/* Accordion arrow rotation */
.accordion-arrow {
  transition: transform 0.3s ease;
}

.accordion-arrow.open {
  transform: rotate(180deg);
}

/* Slider */
.slider-track {
  transition: transform 0.5s ease;
}

/* Timeline connector (desktop) */
.timeline-step::after {
  content: '';
  position: absolute;
  top: 24px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: #E5E7EB;
  z-index: 0;
}

.timeline-step:last-child::after {
  display: none;
}

/* Timeline connector (mobile - vertical) */
@media (max-width: 767px) {
  .timeline-step::after {
    top: 100%;
    left: 24px;
    right: auto;
    width: 2px;
    height: 40px;
  }
}

/* Hero parallax */
.hero-parallax {
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

/* Form input focus */
.form-input:focus {
  outline: none;
  border-color: #F28C28;
  box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.15);
}

/* Star rating */
.star {
  color: #E5E7EB;
}

.star.filled {
  color: #F28C28;
}

/* Masonry gallery */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

@media (max-width: 640px) {
  .masonry-grid {
    grid-template-columns: 1fr;
  }
}

/* Masonry item height variation */
.masonry-item:nth-child(3n+1) {
  grid-row: span 1;
}

.masonry-item:nth-child(3n+2) {
  grid-row: span 1;
}

/* Hide scrollbar on slider */
.slider-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

/* Button pulse effect */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(242, 140, 40, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(242, 140, 40, 0);
  }
}

.btn-pulse {
  animation: pulse 2s infinite;
}

/* ===== MARQUEE / Running Line ===== */
.marquee-wrapper {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  overflow: hidden;
  padding: 16px 24px;
}

.marquee-track {
  display: flex;
  width: fit-content;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 60px;
  padding-right: 60px;
  animation: marqueeScroll 40s linear infinite;
}

.marquee-content .brand-logo {
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== STAGES SECTION - New Design ===== */

/* Step card stagger animation */
.step-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.step-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger delays */
.step-card:nth-child(1) { transition-delay: 0ms; }
.step-card:nth-child(2) { transition-delay: 80ms; }
.step-card:nth-child(3) { transition-delay: 160ms; }
.step-card:nth-child(4) { transition-delay: 240ms; }
.step-card:nth-child(5) { transition-delay: 320ms; }
.step-card:nth-child(6) { transition-delay: 400ms; }
.step-card:nth-child(7) { transition-delay: 480ms; }
.step-card:nth-child(8) { transition-delay: 560ms; }

/* Icon glow on hover */
.step-icon-wrap {
  position: relative;
  transition: transform 0.3s ease;
}

.step-card:hover .step-icon-wrap {
  transform: scale(1.1) rotate(-3deg);
}

.step-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(242, 140, 40, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.step-card:hover .step-icon-wrap::after {
  opacity: 1;
}

/* Step number badge - positioned in top-right of card */
.step-number {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: #F28C28;
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Manrope', sans-serif;
  box-shadow: 0 4px 12px rgba(242, 140, 40, 0.35);
  z-index: 2;
}

/* Step number mobile - inline badge */
.step-number-mobile {
  width: 28px;
  height: 28px;
  background: #F28C28;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  box-shadow: 0 2px 6px rgba(242, 140, 40, 0.3);
}

/* Step card hover lift */
.step-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(48, 52, 63, 0.12);
}

/* Active step indicator */
.step-active-dot {
  width: 8px;
  height: 8px;
  background: #F28C28;
  border-radius: 50%;
  animation: dotPulse 1.5s ease infinite;
}

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

/* Mobile vertical line */
@media (max-width: 767px) {
  .stages-mobile-line {
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #F28C28 0%, #2D7FF9 50%, #F28C28 100%);
    background-size: 100% 200%;
    animation: lineGlowVertical 3s ease infinite;
    opacity: 0.3;
  }

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

  .step-card-mobile {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .step-card-mobile.visible {
    opacity: 1;
    transform: translateX(0);
  }

  .step-card-mobile:nth-child(1) { transition-delay: 0ms; }
  .step-card-mobile:nth-child(2) { transition-delay: 100ms; }
  .step-card-mobile:nth-child(3) { transition-delay: 200ms; }
  .step-card-mobile:nth-child(4) { transition-delay: 300ms; }
  .step-card-mobile:nth-child(5) { transition-delay: 400ms; }
  .step-card-mobile:nth-child(6) { transition-delay: 500ms; }
  .step-card-mobile:nth-child(7) { transition-delay: 600ms; }
  .step-card-mobile:nth-child(8) { transition-delay: 700ms; }
}
