/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #ffffff;
}


body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
/*  overflow-x: hidden;    Prevents entire page from scrolling sideways */
}


a {
  text-decoration: none;
  color: #0066cc;
  transition: color 0.3s ease;
}

a:hover {
  color: #003366;
}

h1, h2, h3 {
  margin-bottom: 10px;
  color: blue ;
}

/* ===== Top Bar ===== */
.topbar {
  background: blue;
  color: #fff;
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.topbar a {
  color: #fff;
  margin-left: 15px;
  font-weight: 500;
}

.topbar a:hover {
  text-decoration: underline;
}

/* ===== Header ===== */
header {
  background: yellow ;
  color: #fff;
  text-align: center;
  padding: 2px 10px;
}

header h1 {
  font-size: 2.5rem;
}

/* ===== Navigation ===== */
nav {
  background: blue;
  padding: 2px 15px;
  text-align: center; /* ensure nav container centers content */
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* center menu items horizontally */
  padding: 0;
  margin: 0;
}

nav li {
  margin: 5px 15px; /* slightly more space between items */
}

nav a {
  color: #fff;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 1.2rem;
  text-decoration: none; /* remove underline */
  transition: background 0.3s, color 0.3s;
}

nav a.active,
nav a:hover {
  background: grey;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: #000;
  color: #004080;
  border: none;
  padding: 5px 10px;
  font-size: 1.2rem;
  margin-bottom: 8px;
  cursor: pointer;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav li {
    margin: 8px 0;
  }

  .menu-toggle {
    display: block;
  }
}

/* ===== News Bar ===== */
.news-bar {
  background: white;
  color: red;
  padding: 2px;
  font-weight: bold;
  text-align: center;
  font-size: 1.2rem;
   border: 1px solid #ccc;
}

/* ===== Main Layout ===== */
.layout {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: 5px;
  padding: 5px;
  font-size: 30px;
}

.content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: justify;
  font-size: 1.2rem;
 }

.sidebar {
  background: #fff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sidebar h3 {
  border-bottom: 2px solid #0066cc;
  padding-bottom: 2px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin: 2px 0;
}

.sidebar a {
  display: block;
  padding: 0px;
  border-radius: 4px;
  color: #333;
  font-size: 1rem;
  font-weight: bold;
}

.sidebar a:hover {
  background: #f0f8ff;
  color: #004080;
}

/* Indexing image */
.indexing-img {
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* ===== Flexbox Styling ===== */

.fields-container {
  display: flex;
  gap: 20px; /* space between columns */
  margin-top: 20px;
  flex-wrap: wrap; /* wrap on small screens */
}

.field-column {
  flex: 1 1 300px; /* all columns equal width */
  min-width: 300px; /* prevents columns from becoming too narrow */
}

.field-column ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* Optional: adjust spacing between columns on mobile */
@media (max-width: 768px) {
  .fields-container {
    flex-direction: column;
    gap: 15px;
  }
}

/* ===== Archive Page Styles ===== */

.archive-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.archive-form .form-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.archive-form .form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 180px;
}

.archive-form label {
  color: #003399;
  font-weight: bold;
  margin-bottom: 5px;
}

.archive-form select,
.archive-form button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.archive-form select,
.archive-form option {
  font-size: 1rem; /* increase text size */
  padding: 8px 10px; /* more space inside the box */
}

.archive-form button {
  background: #003399;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.archive-form button:hover {
  background: #002070;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.data-table th,
.data-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.data-table th {
  background: #003399;
  color: white;
}

/* Download button */
.btn-download {
  color: #003399;
  font-weight: bold;
  text-decoration: none;
}

.btn-download:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .archive-form .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .archive-form .form-group {
    width: 100%;
  }

  .archive-form select,
  .archive-form button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead tr {
    display: none;
  }

  .data-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
  }

  .data-table td {
    border: none;
    padding: 6px 10px;
    position: relative;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 50%;
    text-align: left;
    font-weight: bold;
    color: #003399;
  }
}

/* ===== Grid Containter for displaying table info ===== */
 .grid-container {
    width: 100%;
    overflow-x: auto;     /* Enables horizontal scroll only for table */
    -webkit-overflow-scrolling: touch; /* smooth scrolling for mobile */
  }

  .grid-container table {
    border-collapse: collapse;
    min-width: 100%; /* ensures table takes up full width */
  }

  .grid-container th, .grid-container td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
  }



/* ===== Editorial Board Cards ===== */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card h3 {
  color: #004080;
  margin-bottom: 10px;
}



/* login box with flexbox */

.login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  
  flex: 1 1 300px;   /* flex-grow, flex-shrink, flex-basis */
  min-width: 300px;  /* ensure it never goes below 300px */
  max-width: 400px;  /* optional: stops it from growing too large */
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 20px;
}

.login-box h2 {
  color: #004080;
  margin-bottom: 20px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.login-box input:focus {
  border-color: #0066cc;
  outline: none;
  box-shadow: 0 0 6px rgba(0,102,204,0.3);
}

.login-box button {
  width: 100%;
  background: #004080;
  color: #fff;
  padding: 12px;
  margin-top: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background 0.3s;
}

.login-box button:hover {
  background: #002d5a;
}

.error {
  color: red;
  font-size: 14px;
  margin-bottom: 10px;
}



/* Universal table styling */
table {
  width: 90%;
  max-width: 800px;
  border-collapse: collapse;
  margin: 15px auto;
  font-size: 1rem;
  text-align: left;
}

table th, 
table td {
  padding: 10px;
  border: 1px solid #ddd;
}

/* Nice zebra striping */
table tr:nth-child(even) {
  background: #f9f9f9;
}

table th {
  background: #004080;
  color: #fff;
  font-weight: bold;
}

.table-wrapper td {
  max-width: 200px;          /* adjust as needed */
  white-space: nowrap;       /* prevent wrapping */
  overflow: hidden;          /* hide overflow */
  text-overflow: ellipsis;   /* show ... */
  display: inline-block;     /* required for ellipsis */
  vertical-align: middle;
}

/* Responsive behavior */
@media (max-width: 768px) {
  table, 
  table thead, 
  table tbody, 
  table th, 
  table td, 
  table tr {
    display: block;
    width: 100%;
  }

  table thead {
    display: none; /* Hide headers */
  }

  table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
  }

  table td {
    border: none;
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
  }

  table td::before {
    content: attr(data-label); /* Show header as label */
    font-weight: bold;
    color: #004080;
    flex-basis: 50%;
    text-align: left;
  }
}





/* ===== Footer ===== */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 5px;
  margin-top: 10px;
  font-size: 0.85rem;
}

footer a {
  color: #ffeb3b;
}

footer img {
  margin-top: 2px;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .layout {
    grid-template-columns: 200px 1fr;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #004080;
    padding: 10px;
    border-radius: 6px;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .layout {
    grid-template-columns: 1fr;
  }
}
/* Hamburger Button */
.hamburger {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: none; /* hidden on desktop */
}

/* Hide nav on mobile */
#nav-menu {
  display: flex;
  gap: 15px;
}

@media (max-width: 768px) {
  .hamburger {
    display: block; /* show button on mobile */
  }
  #nav-menu {
    display: none;        /* hidden by default */
    flex-direction: column;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 8px;
  }
  #nav-menu.active {
    display: flex;        /* show when active */
  }
}

/* ===== Sidebar Right (Continuous Scroll with Fixed Heading) ===== */
.sidebar-right {
  width: 100%;
  background: #f0f4ff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  height: 500px; /* Adjust as needed */
  display: flex;
  flex-direction: column;
}

.sidebar-right h3 {
  text-align: center;
  color: #003366;
  font-size: 1.2rem;
  margin-bottom: 10px;
  background: #d9e6ff;
  padding: 8px;
  border-radius: 5px;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Wrapper for scrolling area */
.news-wrapper {
  overflow: hidden;
  position: relative;
  flex: 1;
}

/* Scrolling content */
.news-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: scrollNews 25s linear infinite;
}

/* Pause scroll on hover */
.sidebar-right:hover .news-container {
  animation-play-state: paused;
}

.news-item {
  background: #fff;
  padding: 8px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.4;
}

/* Infinite upward scroll */
@keyframes scrollNews {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* --- FIX MOBILE MENU COLORS --- */
@media (max-width: 768px) {
  #nav-menu,
  nav ul {
    background: #003366 !important;   /* dark navy */
  }

  #nav-menu a,
  nav ul a,
  nav a {
    color: #ffffff !important;        /* white text */
  }

  #nav-menu a:hover,
  nav ul a:hover,
  nav a:hover {
    background: #0055aa !important;   /* lighter blue hover */
    color: #ffffff !important;
  }

  .hamburger {
    color: #003366 !important;        /* hamburger icon visible */
  }
}


