/* CSS Reset & Variables */
:root {
  --primary-blue: #003366;
  --accent-orange: #FF6B00;
  --accent-orange-hover: #E65C00;
  --text-dark: #1A1A1A;
  --text-light: #F8F9FA;
  --bg-day: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  --bg-night: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-speed: 0.3s;
  --header-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-day);
  color: var(--text-dark);
  transition: background 1s ease, color 0.5s ease;
  overflow-x: hidden;
  line-height: 1.6;
}

body.night-mode {
  background: var(--bg-night);
  color: var(--text-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) ease;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background var(--transition-speed) ease;
}

body.night-mode header {
  background: rgba(15, 32, 39, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.night-mode .logo-area a {
  color: var(--text-light);
}

.logo-area span {
  color: var(--accent-orange);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav ul li a {
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--accent-orange);
}

.btn-primary {
  background: var(--accent-orange);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
  transition: transform var(--transition-speed) ease, background var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-blue) !important;
  border: 2px solid var(--primary-blue);
  padding: 8px 22px;
  border-radius: 30px;
  font-weight: 700;
  transition: all var(--transition-speed) ease;
  display: inline-block;
}

body.night-mode .btn-secondary {
  color: var(--text-light) !important;
  border-color: var(--text-light);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: #fff !important;
}

body.night-mode .btn-secondary:hover {
  background: var(--text-light);
  color: var(--primary-blue) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-blue);
}

body.night-mode .mobile-menu-btn {
  color: var(--text-light);
}

/* Hero Section */
.hero {
  padding-top: 60px;
  padding-bottom: 80px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding-inline: 20px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary-blue);
}

body.night-mode .hero h1 {
  color: var(--text-light);
}

.hero p.mission {
  font-size: 1.25rem;
  margin-bottom: 40px;
  color: #555;
  max-width: 800px;
}

body.night-mode .hero p.mission {
  color: #ccc;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-orange);
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Main Content Wrapper for Bricks */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Section Stylings */
section.category,
section.cause,
section.testimonials {
  padding: 40px 0;
}

/* The Brick Animation System */
.brick {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.08);
  border: 1px solid rgba(0, 51, 102, 0.05);

  /* Initial State: Offset and transparent */
  opacity: 0;
  transform: translateY(80px) rotate(-1deg);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
  position: relative;
  overflow: hidden;
}

body.night-mode .brick {
  background: rgba(26, 38, 57, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.brick:nth-child(even) {
  transform: translateY(80px) rotate(1deg);
}

/* Active State: Assembled */
.brick.in-view {
  transform: translateY(0) rotate(0);
  opacity: 1;
  padding: 40px;
}

/* Splash of "Cement" effect when assembling */
.brick::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--accent-orange);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
  mix-blend-mode: color;
  /* Or overlay */
}

.brick.cement-splash::after {
  animation: splashFade 1s forwards;
}

@keyframes splashFade {
  0% {
    opacity: 0;
  }

  30% {
    opacity: 0.15;
  }

  100% {
    opacity: 0;
  }
}

.brick-content {
  position: relative;
  z-index: 2;
}

/* Specific component styles */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* Category Cards */
.category-card {
  background: rgba(0, 51, 102, 0.03);
  padding: 24px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-orange);
  margin-bottom: 20px;
}

body.night-mode .category-card {
  background: rgba(255, 255, 255, 0.05);
}

.category-card h3 {
  color: var(--primary-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.night-mode .category-card h3 {
  color: var(--text-light);
}

.price {
  font-size: 1.25rem;
  color: var(--accent-orange);
  font-weight: 800;
}

.price strike {
  font-size: 0.9rem;
  color: #888;
  font-weight: 400;
  margin-right: 8px;
}

.date-deadline {
  font-size: 0.9rem;
  color: #d32f2f;
  font-weight: 600;
  margin-top: 10px;
}

body.night-mode .date-deadline {
  color: #ff5252;
}

/* Footer */
footer {
  background: var(--primary-blue);
  color: white;
  padding: 40px 20px 0px;
}

body.night-mode footer {
  background: #0a1519;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-logo-col .logo-area a {
  color: white;
  font-size: 1.8rem;
}

.footer-logo-col .logo-area span {
  color: var(--accent-orange);
}

.footer-tagline {
  margin-top: 15px;
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 300px;
}

.footer-col h3 {
  font-size: 1.25rem;
  margin-bottom: 25px;
  color: white;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-orange);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
  opacity: 0.85;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
}

.footer-links a {
  color: white;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-orange);
  padding-left: 5px;
}

.footer-bottom {
  /*max-width: 1200px;*/
  margin: 0;
  /*padding-top: 30px;*/
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Footer Responsive */
@media (max-width: 992px) {
  .footer-container {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  footer {
    padding: 60px 20px 30px;
  }

  .footer-col {
    flex: 1 1 100%;
    margin-bottom: 30px;
  }

  .footer-bottom {
    margin-top: 30px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .nav-container nav ul {
    display: none;
    /* Mobile menu hidden by default */
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }

  body.night-mode .nav-container nav ul {
    background: rgba(15, 32, 39, 0.98);
  }

  .nav-container nav ul.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* --- Extracted Styles & Utilities --- */

/* Utility Classes */
.text-center {
  text-align: center !important;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.p-20 {
  padding: 20px;
}

/* Internal Pages Hero */
.hero-internal {
  min-height: 40vh;
  padding-bottom: 40px;
  padding-top: 140px;
}

/* Regulations List */
.regulations-list {
  padding-left: 20px;
  line-height: 1.8;
}

/* Prize Money Specifics */
.gold-card {
  border-left-color: #FFD700;
  background: rgba(255, 215, 0, 0.05);
}

.gold-text {
  color: #B8860B;
}

.gold-price {
  color: #DAA520;
}

.silver-card {
  border-left-color: #C0C0C0;
  background: rgba(192, 192, 192, 0.05);
}

.silver-text {
  color: #808080;
}

.silver-price {
  color: #A9A9A9;
}

.bronze-card {
  border-left-color: #CD7F32;
  background: rgba(205, 127, 50, 0.05);
}

.bronze-text {
  color: #8B4513;
}

.bronze-price {
  color: #D2691E;
}

.rewards-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.reward-badge {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
}

.primary-badge {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
}

.accent-badge {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

.outline-badge {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
}

/* FAQ Styles */
.faq-item {
  margin-bottom: 15px;
  border: 1px solid rgba(0, 51, 102, 0.1);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  transition: all 0.3s ease;
}

body.night-mode .faq-item {
  background: #1a2639;
  border-color: rgba(255, 255, 255, 0.1);
}

.faq-question {
  padding: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary-blue);
  background: rgba(0, 51, 102, 0.02);
  -webkit-user-select: none;
  user-select: none;
}

body.night-mode .faq-question {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.02);
}

.faq-question:hover {
  background: rgba(0, 51, 102, 0.05);
}

body.night-mode .faq-question:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-orange);
  transition: transform 0.3s ease;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-item.active .faq-answer {
  padding: 20px;
  max-height: 500px;
  opacity: 1;
  border-top: 1px solid rgba(0, 51, 102, 0.05);
}

body.night-mode .faq-item.active .faq-answer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Route Map Styles */
.map-placeholder {
  width: 100%;
  height: 450px;
  background: #e0e0e0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.map-bg-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.map-overlay {
  background: rgba(0, 51, 102, 0.85);
  color: white;
  padding: 25px 50px;
  border-radius: 8px;
  z-index: 2;
  font-weight: 600;
  font-size: 1.2rem;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.map-overlay-text {
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 10px;
}

.route-timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline-item {
  margin-bottom: 30px;
  padding-left: 25px;
  border-left: 4px solid var(--accent-orange);
  position: relative;
}

.timeline-item.last-item {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -14px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-orange);
  border: 4px solid white;
}

.timeline-dot.finish-dot {
  background: var(--primary-blue);
}

.timeline-title {
  font-size: 1.2rem;
  color: var(--primary-blue);
}

.timeline-desc {
  display: block;
  margin-top: 8px;
  color: #555;
}

body.night-mode .brick-content strong {
  color: var(--text-light) !important;
}

body.night-mode .brick-content span.timeline-desc {
  color: #ccc !important;
}

body.night-mode .map-placeholder {
  background: #222 !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5) !important;
}

/* Expo Gallery Styles */
.expo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.expo-img-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  background: #f0f0f0;
}

body.night-mode .expo-img-wrapper {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: #111;
}

.expo-img-wrapper img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  display: block;
}

.expo-img-wrapper:hover img {
  transform: scale(1.05);
}

.expo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 51, 102, 0.95));
  color: white;
  padding: 30px 20px 20px 20px;
  font-weight: 600;
  font-size: 1.2rem;
  transform: translateY(10px);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.expo-img-wrapper:hover .expo-caption {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .expo-gallery {
    grid-template-columns: 1fr;
  }
}

.fade-in-delay-1 {
  opacity: 0;
  animation: fadeIn 1.5s forwards 0.3s;
}

.fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 1.5s forwards 0.6s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Banner Section */
.main-banner {
  width: 100%;
  padding-top: var(--header-height);
  display: block;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}