@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #0a4a91;
  --secondary-color: #007bff;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --text-color: #333;
  --border-radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* === BASE STYLES === */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Justify text in paragraphs within the main content */
main.container p {
    text-align: justify;
}

/* === NAVIGATION === */
.navbar {
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.1);
}

.nav-link {
  font-weight: 600;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--secondary-color) !important;
}

/* === HERO SECTIONS === */
/* Main Hero Section - Used on Home, Dataset, Registration, etc. */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(images/cover_image.jpg) center/cover no-repeat;
  padding: 6rem 1rem;
  animation: fadeIn 1s ease-in-out;
}

.hero h1 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.hero a.text-white {
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.hero a.text-white:hover {
  opacity: 0.8;
}

/* Timeline-specific hero (centered text) */
.hero-timeline {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(images/cover_image.jpg) center/cover no-repeat;
  text-align: center;
  padding: 5rem 1rem;
}

.hero-timeline h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero-timeline .lead {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto 1rem;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* === MAIN CONTENT === */
main.container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

section {
  background: #fff;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  animation: slideUp 0.5s ease-in-out;
}

h2.h4, h2.h5 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

/* === COMPONENTS === */
.table {
  box-shadow: var(--shadow);
}

.table thead {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary {
  background-color: var(--secondary-color);
  border: none;
  transition: var(--transition);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.card {
  transition: var(--transition);
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.sponsors-grid img {
  max-width: 150px;
  transition: var(--transition);
  filter: grayscale(100%);
}

.sponsors-grid img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* === TIMELINE SPECIFIC (from timeline.css) === */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 30px);
}

.timeline-item:nth-child(even) {
  justify-content: flex-start;
  padding-left: calc(50% + 30px);
  padding-right: 0;
}

.timeline-content {
  background: white;
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 5px solid var(--primary-color);
  width: 100%;
  max-width: 400px;
  position: relative;
  transition: var(--transition);
}

.timeline-item:nth-child(even) .timeline-content {
  border-left: none;
  border-right: 5px solid var(--secondary-color);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.timeline-date {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-item:nth-child(even) .timeline-date {
  color: var(--secondary-color);
}

.timeline-milestone {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.timeline-desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left; /* Specific override for timeline */
}

.timeline-content::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  top: 30px;
  right: -42px;
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-content::before {
  right: auto;
  left: -42px;
  border-color: var(--secondary-color);
}

.current-phase {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
  border-left: 5px solid #1976d2 !important;
}

.badge-phase {
  font-size: 0.75rem;
  padding: 4px 10px;
  margin-left: 10px;
}

/* === FOOTER === */
.footer {
  background-color: var(--dark-color);
}

.footer img {
    max-width: 200px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
  .hero, .hero-timeline {
    padding: 4rem 1rem;
  }
  
  .hero h1, .hero-timeline h1 {
    font-size: 2.2rem;
  }
  
  .hero .lead, .hero-timeline .lead {
    font-size: 1.3rem;
  }
  
  /* Timeline responsive */
  .timeline::before {
    left: 30px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 2rem 1rem;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .hero, .hero-timeline {
    padding: 3rem 1rem;
  }
  
  .hero h1, .hero-timeline h1 {
    font-size: 1.8rem;
  }
  
  .hero .lead, .hero-timeline .lead {
    font-size: 1.1rem;
  }
  
  .hero .text-lg-end {
    text-align: center !important;
    margin-top: 2rem;
  }
  
  /* Timeline mobile adjustments */
  .timeline-item,
  .timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 70px;
    padding-right: 0;
  }
  
  .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -40px;
    right: auto;
  }
}

@media (max-width: 576px) {
  .hero-timeline h1 {
    font-size: 1.6rem;
  }
  
  .timeline-content {
    padding: 20px 15px;
  }
  
  .timeline-date {
    font-size: 1rem;
  }
  
  .timeline-milestone {
    font-size: 1rem;
  }
}

/* Prizes-specific styles */
/* Sponsors grid - moved from inline */
.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.sponsors-grid img {
    max-width: 150px;
    transition: var(--transition);
    filter: grayscale(100%);
}

.sponsors-grid img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Section title styling for consistency */
.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}