/* =========================
  Base
========================= */
body {
  margin: 0;
  padding: 0;
  background: url('/images/it3.webp') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: -1;
}

.glassy-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.request-section h3 {
  color: #1B5E20;
  font-weight: bold;
}

.request-form label {
  font-weight: 600;
  margin-top: 10px;
}

.request-form input,
.request-form textarea {
  border-radius: 6px;
  padding: 8px;
  width: 100%;
  border: 1px solid #ccc;
}

/* =========================
   Detail Pages (News & Events)
========================= */
.news-detail-page .glassy-wrapper,
.event-detail-page .glassy-wrapper {
  background: #fff !important; /* solid background */
  color: #222 !important;      /* dark text */
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.25);
  line-height: 1.7;
  text-align: left; /* better for long paragraphs */
}

.news-detail-page .glassy-wrapper h2,
.event-detail-page .glassy-wrapper h2 {
  color: #196b3f;
  margin-bottom: 15px;
}

.news-detail-page .glassy-wrapper .date,
.event-detail-page .glassy-wrapper .date {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
  display: block;
}

.news-detail-page .glassy-wrapper img,
.event-detail-page .glassy-wrapper img {
  width: 100%;
  border-radius: 10px;
  margin: 20px 0;
  object-fit: cover;
}

.news-detail-page .glassy-wrapper .full-content,
.event-detail-page .glassy-wrapper .full-content {
  font-size: 16px;
  color: #333;
  margin-top: 15px;
}

/* Buttons inside detail */
.news-detail-page .glassy-wrapper .btn,
.event-detail-page .glassy-wrapper .btn {
  background: #196b3f;
  border: none;
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
  padding: 10px 18px;
  transition: 0.3s ease;
}

.news-detail-page .glassy-wrapper .btn:hover,
.event-detail-page .glassy-wrapper .btn:hover {
  background: #cba135;
  color: #222;
}

/* Mobile readability */
@media (max-width: 600px) {
  .news-detail-page .glassy-wrapper,
  .event-detail-page .glassy-wrapper {
    padding: 18px 15px;
    font-size: 15px;
    line-height: 1.6;
  }
}


/* =========================
  Page Wrapper
========================= */
.news-events-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* =========================
  Header
========================= */
.page-header h2 {
  text-align: center;
  font-size: 34px;
  color: #0c5905;
  margin-bottom: 15px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.page-header h3 {
  text-align: center;
  font-size: 22px;
  color: #cba135;
  margin-bottom: 10px;
}

.intro-text {
  text-align: center;
  font-size: 18px;
  color: #ddd;
  margin-bottom: 25px;
}

/* =========================
  Grid & Cards
========================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.news-card {
  position: relative; /* needed for badge */
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: all 0.35s ease;
  text-align: center;
}

.news-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Image */
.news-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

/* Content */
.news-card h5 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.news-card .date {
  font-size: 14px;
  color: #ffc107;
  margin-bottom: 12px;
  display: inline-block;
  background: rgba(255, 193, 7, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
}

.news-card p {
  font-size: 15px;
  color: #eee;
  line-height: 1.5;
  flex-grow: 1; /* ensures space for button */
}

/* Ensure buttons stick to bottom */
.news-card .btn {
  margin-top: auto;
}

/* =========================
  Badges
========================= */
.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  color: #fff;
  text-transform: capitalize;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.news-badge { background: #28a745; }
.event-badge { background: #007bff; }
.announcement-badge { background: #dc3545; }
.achievement-badge { background: #ffc107; color: #222; }

/* =========================
  Category Filters
========================= */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

/* =========================
  Footer
========================= */
.site-footer {
  background: #196b3f;
  padding: 25px 15px;
  text-align: center;
  border-top: 3px solid #cba135;
}

.site-footer p {
  margin: 8px 0;
  color: #eee;
}

.site-footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #cba135;
  font-size: 20px;
  transition: all 0.3s ease;
}

.site-footer .social-icons a:hover {
  background: #cba135;
  color: #196b3f;
  transform: scale(1.15);
}

/* =========================
  Responsive
========================= */
@media (max-width: 992px) {
  .page-header h2 { font-size: 28px; }
  .page-header h3 { font-size: 20px; }
}

@media (max-width: 768px) {
  .page-header h2 { font-size: 24px; }
  .page-header h3 { font-size: 18px; }
  .news-card h5 { font-size: 16px; }
  .news-card p { font-size: 14px; }
}

@media (max-width: 600px) {
  .news-grid {
    grid-template-columns: 1fr; /* single column */
  }

  .news-card {
    padding: 14px;
  }

  .news-card h5 {
    font-size: 15px;
  }

  .news-card .date {
    font-size: 13px;
  }
}
/* Toast (certificate request success) */
.cg-toast {
  position: fixed;
  top: 20px;
  right: -420px; /* start off-screen */
  min-width: 260px;
  max-width: 92%;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 9999;
  transition: right 0.35s ease, opacity 0.35s ease;
  opacity: 0;
  font-family: 'Segoe UI', sans-serif;
}

.cg-toast--visible {
  right: 20px;
  opacity: 1;
}

.cg-toast__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.cg-toast__msg {
  flex: 1;
  font-size: 14px;
  line-height: 1.2;
}

.cg-toast__close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cg-toast__close:hover { transform: scale(1.05); background: rgba(255,255,255,0.18); }

/* Mobile tweak */
@media (max-width: 600px) {
  .cg-toast { top: 14px; left: 50%; transform: translateX(-50%); right: auto; }
  .cg-toast--visible { right: auto; left: 50%; transform: translateX(-50%); opacity: 1; }
  .cg-toast__inner { padding: 10px; }
  .cg-toast__msg { font-size: 13px; }
}
