/* Basic Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #b28c59; /* Muted Gold */
  --secondary-color: #f9f7f3; /* Soft Cream */
  --text-dark: #1e2a40; /* Deep Navy */
  --text-gray: #4a4a4a;
  --text-light: #ffffff;
  --link-hover: #d4b98e;
  --shadow-light: rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-gray);
  background-color: var(--secondary-color);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
}

/* Header & Navigation */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px var(--shadow-light);
  transition: background 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 2rem;
}

.nav-link {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-dark);
  transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-align: center;
}

.hero-carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.hero-overlay {
  position: relative;
  z-index: 10;
  padding: 2rem;
}

.school-name {
  font-family: "Dancing Script", cursive;
  font-size: 4rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.event-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.countdown-timer {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.countdown-timer span {
  display: inline-block;
  min-width: 50px;
  margin: 0 10px;
}

/* Content Sections */
.content-section {
  padding: 5rem 0;
}

.content-section:nth-child(even) {
  background-color: var(--secondary-color);
}

.content-section:nth-child(odd) {
  background-color: #fff;
}

/* About Section */
.about-text {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.contact-info {
  text-align: center;
}

.contact-info p {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.social-links a {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  transform: scale(1.1);
}

/* Event Details Section */
.event-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.detail-item {
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.detail-item i {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.detail-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.detail-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

/* Agenda Section */
.agenda-timeline {
  list-style: none;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 20px;
}

.agenda-timeline::before {
  content: "";
  display: block;
  width: 2px;
  height: 100%;
  background-color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 0;
}

.agenda-timeline li {
  position: relative;
  padding: 1.5rem 0 1.5rem 2rem;
}

.timeline-dot {
  position: absolute;
  left: -8px;
  top: 2.25rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid #fff;
}

.timeline-content h4 {
  font-size: 1.2rem;
  color: var(--text-dark);
}

/* Gallery Section */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-light);
}

/* Testimonials Section */
.testimonial-carousel-container {
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  height: 150px; /* Adjust based on content height */
}

.testimonial-carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-item {
  min-width: 100%;
  text-align: center;
  opacity: 0;
  position: absolute;
  transition: opacity 1s ease-in-out;
}

.testimonial-item.active {
  opacity: 1;
  position: relative;
}

.testimonial-item .quote {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-gray);
}

.testimonial-item cite {
  display: block;
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-dark);
}

/* Sponsors Section */
.sponsors-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.sponsor-item {
  text-align: center;
}

.sponsor-item img {
  max-width: 100%;
  height: auto;
  filter: grayscale(100%) opacity(75%);
  transition: filter 0.3s ease;
}

.sponsor-item img:hover {
  filter: grayscale(0%) opacity(100%);
}

.sponsor-item p {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.5rem;
  color: var(--text-dark);
}

/* Sponsor Section Styling */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(150px, 1fr)
  ); /* Adjust minmax as needed */
  gap: 30px;
  justify-items: center;
  align-items: center;
  padding: 40px 0;
}

.sponsor-item {
  text-align: center;
  /* Removed: padding, border-radius, background-color, and box-shadow */
  width: 100%; /* Ensure it fills its grid cell */
  max-width: 200px; /* Limit individual sponsor item width */
}

/* Updated: The hover effect is now on the anchor tag itself */
.sponsor-item a {
  text-decoration: none; /* Remove underline from sponsor links */
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%; /* Allow link to take full height of item */
  transition: transform 0.3s ease; /* Keep the transition for a smooth hover effect */
}

.sponsor-item a:hover {
  transform: translateY(-5px); /* This will lift the entire item on hover */
}

/* Wrapper for Sponsor Logos to control dimensions */
.sponsor-logo-wrapper {
  width: 120px; /* Fixed width for all logos */
  height: 80px; /* Fixed height for all logos */
  display: flex; /* Use flexbox to center the image */
  justify-content: center;
  align-items: center;
  margin-bottom: 10px; /* Space between logo and name */
  overflow: hidden;
}

.sponsor-logo-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Scale image down to fit, maintaining aspect ratio */
  display: block;
}

.sponsor-item p {
  margin-top: 0;
  font-size: 0.95em;
  font-weight: 500;
  color: var(--color-primary);
}

/* Responsive adjustments for sponsors */
@media (max-width: 768px) {
  .sponsors-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
  }
  .sponsor-logo-wrapper {
    width: 100px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  .sponsors-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 15px;
  }
  .sponsor-logo-wrapper {
    width: 80px;
    height: 50px;
  }
  .sponsor-item p {
    font-size: 0.85em;
  }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.visible {
  visibility: visible;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--secondary-color);
  text-align: center;
  padding: 2rem 0;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  background-color: var(--primary-color);
  color: var(--text-dark);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 8px var(--shadow-light);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

#back-to-top:hover {
  transform: translateY(-5px);
  opacity: 0.9;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
    text-align: center;
    transition: left 0.3s;
    box-shadow: 0 4px 10px var(--shadow-light);
    padding-top: 1rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 1.5rem 0;
  }

  .school-name {
    font-size: 2.5rem;
  }

  .event-title {
    font-size: 1.5rem;
  }
}
