/* ========================================
   UAV MTC - Component Animations & Utilities
   ======================================== */

/* Fade in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Section divider */
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* Text utilities */
.text-center { text-align: center; }
.text-accent { color: var(--c-accent); }
.text-muted { color: var(--c-text-secondary); }
.text-sm { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Flex helpers */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Section header centered */
.section-header--center {
  text-align: center;
  margin-bottom: 48px;
}

.section-header--center .section__desc {
  margin: 0 auto;
}

/* Venue card */
.venue-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 32px;
  align-items: center;
}

.venue-card__map {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--c-text-secondary);
}

.venue-card__info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.venue-card__info p {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.venue-card__info svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  fill: var(--c-accent);
}

@media (max-width: 768px) {
  .venue-card {
    grid-template-columns: 1fr;
  }
}

/* Contest rules */
.rules-list {
  counter-reset: rule;
  list-style: none;
}

.rules-list li {
  counter-increment: rule;
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text-secondary);
  display: flex;
  gap: 12px;
}

.rules-list li::before {
  content: counter(rule);
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-accent-light);
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Prize grid */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.prize-card {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
}

.prize-card--gold { border-color: #f59e0b; background: rgba(245,158,11,0.05); }
.prize-card--silver { border-color: #9ca3af; background: rgba(156,163,175,0.05); }
.prize-card--bronze { border-color: #b45309; background: rgba(180,83,9,0.05); }

.prize-card__rank {
  font-size: 28px;
  margin-bottom: 8px;
}

.prize-card__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.prize-card__reward {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

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

/* Timeline for about page */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-border);
}

.timeline__item {
  position: relative;
  padding-bottom: 32px;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid #fff;
}

.timeline__item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline__item p {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,107,43,0.15), transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .cta-banner { padding: 40px 24px; }
  .cta-banner h2 { font-size: 24px; }
}

/* Page header for sub pages */
.page-header {
  background: linear-gradient(135deg, #0a0f1f, #1a2a5e);
  padding: calc(var(--nav-h) + 60px) 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
  .page-header { padding: calc(var(--nav-h) + 40px) 0 40px; }
  .page-header h1 { font-size: 28px; }
}

/* Toast notification */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  z-index: var(--z-modal);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(0); }
.toast--success { background: var(--c-success); }
.toast--error { background: var(--c-danger); }
