.news-container {
   padding: 120px 40px 60px;
   max-width: 1200px;
   margin: 0 auto;
}

.news-title {
   color: var(--primary-color);
   font-size: 2.5rem;
   margin-bottom: 40px;
   margin-top: 20px;
   font-weight: var(--font-weight-bold);
}

.news-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 30px;
}

.news-card {
   background: var(--white);
   border-radius: 10px;
   overflow: hidden;
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
   transition: transform 0.3s ease;
   display: flex;
   flex-direction: column;
}

.news-card:hover {
   transform: translateY(-5px);
}

.news-image {
   width: 100%;
   background-color: #f8f9fa;
}

.news-image img {
   width: 100%;
   height: auto;
   display: block;
   object-fit: contain;
}

.news-content {
   padding: 15px;
   border-top: 1px solid #eee;
   background-color: var(--white);
}

.news-date {
   color: #666;
   font-size: 0.9rem;
   margin-bottom: 8px;
}

.news-content h3 {
   color: var(--primary-color);
   font-size: 1.2rem;
   margin: 0;
   line-height: 1.4;
}

@media (max-width: 1024px) {
   .news-grid {
      grid-template-columns: repeat(2, 1fr);
   }
}

@media (max-width: 768px) {
   .news-container {
      padding: 100px 20px 40px;
   }

   h1 {
      font-size: 2rem;
      margin-bottom: 30px;
   }
}

@media (max-width: 480px) {
   .news-grid {
      grid-template-columns: 1fr;
   }

   h1 {
      font-size: 1.8rem;
   }

   .news-content h3 {
      font-size: 1.1rem;
   }
}

/* Lightbox styles for news certificates */
.lightbox {
   position: fixed;
   inset: 0;
   z-index: 2000;
}

.lightbox-backdrop {
   position: absolute;
   inset: 0;
   background: rgba(0, 0, 0, 0.7);
}

.lightbox-content {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   max-width: min(90vw, 1200px);
   max-height: 90vh;
   background: #111;
   border-radius: 8px;
   overflow: hidden;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
   display: flex; /* center image */
   align-items: center; /* vertical center */
   justify-content: center; /* horizontal center */
}

.lightbox-image {
   display: block;
   width: 100%;
   height: auto;
   max-height: 90vh;
   object-fit: contain;
   margin: 0 auto; /* ensure horizontal center */
}

.lightbox-close {
   position: absolute;
   top: 8px;
   right: 10px;
   background: rgba(255, 255, 255, 0.15);
   color: #fff;
   border: none;
   border-radius: 4px;
   padding: 6px 10px;
   font-size: 20px;
   cursor: pointer;
}

.lightbox[aria-hidden='true'],
.lightbox[hidden] {
   display: none !important;
}

/* Mobile: make the lightbox truly full-screen and maximize the image */
@media (max-width: 768px) {
   .lightbox-content {
      top: 0;
      left: 0;
      transform: none;
      width: 100vw;
      height: 100vh;
      max-width: 100vw;
      max-height: 100vh;
      border-radius: 0;
      background: #000;
      padding: 0 12px; /* side padding */
      box-sizing: border-box;
      display: flex; /* ensure centering on mobile */
      align-items: center;
      justify-content: center;
   }

   .lightbox-image {
      width: 100%;
      height: auto;
      max-width: 100%;
      max-height: calc(100vh - 24px);
      object-fit: contain;
      margin: 0 auto;
   }

   .lightbox-close {
      top: 12px;
      right: 12px;
      z-index: 1;
      background: rgba(255, 255, 255, 0.25);
   }
}
