/* ============================================= */
/*   SWISS ROVER CHALLENGE - styles.css         */
/*   Updated: Translucent Navbar                */
/* ============================================= */

:root {
  --red: #e63939;
  --dark: #0a0a0a;
  --gray-900: #111111;
  --gray-800: #1a1a1a;
  --gray-700: #222222;
  --muted: #aaaaaa;
  --light: #eeeeee;
}

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

body {
  font-family: 'Roboto', system-ui, sans-serif;
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ====================== HEADER ====================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.65);     /* ← More transparent */
  backdrop-filter: blur(16px);            /* Stronger blur */
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
  transition: background 0.3s ease;
}

/* Optional: Make it even more transparent when scrolled */
header.scrolled {
  background: rgba(10, 10, 10, 0.85);
}

/* Desktop Navigation */
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.logo img {
  height: 52px;
}

.logo span {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--red);
}

/* Hamburger */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  padding: 8px;
}

/* ====================== MOBILE MENU ====================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid #222;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 15px rgba(0,0,0,0.5);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu a {
  color: var(--light);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 500;
  padding: 8px 0;
  display: block;
}

/* ====================== HERO ====================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10,10,10,0.35), rgba(10,10,10,0.75));
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  padding: 0 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: -2.5px;
}

.hero-content p {
  font-size: 1.35rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #ddd;
}

/* ====================== BUTTONS ====================== */
.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.btn-red {
  background: var(--red);
  color: white;
}

.btn-red:hover {
  background: #ff6e6e;
  color: white;
  transform: translateY(-3px);
}

.btn-outline {
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--dark);
  transform: translateY(-3px);
}

/* ====================== SECTIONS ====================== */
.section {
  padding: 110px 0;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h2 {
  font-size: 2.8rem;
  margin-bottom: 3rem;
  text-align: center;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 868px) {
  .hamburger {
    display: block;
  }
  
  .nav-menu {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.9rem;
  }
}

/* ====================== LINKS ====================== */
/* Make all links inherit the color of their parent text */
a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0px;
  transition: color 0.1s ease;
}

/* Hover effect */
a:hover {
  color: var(--red);
  text-decoration-thickness: 2px;
}

/* Optional: Make links in muted/gray text even cleaner */
p a,
.text-muted a,
[style*="color: var(--muted)"] a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ====================== EDITIONS CARDS ====================== */
/* in /editions/index.html */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.edition-card {
  text-decoration: none;
  color: inherit;
  display: block;
  background: var(--gray-800);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  height: 100%;
}

.edition-card:hover {
  transform: translateY(-8px);
}

/* Prevent text color change when clicked */
.edition-card:active,
.edition-card:visited,
.edition-card:active h3,
.edition-card:active p {
  color: inherit !important;
}

.edition-image {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
}

.edition-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badges - Both in top right */
.edition-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  z-index: 2;
}

.edition-badge.past {
  background: rgba(0, 0, 0, 0.75);
}

.edition-badge.upcoming {
  background: var(--red);
}

.edition-content {
  padding: 1.75rem 1.85rem;
}

.edition-content h3 {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
  color: var(--light);
}

.edition-content p {
  color: var(--muted);
  line-height: 1.55;
}

/* Mobile */
@media (max-width: 640px) {
  .editions-grid {
    gap: 1.75rem;
  }
  .edition-content {
    padding: 1.5rem 1.6rem;
  }
  .edition-badge {
    top: 16px;
    right: 16px;
    padding: 5px 14px;
    font-size: 0.9rem;
  }
}

/* Fix for outline buttons */
.btn-outline {
  background: transparent !important;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white !important;
  color: var(--dark);
}

/* ====================== HERO CONTENT BOX ====================== */
/* For the 2025 and 2026 section, blacked out box behind date*/
.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.1) 0%,
    rgba(10,10,10,0.2) 50%,
    rgba(10,10,10,0.3) 100%
  );
  z-index: 1;
}

.hero-content-box {
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 10, 0.2);
  backdrop-filter: blur(3px);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  max-width: 720px;
  margin: 0 1.5rem;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

.hero-content-box h1 {
  font-size: clamp(1.9rem, 6vw, 4rem);
  margin-bottom: 1rem;
  line-height: 1.05;
  font-weight: 700;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 4vw, 1.4rem);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  color: #ddd;
  line-height: 1.4;
}

.hero-location {
  font-size: clamp(1.25rem, 4.2vw, 1.5rem);
  color: #ccc;
  margin-bottom: 2.5rem;
}

/* Button */
.hero-content-box .btn-red {
  background: var(--red);
  color: white;
  font-size: 1.1rem;
  padding: 14px 38px;
  border: none;
}

.hero-content-box .btn-red:hover {
  background: #ff4d4d;
  transform: translateY(-2px);
}

/* Mobile scaling improvements */
@media (max-width: 768px) {
  .hero-content-box {
    padding: 2.4rem 2rem;
    margin: 0 1rem;
    border-radius: 16px;
  }
  
  .hero {
    min-height: 620px;
  }
}

@media (max-width: 480px) {
  .hero-content-box {
    padding: 2rem 1.6rem;
  }
}

/* ====================== RULEBOOK SECTION ====================== */

.rulebook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;                    /* Controls distance between photo and text */
  align-items: center;
  max-width: 1050px;
  margin: 4rem auto 0;
}

.rulebook-image {
  display: flex;
  justify-content: flex-end;      /* Pushes image to the right edge of its column */
}

.rulebook-preview-link {
  display: block;
  max-width: 360px;               /* Adjust this number if you want the image smaller/larger */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.7);
  transition: transform 0.3s ease;
}

.rulebook-preview-link:hover {
  transform: scale(1.03);
}

.rulebook-preview {
  width: 100%;
  height: auto;
  display: block;
}

.rulebook-text h3 {
  font-size: 1.85rem;
  margin-bottom: 1rem;
}

.rulebook-download-btn {
  font-size: 1.15rem;
  padding: 16px 40px;
}

/* Mobile - Photo first, then text */
@media (max-width: 868px) {
  .rulebook-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .rulebook-image {
    text-align: center;
  }
  
  .rulebook-preview-link {
    max-width: 320px;
    margin: 0 auto;
  }
  
  .rulebook-text {
    text-align: center;
  }
}

/* ====================== TEAM MEMBER CARDS ====================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--gray-800);
  padding: 2rem 1.5rem;           /* Consistent padding like Afroditi's card */
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
}

.team-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1.25rem;         /* Nice spacing like Afroditi's card */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.team-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
}

.team-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

/* ====================== SPONSORS ====================== */

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: center;
  justify-items: center;
  margin-top: 3rem;
  opacity: 0.9;
}

.sponsor-link {
  display: block;
  transition: transform 0.3s ease;
  padding: 0rem;                    /* Better click area */
}

.sponsor-link:hover {
  transform: scale(1.08);
}

.sponsor-link img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.95);
}

.sponsor-link:hover img {
  filter: brightness(1);
}

/* ====================== GET INVOLVED SECTION ====================== */
.get-involved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
}

.involve-card {
  background: var(--gray-800);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  text-align: center;
}

.involve-card p {
  min-height: 1rem;           /* Keeps consistent height */
}

/* Grey buttons (outline style) */
.involve-card .btn-outline {
  background: transparent;
  border: 2px solid #555;
  color: #ccc;
}

.involve-card .btn-outline:hover {
  background: #555;
  color: white;
  border-color: #555;
}
