/* Global Styles & Reset */
:root {
  --primary-color: #0f4c81;
  --primary-dark: #092e52;
  --secondary-color: #2b7a78;
  --accent-color: #f39c12;
  --bg-light: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 48px;
  width: auto;
}

.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Menu Toggle Button for Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary-dark);
}

nav {
  display: flex;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
}

/* Mobile Nav styles */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }

  nav.open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    padding: 1rem;
    gap: 10px;
    align-items: stretch;
  }

  .nav-links a {
    display: block;
    padding: 10px;
  }
}

/* Main Layout */
.container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* Banner Card H1 */
.banner-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.banner-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.banner-card p {
  font-size: 1rem;
  opacity: 0.9;
}

/* Content Cards & Sections */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.card h2, .card h3 {
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  text-decoration: none;
}

/* Table and Responsive Card View for Mobile */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background-color: var(--white);
  border-radius: 6px;
  overflow: hidden;
}

table.data-table th, table.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table.data-table th {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
}

@media (max-width: 600px) {
  table.responsive-card-table, 
  table.responsive-card-table thead, 
  table.responsive-card-table tbody, 
  table.responsive-card-table th, 
  table.responsive-card-table td, 
  table.responsive-card-table tr { 
    display: block; 
  }

  table.responsive-card-table thead {
    display: none;
  }

  table.responsive-card-table tr {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  }

  table.responsive-card-table td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  table.responsive-card-table td:last-child {
    border-bottom: none;
  }

  table.responsive-card-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--primary-dark);
  }
}

/* Home Specific Elements */
.home-img-container {
  text-align: center;
  margin: 1.5rem 0;
}

.home-img-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.welcome-section {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.welcome-section h2 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

/* News List & Detail */
.news-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.news-item h2 a {
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.news-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}

.related-news {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-color);
}

/* Random Links Box */
#random-links {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 2rem 0;
}

#random-links h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.random-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}

.random-links-list li a {
  font-size: 0.9rem;
  color: var(--secondary-color);
  border-radius: 4px;
}

.random-links-list li a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 2rem;
}

footer p {
  color: var(--white);
}
