/* Hero section */
.hero {
  height: 400px;
  background-image: url('../assets/images/people.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 40px;
  animation: heroAnimation 20s ease-in-out infinite;
  overflow: hidden;
}

@keyframes heroAnimation {
  0% {
    background-size: 100%;
    background-position: center;
  }
  50% {
    background-size: 110%;
    background-position: center 45%;
  }
  100% {
    background-size: 100%;
    background-position: center;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: white;
  padding: 20px;
}

.hero-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: white;
}

.hero-overlay p {
  font-size: 1.2rem;
  max-width: 700px;
  margin-bottom: 20px;
  color: white;
}

/* News & events content */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.news-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-image-container {
  position: relative;
  height: 180px;
  overflow: hidden;
}

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

.news-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #7338A0;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.news-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-category {
  color: #7338A0;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.news-title {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-excerpt {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 12px;
  flex-grow: 1;
  line-height: 1.5;
}

.read-more {
  display: inline-block;
  padding: 8px 16px;
  background-color: #7338A0;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin-top: 10px;
}

.read-more:hover {
  background-color: #581845;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(115, 56, 160, 0.3);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}

.pagination-button {
  padding: 8px 16px;
  margin: 0 4px;
  background-color: #7338A0;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-button.active {
  background-color: #581845;
}

.pagination-button:hover {
  background-color: #581845;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(115, 56, 160, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .main-content-container {
    flex-direction: column;
  }

  .search-sidebar {
    width: 100%;
    position: static;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  /* Hero Section Mobile */
  .hero {
    height: 300px;
    animation: none !important;
    background-attachment: scroll !important;
  }

  .hero-overlay {
    padding: 15px;
    animation: none !important;
  }

  .hero-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .hero-overlay p {
    font-size: 1rem;
    max-width: 90%;
    line-height: 1.5;
  }

  .main-content-container {
    padding: 0 15px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .date-filters {
    flex-direction: column;
  }

  .day-range {
    flex-direction: column;
  }

  .day-range::before {
    margin-bottom: 5px;
  }
}

/* Style for login-register btn */

.login-btn, .register-btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  background-color: #00b7ff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.login-btn:hover, .register-btn:hover {
  background-color: white;
  color: #0c4da2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Add header-right container styles */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.logreg-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Search and Filter Container */
.search-filter-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.search-filter-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
}

.search-box input {
  flex: 1;
  padding: 12px 15px;
  padding-right: 45px; /* Make room for the search icon */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-box button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 15px;
  background-color: #7338A0;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box button:hover {
  background-color: #581845;
}

.search-box button i {
  font-size: 1rem;
}

/* Date Filters */
.date-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.date-filters select {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  display: block;
}

.day-range {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.day-range select {
  width: 100%;
  max-width: 110px;
}

.day-range::before {
  min-width: 40px;
}

@media (max-width: 480px) {
  /* Hero Section Small Mobile */
  .hero {
    height: 250px;
    animation: none !important;
    background-attachment: scroll !important;
  }

  .hero-overlay {
    padding: 10px;
    animation: none !important;
  }

  .hero-overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  .hero-overlay p {
    font-size: 0.9rem;
    max-width: 95%;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .date-filters select {
    max-width: 100%;
  }
  .day-range select {
    max-width: 100%;
  }
}

@media (max-width: 320px) {
  /* Hero Section Extra Small Mobile */
  .hero {
    height: 220px;
  }

  .hero-overlay h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .hero-overlay p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* Main Content Container */
.main-content-container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

.news-content-section {
  flex: 1;
}

/* Search Sidebar */
.search-sidebar {
  width: 300px;
  height: fit-content;
  margin-top: 40px;
}

.search-filter-form {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-box button {
  padding: 12px 20px;
  background-color: #7338A0;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background-color: #581845;
}

.date-filters {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.date-filters select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 10.2px;
  background-color: white;
  cursor: pointer;
}

.day-range {
  display: flex;
  gap: 10px;
  align-items: center;
}

.day-range select {
  flex: 1;
}

.day-range::before {
  content: "Days:";
  color: #666;
  font-size: 0.9rem;
  margin-right: 5px;
}

.filter-button {
  padding: 10px 20px;
  background-color: #7338A0;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-button:hover {
  background-color: #581845;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(115, 56, 160, 0.3);
}

.clear-filters {
  padding: 8px 16px;
  background-color: transparent;
  color: #7338A0;
  border: 2px solid #7338A0;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
  display: block;
  margin-top: 10px;
}

.clear-filters:hover {
  background-color: #7338A0;
  color: white;
}

.search-sidebar:has(.clear-filters) {
  margin-top: 10px;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .main-content-container {
    flex-direction: column;
  }

  .search-sidebar {
    width: 100%;
    position: static;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-content-container {
    padding: 0 15px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .date-filters {
    flex-direction: column;
  }

  .day-range {
    flex-direction: column;
  }

  .day-range::before {
    margin-bottom: 5px;
  }
}

.no-news {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  padding: 20px;
  grid-column: 1 / -1;
  margin-top: 115px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}