/* ==========================================================================
   InMedia — IIT (ISM) Dhanbad Team Stylesheet
   Professional, formal, institutional styling in alignment with DCC theme
   ========================================================================== */

:root {
  --primary-maroon: #7a0019;
  --primary-dark: #500010;
  --accent-gold: #c49a45;
  --accent-gold-soft: #f4e8cf;
  --navy-dark: #1b263b;
  --canvas-bg: #faf7f2;
  --surface-white: #ffffff;
  --card-border: #e9e2d7;
  --card-border-hover: #d2c5b3;
  --text-main: #1e1b18;
  --text-muted: #695e55;
  --font-serif: "Playfair Display", "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 2px 8px rgba(30, 20, 10, 0.04);
  --shadow-md: 0 8px 24px rgba(122, 0, 25, 0.08);
  --shadow-lg: 0 16px 36px -10px rgba(30, 20, 10, 0.15);
  --radius-card: 12px;
}

/* Page Hero */
.team-hero {
  background: linear-gradient(135deg, #1b263b 0%, #2b1118 60%, #4a0d16 100%);
  color: #ffffff;
  padding: 70px 0 50px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent-gold);
}

.team-hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 85% 20%, rgba(196, 154, 69, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.team-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid rgba(196, 154, 69, 0.3);
}

.team-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.team-hero h1 .accent {
  color: var(--accent-gold);
  font-style: italic;
}

.team-hero .lead {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  line-height: 1.6;
  margin: 0;
}

/* Filter Navigation Bar */
.team-filter-bar {
  background: var(--surface-white);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 0;
  position: sticky;
  top: 68px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.team-filter-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: center;
  align-items: center;
}

.team-filter-btn {
  background: var(--canvas-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 30px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.team-filter-btn:hover {
  background: #f0e9df;
  color: var(--text-main);
  border-color: #c9bea9;
}

.team-filter-btn.active {
  background: var(--primary-maroon);
  color: #ffffff;
  border-color: var(--primary-maroon);
  box-shadow: 0 3px 10px rgba(122, 0, 25, 0.25);
}

/* Section Headings */
.team-group-section {
  padding: 45px 0 25px;
  transition: opacity 0.3s ease;
}

.team-group-section:nth-of-type(even) {
  background: #faf7f2;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.team-section-head {
  margin-bottom: 26px;
  position: relative;
}

.team-section-head .section-kicker {
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--primary-maroon);
  margin-bottom: 6px;
  display: block;
}

.team-section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.team-section-head p {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 650px;
  margin: 0;
}

.team-divider {
  width: 44px;
  height: 3px;
  background: var(--accent-gold);
  margin-top: 10px;
  border-radius: 2px;
}

/* Grids - Uniform 4-column across all team sections */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Team Card - Guaranteed Identical Sizing */
.team-card {
  background: var(--surface-white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8cbbb;
}

/* Category Badge Ribbon */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(122, 0, 25, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.card-badge.gold {
  background: rgba(196, 154, 69, 0.95);
  color: #1a1610;
  border-color: rgba(255, 255, 255, 0.4);
}

.card-badge.navy {
  background: rgba(27, 38, 59, 0.92);
  color: #ffffff;
}

/* Card Image Box - Equal Fixed Height & Proportions Across All Cards */
.card-img-wrap {
  width: 100%;
  height: 250px;
  background: #f4eee6;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0 10px;
}

.card-img-wrap img {
  max-width: 92%;
  max-height: 94%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  transition: transform 0.35s ease;
}

.card-img-wrap img.portrait-cover {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  object-fit: cover;
  object-position: top center;
}

.team-card:hover .card-img-wrap img {
  transform: scale(1.03);
}

/* Card Content Details - Balanced Typography & Stable Spacing */
.card-details {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: var(--surface-white);
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.card-details h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 5px;
  line-height: 1.25;
}

.card-role {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-maroon);
  margin: 0 0 4px;
  line-height: 1.35;
}

.card-dept {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Executive Featured Card */
.featured-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 860px;
  background: var(--surface-white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  margin-bottom: 22px;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8cbbb;
}

.featured-img-wrap {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: #f4eee6;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 10px 0 10px;
}

.featured-img-wrap img {
  max-width: 92%;
  max-height: 94%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  transition: transform 0.35s ease;
}

.featured-img-wrap img.portrait-cover {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.featured-card:hover .featured-img-wrap img {
  transform: scale(1.03);
}

.featured-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--primary-maroon);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.featured-badge.gold {
  background: var(--accent-gold);
  color: #1a1610;
}

.featured-content h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 6px;
}

.featured-role {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-maroon);
  margin: 0 0 5px;
}

.featured-dept {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.featured-bio {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0;
  border-top: 1px solid var(--card-border);
  padding-top: 12px;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

/* Public Relations Office 2-Column Subgrid */
.pro-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 860px;
}

/* ==========================================================================
   Mobile Responsive Precision Pass (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent sticky filter bar from swallowing the screen on mobile */
  .team-filter-bar {
    position: sticky !important;
    top: 50px !important;
    padding: 6px 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid var(--card-border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    z-index: 99 !important;
    overflow: hidden !important;
  }

  .team-filter-bar .container {
    padding: 0 6px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Single horizontal swipe row of chip buttons - NEVER wrap! */
  .team-filter-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 8px 4px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .team-filter-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .team-filter-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 5px 11px !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  }

  /* Compact Hero */
  .team-hero {
    padding: 32px 0 22px !important;
  }

  .team-hero .eyebrow {
    font-size: 9.5px !important;
    letter-spacing: 0.1em !important;
    padding: 3px 10px !important;
    margin-bottom: 8px !important;
    white-space: nowrap !important;
    max-width: 90vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .team-hero h1 {
    font-size: 2.1rem !important;
    margin-bottom: 6px !important;
  }

  .team-hero .lead {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }

  /* Compact Section Headings */
  .team-group-section {
    padding: 22px 0 14px !important;
  }

  .team-section-head {
    margin-bottom: 14px !important;
    text-align: center !important;
  }

  .team-section-head .section-kicker {
    font-size: 9.5px !important;
    letter-spacing: 0.14em !important;
  }

  .team-section-head h2 {
    font-size: 1.4rem !important;
    margin: 2px 0 4px !important;
  }

  .team-section-head p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    max-width: 320px !important;
    margin: 0 auto !important;
  }

  .team-divider {
    margin: 6px auto 0 !important;
    width: 36px !important;
  }

    /* Featured Card for PRO Officer */
  .featured-card {
    grid-template-columns: 1fr !important;
    border: 1.5px solid rgba(197, 160, 89, 0.4) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    margin: 0 auto 18px !important;
    max-width: 380px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    text-align: center !important;
  }

  .featured-img-wrap {
    min-height: unset !important;
    max-height: 155px !important;
    height: 155px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 10px 4px !important;
  }

  .featured-img-wrap img {
    max-height: 140px !important;
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
  }

  .featured-content {
    padding: 8px 16px 18px !important;
    align-items: center !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .featured-badge {
    align-self: center !important;
    margin: 0 auto 8px !important;
    background: rgba(212, 160, 23, 0.12) !important;
    color: #8a6708 !important;
    border: 1px solid rgba(212, 160, 23, 0.35) !important;
    border-radius: 999px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    padding: 3px 10px !important;
    text-transform: uppercase !important;
  }

  .featured-content h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1a233a !important;
    margin: 0 0 3px !important;
  }

  .featured-role {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #7a0019 !important;
    margin: 0 0 2px !important;
  }

  .featured-dept {
    font-size: 0.78rem !important;
    color: #64748b !important;
    margin: 0 0 8px !important;
  }

  .featured-bio {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    color: #475569 !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  /* 2-Column Clean Team Grid on ALL mobile phones */
  .team-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .pro-subgrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .team-card {
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid var(--card-border) !important;
  }

  .card-img-wrap {
    height: 175px !important;
  }

  .card-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
  }

  .card-details {
    padding: 9px 7px !important;
  }

  .card-details h3 {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin: 0 0 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-role {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--primary-maroon) !important;
    margin: 0 0 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-dept {
    font-size: 9.5px !important;
    line-height: 1.3 !important;
    color: var(--text-muted) !important;
  }

  .card-badge {
    font-size: 8.5px !important;
    padding: 2px 6px !important;
    top: 6px !important;
    left: 6px !important;
  }
}
