* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #001f5b;
  --primary-dark: #000d2e;
  --secondary-blue: #003399;
  --light-gray: #f5f5f5;
  --text_dark: #333;
  --text-light: #666;
  --border-color: #ddd;
  --white: #fff;
  --accent: #0052cc;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text_dark);
  background-color: #fafafa;
}

nav {
  background-color: var(--primary-blue);
  /* Reverted navbar to original padding and removed full-width styling */
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-start; /* changed justify-content from space-between to flex-start to reduce gap between logo and menu */
  align-items: center;
  padding: 0 20px;
  gap: 10px; /* added gap property to control spacing between logo and nav menu */
  /* removed flex-wrap: wrap to prevent navigation items from wrapping below logo */
}

.nav-logo {
  color: var(--white);
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  /* added logo image styling */
  display: flex;
  align-items: center;
  height: 60px;
  flex-shrink: 0;
}

/* Removed logo image and logo text styling */

/* added new logo-image class for proper alignment */
.logo-image {
  height: 70px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  /* removed flex-wrap: wrap to keep menu items on single line */
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
  /* prevent nav items from shrinking */
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  /* reduced padding from 20px to 12px vertically to fit more items */
  padding: 12px 14px;
  display: block;
  transition: background-color 0.3s ease;
  font-weight: 500;
  font-size: 16px; /* increased from 12px to 16px for better readability */
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active > .nav-link {
  background-color: rgba(255, 255, 255, 0.2);
  border-bottom: 3px solid var(--white);
}

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

/* Replaced static hero section with carousel styling */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 31, 91, 0.75), rgba(0, 13, 46, 0.75));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  max-width: 1000px;
}

.hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
  animation: fadeInUp 1s ease-out;
}

.hero-content p {
  font-size: 24px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.hero-nav:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.hero-prev {
  left: 30px;
}

.hero-next {
  right: 30px;
}

.hero-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.indicator.active {
  background-color: var(--white);
  width: 30px;
  border-radius: 6px;
}

/* Remove old hero styles */
.hero {
  display: none;
}

main {
  min-height: calc(100vh - 200px);
}

section {
  padding: 60px 20px;
}

section h2 {
  color: var(--primary-blue);
  font-size: 36px;
  margin-bottom: 30px;
  text-align: center;
}

section h3 {
  color: var(--primary-blue);
  font-size: 24px;
  margin-top: 20px;
  margin-bottom: 15px;
}

.grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Added grid-4 class for 4-column layout */
/* Update grid-4 to force exactly 4 columns on desktop */
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Added grid-6 class for 6-column layout in partners section */
/* Update grid-6 to properly display 6 columns on desktop */
.grid-6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* Added 2-column profile grid and profile card styling to match reference layout */
.grid-2-profile {
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.profile-card {
  display: flex;
  flex-direction: column;
}

.profile-image {
  /* Increased image height from 300px to 400px for larger profile display */
  height: 400px;
  background-color: #d4d4d4;
  margin-bottom: 0;
}

.profile-content {
  /* Reduced padding and removed description text to match reference style */
  padding: 20px;
  text-align: center;
}

.profile-content .card-title {
  margin-bottom: 5px;
  font-size: 18px;
}

.profile-content p {
  font-size: 14px;
}

.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
  width: 100%;
  /* increased height from 200px to 300px for larger profile pictures */
  height: 300px;
  background-color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 20px;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.card-text {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
}

.card-meta {
  font-size: 12px;
  color: #999;
  margin-top: 15px;
}

.badge {
  display: inline-block;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Add full-size featured image styling for news page */
.featured-image-full {
  width: 100%;
  height: auto;
  max-height: none;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.featured-image-full img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.post-card-full {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  transition: transform 0.3s ease;
}

.post-card-full:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.post-card-content {
  padding: 30px;
}

form {
  max-width: 600px;
  margin: 30px auto;
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dark);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 5px rgba(0, 31, 91, 0.2);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: 44px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: #666;
}

.btn-secondary:hover {
  background-color: #444;
}

.btn-danger {
  background-color: #d32f2f;
}

.btn-danger:hover {
  background-color: #b71c1c;
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  margin-right: 5px;
}

/* Added pagination styling */
.pagination-btn {
  display: inline-block;
  padding: 8px 12px;
  background-color: var(--white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
}

.pagination-btn:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.pagination-btn.active {
  background-color: var(--primary-blue);
  color: var(--white);
  cursor: default;
}

/* Add accordion styling */
.accordion-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  width: 100%;
  padding: 20px;
  background: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-blue);
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: #f5f5f5;
}

.accordion-header svg {
  color: var(--primary-blue);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.active .accordion-header {
  background-color: #f0f0f0;
}

.accordion-item.active .accordion-header svg {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  animation: slideDown 0.3s ease;
}

.accordion-content.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

footer {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 40px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.stats-box {
  text-align: center;
  padding: 20px;
}

.stats-number {
  font-size: 36px;
  color: var(--primary-blue);
  font-weight: bold;
  margin-bottom: 10px;
}

.stats-label {
  font-size: 16px;
  color: var(--text-light);
}

/* Removed carousel navigation styles since Latest News is now a 3-column grid */
.news-carousel-wrapper {
  display: none;
}

.news-carousel-container {
  display: none;
}

.news-carousel-track {
  display: none;
}

.news-card-item {
  display: none;
}

.carousel-nav {
  display: none;
}

/* Add responsive breakpoint for grid-4 on tablets */
/* Add proper responsive breakpoints for grid-6 */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Add responsive breakpoint for grid-6 on tablets */
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .news-card-item {
    flex: 0 0 calc(50% - 15px);
    min-width: calc(50% - 15px);
  }
}

/* Add responsive styles for About page president message section */
@media (max-width: 968px) {
  section > .container > div[style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }

  section > .container > div > div[style*="position: sticky"] {
    position: relative !important;
    top: 0 !important;
  }
}

/* Add responsive styles for college and high school overview sections */
@media (max-width: 768px) {
  /* Added responsive breakpoint for profile grid on mobile */
  .grid-2-profile {
    grid-template-columns: 1fr;
  }

  .profile-image {
    height: 300px;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 18px;
  }

  .hero-nav {
    width: 45px;
    height: 45px;
  }

  .hero-prev {
    left: 15px;
  }

  .hero-next {
    right: 15px;
  }

  .hero-nav svg {
    width: 24px;
    height: 24px;
  }

  .hero {
    padding: 180px 20px;
    min-height: 500px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .nav-container {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .nav-menu {
    width: auto;
    /* allow menu to be its natural width and scroll if needed */
    flex-shrink: 1;
  }

  .nav-link {
    padding: 15px 8px;
    /* reduced padding for mobile */
    font-size: 11px;
    /* reduced from 13px to 11px for mobile */
  }

  section {
    padding: 40px 20px;
  }

  section h2 {
    font-size: 28px;
  }

  /* Add responsive layout for college/high school sections */
  section > .container > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Add responsive grid for 2-column department layouts */
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Keep grid-6 at 2 columns on mobile for better visibility */
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  form {
    padding: 20px;
  }

  .news-card-item {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }
}
