
/* ===== General Styles ===== */
body {
  font-family: Arial, sans-serif;
  background: #f2f9ff;
  color: #2c3e50;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Container ===== */
.container {
  max-width: 1000px;
  margin: 2.5rem auto 4rem;
  padding: 2rem 3rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  flex-grow: 1;
  box-sizing: border-box;
}

/* ===== Headings ===== */
h1, h2 {
  font-weight: 700;
  color: #004080;
  text-align: center;
  margin-bottom: 2rem;
}
h2 {
  font-size: 20px;
  margin-top: 30px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  color: #34495e;
}

/* ===== Grid Styles ===== */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.grid .card {
  flex: 1 1 180px;
  max-width: 200px;
  background-color: #f0f8ff;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  color: #004080;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.2s ease;
}
.grid .card:hover {
  background-color: #dff0ff;
  transform: translateY(-3px);
}

/* ===== Category Buttons ===== */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.category-button {
  flex: 1 1 140px;
  max-width: 160px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  user-select: none;
}
.category-button:hover {
  filter: brightness(85%);
  transform: translateY(-3px);
}
.category-button.academics { background-color: #3a9ce6; }
.category-button.sports { background-color: #3182cc; }
.category-button.kmf { background-color: #2e78b8; }
.category-button.ksef { background-color: #2965a3; }
.category-button.swops { background-color: #255188; }
.category-button.teachers-bonding { background-color: #21406e; }
.category-button.vacancies { background-color: #1c375f; }
.category-button.upcoming-events { background-color: #172e50; }

/* ===== Header ===== */
.main-header {
  background-color: #004080;
  padding: 0.5rem 2rem;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo a {
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

/* Menu Links */
.menu-links a {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 6px;
  background-color: #e6f0ff;
  color: #003366;
  text-decoration: none;
  font-weight: bold;
  border-radius: 25px;
  transition: all 0.25s ease;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.menu-links a:hover {
  background-color: #cce0ff;
  color: #001f4d;
  transform: translateY(-2px);
}

/* Dropdowns */
.dropbtn {
  background-color: #3498db;
  color: white;
  padding: 6px 12px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
  right: 0;
}
.dropdown-content a {
  color: #004080;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-weight: 500;
}
.dropdown-content a:hover {
  background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== Footer ===== */
.main-footer {
  background-color: #004080;
  color: white;
  padding: 1rem 0;
  text-align: center;
  margin-top: auto;
  box-shadow: 0 -3px 6px rgba(0,0,0,0.1);
  font-size: 0.9rem;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 700px) {
  .grid .card,
  .category-button {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ===== Forms & Inputs ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
form .form-group {
  margin-bottom: 12px;
}
form label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  display: block;
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}
form input:focus,
form select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 4px rgba(52, 152, 219, 0.3);
}
form button {
  background-color: #004080;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
form button:hover {
  background-color: #0059b3;
  transform: translateY(-2px);
}

/* ===== Article Styles ===== */
.single-article-container {
  max-width: 800px;
  margin: 30px auto;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.article-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}
.article-meta-box {
  font-size: 14px;
  color: #666;
  text-align: center;
  margin-bottom: 20px;
}
.article-featured-img {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f9fc;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 20px 0;
  max-height: 300px;
  overflow: hidden;
}
.article-featured-img img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.article-content {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  margin-bottom: 25px;
}

/* ===== Interactions ===== */
.article-interactions {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  text-align: center;
}
.interaction-buttons {
  margin-bottom: 10px;
}
.like-button,
.comment-button {
  cursor: pointer;
  font-size: 14px;
  color: #e74c3c;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 10px;
  transition: background 0.2s;
}
.like-button:hover,
.comment-button:hover {
  background: #ffeef0;
}
.like-button.liked {
  color: #c0392b;
  background-color: #fdecea;
}

/* ===== Comments ===== */
.comment-form {
  margin-top: 30px;
  text-align: center;
}
.comment-form textarea {
  width: 90%;
  height: 80px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical;
}
.comment-form button {
  margin-top: 10px;
  padding: 8px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
}
.comment-form button:hover {
  background-color: #0056b3;
}
.comment-box {
  background: #f9f9f9;
  padding: 10px;
  margin: 10px 0;
  border-left: 4px solid #0077cc;
  border-radius: 4px;
}
/* ===== Page Grid Layout ===== */
.main-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  padding: 2rem;
  max-width: 1300px;
  margin: auto;
  box-sizing: border-box;
}

/* ===== Left & Right Sidebars ===== */
.left-sidebar, .right-sidebar {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.sidebar-block {
  margin-bottom: 1.5rem;
}
.sidebar-block h4 {
  font-size: 16px;
  color: #004080;
  margin-bottom: 10px;
}
.trending-school-list {
  list-style: none;
  padding: 0;
}
.trending-school-list li {
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
}

/* ===== Articles Section ===== */
.left-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Article Row */
.article-row {
  display: flex;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.2s;
}
.article-row:hover {
  transform: translateY(-2px);
}
.article-thumb {
  flex: 0 0 160px;
  height: 140px;
  overflow: hidden;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-info {
  padding: 1rem;
  flex-grow: 1;
}
.article-title a {
  font-size: 17px;
  font-weight: bold;
  color: #004080;
  text-decoration: none;
}
.article-title a:hover {
  text-decoration: underline;
}
.article-meta {
  font-size: 13px;
  color: #555;
  margin-top: 6px;
}

/* Top Categories Thumbnail */
.category-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5faff;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.category-thumb img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .left-sidebar, .right-sidebar {
    order: 2;
  }
  .left-main {
    order: 1;
  }
}
/* Make the explore button circular, modern and floaty */
.dropbtn {
  background-color: #0057A8; /* deep blue */
  color: #fff;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 30px; /* rounded-pill look */
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dropbtn:hover {
  background-color: #003f7f;
  transform: scale(1.05);
}

/* Position dropdown content */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 220px;
  right: 0;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 99;
  border-radius: 10px;
  overflow: hidden;
}

.dropdown-content a {
  color: #333;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  transition: background 0.3s;
}

.dropdown-content a:hover {
  background-color: #f2f2f2;
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Optional: extra glow on hover */
.dropdown:hover .dropbtn {
  box-shadow: 0 6px 20px rgba(0, 87, 168, 0.3);
}
.styled-select {
  padding: 8px;
  border-radius: 5px;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.article-preview {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.article-preview h3 {
  margin: 0 0 0.5rem 0;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: #0066cc;
  font-weight: bold;
}
.category-articles-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-article {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  padding: 10px;
}

.category-article img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 16px;
  flex-shrink: 0;
}

.category-article-details {
  flex-grow: 1;
}

.category-article-details .school-meta {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.category-article-details .engagement {
  font-size: 13px;
  color: #666;
}
.trending-school-list li a:hover {
  text-decoration: underline;
  color: #0055cc;
}
.info-box {
  background: #fefefe;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box h2 {
  margin-top: 0;
  color: #004080;
  font-size: 18px;
}

.info-box p {
  margin: 0.5rem 0 0;
  color: #333;
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 64, 128, 0.15);
  background-color: #f7fbff;
}
.article-thumbnail-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #e6f0ff; /* brighter background */
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.article-thumbnail-row:hover {
  background-color: #d0e7ff;
}

.thumb-img {
  flex: 0 0 140px;
  max-height: 120px;
  overflow: hidden;
  border-radius: 10px;
}

.thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.thumb-details {
  flex: 1;
}

.thumb-details h3 {
  margin: 0 0 5px;
  font-size: 17px;
  color: #003366;
}
/* Section for empty categories */
.empty-msg {
  color: #666;
  text-align: center;
  font-style: italic;
  margin-bottom: 2rem;
}

.error-msg {
  text-align: center;
  color: #d00;
  font-weight: bold;
  margin: 2rem 0;
}

/* Admin Buttons */
.admin-actions {
  text-align: center;
  margin-top: 2rem;
}

.admin-btn {
  display: inline-block;
  background-color: #004080;
  color: white;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.admin-btn:hover {
  background-color: #003366;
  transform: scale(1.05);
}

.admin-note {
  font-weight: bold;
  color: #004080;
  margin-top: 1rem;
}
/* ===== Form Grid Tweaks for Registration ===== */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1 1 45%;
  min-width: 220px;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

/* Responsive stacking for small screens */
@media (max-width: 768px) {
  .form-group {
    flex: 1 1 100%;
  }
}
.tool-link {
  display: block;
  margin: 8px 0;
  padding: 10px;
  background: #f4f8ff;
  border-left: 4px solid #0077cc;
  text-decoration: none;
  color: #003366;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.tool-link:hover {
  background: #d7ecff;
  color: #000;
  padding-left: 14px;
}
.comment-meta-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 5px;
}

.comment-box.left .comment-meta-line {
  flex-direction: row;
  text-align: left;
}

.comment-box.right .comment-meta-line {
  flex-direction: row-reverse;
  text-align: right;
}

.comment-author.you {
  color: green;
}

.comment-author.other {
  color: red;
}

.comment-time {
  color: #777;
  font-style: italic;
  margin-left: 10px;
}
/* 🌟 Common Form Styling for edit_profile and post_swop */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 25px 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #003366;
    font-size: 24px;
}

.form-container form {
    display: flex;
    flex-direction: column;
}

.form-container label {
    font-weight: bold;
    margin: 12px 0 5px;
    color: #333;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container select,
.form-container textarea {
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-container input[disabled] {
    background-color: #eee;
    color: #666;
    cursor: not-allowed;
}

.form-container textarea {
    resize: vertical;
}

.form-container button {
    margin-top: 20px;
    background-color: #0077cc;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-container button:hover {
    background-color: #005fa3;
}

/* ✅ Success Message */
.form-container p {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

/* 📱 Mobile responsiveness */
@media (max-width: 600px) {
    .form-container {
        margin: 20px;
        padding: 20px;
    }

    .form-container h2 {
        font-size: 20px;
    }

    .form-container button {
        font-size: 14px;
        padding: 10px;
    }
}


/* 📌 View Swops Specific Enhancements */

.table-container {
  overflow-x: auto;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0,0,0,0.05);
  margin-top: 20px;
  position: relative;
}

/* Force scroll indicator to be always visible */
.table-container::-webkit-scrollbar {
  height: 8px;
}
.table-container::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}
.table-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
.table-container:hover::-webkit-scrollbar-thumb {
  background: #999;
}


/* Make sure table looks clean and aligned */
.swop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
  min-width: 800px;
}

.swop-table thead {
  background: #f4f6f9;
}

.swop-table th,
.swop-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
}

.swop-table tbody tr:hover {
  background-color: #f9f9f9;
}

/* Style the Post New Swop button */
a.button-link {
  background-color: #007BFF;
  color: white;
  padding: 8px 14px;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

a.button-link:hover {
  background-color: #0056b3;
}
/* Filters layout in a row */
.form-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.filter-box {
  flex: 1 1 220px;
}
/* ✅ Swop Table Scroll Improvements */
.table-container {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable both-edges;
  position: relative;
}
.table-container::after {
  content: "← Scroll right →";
  position: absolute;
  bottom: 5px;
  right: 20px;
  font-size: 12px;
  color: #888;
  pointer-events: none;
  display: none;
}
@media (max-width: 768px) {
  .table-container::after {
    display: block;
  }
}
.swop-table td {
  white-space: nowrap;
}

.pagination {
  text-align: center;
  margin-top: 1rem;
}
.pagination a {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  background-color: #007BFF;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.pagination a:hover {
  background-color: #0056b3;
}
.pagination a.active {
  background-color: #0056b3;
}
.hero-section {
  background: linear-gradient(to right, #007f5f, #2b9348);
  color: #fff;
  text-align: center;
  padding: 60px 20px 40px;
  border-bottom: 4px solid #004b23;
}

.hero-section h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.hero-section .subheading {
  font-size: 1.2rem;
  color: #dfffe1;
  font-weight: 400;
}
@media (max-width: 768px) {
  .main-grid {
    display: flex;
    flex-direction: column;
    padding: 1rem;
  }

  .left-sidebar, .right-sidebar, .left-main {
    width: 100%;
    padding: 1rem 0;
  }

  .article-row {
    flex-direction: column;
  }

  .article-thumb {
    width: 100%;
    height: auto;
  }

  .article-thumb img {
    height: auto;
    max-height: 250px;
  }
}
@media (max-width: 600px) {
  .admin-btn,
  .dropbtn,
  form button {
    padding: 14px 20px;
    font-size: 16px;
  }

  .category-button {
    font-size: 14px;
    padding: 12px;
  }
}
.main-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  padding: 20px;
  background: #f3f7fc;
}

.left-sidebar, .right-sidebar {
  background: #ffffff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

.left-main {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

.sidebar-block {
  margin-bottom: 30px;
}

.sidebar-block h4 {
  background: #e1ecf4;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  color: #104c91;
}

.article-thumbnail-row {
  display: flex;
  margin-top: 12px;
  gap: 10px;
  cursor: pointer;
  background: #f8fafd;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.article-thumbnail-row:hover {
  background: #e4f0ff;
}

.thumb-img img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.thumb-details h3 {
  font-size: 14px;
  margin: 0;
  color: #064579;
}

.school-meta {
  font-size: 12px;
  color: #666;
}

.article-title {
  font-size: 26px;
  font-weight: bold;
  color: #1e2f57;
  margin-bottom: 10px;
}

.article-meta-box {
  font-size: 14px;
  margin-bottom: 20px;
  color: #4b5563;
  background: #eef2f7;
  padding: 10px;
  border-left: 4px solid #1976d2;
  border-radius: 6px;
}

.article-featured-img img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 8px;
}

.article-content {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  padding-bottom: 20px;
}

.tool-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  text-decoration: none;
  color: #1976d2;
}

.tool-link:hover {
  text-decoration: underline;
}

.empty-msg {
  font-size: 13px;
  color: #aaa;
}
.article-section-title {
  font-size: 1.05rem;
  font-weight: bold;
  background-color: #f2f6ff;
  padding: 8px 12px;
  border-left: 4px solid #0077cc;
  border-radius: 4px;
  color: #0077cc;
  margin-bottom: 12px;
  transition: background-color 0.3s, color 0.3s;
}

.article-section-title:hover {
  background-color: #e0efff;
  color: #005fa3;
}
.article-title a {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: bold;
  color: #0077cc;
  background-color: #f2f6ff;
  padding: 6px 10px;
  border-left: 4px solid #0077cc;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 6px;
}

.article-title a:hover {
  background-color: #e0efff;
  color: #005fa3;
}
.single-article-title {
  font-size: 24px;
  background-color: #eef4ff;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-left: 6px solid #2d77e8;
  border-radius: 5px;
  font-weight: bold;
  color: #2d3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.single-article-title .emoji {
  font-size: 24px;
}

.article-meta-box {
  margin-bottom: 20px;
  font-size: 14px;
}

.article-meta-box a {
  color: #2d77e8;
  background-color: #eaf2ff;
  padding: 3px 7px;
  border-radius: 6px;
  margin-right: 5px;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.article-meta-box a:hover {
  background-color: #2d77e8;
  color: #fff;
}

.article-featured-img {
  margin-bottom: 20px;
  text-align: center;
}

.article-featured-img img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.article-content {
  line-height: 1.8;
  font-size: 16px;
  color: #333;
  padding: 10px 0;
}
.modern-articles {
  padding: 2rem;
  background: #f9f9f9;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 5px;
}

.filter-group select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.article-list {
  max-width: 900px;
  margin: auto;
}
/* ==== COMMENTS STYLING ==== */
.comments-wrapper {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
}

.comments-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

.comment-list .comment {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  padding: 10px 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.comment-avatar {
  font-size: 24px;
  margin-right: 10px;
  margin-top: 5px;
}

.comment-body {
  flex: 1;
}

.comment-meta {
  font-size: 14px;
  font-weight: bold;
  color: #444;
  margin-bottom: 4px;
}

.comment-meta small {
  font-weight: normal;
  color: #777;
  margin-left: 5px;
}

.comment-text {
  font-size: 15px;
  line-height: 1.4;
}

.comment-form {
  margin-top: 20px;
}

.comment-input-wrapper {
  display: flex;
  align-items: flex-start;
}

.comment-input {
  width: 100%;
  height: 70px;
  padding: 12px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
  resize: none;
  outline: none;
  transition: border 0.2s ease;
}

.comment-input:focus {
  border-color: #007bff;
}

.comment-login-msg {
  background: #fff3cd;
  padding: 10px;
  border-radius: 8px;
  font-size: 15px;
}
 .comment-submit-wrapper {
  margin-top: 10px;
  text-align: right;
}

.comment-post-btn {
  background: #2a75f3;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.comment-post-btn:hover {
  background: #1d5ec2;
}
.btn {
  background-color: #4e73df;
  color: white;
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
}

.btn:hover {
  background-color: #2e59d9;
}
/* === Header Style === */
.main-header {
  background-color: #003366;
  padding: 15px 20px;
  color: white;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.logo-area {
  flex: 1 1 200px;
}

.site-title {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
}

.tagline {
  margin: 2px 0 0 0;
  font-size: 14px;
  color: #cce0ff;
}

.search-area {
  flex: 2 1 300px;
  position: relative;
}

.search-area input {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
}

#searchResults {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  color: black;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  z-index: 9999;
  display: none;
  border-radius: 5px;
}

#searchResults div {
  padding: 8px;
  cursor: pointer;
}

#searchResults div:hover {
  background-color: #f0f0f0;
}

.explore-btn-container {
  flex: 0 0 auto;
}

.explore-btn {
  background-color: #0055cc;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}

.explore-btn:hover {
  background-color: #0041a3;
}
.main-header {
  background-color: #003366;
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 22px;
  font-weight: bold;
  margin: 0;
}

.tagline {
  font-size: 13px;
  color: #cde;
  margin-top: 2px;
}

.search-container {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 7px 12px;
  border-radius: 5px;
  border: none;
  font-size: 14px;
}

#searchResults {
  display: none;
  position: absolute;
  background: #fff;
  color: #000;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  top: 100%;
  left: 0;
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
}

#searchResults div {
  padding: 8px;
  cursor: pointer;
}

#searchResults div:hover {
  background-color: #f2f2f2;
}

.explore-container {
  flex-shrink: 0;
}

.explore-btn {
  background-color: #007bff;
  padding: 8px 16px;
  border-radius: 5px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.explore-btn:hover {
  background-color: #0056b3;
}
.inline-sidebar {
  display: none;
  margin: 20px 0;
  border-top: 1px solid #ccc;
  padding-top: 15px;
}

@media (max-width: 768px) {
  .left-sidebar,
  .right-sidebar {
    display: none;
  }

  .inline-sidebar {
    display: block;
  }

  .inline-sidebar img {
    max-width: 100%;
    height: auto;
  }

  .inline-sidebar ul {
    padding-left: 1rem;
  }
}
/* Prevent horizontal scrolling */
body, html {
  overflow-x: hidden;
}

/* Hide floating sidebars on mobile */
@media (max-width: 768px) {
  .left-sidebar,
  .right-sidebar {
    display: none !important;
  }

  .main-grid {
    display: block !important;
    width: 100%;
    overflow-x: hidden;
  }
}
.article-page-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
}

.main-article-block {
  max-width: 850px;
  margin: auto;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.related-block {
  background: #f7f7f7;
  padding: 1rem;
  border-radius: 8px;
}

@media screen and (min-width: 992px) {
  .article-page-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .main-article-block {
    flex: 3;
  }

  .related-articles-grid {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-left: 2rem;
  }
}
.article-img-caption {
  font-size: 0.95rem;
  color: #555;
  margin-top: 4px;
  font-style: italic;
  text-align: center;
}
/* Ensure main-grid stacks on mobile */
@media screen and (max-width: 768px) {
  .main-grid {
    display: block;
  }

  .left-sidebar,
  .right-sidebar,
  .inline-left-sidebar,
  .inline-right-sidebar {
    display: none; /* hide sidebars on small screens */
  }

  .left-main {
    width: 100%;
    padding: 10px;
  }

  .article-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
  }

  .article-thumb img {
    width: 100%;
    height: auto;
    border-radius: 4px;
  }

  .article-info {
    margin-top: 10px;
  }

  .article-title a {
    font-size: 18px;
    font-weight: bold;
    color: #333;
  }

  .article-meta {
    font-size: 14px;
    color: #555;
  }
}
/* =========================
   Responsive Page Layout
   Used in index.php & article pages
========================= */

.article-page-layout {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 20px;
  flex-wrap: nowrap;
}

.left-sidebar, .right-sidebar {
  width: 250px;
}

.main-article-block {
  flex: 1;
  background: #fff;
  padding: 15px;
  border-radius: 6px;
}

/* Article row design */
.article-row {
  display: flex;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid #ddd;
}

.article-thumb img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.article-info {
  flex: 1;
}

.article-title a {
  font-weight: bold;
  font-size: 1.05rem;
  color: #0077cc;
  text-decoration: none;
}

.article-meta {
  font-size: 0.88rem;
  color: #555;
  margin-top: 6px;
}

/* Mobile layout */
@media (max-width: 768px) {
  .article-page-layout {
    flex-direction: column;
    padding: 10px;
  }

  .left-sidebar,
  .right-sidebar {
    width: 100%;
    order: 2;
  }

  .main-article-block {
    width: 100%;
    order: 1;
  }

  .article-row {
    flex-direction: column;
  }

  .article-thumb img {
    width: 100%;
    height: auto;
  }
}
/* Sidebar/Desktop Layout */
.main-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 20px;
}

/* Default order */
.left-sidebar {
  width: 250px;
  order: 1;
}
.left-main {
  flex: 1;
  order: 2;
}
.right-sidebar {
  width: 250px;
  order: 3;
}

/* Mobile layout */
@media (max-width: 768px) {
  .main-grid {
    flex-direction: column;
  }

  .left-sidebar,
  .right-sidebar {
    width: 100%;
    order: 3; /* move below main */
  }

  .left-main {
    width: 100%;
    order: 1; /* ensure main comes first */
  }
}
/* === Homepage Grid Fix === */
.main-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  padding: 20px;
}

.left-sidebar {
  grid-column: 1;
}
.left-main {
  grid-column: 2;
}
.right-sidebar {
  grid-column: 3;
}

/* Mobile view: stack all sections */
@media (max-width: 768px) {
  .main-grid {
    display: block;
    padding: 10px;
  }

  .left-sidebar,
  .right-sidebar {
    display: none;
  }
}
/* Inserted sidebars in mobile view only */
@media (max-width: 768px) {
  .inline-sidebar {
    background: #f8f8f8;
    border: 1px solid #ccc;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
  }

  .inline-sidebar h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .inline-sidebar .sidebar-block {
    margin-bottom: 12px;
  }

  /* Hide original sidebars on mobile */
  .left-sidebar,
  .right-sidebar {
    display: none;
  }
}
@media (max-width: 768px) {
  .main-grid {
    display: block;
    padding: 0 10px;
  }

  .left-sidebar,
  .right-sidebar {
    display: none;
  }

  .inline-left-sidebar,
  .inline-right-sidebar {
    display: block;
    margin: 20px 0;
  }

  .left-main {
    width: 100%;
    margin: 0;
  }
}

@media (min-width: 769px) {
  .inline-left-sidebar,
  .inline-right-sidebar {
    display: none;
  }

  .main-grid {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
  }

  .left-sidebar,
  .right-sidebar {
    display: block;
  }

  .left-main {
    max-width: 100%;
  }
}
/* 🔄 Horizontal Scroll Sidebars for Mobile */
@media (max-width: 768px) {
  .scrollable-sidebar {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    gap: 12px;
    scroll-snap-type: x mandatory;
  }

  .scrollable-sidebar > .sidebar-card {
    min-width: 240px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.05);
  }

  .inline-left-sidebar, .inline-right-sidebar {
    margin: 20px 0;
  }
}
@media screen and (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-scroll-section {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px;
  }

  .mobile-scroll-section > * {
    flex: 0 0 auto;
    min-width: 250px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    padding: 10px;
  }

  .article-row {
    margin-bottom: 20px;
  }
}
@media screen and (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}
/* === 📱 MOBILE TOOLS SECTION === */
.mobile-tools-section {
  margin: 10px 0;
  padding: 0 0 10px;
  background-color: #fefefe;
}

.mobile-tools-section h4.article-section-title {
  font-size: 20px;
  color: #0051a3;
  margin: 8px 12px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(to right, #d0e8ff, #e6f0ff);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #c8e0ff;
  box-shadow: 0 1px 3px rgba(0, 85, 170, 0.1);
}

/* Horizontal swipe container */
.tools-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Each swipeable block with 2 stacked buttons */
.tools-card {
  flex: 0 0 auto;
  min-width: 230px;
  max-width: 250px;
  background: #f1f7ff;
  border: 1px solid #bcd;
  border-radius: 14px;
  padding: 16px 14px;
  scroll-snap-align: start;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  transition: transform 0.2s ease;
}

.tools-card:hover {
  transform: translateY(-2px);
}

/* Buttons inside the cards */
.tool-button {
  display: block;
  background: #ffffff;
  border: 1px solid #aad;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #0055aa;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: background 0.3s, box-shadow 0.3s;
}

.tool-button:hover {
  background: #d0e8ff;
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.15);
}

/* Hide desktop section on mobile */
@media screen and (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

/* Hide mobile tools on desktop */
@media screen and (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}
/* === 📱 RIGHT SIDEBAR FOR MOBILE === */
.mobile-right-section {
  margin: 10px 0;
  padding-bottom: 10px;
}

.mobile-right-section h4.article-section-title {
  font-size: 20px;
  color: #003366;
  margin: 8px 12px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(to right, #d9f0ff, #eaf7ff);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cde4ff;
  box-shadow: 0 1px 3px rgba(0, 85, 170, 0.1);
}

/* Scroll container */
.right-scroll-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Card container */
.right-card {
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 240px;
  background: #f9fcff;
  border: 1px solid #cce;
  border-radius: 14px;
  padding: 12px 10px;
  scroll-snap-align: start;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease;
}

.right-card:hover {
  transform: translateY(-2px);
}

/* Buttons inside cards */
.right-button {
  display: block;
  background: #ffffff;
  border: 1px solid #aad;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #005199;
  text-decoration: none;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.right-button:hover {
  background: #e0f0ff;
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.15);
}

/* Show mobile only on small devices */
@media screen and (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}
.main-grid {
  display: flex;
  flex-direction: row;
  gap: 20px; /* adds spacing between center and sidebar */
}
.category-thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdfdfd;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  transition: background 0.3s;
}

.category-thumb:hover {
  background: #f0f8ff;
}

.thumb-img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
}
.category-article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.category-article-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  background-color: #fefefe;
  border: 1px solid #dde;
  border-radius: 10px;
  padding: 10px;
  transition: background 0.3s;
  color: #000;
}

.category-article-item:hover {
  background-color: #f0f8ff;
}

.thumb-wrapper img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.info-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #333;
}

.info-wrapper strong {
  font-weight: 700;
  font-size: 15px;
  color: #0055aa;
}

.info-wrapper small {
  color: #555;
}
.article-page-layout {
  display: flex;
  flex-direction: column; /* Ensure main article is on top */
  gap: 20px; /* spacing between article and related blocks */
}

.main-article-block {
  order: 0;
}

.related-articles-grid {
  order: 1;
}

/* Optional: make related articles display grid-style on wider screens */
@media (min-width: 769px) {
  .article-page-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .main-article-block {
    flex: 2;
    margin-right: 20px;
  }

  .related-articles-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}
/* Make swop table responsive */
.swop-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.swop-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px; /* prevent cramping on narrow screens */
}

.swop-table th, .swop-table td {
  padding: 8px;
  border: 1px solid #ccc;
  text-align: left;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: bold;
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .swop-table {
    font-size: 0.9rem;
  }

  .swop-table th,
  .swop-table td {
    white-space: nowrap;
  }

  .dropdown-content {
    position: static;
  }

  .dropdown .dropbtn {
    font-size: 1rem;
  }
}
/* Scrollable horizontal table container */
.swop-table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Table styling */
.swop-table {
  width: 100%;
  min-width: 1000px; /* ensures horizontal scroll on small screens */
  border-collapse: collapse;
}

.swop-table th, .swop-table td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
  white-space: nowrap; /* ensures content doesn’t wrap in narrow view */
}

/* Mobile-friendly filter layout */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
}
/* Existing dropdown button */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 30px;
  background-color: #f9f9f9;
  min-width: 140px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1000;
  padding: 8px 0;
  border-radius: 8px;
}

.dropdown-content a,
.dropdown-content form button {
  padding: 8px 16px;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
}

.dropdown-content a:hover,
.dropdown-content form button:hover {
  background-color: #f0f0f0;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Allow dropdown to be visible outside horizontal scroll on large screens */
@media (min-width: 769px) {
  .swop-table-responsive {
    overflow-x: visible;
  }

  .swop-table {
    width: 100%;
    min-width: auto;
  }
}


  .category-section h3 {
    margin-bottom: 10px;
    margin-top: 30px;
    font-size: 1.3rem;
    border-bottom: none;
  }
  .scroll-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 10px;
  }
  .article-card {
    flex: 0 0 250px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }
  .article-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
  }
  .article-info {
    padding: 10px;
  }
  .article-info a {
    font-weight: bold;
    text-decoration: none;
    color: #333;
  }
  .article-meta {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
  }
  @media (max-width: 768px) {
    .article-card {
      flex: 0 0 80%;
    }
  }
.see-all-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #007BFF;
  color: white;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s;
}
.see-all-btn:hover {
  background: #0056b3;
}

/* Style for like/comment */
.meta-action {
  text-decoration: none;
  font-size: 0.9rem;
  color: #333;
  transition: color 0.2s;
}
.meta-action:hover {
  color: #007BFF;
}
.see-all-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #007BFF;
  color: white;
  border-radius: 20px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s;
}
.see-all-btn:hover {
  background: #0056b3;
}

.like-button {
  text-decoration: none;
  font-size: 0.9rem;
  color: #333;
}
.like-button:hover {
  color: #007BFF;
}

  .article-mini {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
  }
  .article-mini-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
  }
  .article-mini-info {
    flex: 1;
    font-size: 14px;
    color: #333;
  }
  .see-more-btn {
    background: #007BFF;
    color: white;
    text-align: center;
    font-weight: bold;
    margin-top: 8px;
    border-radius: 5px;
  }
  .see-more-btn:hover {
    background: #0056b3;
  }
.article-row a[title="Manage Article"]:hover {
  color: #0077cc;
  cursor: pointer;
}
 
    .dropdown {
      position: relative;
      display: inline-block;
    }

    .dropbtn {
      background-color: white;
      color: red;
      padding: 10px 16px;
      font-size: 16px;
      border-radius: 20px;
      border: none;
      cursor: pointer;
    }

    .dropdown-content {
      display: none;
      position: absolute;
      background-color: #f9f9f9;
      min-width: 240px; /* Wider dropdown */
      box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
      z-index: 1;
    }

    .dropdown:hover .dropdown-content {
      display: block;
    }

    .dropdown-content a {
      color: black;
      padding: 10px 14px;
      text-decoration: none;
      display: block;
    }

    .dropdown-content a:hover {
      background-color: #f1f1f1;
    }
/* === Simplified Header === */
.main-header {
  background-color: #003366;
  padding: 12px 20px;
}

/* Title */
.site-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: bold;
}

/* Nav container */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* Nav links */
.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background 0.25s ease;
  font-size: 1rem;
}
.nav-link:hover {
  background: rgba(255,255,255,0.2);
}

/* Explore dropdown */
.explore-dropdown {
  position: relative;
}
.explore-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: #ffffff;
  color: #003366;
  min-width: 180px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 100;
  text-align: left;
}
.explore-dropdown .dropdown-menu a {
  display: block;
  padding: 8px 12px;
  color: #003366;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}
.explore-dropdown .dropdown-menu hr {
  margin: 6px 0;
  border: none;
  border-top: 1px solid #ddd;
}
.explore-dropdown .dropdown-menu a:hover {
  background: #f5f5f5;
}
/* show on click */
.explore-dropdown .explore-btn {
  background: none;
  border: none;
  cursor: pointer;
}
.explore-dropdown .explore-btn:focus + .dropdown-menu,
.explore-dropdown .dropdown-menu:hover {
  display: block;
}

/* === Mobile === */
@media (max-width: 768px) {
  .main-header {
    text-align: center;
  }

  .main-nav {
    justify-content: space-between; /* Home left, Explore right, Chatroom in center */
    position: relative;
    margin-top: 12px;
  }

  /* center the middle link */
  .main-nav .nav-link:nth-child(2) {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* ensure Explore stays right */
  .main-nav .explore-dropdown {
    margin-left: auto;
  }
}

.adsbygoogle {
    display: none !important;
}
