* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fcfcfc;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #1e1e1e;
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================
   TOP CONTACT BAR & NAVIGATION (Matched)
============================================ */
.topbar { background-color: #31353c; display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 5%; min-height: 2.5rem; }
.logo-group { display: flex; align-items: center; gap: 1.5rem; }
.logo-group a { transition: opacity 0.3s ease; }
.logo-group a:hover { opacity: 0.8; }
.logo-group img { height: 1.2rem; width: auto; }

.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; justify-content: center; }
.nav-links a { color: white; text-decoration: none; font-size: clamp(0.7rem, 1vw, 0.85rem); transition: 0.3s ease; display: flex; align-items: center; gap: 5px; }
.nav-links a:hover { color: #D5481B; }

.subbar { background-color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 5%; border-bottom: 8px solid #D5481B; height: 6rem; position: relative; }
.subbar-logo img { height: 5rem; width: auto; }

.subbar-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.subbar-links a { color: #1e1e1e; text-decoration: none; font-size: clamp(0.8rem, 1.2vw, 1rem); transition: color 0.3s ease; font-weight: 500; }
.subbar-links a:hover, .subbar-links a[aria-current="page"] { color: #D5481B; }

.search-box { display: flex; align-items: center; background: #f1f1f1; border-radius: 50px; padding: 0.4rem 1rem; max-width: 250px; }
.search-box input { border: none; background: transparent; outline: none; width: 100%; color: #1e1e1e; }
.search-box button { border: none; background: none; cursor: pointer; }
.search-box button img { width: 16px; }

/* Hamburger Menu & Mobile Sidebar */
.hamburger-icon-button { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; z-index: 1001; }
.hamburger-icon-button .bar { width: 25px; height: 3px; background-color: #1e1e1e; transition: 0.3s; }

.mobile-sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: #fff; z-index: 1000; padding: 5rem 2rem 2rem; box-shadow: -2px 0 10px rgba(0,0,0,0.1); transition: right 0.3s ease-in-out; display: block; overflow-y: auto; }
.mobile-sidebar.open { right: 0; }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s ease-in-out; display: block; }
.sidebar-overlay.visible { opacity: 1; visibility: visible; }
.mobile-links { list-style: none; padding: 0; margin-top: 2rem; }
.mobile-links li { margin-bottom: 1.5rem; }
.mobile-links a { text-decoration: none; color: #1e1e1e; font-size: 1.1rem; font-weight: 500; }
.mobile-links a:hover, .mobile-links a.active-link { color: #D5481B; }
.mobile-search-box { margin-bottom: 2rem; max-width: 100%; border: 1px solid #ddd; }


/* ============================================
   BREADCRUMB & TEAM SECTION
============================================ */
.breadcrumb {
  background: #D5481B;
  padding: 0.8rem 5%;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a {
  color: #ffcccb;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb span {
  font-weight: bold;
}

/* General Styles */
.team-section {
  padding: 4rem 5%;
  background-color: #fcfcfc;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.team-header h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: #D5481B;
  margin-top: 0;
  margin-bottom: 0.5rem;
   opacity: 0;
  animation: fadeInLeft .8s ease-out forwards;
}

.team-header p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 2rem;
   opacity: 0;
  animation: fadeInLeft .9s ease-out forwards;
}

.fitc-logo {
  display: block;
  margin: 0 auto 3rem;
  max-width: 250px;
  width: 100%;
  height: auto;
   opacity: 0;
  animation: fadeInUp .8s ease-out forwards;
}

.group-title {
  font-size: clamp(1.8rem, 2.5vw, 2rem);
  color: #31353c;
  margin: 4rem 0 2rem;
  font-weight: bold;
  position: relative;
  display: inline-block;
}

.group-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background-color: #D5481B;
  margin: 10px auto 0;
  border-radius: 2px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px); /* Magsisimula sa 50px mula sa kaliwa */
  }
  to {
    opacity: 1;
    transform: translateX(0px);    /* Pupunta sa orihinal na pwesto */
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px); /* Magsisimula sa 50px mula sa kaliwa */
  }
  to {
    opacity: 1;
    transform: translateX(0);    /* Pupunta sa orihinal na pwesto */
  }
}
/* Card Styles & Auto-Grid Magic */
.team-grid {
  display: grid;
  /* Hinati sa 6 units para flexible ang 3-at-2 layout */
  grid-template-columns: repeat(6, 1fr); 
  gap: 3rem 2rem;
  max-width: 1000px; /* Nilimit para hindi masyadong malayo ang agwat */
  margin: 0 auto;
  justify-items: center;
}
.pres-card {
  width: 100%;
  /* Mas malaki para magmukhang bida */
  max-width: 400px; 
  text-align: center;
  margin: 0 auto 3rem auto; /* Siguradong nasa gitna */
  transition: all 0.4s ease;
  position: relative;
}

/* Espesyal na adjustment para sa image ng President */
.pres-card .img-container {
  aspect-ratio: 3 / 4; /* Portrait style */
  border-bottom: 10px solid #D5481B; /* Mas makapal na accent line */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* Mas malalim na anino */
}

/* Typography adjustment para sa President */
.pres-card h3 {
  font-size: 1.8rem; /* Mas malaking font size */
  margin-top: 1.5rem;
  letter-spacing: 1px;
}

.pres-card .role {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hover effect na mas "commanding" */
.pres-card:hover {
  transform: translateY(-12px);
}



/* Lahat ng team cards default span is 2 units (3 cards total per row) */
.team-card {
  grid-column: span 2;
  width: 100%;
  max-width: 240px;
  text-align: center;
  transition: transform 0.3s ease;
}
.team-card:nth-child(4),
.team-card:nth-child(5) {
  grid-column: span 3;
}

.president-group {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.team-card:hover .img-container {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.img-container {
  width: 100%;
  aspect-ratio: 3 / 4; 
  margin: 0 auto 1.2rem;
  background-color: #eaeaea;
  border-radius: 8px;
  border-bottom: 6px solid #D5481B;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card h3 {
  font-size: 1.2rem;
  color: #1e1e1e;
  margin: 0 0 0.3rem 0;
  font-weight: 700;
}

.role {
  font-size: 1rem;
  color: #D5481B;
  font-weight: 500;
  margin: 0;
}


/* Gagamitin lang ito kapag may class na 'centered-grid' */
.team-grid.centered-grid {
  display: flex;            /* Override ang Grid papuntang Flex */
  justify-content: center;  /* Pinapagitna ang mga cards */
  flex-wrap: wrap;          /* Para hindi masira sa mobile */
  gap: 5rem;                /* Spacing sa pagitan ng dalawang cards */
}

/* Siguraduhin na hindi magbabago ang itsura ng cards sa loob nito */
.centered-grid .team-card {
  grid-column: auto !important; /* Tinatanggal ang span logic ng grid */
  flex: 0 1 300px;              /* Standard width para sa small boxes */
}

/* Para sa mobile view ng centered-grid */
@media (max-width: 768px) {
  .team-grid.centered-grid {
    gap: 1.5rem;
  }
}

/* ============================================
   FOOTER (Matched)
============================================ */
.footer { background-color: #31353c; color: #fff; padding: 4rem 5% 0; }
.footer-container { max-width: 1360px; margin: 0 auto; display: flex; gap: 3rem; flex-wrap: wrap; padding-bottom: 3rem; }
.footer-column { flex: 1; min-width: 250px; }
.footer-column h3 { color: #D5481B; margin-bottom: 1.5rem; font-size: 1.3rem; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column a { color: #ddd; text-decoration: none; transition: 0.3s ease; }
.footer-column a:hover { color: #D5481B; }
.map-container { border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.footer-bottom { background-color: #D5481B; text-align: center; padding: 1.5rem; margin: 0 -5.5%; }

/* ============================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
============================================ */
@media (max-width: 1024px) {
  .subbar-links { gap: 1rem; }
}

@media (max-width: 768px) {
  /* Hide Desktop Nav, Show Hamburger */
  .subbar-links, .search-box { display: none; }
  .hamburger-icon-button { display: flex; }
  
  /* Topbar stacking */
  .topbar { flex-direction: column; gap: 0.5rem; padding: 1rem 5%; text-align: center; }
  
  /* Hamburger Animation */
  .hamburger-icon-button.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger-icon-button.open .bar:nth-child(2) { opacity: 0; }
  .hamburger-icon-button.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Mobile Grid adjustments */
  .team-section { padding: 3rem 5%; }
  
  .team-grid {
    gap: 2.5rem 1rem;
  }
}

/* Responsive: Pag Tablet/Mobile, balik sa 2 columns o 1 column */
@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .team-card, 
  .team-card:nth-child(4), 
  .team-card:nth-child(5) {
    grid-column: span 2; /* 2 cards per row */
  }
}

@media (max-width: 600px) {
  .team-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .team-card {
    max-width: 100%;
  }
}