/* Main CSS - Core layout and components */

/* Section Base Styles */
.section {
  padding: var(--space-20) 0;
  position: relative;
}

.section:nth-child(even) {
  background: rgba(219, 234, 254, 0.3);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.section-tag {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  color: var(--text-dark);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-gray);
  margin-bottom: 0;
  font-weight: var(--font-medium);
}

/* Hero Visual Elements */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.hero-stats {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  min-width: 400px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--primary-blue);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-gray);
  font-weight: var(--font-medium);
  margin-top: var(--space-1);
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.about-card {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left var(--transition-slow);
}

.about-card:hover::before {
  left: 100%;
}

.about-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.about-card .card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-6);
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.about-card h3 {
  color: var(--text-dark);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.about-card p {
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

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

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-success);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-bottom: var(--space-6);
}

.service-card h3 {
  color: var(--text-dark);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.service-card > p {
  color: var(--text-gray);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.service-features {
  list-style: none;
  margin-bottom: var(--space-6);
}

.service-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-gray);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.service-features li::before {
  content: '✓';
  width: 16px;
  height: 16px;
  background: var(--success-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  flex-shrink: 0;
}

.service-link {
  color: var(--light-blue);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--transition-fast);
  display: none;
}

.service-link:hover {
  gap: var(--space-3);
}

.service-link::after {
  content: '→';
  font-size: var(--text-lg);
}

/* Process Section */
.section.process {
  background: var(--text-dark);
  color: var(--white);
}

.section.process .section-tag {
  background: var(--gradient-success);
}

.section.process .section-title {
  color: var(--white);
}

.section.process .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Desktop Timeline Layout */
.process-timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  z-index: 1;
}

.progress-line {
  width: 100%;
  height: 0%;
  background: var(--gradient-success);
  border-radius: var(--radius-full);
  transition: height 0.8s ease-out;
}

.process-steps {
  position: relative;
  z-index: 2;
}

.process-step {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-20);
  min-height: 200px;
}

/* Desktop: Alternating left/right layout */
@media (min-width: 769px) {
  .process-step {
    justify-content: center;
  }
  
  /* Odd steps (1, 3, 5) - content on left, marker center, empty right */
  .process-step:nth-child(odd) {
    flex-direction: row;
  }
  
  .process-step:nth-child(odd) .step-content {
    order: 1;
    margin-right: var(--space-8);
    text-align: right;
  }
  
  .process-step:nth-child(odd) .step-marker {
    order: 2;
  }
  
  .process-step:nth-child(odd)::after {
    content: '';
    order: 3;
    flex: 1;
    max-width: 300px;
  }
  
  /* Even steps (2, 4, 6) - empty left, marker center, content on right */
  .process-step:nth-child(even) {
    flex-direction: row;
  }
  
  .process-step:nth-child(even)::before {
    content: '';
    order: 1;
    flex: 1;
    max-width: 300px;
  }
  
  .process-step:nth-child(even) .step-marker {
    order: 2;
  }
  
  .process-step:nth-child(even) .step-content {
    order: 3;
    margin-left: var(--space-8);
    text-align: left;
  }
}

/* Mobile: Simple vertical layout */
@media (max-width: 768px) {
  .timeline-progress {
    left: 30px;
    transform: none;
  }
  
  .process-step {
    flex-direction: row;
    align-items: flex-start;
    padding-left: var(--space-16);
  }
  
  .process-step .step-marker {
    order: 1;
    margin-right: var(--space-6);
    margin-top: 0;
    position: absolute;
    left: 0;
  }
  
  .process-step .step-content {
    order: 2;
    flex: 1;
    text-align: left;
    margin: 0;
  }
}

.step-marker {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  box-shadow: 0 0 0 8px var(--text-dark);
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.step-marker.active {
  background: var(--gradient-success);
  box-shadow: 0 0 0 8px var(--text-dark), 0 0 20px rgba(16, 185, 129, 0.5);
  transform: scale(1.1);
}

.step-marker.completed {
  background: var(--gradient-success);
  opacity: 0.8;
}

.step-marker.pending {
  background: rgba(255, 255, 255, 0.3);
  opacity: 0.5;
}

.step-number {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--white);
}

.step-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  max-width: 400px;
  transition: all var(--transition-normal);
}

.step-content.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.step-content.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.step-content.pending {
  opacity: 0.6;
}

.step-content h3 {
  color: var(--white);
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
}

.step-content p {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.step-image {
  height: 120px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  margin-top: var(--space-4);
  transition: all var(--transition-normal);
}

.process-step.active .step-image {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Clients Section */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
}

.client-item {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-normal);
}

.client-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.client-logo {
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.client-item p {
  color: var(--text-gray);
  font-size: var(--text-sm);
  margin-bottom: 0;
  font-weight: var(--font-medium);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.contact-details h4 {
  color: var(--text-dark);
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.contact-details p {
  color: var(--text-gray);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.contact-details p:last-child {
  margin-bottom: 0;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: var(--font-semibold);
  color: var(--text-dark);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: var(--space-20) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--space-6);
  font-size: var(--text-lg);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-3);
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-logo {
  margin-bottom: var(--space-6);
}

.footer-logo .logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.footer-logo .logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-logo .logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-stats {
    min-width: 350px;
    padding: var(--space-6);
    gap: var(--space-4);
  }
  
  .stat-number {
    font-size: var(--text-2xl);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }
  
  .section-header {
    margin-bottom: var(--space-12);
  }
  
  .hero-stats {
    position: static;
    transform: none;
    min-width: auto;
    margin-top: var(--space-8);
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .about-grid,
  .services-grid,
  .clients-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .process-step {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-6);
  }
  
  .process-step:nth-child(even) {
    direction: ltr;
  }
  
  .timeline-progress {
    display: none;
  }
  
  .step-marker {
    margin: 0 auto;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .footer-logo .logo {
    justify-content: center;
    align-items: center;
  }
  
  .footer-logo .logo-icon {
    width: 40px;
    height: 40px;
  }
  
  .footer-logo .logo-text {
    font-size: var(--text-2xl);
    margin-left: var(--space-3);
  }
}

@media (max-width: 480px) {
  .hero-features {
    grid-template-columns: 1fr;
  }
  
  .feature-item {
    justify-content: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    padding: var(--space-6);
  }
  
  .contact-form {
    padding: var(--space-6);
  }
  
  .footer-logo .logo {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .footer-logo .logo-icon {
    width: 48px;
    height: 48px;
  }
  
  .footer-logo .logo-text {
    font-size: var(--text-xl);
    text-align: center;
  }
  
  .back-to-top {
    bottom: var(--space-6);
    right: var(--space-6);
    width: 45px;
    height: 45px;
  }
}
