/*
 * FILE: css/team-section.css
 * About Us — Keras Dark Theme
 * Layout: Visi/Misi 2-col → divider → 3×3 team grid (auto-fit)
 * Card:   vertical flex stack — photo top, name, role, socials
 */

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
#about-team,
section#about {
  background: #080B14;
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ambient red/blue glows */
#about-team::before,
section#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 0% 55%,   rgba(232, 0, 28, 0.07)  0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 100% 10%,  rgba(0, 180, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Grid texture overlay */
#about-team::after,
section#about::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

/* Content wrapper sits above pseudo-element overlays */
.team-section-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.team-section-header {
  text-align: center;
  margin-bottom: 52px;
}

.team-eyebrow {
  display: inline-block;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #8B0000;
  margin-bottom: 18px;
  padding: 6px 18px;
  background: rgba(139, 0, 0, 0.1);
  border: 1px solid rgba(139, 0, 0, 0.28);
  border-radius: 20px;
}

.team-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.team-title span {
  color: #E8001C;
}

.team-subtitle {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
  color: #8899AA;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   VISI & MISI
   Two side-by-side cards. Each is a self-contained block.
   margin-bottom creates clear separation from the team grid.
   ============================================================ */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px; /* explicit clear gap before team grid */
}

.vm-card {
  background: #0F1523;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Coloured top accent bar */
.vm-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
}

.vm-card--vision::before {
  background: linear-gradient(90deg, #8B0000, rgba(232, 0, 28, 0.12));
}

.vm-card--mission::before {
  background: linear-gradient(90deg, #00B4FF, rgba(0, 180, 255, 0.12));
}

/* Corner radial glow */
.vm-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.65;
}

.vm-card--vision::after  { background: radial-gradient(circle, rgba(232, 0, 28, 0.1)  0%, transparent 70%); }
.vm-card--mission::after { background: radial-gradient(circle, rgba(0, 180, 255, 0.09) 0%, transparent 70%); }

.vm-card:hover { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.vm-card--vision:hover  { border-color: rgba(232, 0, 28, 0.28); }
.vm-card--mission:hover { border-color: rgba(0, 180, 255, 0.28); }

/* Icon + title row */
.vm-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.vm-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.vm-card--vision  .vm-card__icon { background: rgba(232, 0, 28, 0.12);  color: #E8001C; }
.vm-card--mission .vm-card__icon { background: rgba(0, 180, 255, 0.12); color: #00B4FF; }

.vm-card__title {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.vm-card--vision  .vm-card__title { color: #E8001C; }
.vm-card--mission .vm-card__title { color: #00B4FF; }

.vm-card__text {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #8899AA;
  line-height: 1.75;
  margin: 0;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.team-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.team-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.team-divider__label {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8899AA;
  white-space: nowrap;
}

/* ============================================================
   TEAM GRID — 3×3
   auto-fit + minmax(300px, 1fr):
     desktop  ≥ 960px → 3 columns (300×3 + 30×2 = 960px)
     tablet   ≥ 630px → 2 columns
     mobile   < 630px → 1 column
   With exactly 9 members this is a perfect 3×3 on desktop.
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* ============================================================
   TEAM CARD — vertical flex stack, all cards identical
   photo (top center) → name → role → socials
   ============================================================ */
.team-card {
  /* Vertical flex stack */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  /* Spacing & shape */
  padding: 30px 24px;
  background: #0F1523;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  position: relative;
  overflow: hidden;

  /* Smooth hover */
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  cursor: default;
}

/* Top red accent bar */
.team-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8B0000 0%, rgba(232, 0, 28, 0.08) 100%);
  border-radius: 18px 18px 0 0;
  opacity: 0.55;
  transition: opacity 0.28s ease;
}

/* Corner radial glow (hidden until hover) */
.team-card::after {
  content: '';
  position: absolute;
  top: -44px; right: -44px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(232, 0, 28, 0.08) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 0, 28, 0.3);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 0, 28, 0.07);
}

.team-card:hover::before { opacity: 1; }
.team-card:hover::after  { opacity: 1; }

/* ── Photo ── */
.team-card__photo-wrap {
  margin-bottom: 18px;
  flex-shrink: 0;
}

.team-card__photo {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: 50%;          /* circular */
  object-fit: cover;            /* no distortion */
  object-position: center top;  /* favour face area */
  border: 3px solid rgba(232, 0, 28, 0.35);
  box-shadow:
    0 0 0 5px rgba(232, 0, 28, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.45);
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.team-card:hover .team-card__photo {
  border-color: rgba(232, 0, 28, 0.75);
  box-shadow:
    0 0 0 7px rgba(232, 0, 28, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.55);
}

/* ── Name ── */
.team-card__name {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}

/* ── Role ── */
.team-card__role {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #C0392B;
  line-height: 1.5;
  margin: 0; /* no bottom gap needed — role is the last element */
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* auto-fit handles col count automatically;
   these breakpoints adjust spacing + typography only */

@media (max-width: 900px) {
  .team-title { font-size: 2rem; }
}

@media (max-width: 768px) {
  /* Horizontal scrollable carousel */
  .team-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px; /* breathing room so cards don't clip */
  }

  /* Hide scrollbar — WebKit */
  .team-grid::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar — Firefox */
  .team-grid {
    scrollbar-width: none;
  }

  /* Each card snaps to centre and keeps a fixed width */
  .team-card {
    flex: 0 0 72vw;
    max-width: 280px;
    scroll-snap-align: center;
  }
}

@media (max-width: 680px) {
  section#about,
  #about-team {
    padding: 72px 0 88px;
  }

  .team-title           { font-size: 1.65rem; }
  .team-section-header  { margin-bottom: 40px; }

  /* Stack vm cards vertically on narrow screens */
  .vm-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }

  /* Tighten card padding on small screens */
  .team-card { padding: 24px 18px; }
  .vm-card   { padding: 24px 22px; }
}

@media (max-width: 420px) {
  .team-card__photo {
    width: 88px;
    height: 88px;
  }

  .team-card__name { font-size: 0.9rem; }
}
