/* ============================================
   CSS Variables
   ============================================ */
:root {
  --primary: #002856;
  --accent:  #001a3a;
  --gold: #DAA900;
  --gold-hover: #c49800;
  --secondary: #002856;
  --light-bg: #f8f9fa;
  --card-shadow: 0 2px 10px rgba(0,0,0,0.09);
  --transition: all 0.3s ease;
}

/* ============================================
   Global
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* Bootstrap primary overrides for UC Merced Blue */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Gold accent buttons on dark backgrounds */
.bg-dark-blue .btn-primary {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #002856;
}
.bg-dark-blue .btn-primary:hover {
  background-color: var(--gold-hover);
  border-color: var(--gold-hover);
  color: #002856;
}
.bg-dark-blue .btn-outline-primary {
  color: var(--gold);
  border-color: var(--gold);
}
.bg-dark-blue .btn-outline-primary:hover {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #002856;
}

section { padding: 64px 0; }

h2 { font-weight: 700; margin-bottom: 1.5rem; }

/* ============================================
   Navbar
   ============================================ */
.navbar { background-color: #002856 !important; }

.navbar-logo { height: 28px; width: auto; }
.navbar-brand .brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,0.80);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  transition: var(--transition);
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active { color: var(--gold); }

/* ============================================
   Hero / Banner
   ============================================ */
.banner__section {
  position: relative;
  height: 72vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.banner__section video,
.banner__section .banner-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.banner__section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,40,86,0.55) 0%, rgba(0,26,58,0.35) 100%);
  z-index: 1;
}

.banner__wrapper {
  position: relative;
  z-index: 2;
  color: #fff;
}

.banner__wrapper h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.banner__wrapper p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 680px;
  margin-bottom: 1.75rem;
}

.theme2 { color: #DAA900; }

/* ============================================
   Section Header
   ============================================ */
.section-header { margin-bottom: 2.5rem; }

.section-header h2 {
  font-size: 2rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-header.text-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================
   Cards
   ============================================ */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.card-img-top {
  height: 180px;
  object-fit: cover;
}

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  margin-bottom: 0.5rem;
}

/* ============================================
   Team Cards
   ============================================ */
.team-card {
  text-align: center;
  padding: 1.75rem 1rem 1.25rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.team-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
}

.team-card .avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2.5rem;
  color: #6c757d;
}

.team-card h6 { font-weight: 700; margin-bottom: 0.2rem; font-size: 0.97rem; }
.team-card .role { font-size: 0.8rem; color: #6c757d; margin-bottom: 0.5rem; }
.team-card .contact a { font-size: 0.78rem; color: var(--primary); word-break: break-all; }

.faculty-card {
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.faculty-card img {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  object-fit: cover;
}

/* ============================================
   Swiper Carousels
   ============================================ */
.swiper { padding-bottom: 50px !important; }
.swiper-pagination-bullet-active { background: var(--gold) !important; }

.swiper-button-next,
.swiper-button-prev { color: var(--gold) !important; }

/* ============================================
   Publication Entries
   ============================================ */
.pub-entry {
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: #fff;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--card-shadow);
}

.pub-entry h6 { font-weight: 700; margin-bottom: 0.2rem; font-size: 1rem; }
.pub-entry .authors { font-size: 0.87rem; color: #555; margin-bottom: 0.2rem; }
.pub-entry .venue {
  font-size: 0.84rem;
  color: #6c757d;
  font-style: italic;
  margin-bottom: 0.6rem;
}

.pub-entry .pub-links a {
  font-size: 0.78rem;
  margin-right: 0.4rem;
  padding: 2px 9px;
  border-radius: 4px;
  border: 1px solid currentColor;
  display: inline-block;
}

.pub-year-heading {
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
  color: var(--secondary);
}

/* ============================================
   Filter Buttons
   ============================================ */
.filter-btns .btn {
  margin: 0.25rem;
  border-radius: 20px;
  font-size: 0.88rem;
}

/* ============================================
   News
   ============================================ */
.news-item {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.news-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
.news-item img { width: 100%; height: 200px; object-fit: cover; }
.news-item .news-body { padding: 1.25rem; }
.news-item .news-date { font-size: 0.8rem; color: #6c757d; margin-bottom: 0.4rem; }
.news-item h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }

/* ============================================
   Page Banner (inner pages)
   ============================================ */
.page-banner {
  background: linear-gradient(135deg, #002856 0%, #003a75 100%);
  color: #fff;
  padding: 70px 0;
}

.page-banner h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-banner p { opacity: 0.75; font-size: 1.05rem; max-width: 600px; }

/* ============================================
   Event Card
   ============================================ */
.event-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.event-card img { width: 100%; height: 260px; object-fit: cover; }
.event-date-badge {
  background: var(--gold);
  color: #002856;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ============================================
   Opportunities
   ============================================ */
.position-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--gold);
  transition: var(--transition);
}

.position-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
.position-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 4px;
  margin-right: 6px;
  margin-bottom: 0.75rem;
}

/* ============================================
   Footer
   ============================================ */
.footer__section {
  background: #001a3a;
  color: #bbb;
  padding: 56px 0 32px;
}

.footer__section h5 { color: #fff; margin-bottom: 1.1rem; font-size: 1rem; }

.footer__section a { color: #999; display: block; margin-bottom: 0.45rem; font-size: 0.9rem; }
.footer__section a:hover { color: #fff; text-decoration: none; }

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: #ccc !important;
  margin-right: 0.4rem;
  transition: var(--transition);
  font-size: 0.95rem;
}

.footer-social a:hover { background: var(--gold); color: #002856 !important; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.84rem;
  color: #666;
}

/* ============================================
   Utilities
   ============================================ */
.bg-dark-blue { background-color: #002856; }
.text-muted-sm { font-size: 0.85rem; color: #6c757d; }

/* Bootstrap color overrides for UC Merced theme */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.bg-secondary { background-color: var(--primary) !important; }
.bg-warning { background-color: var(--gold) !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .banner__wrapper h1 { font-size: 1.75rem; }
  .page-banner h1 { font-size: 1.75rem; }
  section { padding: 44px 0; }
  .section-header h2 { font-size: 1.6rem; }
}
