/* ============================================
   IEEE SB MCET - Modern Website Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #003566;
  --secondary-color: #0077b6;
  --accent-color: #00f5d4;
  --bg-color: #f0f4f8;
  --text-color: #1a1a1a;
  --light-blue: #ade8f4;
  --dark-blue: #000814;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.12);
  --shadow-hover: 0 20px 50px rgba(0, 53, 102, 0.2);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============ PRELOADER ============ */
#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--dark-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  width: 200px;
  animation: preloaderPulse 1.2s ease-in-out infinite alternate;
}

.preloader-bar-track {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  margin-top: 2rem;
  overflow: hidden;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  border-radius: 50px;
  animation: loadBar 1.8s ease forwards;
}

@keyframes preloaderPulse {
  from { transform: scale(0.95); filter: drop-shadow(0 0 10px rgba(0, 119, 182, 0.4)); }
  to   { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(0, 245, 212, 0.6)); }
}

@keyframes loadBar {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* ============ GLASS UTILITY ============ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ============ LIGHT RAYS BG ============ */
.light-rays {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 119, 182, 0.07) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* ============ SECTION BASE ============ */
section {
  padding: 5rem 2rem;
  min-height: auto;
  position: relative;
  overflow: visible;
}

/* ============ NAVBAR ============ */
.head-navbar {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 53, 102, 0.08);
  padding: 0.75rem 1.5rem;
  transition: box-shadow 0.3s ease;
}

.navbar-brand {
  font-weight: 800;
  color: var(--primary-color) !important;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--primary-color) !important;
  font-weight: 600;
  margin: 0 0.4rem;
  position: relative;
  padding-bottom: 4px !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover::after { width: 100%; }

/* ============ HERO SECTION ============ */
#home {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(150deg, #000c1d 0%, #001d3d 40%, #003566 100%);
  color: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(0,119,182,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,245,212,0.1) 0%, transparent 50%);
  pointer-events: none;
}

#home h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
  position: relative;
}

.quick-access {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============ MODERN BUTTONS ============ */
.quick-access a {
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: white;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-access a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.quick-access a span { position: relative; z-index: 1; }

.quick-access a:hover {
  color: var(--dark-blue);
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 245, 212, 0.35);
}

.quick-access a:hover::before { opacity: 1; }

.quick-access a:active {
  transform: translateY(-1px) scale(0.97);
  box-shadow: 0 6px 15px rgba(0, 245, 212, 0.2);
}

/* BTN primary modern override */
.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 119, 182, 0.4);
}

.btn-primary:hover::after { opacity: 1; }

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 10px rgba(0, 119, 182, 0.2);
}

.btn-outline-primary {
  border: 2px solid var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  background: transparent;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--secondary-color) !important;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 119, 182, 0.3);
}

.btn-outline-primary:active {
  transform: translateY(0) scale(0.97);
}

/* Generic .btn submit */
form .btn-primary {
  padding: 1rem 2rem;
  font-size: 1rem;
  letter-spacing: 1px;
  border-radius: 14px;
}

/* Click ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ============ SCROLL DOWN ============ */
.scroll-down {
  position: absolute;
  bottom: 30px;
  animation: bounce 2s infinite;
  color: var(--accent-color);
  font-size: 1.4rem;
  cursor: pointer;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

/* ============ ABOUT SECTION ============ */
#about {
  max-width: 900px;
  margin: 0 auto;
}

.about-content {
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 3rem;
}

.about-content .lead {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-content p {
  color: #555;
  margin-bottom: 1rem;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.typed-cursor {
  color: var(--accent-color);
  font-weight: bold;
}

/* ============ EXECOM SECTION ============ */
#committee {
  background: linear-gradient(180deg, #f0f4f8 0%, #e8eef5 100%);
}

#committee h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- TAB BUTTONS --- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.tabs .btn {
  padding: 0.6rem 1.6rem;
  background: white;
  border: 2px solid #dde3ea;
  border-radius: 50px;
  font-weight: 700;
  color: #666;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.9rem;
}

.tabs .btn.active,
.tabs .btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 6px 18px rgba(0, 53, 102, 0.25);
  transform: translateY(-2px);
}

.tabs .btn:active {
  transform: translateY(0) scale(0.96);
}

/* --- MEMBER GRID: 2 per row on mobile, 4 per row on desktop --- */
.committee-2025 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 576px) {
  .committee-2025 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .committee-2025 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- MEMBER CARD --- */
.member {
  background: white;
  border-radius: 20px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
}

.member:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 53, 102, 0.15);
}

/* --- MEMBER PHOTO with hover scale + shadow --- */
.member-img-wrapper {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 53, 102, 0.15);
  transition: var(--transition);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.member:hover .member-img-wrapper {
  transform: scale(1.1);
  box-shadow: 0 16px 44px rgba(0, 53, 102, 0.32);
}

.member-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: var(--transition);
}

.member:hover .member-img-wrapper img {
  transform: scale(1.06);
}

.member h5 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.member p {
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ============ EVENTS SECTION ============ */
#events {
  background: white;
}

.event-card {
  background: #f7faff;
  border-radius: 20px;
  border: 1px solid #e0ecff;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.event-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Event item inside card */
.event {
  background: white;
  border: 1px solid #e8eef8;
  padding: 1.2rem 1.5rem;
  border-left: 5px solid var(--secondary-color);
  border-radius: 14px;
  transition: var(--transition);
}

.event h4 {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.05rem;
}

.event p.text-muted {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

/* Gallery images in event cards — bigger */
.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.event-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.event-gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* Upcoming event images */
.event-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.event-images img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.event-images img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* ============ RESOURCES SECTION ============ */
#resources {
  background: var(--bg-color);
}

.list-group-item {
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition);
  border-left: 3px solid transparent !important;
}

.list-group-item:hover {
  background: #e8f4ff;
  border-left-color: var(--secondary-color) !important;
  transform: translateX(5px);
  color: var(--secondary-color);
  text-decoration: none;
}

/* ============ CONTACT SECTION ============ */
#contact {
  background: white;
  border-radius: 30px;
}

form .form-control {
  background: #f1f5fb;
  border: 1.5px solid #e0e8f5;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  color: var(--text-color);
  transition: var(--transition);
}

form .form-control:focus {
  background: white;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
  outline: none;
}

/* ============ FOOTER ============ */
footer {
  background: var(--dark-blue);
  color: white;
  padding: 3.5rem 1rem;
}

.scroll-float-text {
  color: #999;
  font-size: 0.9rem;
}

.scroll-float-text a {
  color: var(--accent-color);
  margin: 0 0.5rem;
  text-decoration: none;
  font-weight: 600;
}

.scroll-float-text a:hover {
  color: white;
}

/* ============ BLUR TEXT ANIMATION (word-by-word) ============ */
#blur-text {
  white-space: normal;
  word-spacing: normal;
}

#blur-text span {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(20px) scale(0.92);
  animation: blurWordIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  margin-right: 0.22em;
}

#blur-text span:last-child {
  margin-right: 0;
}

@keyframes blurWordIn {
  0%   { opacity: 0; filter: blur(14px); transform: translateY(20px) scale(0.92); }
  60%  { opacity: 1; filter: blur(2px);  transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; filter: blur(0px);  transform: translateY(0)   scale(1); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
  #home h1 { font-size: 3rem; }
  .title { font-size: 2rem; }
  #about { padding: 2rem 1rem; }
  .about-content { padding: 2rem; }
}

@media (max-width: 768px) {
  #home h1 { font-size: 2.2rem; }
  .quick-access a { padding: 0.75rem 1.4rem; font-size: 0.85rem; }
  section { padding: 3rem 1.2rem; }
  .member-img-wrapper { width: 100px; height: 100px; }
  .event-gallery img, .event-images img { height: 100px; }
}

@media (max-width: 480px) {
  #home h1 { font-size: 1.8rem; }
  .committee-2025 { gap: 1rem; }
  .member { padding: 1rem 0.75rem; }
  .member-img-wrapper { width: 85px; height: 85px; border-radius: 14px; }
  .member h5 { font-size: 0.85rem; }
}
