/* ===== CSS VARIABLES ===== */
:root {
  --brick: #b85638;
  --gray-text: #444;
  --nav-radius: 2.2em;
  --nav-padding: 11px 22px;
  --header-height: 140px;
  --max-width: 1300px;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Fira Sans', Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: var(--gray-text);
  line-height: 1.6;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: #fff;
  border-bottom: 2px solid var(--brick);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--box-shadow);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 16px 24px;
  gap: 40px;
}

.header-logo img {
  display: block;
  height: 90px;
  width: auto;
  border-radius: var(--border-radius);
  background: none;
  padding: 4px;
  box-shadow: none;
}

.header-nav {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 2.2px solid var(--brick);
  border-radius: var(--nav-radius);
  padding: 0 12px;
  box-shadow: 0 2px 18px rgba(184,86,56,0.05);
}

.header-nav a {
  color: var(--gray-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.13rem;
  padding: var(--nav-padding);
  border-radius: 1.7em;
  letter-spacing: 0.01em;
  transition: var(--transition);
  display: block;
}

.header-nav a:hover, 
.header-nav a:focus {
  background: var(--brick);
  color: #fff;
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1200px;
  margin: var(--header-height) auto 0 auto;
  padding: 0 20px;
  min-height: 80vh;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--brick);
  margin-top: 0;
}

/* ===== STAFF CARDS ===== */
.staff-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 38px 32px;
  margin-top: 38px;
  margin-bottom: 38px;
  width: 100%;
}

.staff-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.09);
  padding: 34px 20px 24px 20px;
  min-width: 210px;
  max-width: 240px;
  margin: 0;
  transition: var(--transition);
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.staff-avatar {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 14px;
  background: #f6f6fa;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.staff-details {
  text-align: center;
}

.staff-details h3 {
  margin: 0 0 2px 0;
  font-size: 1.11em;
  font-weight: bold;
  text-align: center;
  font-family: inherit;
  text-decoration: underline;
  color: #111;
}

.staff-link {
  color: inherit;
  text-decoration: underline;
  transition: var(--transition);
}

.staff-link:hover,
.staff-link:focus {
  color: var(--brick);
  text-decoration: underline;
}

.staff-details .phd,
.staff-details .msc {
  font-size: 0.95em;
  font-weight: bold;
}

.staff-title {
  font-style: italic;
  font-size: 1em;
  color: #555;
  margin-top: 2px;
  text-align: center;
}

.staff-institution {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
  text-align: center;
}

.institution-info {
  color: #666;
  font-size: 1.1em;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* ===== STAFF PROFILE PAGES ===== */
.staff-profile {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
}

.staff-profile h2 {
  color: var(--brick);
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.2em;
}

.profile-info {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.profile-image {
  flex-shrink: 0;
}

.profile-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-details {
  flex: 1;
}

.profile-details h3 {
  color: var(--brick);
  border-bottom: 2px solid var(--brick);
  padding-bottom: 5px;
  margin-top: 25px;
  margin-bottom: 15px;
}

.profile-details h3:first-child {
  margin-top: 0;
}

.profile-details p {
  margin: 8px 0;
  line-height: 1.6;
}

.profile-details ul {
  margin: 10px 0;
  padding-left: 20px;
}

.profile-details li {
  margin: 8px 0;
  line-height: 1.5;
}

/* ===== NEWS CAROUSEL ===== */
.news-carousel {
  max-width: 100%;
  margin: 0 auto 24px auto;
  position: relative;
}

.news-slide {
  display: none;
}

.news-slide.active {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.news-slide img {
  flex-shrink: 0;
  width: 300px;
  max-width: 40%;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.news-slide p {
  flex: 1;
  min-width: 300px;
  margin: 0;
}

.news-carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--brick);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2em;
  cursor: pointer;
  transition: var(--transition);
}

.news-carousel button:hover {
  background: #a0452a;
}

.news-carousel button#prev-news {
  left: -40px;
}

.news-carousel button#next-news {
  right: -40px;
}

.news-dots {
  text-align: center;
  margin-top: 8px;
}

.news-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  background: #bbb;
  border-radius: 50%;
  opacity: 0.7;
  cursor: pointer;
  transition: var(--transition);
}

.news-dot.active {
  background: var(--brick);
}

/* ===== COUNTDOWN TIMER ===== */
.countdown {
  font-size: 1.2em;
  color: var(--brick);
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  background: #f4f7fb;
  color: #333;
  padding: 20px 0 10px 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
  font-size: 0.98rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ===== HOME PAGE SPECIFIC ===== */
.home-content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.campus-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  display: block;
  margin-bottom: 1.2rem;
}

.section-divider {
  margin: 2.5rem 0;
  border: none;
  border-top: 2px solid var(--brick);
}

/* ===== NEWS PAGE SPECIFIC ===== */
.news-item {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--brick);
}

.news-header {
  margin-bottom: 1.5rem;
}

.news-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--brick);
}

.news-date {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 0;
}

.news-content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.news-left-column {
  flex: 0 0 300px;
}

.news-right-column {
  flex: 1;
  min-width: 300px;
}

.news-image {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== VIDEOS PAGE SPECIFIC ===== */
.video-item {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--box-shadow);
}

.video-item h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--brick);
}

.video-description {
  margin-bottom: 20px;
  color: #666;
  line-height: 1.6;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.video-container iframe {
  width: 100%;
  height: 315px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== NETWORK PAGE SPECIFIC ===== */
.network-item {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--brick);
}

.network-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--brick);
}

.network-item .institution {
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

.network-item .description {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1000px) {
  main { 
    max-width: 98vw; 
  }
  
  .header-bar { 
    flex-direction: column; 
    gap: 10px; 
  }
  
  .header-logo img { 
    height: 60px; 
  }
  
  .header-nav { 
    margin-top: 7px; 
    gap: 7px; 
    padding: 0 6px; 
  }
  
  .header-nav a { 
    font-size: 1rem; 
    padding: 8px 13px; 
  }
}

@media (max-width: 800px) {
  .header-bar {
    padding: 16px 6vw 10px 6vw;
  }
  
  .header-nav {
    border-radius: 1.5em;
  }
  
  .staff-list {
    flex-direction: column;
    align-items: center;
    gap: 26px 0;
  }
  
  .staff-card {
    min-width: 0;
    width: 94vw;
    max-width: 340px;
  }
  
  .profile-info {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-image {
    margin-bottom: 20px;
  }
  
  .news-carousel button#prev-news {
    left: 10px;
  }
  
  .news-carousel button#next-news {
    right: 10px;
  }
  
  /* Mobile layout for news carousel */
  .news-slide.active {
    flex-direction: column;
    gap: 1rem;
  }
  
  .news-slide img {
    width: 100%;
    max-width: 100%;
  }
  
  .news-slide p {
    min-width: 0;
  }
  
  /* Mobile layout for news items */
  .news-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .news-left-column,
  .news-right-column {
    min-width: 0;
  }
  
  .news-left-column {
    flex: none;
  }
  
  .news-image {
    width: 100%;
    max-width: 100%;
  }
}