:root {
  --primary: #ee764e;
  --secondary: #000000;
  --accent: #ff9f43;
  --dark: #0f172a;
  --dark-secondary: #1e293b;
  --text: #f8fafc;
  --font-family: "Manrope", sans-serif;
}

/* Enable smooth scrolling for in-page links */
html {
  scroll-behavior: smooth;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--dark);
  color: var(--text);
  line-height: 1.6;
}

/* Uniform Spacing for Sections */
.results-section {
  margin: 4rem 0;
  padding: 0 1rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--secondary);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.9);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Updated Logo size */
.logo {
  height: 70px;
  /* Use drop-shadow for natural look */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Navigation */
nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: var(--primary);
  color: var(--secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 120px 2rem 4rem;
  text-align: center;
  background: linear-gradient(45deg, var(--dark-secondary), var(--dark));
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  margin-bottom: -5rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.25rem;
  color: #94a3b8;
  animation: fadeInUp 1.5s ease;
}

/* Redesigned Topper Spotlight Section */
.topper-spotlight {
  max-width: 1200px;
  margin: 4rem auto;
  background: var(--dark-secondary);
  border-radius: 16px;
  overflow: hidden;
  /* Two-column flex layout for desktop */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* Added a subtle white glow to improve visibility on dark bg */
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.topper-spotlight.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Revised Topper Badge for Better Visibility */
.topper-spotlight::before {
  content: "🏆 All India Topper";
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: var(--text);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Layout for Photo and Details in Topper Spotlight */
.topper-photo {
  flex: 1 1 50%;
  background-image: url("./assets/student photos/topper.jpg");
  background-size: cover;
  background-position: center 20%; /* Adjusted to focus above */
  /* Aspect ratio 2:1 (height is half of width) */
  aspect-ratio: 2 / 1;
  border: 5px solid var(--accent); /* Added border for better visibility */
}

.topper-details {
  flex: 1 1 50%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

/* Mobile Adjustments for Topper Spotlight */
@media (max-width: 768px) {
  .topper-spotlight {
    flex-direction: column;
    max-width: 900px;
  }
  .topper-photo {
    width: 100%;
    aspect-ratio: 2 / 1;
  }
  .topper-details {
    width: 100%;
    padding: 1rem;
    text-align: center;
  }
}

/* Highlight Element for CA Foundation with Pop Animation */
.pass-highlight {
  background: var(--accent);
  color: var(--secondary);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  text-align: center;
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 400px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Brochure Download Button (New) */
.brochure-download {
  text-align: center;
  margin: 1.5rem auto;
}

.brochure-download a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--secondary);
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}

.brochure-download a:hover {
  background: var(--accent);
}

/* Students Grid */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* CA Foundation & Common Student Card */
.student-card {
  background: var(--dark-secondary);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.student-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.student-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Student Photo with Rounded Border */
.student-photo {
  width: 80%;
  height: 220px;
  background-size: cover;
  background-position: top center; /* Move the focus upwards */
  border-radius: 12px;
  margin-top: 1rem;
}

.student-rank {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--primary);
  color: var(--secondary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Centered Student Info */
.student-info {
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topper-marks {
  font-size: 3.5rem;
  font-weight: 800;
  color: #4ade80;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.topper-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.student-marks {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.student-max-marks {
  color: #94a3b8;
  font-size: 1rem;
}

.topper-max-marks {
  font-size: 1.25rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

/* Modified Topper HTNO with Visible Background */
.topper-htno {
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 1.1rem;
  color: var(--dark);
}

/* Unique styles for the top 3 CA Foundation student cards */
.student-card.rank-1 {
  border: 2px solid #ffd700;
  background: rgba(255, 215, 0, 0.2);
}
.student-card.rank-2 {
  border: 2px solid #c0c0c0;
  background: rgba(192, 192, 192, 0.2);
}
.student-card.rank-3 {
  border: 2px solid #cd7f32;
  background: rgba(205, 127, 50, 0.2);
}

/* Unique Jr. MEC Card Styling */
.student-card.jr-mec {
  background: linear-gradient(135deg, var(--dark-secondary), var(--dark));
  border: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
}
.student-card.jr-mec:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.student-name {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.8rem;
  max-width: 90%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

/* Video Highlights Section */
.video-section {
  background: var(--dark-secondary);
  padding: 3rem 1rem;
  border-top: 4px solid var(--accent);
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  margin: 3rem auto;
  background: linear-gradient(135deg, #222, #111);
  border: 3px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Redesigned Section End Dividers */
.section-end {
  position: relative;
  width: 100%;
  height: 30px;
  margin-top: 2rem;
  overflow: hidden;
}
.ca-foundation-end::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 150%;
  height: 100%;
  border-radius: 50%;
  transform: translateX(-50%) translateY(50%);
  background: linear-gradient(90deg, #ffd700, #ff9f43);
}
.jr-mec-end::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 150%;
  height: 100%;
  border-radius: 50%;
  transform: translateX(-50%) translateY(50%);
  background: linear-gradient(90deg, #ff9f43, #ee764e);
}
.video-end::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, #ff6f00, #ffca28);
  clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%);
}
.management-end::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 150%;
  height: 100%;
  border-radius: 50%;
  transform: translateX(-50%) translateY(50%);
  background: linear-gradient(90deg, #ff9f43, #ffd700);
}

/* Meet Our Management Section */
.management-section {
  background: var(--dark-secondary);
  padding: 3rem 1rem;
  border-top: 4px solid var(--accent);
}

.management-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Management Profiles */
.management-profile {
  background: var(--dark);
  border: 2px solid var(--accent);
  border-radius: 12px;
  min-height: 400px;
  padding: 1rem 0.75rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease 0.1s, box-shadow 0.3s ease 0.1s,
    border-color 0.3s ease 0.1s;
  margin-bottom: 2rem;
}

.management-profile.chairman {
  min-height: 550px;
  padding: 1.5rem 1rem 2.5rem;
  margin-bottom: 4rem;
}

.management-profile.vice-chairman,
.management-profile.secretary {
  min-height: 370px;
  padding: 0.75rem 0.75rem 1.25rem;
}

.management-profile:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.management-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.management-profile:hover .management-badge {
  opacity: 1;
}

.management-icon {
  display: none;
}

.management-name {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.management-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.management-info {
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.4;
}

.management-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.management-profile:hover .management-photo {
  transform: scale(0.95);
}

/* Desktop Ordering for Management Profiles */
@media (min-width: 768px) {
  .management-profile.vice-chairman {
    order: 1;
    transform: scale(0.95);
  }
  .management-profile.chairman {
    order: 2;
    transform: scale(1);
  }
  .management-profile.secretary {
    order: 3;
    transform: scale(0.95);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Keyframes for the pop animation on pass-highlight */
@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.results-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  animation: fadeInUp 1s ease;
}

/* Footer Section Styles */
.footer-section {
  background: var(--dark-secondary);
  padding: 2rem 1rem;
  margin-top: 2rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  text-align: center;
  margin-bottom: 1rem;
}
.footer-logo .logo {
  height: 60px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-item {
  background: var(--dark);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.3s ease;
}
.contact-item:hover {
  transform: translateY(-5px);
}
.contact-item i {
  font-size: 1.5rem;
  color: var(--primary);
  min-width: 40px;
}
.contact-item a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.contact-item a:hover {
  color: var(--primary);
}
.map-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.qr-code {
  text-align: center;
  padding: 0.75rem;
}
.qr-code img {
  border: whitesmoke 6px solid;
  width: 120px;
  height: auto;
  margin-bottom: 0.5rem;
}
.qr-code p {
  color: #94a3b8;
  font-size: 0.85rem;
}
.footer-credits {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.4;
}
.footer-credits p {
  margin: 0.25rem 0;
}
.footer-credits a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dashed var(--primary);
  transition: color 0.3s ease;
}
.footer-credits a:hover {
  color: var(--accent);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .students-grid {
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
    padding: 1.5rem;
  }
  .mobile-menu-toggle {
    display: block;
  }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--secondary);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
  nav.active {
    display: flex;
  }
  nav a {
    padding: 1rem;
    text-align: center;
  }
  .topper-spotlight {
    flex-direction: column;
    margin: 2rem 1rem;
    padding: 1.5rem;
    max-width: 900px;
  }
  .topper-photo {
    width: 100%;
    height: 200px;
  }
  .topper-details {
    width: 100%;
    padding: 1rem;
    text-align: center;
  }
  .student-photo {
    height: 180px;
  }
  .student-info {
    font-size: 0.9rem;
    padding: 1rem;
  }
  .video-container {
    max-width: 90%;
  }
  .management-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .map-container {
    height: 180px;
  }
  .contact-item {
    padding: 0.75rem;
  }
  .footer-logo .logo {
    height: 50px;
  }
}

@media (max-width: 480px) {
  .students-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .topper-marks {
    font-size: 2.5rem;
  }
  .student-info {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}
/* Disable text selection */
body {
  -webkit-user-select: none; /* Chrome/Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
  user-select: none;
}
