/* Only keep this unique gradient override for the news section */
.slide::after {
  background: linear-gradient(45deg, hsla(var(--DarkRed), 0.5), hsla(var(--Gold), 0.5), hsla(var(--Blue), 0.5));
}

.contentFrame h1, .contentFrame h2, .contentFrame h3 {
  color: hsl(var(--PrimaryColor));
}
/* Category Navigation */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.category-button {
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.category-button.active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px currentColor;
}

/* Category Sections */
.category-section {
    margin-bottom: 40px;
}

.category-heading {
    font-size: 24px;
    padding-left: 15px;
    border-left: 5px solid #ccc;
    margin-bottom: 20px;
}

.view-more-container {
    text-align: right;
    margin-top: 10px;
}

.view-more-link {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    color: hsl(var(--PrimaryColor));
    transition: all 0.3s ease;
}

.view-more-link:hover {
    transform: translateX(5px);
}

/* Article Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.back-link, .category-link {
    text-decoration: none;
    font-weight: 600;
    color: hsl(var(--PrimaryColor));
    transition: all 0.3s ease;
}

.back-link:hover, .category-link:hover {
    opacity: 0.8;
}

/* Article Meta Information */
.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.article-meta .date {
    color: #666;
}

.article-meta .category {
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 0.9em;
}

/* Responsive adjustments for categories */
@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .category-nav {
        flex-direction: column;
    }
    
    .category-button {
        width: 90%;
        text-align: center;
    }
}
/* Search Container */
.search-container {
    margin: 20px 0;
    width: 100%;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid hsl(var(--PrimaryColor), 0.3);
    border-radius: 24px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

.search-input:focus {
    border-color: hsl(var(--PrimaryColor), 1);
    box-shadow: 0 0 0 3px hsla(var(--PrimaryColor), 0.2);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: hsl(var(--PrimaryColor), 1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: hsl(var(--PrimaryColor), 0.8);
}

/* Search Results */
.search-results-container {
    margin-top: 20px;
}

.results-count {
    margin-bottom: 20px;
    color: #666;
}

.no-results {
    padding: 20px;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin: 20px 0;
}

.search-meta {
    margin: 10px 0;
}

.search-meta .category {
    font-size: 12px;
    padding: 3px 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-form {
        max-width: 100%;
    }
}
/* Content frame styles */
.contentFrame {
  position: relative;
  padding: 2em;
  background: hsla(var(--White), 0.9);
  border-radius: 10px;
  min-height: 60vh;
  width: 90%;
  max-width: 1920px;
  z-index: 10;
  box-sizing: border-box;
  margin: 0 auto;
}

.contentFrame img {
  border-radius: 10px;
}

.contentFrame ul,
.contentFrame ol {
  overflow: hidden;
  list-style-type: disc;
  list-style-position: inside;
  margin-left: 20px;
  margin-bottom: 20px;
  line-height: 1;
}

.contentFrame li {
  list-style-type: disc;
  color: hsl(var(--PrimaryColor));
  margin-left: 20px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.contentFrame .bulletList {
  margin-left: 20px;
}

/* Video element generic styling */
video {
  width: 100%;
  height: auto;
}


/* Desktop-specific positioning */
@media screen and (min-width: 769px) {
  .contentFrame {
    margin-top: -20vw; /* Keep negative margin only for desktop */
  }
}

/* Adjust for mobile with proper stacking */
@media screen and (max-width: 768px) {
  .contentFrame {
    margin-top: 20px; /* Positive margin for natural stacking */
    padding: 1.5em;
    width: 95%;
  }
}

/*------News Styles------*/
.galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 1em;
}

@media screen and (max-width: 768px) {
  .galleryGrid {
    grid-template-columns: 1fr;
  }
}

.featureGalleryGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1em;
}

@media screen and (max-width: 1200px) {
  .featureGalleryGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .featureGalleryGrid {
    grid-template-columns: 1fr;
  }
}
.homepageGalleryGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Limit to 3 columns */
    grid-gap: 1em;
}

@media screen and (max-width: 768px) {
    .homepageGalleryGrid {
        grid-template-columns: 1fr; /* Stack items on smaller screens */
    }
}
@media screen and (min-width: 1920px) {
    .homepageGalleryGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.galleryGrid img,
.featureGalleryGrid img,
.homepageGalleryGrid img {
  border-radius: 10px;
  width: 100%;
  transition: all 0.3s ease-in-out;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.galleryGrid .roundedBorder,
.featureGalleryGrid .roundedBorder,
.homepageGalleryGrid .roundedBorder {
  border-radius: 10px;
  border: 1px solid hsla(var(--SecondaryColor), 0.25);
  padding: 1em;
  display: flex;
  flex-direction: column;
  background-color: white;
}

.galleryGrid .roundedBorder a,
.featureGalleryGrid .roundedBorder a,
.homepageGalleryGrid .roundedBorder a {
  display: flex;
  flex-direction: column;
}

.galleryGrid .roundedBorder img,
.featureGalleryGrid .roundedBorder img,
.homepageGalleryGrid .roundedBorder img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  align-self: flex-end;
}

.galleryGrid a,
.featureGalleryGrid a,
.homepageGalleryGrid a {
  text-decoration: none;
  color: hsl(var(--PrimaryColor));
}

.galleryGrid a:hover,
.featureGalleryGrid a:hover,
.homepageGalleryGrid a:hover {
  color: hsl(var(--SecondaryColor));
}

.galleryGrid a:hover img,
.featureGalleryGrid a:hover img,
.homepageGalleryGrid a:hover img {
  opacity: 0.5;
  border-radius: 10px;
}

/* Standardized title container with ellipsis for overflow */
.galleryGrid .roundedBorder .title-container,
.featureGalleryGrid .roundedBorder .title-container,
.homepageGalleryGrid .roundedBorder .title-container {
  height: 6em;
  overflow: hidden;
  margin-bottom: 0.5em;
  position: relative;
}

/* Title styling */
.galleryGrid .roundedBorder .title-container h2,
.featureGalleryGrid .roundedBorder .title-container h2,
.homepageGalleryGrid .roundedBorder .title-container h2 {
  margin: 0;
  font-size: 1.1em;
  line-height: 1.4;
}

/* Optional fade effect for text overflow */
.galleryGrid .roundedBorder .title-container::after,
.featureGalleryGrid .roundedBorder .title-container::after,
.homepageGalleryGrid .roundedBorder .title-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.4em;
  background: linear-gradient(transparent, white);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Only show fade when text overflows */
.galleryGrid .roundedBorder .title-container.overflow::after,
.featureGalleryGrid .roundedBorder .title-container.overflow::after,
.homepageGalleryGrid .roundedBorder .title-container.overflow::after {
  opacity: 1;
}

/* Date styling */
.galleryGrid .roundedBorder .date,
.featureGalleryGrid .roundedBorder .date,
.homepageGalleryGrid .roundedBorder .date {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 0.75em;
}

/* Image container */
.galleryGrid .roundedBorder .image-container,
.featureGalleryGrid .roundedBorder .image-container,
.homepageGalleryGrid .roundedBorder .image-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

/* Image styling */
.galleryGrid .roundedBorder .image-container img,
.featureGalleryGrid .roundedBorder .image-container img,
.homepageGalleryGrid .roundedBorder .image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.3s ease-in-out;
}

/* Hover effect */
.galleryGrid .roundedBorder a:hover .image-container img,
.galleryGrid .roundedBorder a:focus .image-container img,
.featureGalleryGrid .roundedBorder a:hover .image-container img,
.featureGalleryGrid .roundedBorder a:focus .image-container img,
.homepageGalleryGrid .roundedBorder a:hover .image-container img,
.homepageGalleryGrid .roundedBorder a:focus .image-container img {
  transform: scale(1.05);
}

/* Ensure modal is using flex layout for centering */
#imageModal {
  display: none;
  z-index: 1000;
}

.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  animation: scaleUp 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 5px;
  max-height: 70vh;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.articleFeature {
  float: left;
  width: 33%;
  max-width: 1000px;
  margin-right: 1em;
}

@media screen and (max-width: 768px) {
  .articleFeature {
    width: 90%;
    margin-bottom: 1em;
  }
}

.articleFeatureContent {
  display: flex;
  flex-direction: column;
}

.articleFeature img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.mainArticle {
  padding: 10px;
}

.mainArticle::after {
  content: "";
  display: table;
  clear: both;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  color: hsl(var(--PrimaryColor));
}

/* Hover Effects for Gallery Images */
.gallery-image {
  width: 100%;
  height: auto;
  border-radius: 5px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.gallery-image.hovered {
  transform: scale(1.05);
  opacity: 0.75;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: hsl(var(--PrimaryColor));
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 1em;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Related News Hover Effects */
.related-news {
  margin-top: 1em;
}

.related-news .galleryGrid img {
  transition: transform 0.3s ease, opacity 0.3s ease, border-radius 0.3s ease;
}

.related-news .galleryGrid img.hovered {
  transform: scale(1.05);
  opacity: 0.8;
  border-radius: 20px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}