/* ========= Global ========= */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f0f4f8;
  color: #1a202c;
  margin: 0;
  padding: 0;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
}

/* Links & Buttons */
a {
  text-decoration: none;
  transition: all 0.3s ease;
}
button {
  cursor: pointer;
}

/* ========= Hero Section ========= */
.hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: url('images/hero-bg.gif') no-repeat center center/cover; /* bg gif/image */
}

.hero video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55); /* overlay */
  z-index: -1;
}

.hero .overlay {
  position: relative;
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: #f3f4f6;
}

.hero a {
  background: linear-gradient(90deg, #2563eb, #9333ea);
  color: white;
  font-weight: bold;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  display: inline-block;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.hero a:hover {
  background: linear-gradient(90deg, #1e40af, #7e22ce);
  transform: translateY(-3px);
}

/* ========= Container ========= */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 3rem 1.5rem;
}

/* Section Titles */
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #1f2937;
}

/* ========= Logos ========= */
.society-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin: 2rem 0;
}
.society-logos img {
  height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.society-logos img:hover {
  transform: scale(1.1);
}

/* ========= About Section ========= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.about-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.about-card h3 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.about-card h3 span {
  font-size: 2rem;
  color: #2563eb;
  margin-right: 1rem;
}
.about-card p {
  color: #4b5563;
  line-height: 1.6;
}

/* ========= Events ========= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.event-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.event-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.event-card:hover {
  transform: scale(1.05);
}
.event-card h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1rem;
}
.event-card p {
  margin: 0 1rem 1.5rem;
  color: #4b5563;
}
/* ========= Achievements ========= */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.achievement-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
  padding-bottom: 1rem;
}

.achievement-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.achievement-card h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1rem;
}

.achievement-card p {
  margin: 0 1rem 1rem;
  color: #4b5563;
}

.achievement-card:hover {
  transform: translateY(-6px);
}


/* ========= Team ========= */
#team {
  margin-top: 4rem;       /* gap above team */
  margin-bottom: 0;       /* remove big gap below */
  padding-bottom: 2rem;   /* small controlled spacing */
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.team-card {
  background: white;
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.team-card:hover {
  transform: translateY(-8px);
}
.team-card img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.team-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
.team-card p {
  color: #6b7280;
}

/* ========= Contact ========= */
#contact {
  margin-top: 0;  /* remove extra gap above contact */
}

.contact-section {
  padding: 4rem 1.5rem;
  background: #f9fafb;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.map iframe {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-info {
  font-size: 1.1rem;
  color: #374151;
  line-height: 1.6;
}

.contact-info a {
  color: #2563eb;
  font-weight: 500;
}
.contact-info a:hover {
  text-decoration: underline;
}

.contact-info form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.contact-info form input,
.contact-info form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.contact-info form input:focus,
.contact-info form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.contact-info form button {
  background: #2563eb;
  color: white;
  font-weight: bold;
  padding: 1rem;
  border-radius: 8px;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s ease;
}
.contact-info form button:hover {
  background: #1e40af;
}

@media(max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .map iframe {
    height: 250px;
  }
}

/* ========= Dock Navbar ========= */
.glassmorphism {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-dock {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
}

.nav-dock .nav-item {
  display: inline-block;
  margin: 0 0.5rem;
  transition: transform 0.2s ease-in-out;
  position: relative;
}
.nav-dock .nav-item:hover { transform: scale(1.2) translateY(-8px); }

.nav-tooltip {
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.nav-item:hover .nav-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.nav-dock .icon {
  background: transparent;
  padding: 0.75rem;
  border-radius: 50%;
  transition: background 0.3s ease;
  font-size: 1.5rem;
}
.nav-dock .icon:hover { background: rgba(255,255,255,0.2); }

/* ========= Footer ========= */
.footer {
  background: #f9f9f9;
  padding: 3rem 2rem 1rem;
  color: #1f2937;
  font-family: 'Inter', sans-serif;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo img {
  width: 160px;
  margin-bottom: 0.5rem;
}
.footer-logo p {
  font-weight: 600;
  color: #111;
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 0.5rem;
  color: #6b7280;
}
.footer-column ul li a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-column ul li a:hover {
  color: #2563eb;
}

.footer-social {
  text-align: center;
  margin-bottom: 1rem;
}
.footer-social a {
  margin: 0 0.5rem;
  font-size: 1.2rem;
  color: #6b7280;
  transition: color 0.3s ease;
}
.footer-social a:hover {
  color: #2563eb;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  color: #111;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

/* ========= Glitter Effect for Headings ========= */
.glitter {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    90deg,
    #ff8c00,
    #ffd700,
    #ff69b4,
    #00ffff,
    #ff8c00
  );
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: glitter 6s infinite linear;
  font-weight: 700;
  overflow: hidden;
}
.glitter::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 2px, transparent 3px);
  background-size: 50px 50px;
  animation: sparkles 3s linear infinite;
  pointer-events: none;
}

@keyframes glitter {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes sparkles {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(-50px) translateY(-50px); }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* ===== Tablets (<= 1024px) ===== */
@media (max-width: 1024px) {
  .container {
    padding: 2rem 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-card,
  .event-card,
  .team-card {
    padding: 1.5rem;
  }

  .event-card img {
    height: 180px;
  }
}

/* ===== Mobile Large (<= 768px) ===== */
@media (max-width: 768px) {
  /* Hero Section */
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  .hero-buttons a {
    width: 90%;
    text-align: center;
    font-size: 1rem;
  }

  /* About Grid */
  .about-grid {
    grid-template-columns: 1fr;
  }

  /* Events */
  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-card img {
    height: 160px;
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .map iframe {
    height: 250px;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer-logo img {
    width: 120px;
  }
}

/* ===== Mobile Small (<= 480px) ===== */
@media (max-width: 480px) {
  /* Hero */
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.8rem;
  }
  .hero-buttons a {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }

  /* Team */
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-column h4 {
    margin-top: 1rem;
  }
}

/* ========= Theme Toggle ========= */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}

#theme-btn {
  background: #2563eb;
  border: none;
  color: white;
  font-size: 1.2rem;
  padding: 0.6rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
#theme-btn:hover {
  background: #1e40af;
  transform: scale(1.1);
}

/* ========= Dark Mode ========= */
body.dark-mode {
  background-color: #111827; /* dark gray */
  color: #f9fafb;           /* light text */
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode a,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #f9fafb !important;
}

body.dark-mode .about-card,
body.dark-mode .event-card,
body.dark-mode .team-card,
body.dark-mode .contact-section,
body.dark-mode .footer {
  background: #1f2937;
  color: #f9fafb;
}

body.dark-mode .footer-column ul li a:hover {
  color: #60a5fa;
}

/* Dark mode fixes for Achievements */
.dark-mode .achievement-card {
  background: #1e293b;   /* dark card background */
  color: #ffffff;        /* fallback text color */
}

.dark-mode .achievement-card h3 {
  color: #f9fafb;        /* light heading */
}

.dark-mode .achievement-card p {
  color: #d1d5db;        /* lighter gray for readability */
}


/* Logo Swap Dark Mode */
body.dark-mode #cs-logo { content: url("images/cslogo-white.png"); }
body.dark-mode #ras-logo { content: url("images/raslogo-white.png"); }
body.dark-mode #footer-logo { content: url("images/ieee-logo-white.png"); }

.wayfire {
  position: absolute;
  width: 80px;
  height: 80px;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: wayfire-ripple 0.6s ease-out forwards;
  opacity: 0.7;
  z-index: 10;
}

@keyframes wayfire-ripple {
  from {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0.8;
  }
  to {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

