:root {
  --primary: #FF1200;
  /* soft red */
  --secondary: #f8f9fa;
  --text: #444;
  --card-bg: #fff;
  --border: #e0e0e0;
  --radius: 5px;
}

* {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  
}

/* Navbar Styles */
.navbar {
  background: var(--text);
  color: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

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

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s, color 0.2s;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-bottom: 2px solid #fff;
}

.nav-links .btn-primary {
  background: #fff;
  color: var(--primary);
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}

.nav-links .btn-primary:hover,
.nav-links .btn-primary:focus {
  background: #f8f9fa;
  color: #d62828;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--secondary);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 5px 0;
}

.section {
  padding: 4rem 0;
}

h1,
h2,
h3 {
  margin-bottom: 0.25rem;
}

.hero {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
  min-height: 700px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-self: center;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  /* padding: 0.75rem 1.5rem; */
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: bold;
}

.cards {
  display: flex;
  /* gap: 1.5rem; */
  flex-wrap: wrap;
}

.card {
  background: var(--card-bg);
  /* border: 1px solid var(--border); */
  flex: 1;
  min-width: 250px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1.5rem;
}

.logos {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Avatar utility: always perfect circle and non-stretched */
.mentor-avatar {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

/* Desktop/default sizes */
.section.mentors .mentor-avatar { width: 70px; height: 70px; }
.batch-mentors .mentor-avatar { width: 48px; height: 48px; }

/* Mobile/Tablet overflow fixes (no desktop changes) */
@media (max-width: 1024px) {
  /* Ensure media scales within narrow containers (scope to content areas only) */
  .section img,
  .section video,
  .section iframe,
  header.hero img { max-width: 100%; height: auto; display: block; }

  /* Hide any residual horizontal scroll on small screens */
  html, body { overflow-x: hidden; }

  /* Stack hero content to avoid side-by-side overflow and refine spacing */
  .hero { min-height: auto; padding: 1.75rem 1rem; }
  .hero > div { display: flex; flex-direction: column; gap: 12px; padding: 0 0.5rem; }
  .hero .hero-title { font-size: clamp(24px, 5vw, 36px); line-height: 1.2; }
  .hero .hero-cta { display: flex; flex-direction: column; gap: 10px; }
  .hero .hero-cta button { width: 100%; height: 44px; }

  /* Timeline: stack columns and make them full width */
  .section.timeline .container > .flex { flex-direction: column; }
  .section.timeline .container .w-3/4 { width: 100% !important; }

  /* Tablet grid: use 2 columns for 3-up grids */
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* Prevent carousels from causing page-wide scroll */
  .partner-swiper, .swiper { overflow-x: hidden; }

  /* Mentors section adjustments on tablet */
  .section.mentors .card { height: auto; }
  .section.mentors .mentor-avatar { width: 60px !important; height: 60px !important; object-fit: cover; border-radius: 50%; }
  .batch-mentors .mentor-avatar { width: 44px !important; height: 44px !important; object-fit: cover; border-radius: 50%; }
}

@media (max-width: 640px) {
  /* Allow cards to shrink on phones */
  .cards .card { min-width: 0; }

  /* Collapse grids to a single column on phones */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  /* Avoid long words/URLs causing overflow in content */
  .section, header.hero { word-break: break-word; overflow-wrap: anywhere; }

  /* Timeline cards: allow shrinking on phones */
  .section.timeline .timeline-card { min-width: 0 !important; width: 100% !important; }
  .section.timeline .pl-8 { padding-left: 1.25rem; } /* reduce left padding */
  .section.timeline .left-10 { left: 1.25rem; }      /* align vertical line */
  .section.timeline .ml-8 { margin-left: 1rem; }     /* align card with marker */

  /* Simplify timeline spine on phones */
  .section.timeline .absolute.left-10 { display: none; }
  .section.timeline .timeline-card { border-left: 6px solid var(--primary); border-top-width: 0 !important; }

  /* Reduce large fixed hero heights on phones */
  header.hero [class*="h-[420px]"] { height: 240px !important; }
  header[class*="h-[400px]"] { height: 260px !important; }

  /* Tighter vertical rhythm on phones */
  .section { padding: 2rem 0; }

  /* Scale section headings for phones */
  .section h2 { font-size: 1.5rem; }
  .section h3 { font-size: 1.125rem; }

  /* Mentors section on phones */
  .section.mentors .mentor-avatar { width: 56px !important; height: 56px !important; }
  .section.mentors .card { height: auto; gap: 12px; }
  .batch-mentors .mentor-avatar { width: 40px !important; height: 40px !important; }
}
