/* Base */
:root {
  --brand: #00539f; /* CT State-style blue */
  --brand-strong: #003c73;
  --accent: #00a3e0;
  --bg: #f5f7fb;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: radial-gradient(circle at top, #e0edff 0, #f9fafb 55%, #eef2ff 100%);
  color: var(--text-main);
}

/* Navbar – CT State blue bar */
.navbar-custom {
  background: var(--brand-strong);
  border-bottom: 1px solid rgba(15, 23, 42, 0.35);
}

.navbar-custom .navbar-brand {
  color: #ffffff;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  position: relative;
  padding-inline: 0.9rem;
}

.navbar-custom .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: #ffffff;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
  width: 70%;
}

.navbar-toggler {
  border-color: rgba(148, 163, 184, 0.6);
}

/* Hero – clean blue & white */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
  overflow: hidden;
  background-color: #e2ecff;
  background-image: url('Assets/IMG_5464.JPG');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 60%);
  opacity: 0.8;
  z-index: -2;
}

.hero-overlay {
  display: none;
}

.hero-content {
  max-width: 860px;
  padding: 2.5rem 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.hero-dismiss {
  position: absolute;
  top: 14px;
  right: 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.hero-dismiss:hover {
  color: var(--text-main);
}

.hero-banner.hero-hiding {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hero-banner.hero-hidden {
  display: none !important;
}

.club-title-elegant {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
}

.club-title-elegant h1 {
  margin: 0;
  font-family: "Fredoka One", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.club-title-elegant h1:nth-child(2) {
  color: var(--accent);
}

.club-title-elegant h1:last-child {
  color: var(--brand);
}

.hero-subtitle {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-actions.hero-actions-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-btn-primary {
  border-radius: 999px;
  padding-inline: 2.4rem;
  font-weight: 600;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

.hero-btn-secondary {
  border-radius: 999px;
  padding-inline: 2.2rem;
  font-weight: 500;
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--brand-strong);
}

/* Sections */
.section {
  padding: 80px 20px;
  position: relative;
  z-index: 1;
}

.zigzag:nth-child(even) {
  flex-direction: row-reverse
}

.zigzag img {
  max-width: 100%;
  border-radius: 10px
}

.section-title {
  font-weight: 700;
  color: var(--brand-strong);
}

.aboutimage {
  width: 360px;
  height: auto
}

.missionImg {
  width: 360px;
  height: auto
}

/* Team grid (CSS GRID) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  justify-content: center;
  padding: 20px 0;
}

/* Unified Flip Card */
.card-flip {
  background-color: transparent;
  width: 100%;
  max-width: 300px;
  height: 300px;
  perspective: 1000px;
  margin: 0 auto;
  transform-origin: center;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: box-shadow 0.25s ease;
  box-shadow: var(--shadow-soft);
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.card-flip:hover .card-inner {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card-front {
  background: #ffffff;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-front::after {
  content: attr(data-name);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.75), transparent);
  color: #f9fafb;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.card-flip:hover .card-front img {
  transform: scale(1.05);
}

.card-back {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #0ea5e9 100%);
  color: white;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-flip:hover .card-back {
  opacity: 1;
}

.card-back h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Fredoka One', cursive;
}

.card-back p {
  margin: 5px 0;
  font-size: 1rem;
  font-weight: 500;
}

.card-back em {
  font-style: normal;
  opacity: 0.9;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.footer {
  background: var(--brand-strong);
  padding: 30px 20px;
  color: #e5e7eb;
  text-align: center;
  border-top: 1px solid rgba(15, 23, 42, 0.4);
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px
}

.footer-icons a {
  color: #cbd5f5;
  font-size: 1.75em;
  text-decoration: none;
  transition: color .25s, transform .25s;
}

.footer-icons a:hover {
  color: var(--brand);
  transform: translateY(-3px);
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0
}

.footer-links li {
  display: inline-block;
  margin: 0 15px
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  font-size: .9em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .25s;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-copy {
  margin-top: 20px;
  font-size: .8em
}

.dev-credits {
  font-size: .9em;
  color: #e5e7eb;
  text-align: left
}

.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 20px
}

.dev-grid p {
  margin: 0;
  transition: transform .3s ease
}

.dev-grid p:hover {
  color: #ccc;
  transform: translateX(5px)
}

@media (max-width: 768px) {
  .dev-credits {
    text-align: center;
    margin-top: 20px
  }

  .dev-grid {
    grid-template-columns: 1fr;
    justify-content: center
  }
}

/* FAQ Bot (minimal styling) */
.faq-bot-icon {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1030;
  border: 1px solid rgba(191, 219, 254, 0.8);
  transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
}

.faq-bot-icon:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.55);
  filter: brightness(1.03);
}

.faq-bot-icon img {
  width: 56px;
  height: 56px;
  border-radius: 50%
}

.faq-chat-window {
  position: fixed;
  right: 20px;
  bottom: 100px;
  width: 320px;
  max-height: 60vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1030
}

.faq-chat-window.active {
  display: flex
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand);
  color: #fff;
  padding: 10px 12px
}

.chat-close-btn {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer
}

.chat-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  background: #f9fafb;
}

.bot-message {
  background: #e0edff;
  border: 1px solid #bfdbfe;
  padding: 10px;
  border-radius: 10px;
  align-self: flex-start;
  max-width: 90%
}

.user-message {
  align-self: flex-end
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee
}

.chat-input input {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
  color: var(--text-main);
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px
}

.chat-option-btn {
  border: 1px solid var(--brand);
  color: var(--brand);
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
  cursor: pointer
}

.chat-option-btn:hover {
  background: var(--brand);
  color: #fff;
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animate="fade-in-up"].animate-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-in"].animate-visible {
  opacity: 1;
  transform: translateY(0);
  /* No movement, just fade */
}

/* Project Cards (Modern) */
.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-img-wrapper {
  height: 240px;
  overflow: hidden;
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 10px;
}

.project-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Typography Enhancements */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  /* display: inline-block; Removed to allow text-center to work */
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--brand);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    min-height: 90vh;
    background-attachment: scroll;
    background-position: center top;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 40px 15px;
  }

  .dev-credits {
    text-align: center;
    margin-top: 20px;
  }

  .dev-grid {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .footer-icons {
    gap: 20px;
  }

  .footer-links li {
    display: block;
    margin: 10px 0;
  }

  .faq-chat-window {
    width: 90%;
    right: 5%;
    bottom: 90px;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 85vh;
    background-position: center top;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .faq-bot-icon {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .faq-bot-icon img {
    width: 40px;
    height: 40px;
  }
}

/* Project Page Styles */
.project-hero {
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 55%, var(--accent) 120%);
  color: #ffffff;
  padding: 56px 0;
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  opacity: 0.95;
}

.project-breadcrumb a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.project-breadcrumb a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.9);
}

.project-title {
  margin-top: 12px;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.project-subtitle {
  margin: 10px 0 0;
  opacity: 0.95;
  max-width: 70ch;
}

.project-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.info-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 16px 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.info-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--brand-strong);
}

.info-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.media-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(0, 163, 224, 0.14), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 83, 159, 0.16), transparent 60%),
    #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-align: center;
}

.media-caption {
  padding: 12px 14px;
  font-size: 0.95rem;
  color: #475569;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.code-block {
  background: #0b1220;
  color: #e5e7eb;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre;
  overflow: auto;
  margin: 0;
}

.img-placeholder {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}