/* ==========================================
   IIUC Mars Rover Website Stylesheet
   ========================================== */

:root {
  --bg-dark: #07080a;
  --bg-gradient: linear-gradient(135deg, #050608 0%, #0d1220 100%);
  --bg-card: rgba(17, 24, 39, 0.7);
  --mars-red: #ef4444;
  --mars-red-hover: #dc2626;
  --mars-glow: 0 0 20px rgba(239, 68, 68, 0.5);
  --text-white: #f8fafc;
  --text-gray: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-white);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Starry Background Animation */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: transparent;
  pointer-events: none;
}
.stars::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 50px 160px, #fff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 40px, #ef4444, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 160px 120px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: starsAnimation 100s linear infinite;
  opacity: 0.3;
}
.stars2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: transparent;
  pointer-events: none;
}
.stars2::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-image: 
    radial-gradient(1.5px 1.5px at 30px 40px, #fff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 80px 120px, #ef4444, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 150px 20px, #fff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 190px 150px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 300px 300px;
  animation: starsAnimation 150s linear infinite;
  opacity: 0.55;
}

@keyframes starsAnimation {
  from { transform: translateY(0px); }
  to { transform: translateY(-2000px); }
}

/* Glassmorphism Navbar */
.navbar-custom {
  background: rgba(7, 8, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.3s ease;
  z-index: 1000;
}
.navbar-brand img {
  max-height: 42px;
  margin-right: 10px;
}
.navbar-brand span {
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-white);
  font-size: 1.1rem;
}
.navbar-brand span span {
  color: var(--mars-red);
}
.nav-link {
  color: var(--text-gray) !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 8px 16px !important;
  transition: all 0.3s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--mars-red) !important;
  text-shadow: var(--mars-glow);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}
.hero-glow-mars {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.22) 0%, rgba(239, 68, 68, 0.05) 50%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.hero-glow-mars::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, #c92a2a 60%, #1e0000 100%);
  border-radius: 50%;
  box-shadow: 0 0 45px rgba(239, 68, 68, 0.6), inset -10px -10px 40px rgba(0,0,0,0.8);
  animation: marsPulse 8s ease-in-out infinite alternate;
}
@keyframes marsPulse {
  0% { transform: scale(1); box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), inset -10px -10px 40px rgba(0,0,0,0.8); }
  100% { transform: scale(1.05); box-shadow: 0 0 55px rgba(239, 68, 68, 0.85), inset -12px -12px 40px rgba(0,0,0,0.85); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 1px;
}
.hero-title span {
  color: var(--mars-red);
  text-shadow: var(--mars-glow);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-gray);
  max-width: 580px;
}

/* Custom Buttons */
.btn-mars {
  background: var(--mars-red);
  color: var(--text-white);
  border: 1px solid var(--mars-red);
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-mars:hover {
  background: var(--mars-red-hover);
  color: var(--text-white);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
  transform: translateY(-2px);
}
.btn-outline-mars {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--mars-red);
  font-weight: 600;
  padding: 11px 28px;
  border-radius: 30px;
  transition: all 0.3s ease;
}
.btn-outline-mars:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--text-white);
  box-shadow: var(--mars-glow);
  transform: translateY(-2px);
}

/* Section Header */
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--mars-red);
  box-shadow: var(--mars-glow);
}
.section-title-left::after {
  left: 0;
  transform: translateX(0);
}

/* Glassmorphism Cards */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
  height: 100%;
}
.card-glass:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.1);
}
.card-glass-icon {
  font-size: 2.5rem;
  color: var(--mars-red);
  margin-bottom: 20px;
  text-shadow: var(--mars-glow);
}

/* Spec Box Details */
.spec-box {
  border-left: 3px solid var(--mars-red);
  padding-left: 20px;
  margin-bottom: 25px;
}
.spec-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-gray);
  margin-bottom: 4px;
}
.spec-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-white);
}

/* Team Filters & Cards */
.filter-btn {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border-glass);
  padding: 8px 20px;
  border-radius: 20px;
  margin: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(239, 68, 68, 0.15);
  color: var(--mars-red);
  border-color: var(--mars-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.team-card {
  overflow: hidden;
  text-align: center;
  position: relative;
}
.team-img-wrapper {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 20px;
  overflow: hidden;
  border: 3px solid var(--border-glass);
  transition: all 0.3s ease;
}
.team-card:hover .team-img-wrapper {
  border-color: var(--mars-red);
  box-shadow: var(--mars-glow);
  transform: scale(1.05);
}
.team-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-gray);
}
.team-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.team-role {
  font-size: 0.85rem;
  color: var(--mars-red);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 15px;
}
.team-social-links a {
  color: var(--text-gray);
  margin: 0 8px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.team-social-links a:hover {
  color: var(--mars-red);
  text-shadow: var(--mars-glow);
}

/* Media Gallery */
.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border-glass);
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 8, 10, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.4s ease;
  padding: 20px;
  text-align: center;
}
.gallery-item:hover img {
  transform: scale(1.1);
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.gallery-category {
  font-size: 0.8rem;
  color: var(--mars-red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer Section */
.footer-custom {
  background: #040507;
  border-top: 1px solid var(--border-glass);
  padding: 60px 0 30px;
}
.footer-logo img {
  max-height: 48px;
  margin-bottom: 15px;
}
.footer-logo h5 {
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.footer-logo h5 span {
  color: var(--mars-red);
}
.footer-links h6 {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  color: var(--text-white);
}
.footer-links ul {
  padding: 0;
  list-style: none;
}
.footer-links ul li {
  margin-bottom: 10px;
}
.footer-links ul li a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s ease;
}
.footer-links ul li a:hover {
  color: var(--mars-red);
  padding-left: 5px;
}

/* Form Styles */
.form-control-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-white) !important;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}
.form-control-glass:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--mars-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}
.form-control-glass::placeholder {
  color: var(--text-gray);
}

/* Preloader Styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}
.spinner-line {
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--mars-red);
  border-bottom-color: var(--mars-red);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}
.spinner-mars {
  position: absolute;
  top: 25px;
  left: 25px;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, #c92a2a 70%);
  border-radius: 50%;
  box-shadow: var(--mars-glow);
  animation: pulse 1.5s ease-in-out infinite alternate;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  from { transform: scale(0.9); }
  to { transform: scale(1.1); }
}

/* Redesign & Premium Style Upgrade Classes */
.badge-mars-light {
  background: rgba(239, 68, 68, 0.15);
  color: var(--mars-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 16px;
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 30px;
  text-transform: uppercase;
}

.cohort-btn {
  background: transparent;
  color: var(--text-gray);
  border: 1px solid var(--border-glass);
  padding: 10px 20px;
  border-radius: 12px;
  margin: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: monospace;
  transition: all 0.3s ease;
}
.cohort-btn:hover, .cohort-btn.active {
  background: linear-gradient(135deg, var(--mars-red-hover) 0%, var(--mars-red) 100%);
  color: var(--text-white);
  border-color: var(--mars-red);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.search-wrapper {
  position: relative;
  max-width: 300px;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
  font-size: 0.85rem;
}
.search-input {
  padding-left: 40px !important;
}

.featured-delegation-panel {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.team-card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 15px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  cursor: pointer;
}
.team-card-premium:hover {
  transform: translateY(-8px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(239, 68, 68, 0.15);
}
.team-img-premium-wrapper {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1220;
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 15px;
}
.team-img-premium-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text-gray);
  background: linear-gradient(135deg, #161e32 0%, #080c16 100%);
  transition: transform 0.5s ease;
}
.team-card-premium:hover .team-img-premium-placeholder {
  transform: scale(1.05);
}
.team-card-premium:hover .team-img-premium-wrapper {
  border-color: rgba(239, 68, 68, 0.3);
}
.team-lead-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}
.team-card-premium-details {
  padding-top: 5px;
}
.team-premium-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}
.team-card-premium:hover .team-premium-name {
  color: var(--mars-red);
}
.team-premium-role {
  font-size: 0.75rem;
  color: var(--mars-red);
  font-family: monospace;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.team-premium-dept {
  font-size: 0.7rem;
  color: var(--text-gray);
  margin-bottom: 12px;
}

.advisor-quote-box {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: var(--text-gray);
  font-style: italic;
  line-height: 1.6;
  position: relative;
}
.advisor-quote-box i {
  color: rgba(239, 68, 68, 0.3);
  font-size: 0.9rem;
}

.media-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transition: all 0.4s ease;
  height: 100%;
}
.media-stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.media-stat-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-shadow: var(--mars-glow);
}
.media-stat-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}
.media-stat-desc {
  color: var(--text-gray);
  margin-bottom: 0;
}

/* Capsule Navbar Styling */
.navbar-capsule {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  background: rgba(13, 18, 32, 0.45);
  padding: 4px 10px !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: row;
  align-items: center;
}

.navbar-capsule .nav-link {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 18px !important;
  border-radius: 50px;
  color: #ccd6f6 !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar-capsule .nav-link:hover {
  color: var(--text-white) !important;
  background: rgba(255, 255, 255, 0.05);
}

.navbar-capsule .nav-link.active {
  background: linear-gradient(135deg, var(--mars-red-hover) 0%, var(--mars-red) 100%) !important;
  color: var(--text-white) !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  text-shadow: none;
}

/* Action Buttons */
.btn-navbar-admin {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: #ccd6f6 !important;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 22px !important;
  border-radius: 50px !important;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-navbar-admin:hover {
  border-color: var(--mars-red) !important;
  color: var(--mars-red) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: var(--mars-glow);
}

.btn-navbar-join {
  background: linear-gradient(135deg, var(--mars-red-hover) 0%, var(--mars-red) 100%) !important;
  border: 1px solid var(--mars-red-hover) !important;
  color: var(--text-white) !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 24px !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-navbar-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.55);
}

/* responsive overrides for capsule navbar */
@media (max-width: 991.98px) {
  .navbar-capsule {
    flex-direction: column;
    border-radius: 12px;
    padding: 10px !important;
    background: transparent;
    border: none;
    align-items: stretch;
    gap: 5px;
  }
  .navbar-capsule .nav-link {
    border-radius: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px !important;
  }
  .navbar-capsule .nav-link:last-child {
    border-bottom: none;
  }
  .nav-action-buttons {
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}

/* Subteam filter scroll classes */
.subteam-filter-scroll-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}
.subteam-filter-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.subteam-filter-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 5px;
}
