/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root { --nav-h: 70px; --cursor-scale: 1; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: 'Rajdhani', sans-serif;
  line-height: 1.6;
  color: #f2f2f2;
  background: #181818;
  scrollbar-color: #dc143c #222; /* Firefox */
  scrollbar-width: thin;         /* Firefox */
  overflow-x: hidden;            /* prevent sideways scroll on mobile */
}

/* Make media responsive */
img, svg, video { max-width: 100%; height: auto; display: block; }

/* WebKit Scrollbar */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #222; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #dc143c, #b22222);
  border-radius: 6px;
  border: 2px solid #222;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000; padding: 1rem 0;
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  backdrop-filter: saturate(140%) blur(6px);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo-img { height: 50px; width: auto; object-fit: contain; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-menu a {
  color: #fff; text-decoration: none; font-weight: 500;
  transition: color 0.3s ease;
  padding: .25rem .1rem;
}
.nav-menu a:hover { color: #dc143c; }
.hamburger { display: none; flex-direction: column; cursor: pointer; }
.hamburger span { width: 25px; height: 3px; background: #fff; margin: 3px 0; transition: 0.3s; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(139,0,0,0.3) 0%, rgba(0,0,0,0.4) 50%, rgba(139,0,0,0.3) 100%),
    url('./images/BGHome.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* disabled on small screens below */
  display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: visible; /* avoid clipping the logo bar */
  transition: background-size 0.3s ease;
}
.hero > * { position: relative; z-index: 2; }

/* ===== Semi-transparent logo bar (4 logos) — centered with responsive gaps ===== */
.hero-logos {
  position: absolute;
  top: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;            /* CENTERED: logos grouped in the middle */
  gap: clamp(12px, 3vw, 40px);       /* GAP CONTROL: 12px mobile, 3vw tablet, 40px desktop */
  padding: clamp(6px, 1.2vw, 12px) 6px; /* tiny side padding to avoid border clipping */
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(220,20,60,0.35);
  border-radius: 0;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 3;
}
.hero-logos::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: clamp(20px, 4vw, 36px);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

/* Logo sizing */
.hero-logos img {
  height: clamp(28px, 4.5vw, 50px);
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  max-width: 22%;
}
/* Slight bump for middle two */
.hero-logos img[src$="IEEE_Student_Branch_Logo.png"],
.hero-logos img[src$="ECE Logo.png"] {
  height: clamp(32px, 5.2vw, 58px);
  max-width: 26%;
}

/* Order: SSIT (left) → Student Branch → ECE → SRM (right) */
.hero-logos img[src$="Logo IEEE SSIT.png"] { order: 1; }
.hero-logos img[src$="IEEE_Student_Branch_Logo.png"] { order: 2; }
.hero-logos img[src$="ECE Logo.png"] { order: 3; }
.hero-logos img[src$="SRM-Institute-of-Science-and-Technology-Logo.png"] { order: 4; }

/* Hero title + text */
.hero h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 900; color: #dc143c;
  text-shadow: 0 0 20px rgba(220,20,60,0.8), 0 0 40px rgba(220,20,60,0.4), 0 0 60px rgba(220,20,60,0.2);
  margin-bottom: 1rem; animation: glow 2s ease-in-out infinite alternate; position: relative; z-index: 3;
}
@keyframes glow {
  from { text-shadow: 0 0 20px rgba(220,20,60,0.8), 0 0 40px rgba(220,20,60,0.4), 0 0 60px rgba(220,20,60,0.2); }
  to   { text-shadow: 0 0 30px rgba(220,20,60,1),  0 0 60px rgba(220,20,60,0.6), 0 0 90px rgba(220,20,60,0.3); }
}
.hero .subtitle { font-size: clamp(1rem, 3.2vw, 1.35rem); color: #fff; margin-bottom: 1rem; font-weight: 600; }
.hero .description { font-size: clamp(.95rem, 2.6vw, 1.05rem); color: #ccc; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Hero card — down a bit more so it never collides with the logo bar */
.hero-content {
  z-index: 2; position: relative; background: rgba(0,0,0,0.4);
  padding: clamp(18px, 2.5vw, 28px); border-radius: 20px; backdrop-filter: blur(10px);
  border: 2px solid rgba(220,20,60,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(220,20,60,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  animation: heroGlow 4s ease-in-out infinite alternate;
  max-width: min(720px, 92vw);
  margin: clamp(96px, 18vh, 180px) auto 0; /* increased for safe clearance */
}
@keyframes heroGlow {
  0% { box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(220,20,60,0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
  100% { box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 50px rgba(220,20,60,0.6), inset 0 1px 0 rgba(255,255,255,0.1); }
}

/* Hero overlays */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(45deg,
      rgba(220,20,60,0.05) 0%,
      rgba(0,0,0,0.1) 25%,
      rgba(220,20,60,0.05) 50%,
      rgba(0,0,0,0.1) 75%,
      rgba(220,20,60,0.05) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><linearGradient id="speed" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" style="stop-color:%23dc143c;stop-opacity:0.2"/><stop offset="50%" style="stop-color:%23dc143c;stop-opacity:0.05"/><stop offset="100%" style="stop-color:%23dc143c;stop-opacity:0.2"/></linearGradient></defs><path d="M0 20 L100 20 M0 40 L100 40 M0 60 L100 60 M0 80 L100 80" stroke="url(%23speed)" stroke-width="2" opacity="0.3"/></svg>');
  pointer-events: none; animation: speedLines 3s linear infinite;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23dc143c" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.05; pointer-events: none;
}
@keyframes speedLines { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ===== Buttons ===== */
.btn {
  padding: 12px 30px; border: none; border-radius: 50px;
  text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: all 0.3s ease; cursor: pointer; display: inline-block; text-align: center;
}
.btn-primary {
  background: linear-gradient(45deg, #dc143c, #b22222); color: #fff;
  box-shadow: 0 4px 15px rgba(220,20,60,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220,20,60,0.6); }
.btn-secondary { background: transparent; color: #dc143c; border: 2px solid #dc143c; }
.btn-secondary:hover { background: #dc143c; color: #fff; transform: translateY(-2px); }

/* ===== Sections (shared) ===== */
section {
  padding: 80px 0; position: relative;
  backdrop-filter: blur(0);
  transition: backdrop-filter 0.5s ease, transform 0.5s ease;
}

/* Apply hover blur only on devices that actually have hover */
@media (hover: hover) {
  section:hover { backdrop-filter: blur(2px); }
}

section h2 {
  font-family: 'Orbitron', monospace; font-size: 2.5rem; text-align: center;
  margin-bottom: 3rem; color: #fff; position: relative;
}
section h2::after {
  content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 4px; background: linear-gradient(45deg, #dc143c, #b22222); border-radius: 2px;
}

/* Smooth fade-in for sections */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.about, .tracks, .sponsors, .judges, .register-contact {
  border-top: 1px solid rgba(220,20,60,0.1);
  border-bottom: 1px solid rgba(220,20,60,0.1);
  animation: fadeInUp 0.8s ease-out;
}

/* Ensure proper spacing between hero and about */
.hero + .about { margin-top: 0; padding-top: 80px; }

/* ===== About ===== */
.about {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/aboutbg.png');
  background-size: cover; background-position: center; background-attachment: fixed;
  position: relative; z-index: 1; color: #fff;
  min-height: 100vh; display: flex; align-items: center;
}
.about h2 { color: #fff; }

/* Section containers aligned center on desktop, top on mobile */
.about .container,
.tracks .container,
.sponsors .container,
.judges .container,
.register-contact .container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; justify-content: center; min-height: 80vh;
}

.about-content { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; justify-content: center; text-align: center; }
.about-text h3 { font-size: 1.8rem; color: #fff; margin-bottom: 1rem; }
.about-text p { font-size: 1.1rem; color: #f2f2f2; margin-bottom: 1.5rem; line-height: 1.8; }

.event-details {
  background: rgba(220,20,60,0.05); border: 1px solid rgba(220,20,60,0.2);
  border-radius: 10px; padding: 1.5rem; margin: 1.5rem 0;
}
.detail-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 0.5rem 0; }
.detail-item:last-child { margin-bottom: 0; }
.detail-item i { color: #dc143c; font-size: 1.2rem; min-width: 20px; }
.detail-item span { color: #fff; font-size: 1rem; line-height: 1.4; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem;
}
.feature {
  text-align: center; padding: 1.5rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(220,20,60,0.3);
  border-radius: 10px; backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease;
}
.feature:hover { transform: translateY(-5px); }
.feature i { font-size: 2.5rem; color: #dc143c; margin-bottom: 1rem; }
.feature h4 { font-size: 1.2rem; color: #fff; margin-bottom: 0.5rem; }

/* ===== About ===== */
.about {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/aboutbg.png');
  background-size: cover; background-position: center; background-attachment: fixed;
  position: relative; z-index: 1; color: #fff;
  min-height: 100vh; display: flex; align-items: center;
}
.about h2 { color: #fff; }

/* Section containers aligned center on desktop, top on mobile */
.about .container,
.tracks .container,
.sponsors .container,
.judges .container,
.register-contact .container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; justify-content: center; min-height: 80vh;
}

.about-content { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; justify-content: center; text-align: center; }
.about-text h3 { font-size: 1.8rem; color: #fff; margin-bottom: 1rem; }
.about-text p { font-size: 1.1rem; color: #f2f2f2; margin-bottom: 1.5rem; line-height: 1.8; }

.event-details {
  background: rgba(220,20,60,0.05); border: 1px solid rgba(220,20,60,0.2);
  border-radius: 10px; padding: 1.5rem; margin: 1.5rem 0;
}
.detail-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 0.5rem 0; }
.detail-item:last-child { margin-bottom: 0; }
.detail-item i { color: #dc143c; font-size: 1.2rem; min-width: 20px; }
.detail-item span { color: #fff; font-size: 1rem; line-height: 1.4; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem;
}
.feature {
  text-align: center; padding: 1.5rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(220,20,60,0.3);
  border-radius: 10px; backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease;
}
.feature:hover { transform: translateY(-5px); }
.feature i { font-size: 2.5rem; color: #dc143c; margin-bottom: 1rem; }
.feature h4 { font-size: 1.2rem; color: #fff; margin-bottom: 0.5rem; }

/* === About section: boxed grid (space-filling cards) === */
.about-subtitle {
  text-align: center;
  margin: .25rem 0 2rem;
  font-family: 'Orbitron', system-ui, sans-serif;
  letter-spacing: .06em;
  color: #dc143c;
}

/* Responsive full-width grid that uses space nicely */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(auto, 1fr);
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
}

/* Card base — dark glass to match theme */
.about-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(220,20,60,0.25);
  border-radius: 16px;
  padding: clamp(14px, 2.5vw, 20px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.05) inset;
  backdrop-filter: blur(8px);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px; /* Ensures all cards have a minimum uniform height */
}
.about-card p { margin: 0; line-height: 1.6; color: #f2f2f2; }


/* Specific card styling */
.about-card--intro {
  grid-column: span 3;
  text-align: center;
}
/* This targets all the other cards to form the 3x2 grid */
.about-card:not(.about-card--intro) {
  grid-column: span 1;
}

/* Icon pill */
.about-icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(45deg, #dc143c, #b22222);
  color: #fff;
  margin: 0 auto .75rem;
  box-shadow: 0 6px 16px rgba(220,20,60,0.35);
}
.about-card h3, .about-card h4 { margin: .25rem 0 .5rem; font-family: 'Rajdhani', system-ui, sans-serif; font-weight: 700; color: #fff; }

/* Mobile responsiveness */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .about-card--intro,
  .about-card:not(.about-card--intro) {
    grid-column: span 1;
  }
}
/* ===== Tracks ===== */
.tracks {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/Tracks.png');
  background-size: cover; background-position: center; background-attachment: fixed;
  color: #fff; min-height: 100vh; display: flex; align-items: center;
}
.tracks h2 { color: #fff; }
.tracks-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; margin-top: 2rem; }
.themed-tracks .track-card.themed {
  background: linear-gradient(135deg, rgba(220,20,60,0.15) 0%, rgba(0,0,0,0.7) 100%);
  border: 2px solid #dc143c; box-shadow: 0 8px 32px rgba(220,20,60,0.15), 0 1.5px 0 rgba(255,255,255,0.08) inset;
  border-radius: 18px; padding: 2.5rem 1.5rem; color: #fff; transition: transform 0.3s, box-shadow 0.3s; position: relative; overflow: hidden;
}
.themed-tracks .track-card.themed:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 16px 48px rgba(220,20,60,0.25); border-color: #b22222; }
.themed-tracks .track-card.themed i { font-size: 2.5rem; color: #dc143c; margin-bottom: 1rem; text-shadow: 0 2px 8px rgba(220,20,60,0.15); }
.themed-tracks .track-card.themed h3 { font-size: 1.3rem; font-family: 'Orbitron', monospace; color: #fff; margin-bottom: 0.7rem; letter-spacing: 1px; }
.themed-tracks .track-card.themed p { color: #f2f2f2; font-size: 1rem; line-height: 1.6; margin-bottom: 0; }

.tracks-row { display: flex; flex-direction: row; gap: 2rem; justify-content: center; }
.track-card {
  background: rgba(255,255,255,0.1); padding: 2rem; border-radius: 15px;
  backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center; transition: all 0.3s ease; border: 2px solid rgba(220,20,60,0.3);
}
.track-card:hover { transform: translateY(-10px); border-color: #dc143c; box-shadow: 0 20px 40px rgba(220,20,60,0.2); }
.track-card i { font-size: 3rem; color: #dc143c; margin-bottom: 1rem; }
.track-card h3 { font-size: 1.5rem; color: #fff; margin-bottom: 1rem; }
.track-card p { color: #f2f2f2; line-height: 1.6; }

/* ===== Sponsors ===== */
.sponsors {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/BGTracksSponsor.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.sponsors h2 {
  color: #fff;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.sponsor-placeholder {
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 100%);
  background-size: cover;
  background-position: center;
  padding: 4rem; /* Increased vertical dimension */
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(0px);
  border: 1px solid rgba(220,20,60,0.3);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

/* Specific background images for each sponsor */
.sponsor-1 {
  background-image: url('./images/printellect logo.png');
}

.sponsor-2 {
  background-image: url('./images/Altruisity.png');
}
/* ===== Judges Section (final merged) ===== */

/* Page-level background */
.judges {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/BGTracksSponsor.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Section title */
.judges h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 2rem;
}

/* Grid: 3 horizontal cards on large screens */
.judges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

/* Remove old background-image from placeholders */
.judge-1, .judge-2, .judge-3 {
  background-image: none !important;
}

/* Card container */
.judge-placeholder {
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 100%);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(0px);
  border: 1px solid rgba(220,20,60,0.18);
  box-shadow: 0 5px 15px rgba(0,0,0,0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.judge-placeholder:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.26);
}

.judge-placeholder.centered {
  justify-content: center;
  min-height: 320px;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Remove icons if still in HTML */
.judge-placeholder i { display: none; }

/* White text */
.judge-placeholder h3,
.judge-placeholder p {
  color: #ffffff;
  margin: 0;
  line-height: 1.5;
}

.judge-placeholder h3 {
  font-weight: 700;
  margin: 0.25rem 0;
}

/* Judge image */
.judge-photo {
  width: clamp(140px, 30vw, 260px);
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  border: 2px solid rgba(255,255,255,0.04);
  background-color: #ececec;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .judges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .judge-placeholder.centered {
    min-height: 300px;
  }
  .judge-photo { width: clamp(130px, 30vw, 240px); }
}

@media (max-width: 640px) {
  .judges-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  .judges {
    background-attachment: scroll;
  }
  .judge-placeholder {
    padding: 1rem;
    gap: 0.6rem;
  }
  .judge-placeholder.centered {
    min-height: auto;
    justify-content: flex-start;
  }
  .judge-photo {
    width: clamp(110px, 40vw, 200px);
  }
}

/* fallback body bg if image fails */
body, html {
  background-color: #000000;
}


/* ===== Register & Contact ===== */
.register-contact {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%),
    url('./images/BGContactUs.png');
  background-size: cover; background-position: center; background-attachment: fixed;
  color: #fff; min-height: 100vh; display: flex; align-items: center;
}
.register-contact h2 { background: none; color: #fff; min-height: auto; display: block; align-items: unset; filter: none; }

/* === Fix: center QR image with caption below === */
.qr-image-container{
  display: flex;
  flex-direction: column;     /* put caption below the image */
  align-items: center;        /* center horizontally */
  justify-content: center;    /* center vertically within its own box */
  gap: 0.5rem;                /* space between image and caption */
  margin: 2rem auto !important;
  text-align: center !important;
  max-width: 100%;
}
.qr-image-container img{ display: block; height: auto; }
.qr-image-container p{ margin: 0; }

.register-contact h4 { color: #dc143c; font-size: 1.4rem; margin-bottom: 1rem; font-family: 'Orbitron', monospace; }
.register-contact-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto;
  align-items: start; /* align both columns nicely */
}
.registration-section, .contact-section {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(220,20,60,0.3);
  border-radius: 15px; padding: 2rem; backdrop-filter: blur(10px);
}

/* Google Form CTA */
.google-form-container {
  text-align: center; padding: 2rem; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(220,20,60,0.2); border-radius: 10px; margin-top: 1rem;
}
.google-form-container h3 {
  color: #dc143c; font-size: 2rem; margin-bottom: 1.5rem; font-family: 'Orbitron', monospace;
}
.google-form-container p { color: #f2f2f2; font-size: 1.1rem; margin-bottom: 2rem; line-height: 1.6; }
.google-form-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; padding: 1rem 2rem;
  background: linear-gradient(45deg, #dc143c, #b22222); border: none; border-radius: 50px; color: #fff;
  text-decoration: none; font-weight: 600; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(220,20,60,0.3);
}
.google-form-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(220,20,60,0.4); background: linear-gradient(45deg, #b22222, #dc143c); }
.google-form-btn i { font-size: 1rem; }
.form-note { color: #fff; font-size: 0.9rem; margin-top: 1.5rem; font-style: italic; }

/* Socials */
.social-links { margin-top: 2rem; text-align: center; }
.social-links h5 { color: #fff; font-size: 1rem; margin-bottom: 1rem; font-family: 'Orbitron', monospace; }
.social-icons { display: flex; justify-content: center; gap: 1.5rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; background: linear-gradient(45deg, #dc143c, #b22222);
  border-radius: 50%; color: #fff; text-decoration: none; font-size: 1.5rem;
  transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(220,20,60,0.3);
}
.social-link:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(220,20,60,0.5); background: linear-gradient(45deg, #b22222, #dc143c); }

/* ===== Contact Details ===== */
.contact-content { display: flex; flex-direction: column; gap: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(220,20,60,0.2);
  border-radius: 10px; transition: all 0.3s ease;
}
.contact-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(220,20,60,0.4); }
.contact-details h4 { color: #dc143c; font-size: 1rem; margin-bottom: 0.5rem; font-family: 'Orbitron', monospace; }
.contact-details p { color: #f2f2f2; margin-bottom: 0.3rem; font-size: 0.95rem; }
.contact-details p:last-child { margin-bottom: 0; }
.contact-item i { font-size: 1.5rem; color: #dc143c; }
.contact-form h4 { color: #dc143c; font-size: 1.2rem; margin-bottom: 1.5rem; text-align: center; font-family: 'Orbitron', monospace; }
.contact-form form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea {
  padding: 15px; border: 2px solid rgba(220,20,60,0.3); border-radius: 8px; font-size: 1rem;
  background: rgba(255,255,255,0.05); color: #fff; transition: all 0.3s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #f2f2f2; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: #dc143c; background: rgba(255,255,255,0.08); box-shadow: 0 0 10px rgba(220,20,60,0.2);
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ===== Footer ===== */
.footer { background: #0a0a0a; color: #fff; text-align: center; padding: 2rem 0; }

/* ===== Scroll To Top ===== */
#scrollToTopBtn {
  position: fixed; bottom: 32px; right: 32px; z-index: 9999;
  background: linear-gradient(45deg, #dc143c, #b22222); color: #fff;
  border: none; border-radius: 50%; width: 56px; height: 56px; font-size: 2rem;
  box-shadow: 0 4px 16px rgba(220,20,60,0.25); cursor: pointer; display: none;
  transition: opacity 0.3s; outline: none;
}
#scrollToTopBtn:hover { background: linear-gradient(45deg, #b22222, #dc143c); box-shadow: 0 8px 32px rgba(220,20,60,0.35); }

/* ===== Desktop About Grid Breakpoints ===== */
@media (min-width: 768px) {
  .about-card { grid-column: span 6; }
  .about-card--intro { grid-column: span 12; }
}
@media (min-width: 992px) {
  .about-card { grid-column: span 4; }
  .about-card--intro { grid-column: span 6; }
  .about-card--venue { grid-column: span 6; }
}

/* ===== LOGO GAP CONTROL - How to adjust spacing between logos ===== */
/* 
  TO CHANGE GAPS:
  1. MOBILE (up to 768px): Edit the gap in the mobile section below (around line 690)
  2. TABLET (768px - 1024px): Edit the gap in the tablet section below
  3. DESKTOP (1024px+): Edit the gap in the desktop section below
  
  GAP FORMAT: clamp(minimum, preferred, maximum)
  - minimum: smallest gap allowed (e.g., 8px)
  - preferred: responsive gap using vw units (e.g., 2vw = 2% of viewport width)
  - maximum: largest gap allowed (e.g., 30px)
*/

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-logos {
    gap: clamp(20px, 4vw, 35px);  /* TABLET GAP: 20px min, 4vw preferred, 35px max */
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .hero-logos {
    gap: clamp(30px, 3.5vw, 50px) !important;  /* DESKTOP GAP: 30px min, 3.5vw preferred, 50px max */
    padding: clamp(6px, 1.2vw, 12px) 50px !important;  /* 50px inward from left/right edges */
  }
}

/* ===== General Responsive Adjustments ===== */
@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
  /* Disable parallax/attachments for better mobile performance */
  .hero, .about, .tracks, .sponsors, .judges, .register-contact { background-attachment: scroll; }
}

@media (max-width: 900px) {
  .tracks-row { flex-direction: column; gap: 2rem; align-items: center; }
}

/* ===== Mobile-first fixes ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; left: -100%; top: 70px; flex-direction: column;
    background: rgba(0,0,0,0.95); width: 100%; text-align: center;
    transition: 0.3s; padding: 1rem 0; gap: 0;
    height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav-menu a { display: block; padding: 0.9rem 1rem; }
  .nav-menu.active { left: 0; }

  .hero-buttons { flex-direction: column; align-items: center; }

  /* Top-align content instead of vertical centering to avoid cramped view */
  .about, .tracks, .sponsors, .judges, .register-contact { min-height: auto; display: block; }
  .about .container,
  .tracks .container,
  .sponsors .container,
  .judges .container,
  .register-contact .container {
    min-height: auto; justify-content: flex-start;
    padding-top: 80px; padding-bottom: 60px;
  }

  .about-content { gap: 1.75rem; }
  .features { grid-template-columns: 1fr; }

  .event-details { padding: 1rem; }
  .detail-item { flex-direction: column; text-align: center; gap: 0.5rem; }

  /* Full-width logo bar on mobile too */
  .hero-logos {
    top: calc(var(--nav-h) + 10px);
    width: 100vw;
    padding: 6px 10px !important;
    gap: clamp(8px, 2.5vw, 16px) !important;  /* MOBILE GAP: 8px min, 2.5vw preferred, 16px max */
    justify-content: center;        /* ensure centered on mobile too */
  }

  .tracks-grid { grid-template-columns: 1fr; }
  .sponsors-grid, .judges-grid { grid-template-columns: 1fr; }

  .register-contact-content { grid-template-columns: 1fr; gap: 2rem; }
  .google-form-container { padding: 1.5rem 1.25rem; }
  .google-form-container h3 { font-size: 1.5rem; }
  .google-form-container p { font-size: 1rem; }
  .google-form-btn { font-size: 1.05rem; padding: 0.8rem 1.4rem; }

  .social-icons { gap: 1rem; }
  .social-link { width: 45px; height: 45px; font-size: 1.3rem; }

  #scrollToTopBtn {
    bottom: 16px !important; right: 16px !important;
    width: 44px !important; height: 44px !important; font-size: 1.5rem !important;
  }

  /* Push hero card more on very cramped heights */
  .hero-content { margin-top: clamp(100px, 22vh, 190px); }
}

@media (max-width: 480px) {
  section { padding: 60px 0; }
  section h2 { font-size: 2rem; }
  .hero h1 { font-size: 2rem; }
  .about-card { padding: 14px; }
}

/* Optional badges row (works on all sizes) */
.about-badges {
  margin-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
}
.badge {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600;
  padding: .5rem .75rem; border-radius: 999px;
  background: rgba(220,20,60,0.10); border: 1px solid rgba(220,20,60,0.25);
  color: #ffd9df;
}
.badge i { font-size: .9rem; color: #dc143c; }
