* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    sans-serif;
  background: #fafaf9;
  color: #1f2937;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Updated keyframe animations for smoother, more refined entrance effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero Section with refined styling */
.hero-section {
  padding: 100px 20px 80px;
  background: linear-gradient(135deg, #f5f1eb 0%, #f9f7f4 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e5ddd3;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(168, 130, 100, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(168, 130, 100, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #e5ddd3;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #78643a;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
  transition: all 0.3s ease;
}

.hero-badge:hover {
  border-color: #a88264;
  box-shadow: 0 4px 12px rgba(168, 130, 100, 0.1);
}

.badge-icon {
  font-size: 18px;
}

.hero-title {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #1f2937;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  letter-spacing: -0.5px;
}

.hero-description {
  font-size: 18px;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 48px;
  color: #6b7280;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  animation: fadeInUp 0.8s ease-out 0.5s both;
  padding-top: 60px;
  border-top: 1px solid #e5ddd3;
}

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

.stat-number {
  font-size: 44px;
  font-weight: 700;
  color: #78643a;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 500;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #1f2937;
  color: white;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.15);
}

.btn-primary:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.25);
}

.btn-secondary {
  background: white;
  color: #1f2937;
  border: 1.5px solid #e5ddd3;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
}

.btn-secondary:hover {
  border-color: #a88264;
  background: #fafaf9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 130, 100, 0.15);
}

.btn-telegram {
  background: #0088cc;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
}

.btn-telegram:hover {
  background: #006aa3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.3);
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

/* Container and sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

section:nth-child(2) {
  animation-delay: 0.1s;
}

section:nth-child(3) {
  animation-delay: 0.2s;
}

section:nth-child(4) {
  animation-delay: 0.3s;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.8s ease-out;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-description {
  font-size: 18px;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Features Section */
.features-section {
  background: white;
  padding: 100px 0;
  border-bottom: 1px solid #e5e7eb;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.feature-card {
  background: #fafaf9;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid #e5ddd3;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.1s;
}
.feature-card:nth-child(2) {
  animation-delay: 0.2s;
}
.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}
.feature-card:nth-child(4) {
  animation-delay: 0.4s;
}
.feature-card:nth-child(5) {
  animation-delay: 0.5s;
}
.feature-card:nth-child(6) {
  animation-delay: 0.6s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #a88264;
  box-shadow: 0 12px 24px rgba(168, 130, 100, 0.1);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 24px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.feature-description {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

/* How it works section */
.how-it-works-section {
  background: linear-gradient(135deg, #f5f1eb 0%, #faf8f5 100%);
  padding: 100px 0;
  border-bottom: 1px solid #e5ddd3;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.step-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid #e5ddd3;
  position: relative;
  transition: all 0.4s ease;
  opacity: 0;
}

.step-card:nth-child(1) {
  animation: slideInLeft 0.8s ease-out 0.1s forwards;
}
.step-card:nth-child(2) {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
}
.step-card:nth-child(3) {
  animation: slideInRight 0.8s ease-out 0.3s forwards;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: #a88264;
  box-shadow: 0 12px 24px rgba(168, 130, 100, 0.1);
}

.step-number {
  font-size: 64px;
  font-weight: 700;
  color: #78643a;
  opacity: 0.15;
  position: absolute;
  top: 20px;
  right: 20px;
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.step-description {
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

/* CTA section */
.cta-section {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  text-align: center;
  padding: 100px 20px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid #374151;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.cta-content {
  position: relative;
  z-index: 1;
  animation: scaleIn 0.8s ease-out;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.cta-description {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Role-based hero sections */
.hero-student {
  background: linear-gradient(135deg, #e8f0f4 0%, #f0f5f8 100%);
}

.hero-teacher {
  background: linear-gradient(135deg, #f4ede4 0%, #f8f2eb 100%);
}

.hero-methodist {
  background: linear-gradient(135deg, #ede8df 0%, #f5f0e6 100%);
}

/* Card links */
.card-link {
  text-decoration: none;
  color: inherit;
}

/* Statistics cards */
.statistics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.stat-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e5ddd3;
  text-align: center;
  border-left: 3px solid #78643a;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-left-color: #a88264;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.stat-label {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 12px;
  font-weight: 500;
}

.stat-value {
  font-size: 40px;
  font-weight: 700;
  color: #78643a;
}

/* Table container */
.table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5ddd3;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: #f9f7f4;
  border-bottom: 1px solid #e5ddd3;
}

.data-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid #f0ebe4;
  color: #6b7280;
  font-size: 14px;
}

.data-table tbody tr:hover {
  background: #fafaf9;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Competition grid */
.competitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.competition-card {
  background: white;
  border: 1px solid #e5ddd3;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.competition-card:hover {
  border-color: #a88264;
  box-shadow: 0 8px 16px rgba(168, 130, 100, 0.1);
  transform: translateY(-2px);
}

.competition-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.competition-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 20px;
}

.comp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.comp-status {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  background: #f0ebe4;
  color: #78643a;
}

.comp-status.active {
  background: #dbeafe;
  color: #1e40af;
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 42px;
  }

  .hero-description {
    font-size: 16px;
  }

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

  .features-grid,
  .steps-grid,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .step-card {
    padding: 32px 24px;
  }

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

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 0 !important;
  }

  .hero-section {
    padding: 60px 20px;
  }

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

  .hero-description {
    font-size: 15px;
  }

  .section-title {
    font-size: 26px;
  }

  .feature-icon {
    font-size: 40px;
  }

  .step-number {
    font-size: 48px;
  }

  .cta-title {
    font-size: 28px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-stats {
    gap: 24px;
    border-top: none;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
