/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0065BD;
  --primary-dark: #004A8C;
  --primary-light: #3388D0;
  --bg-light: #F5F7FA;
  --bg-white: #ffffff;
  --text: #1a1a1a;
  --text-light: #555;
  --text-muted: #777;
  --border: #dce3ed;
  --sidebar-width: 280px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

[id] {
  scroll-margin-top: 1.5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* === Layout === */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 2.5rem;
  max-width: 1100px;
  position: relative;
  overflow: hidden;
}

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--primary);
  color: #fff;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.sidebar-header .subtitle {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav > ul > li > a,
.sidebar-nav > ul > li > .menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.sidebar-nav > ul > li > a:hover,
.sidebar-nav > ul > li > .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav > ul > li > a.active,
.sidebar-nav > ul > li > .menu-toggle.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

.menu-toggle .arrow {
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.25s;
}

.menu-toggle.open .arrow {
  transform: rotate(90deg);
}

/* Flag icons */
.flag {
  width: 20px;
  height: 14px;
  vertical-align: middle;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
  margin-right: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 1px rgba(0,0,0,0.3);
}

/* Submenu */
.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.12);
}

.submenu.open {
  max-height: 500px;
}

.submenu a {
  display: block;
  padding: 0.5rem 1.25rem 0.5rem 2.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.submenu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.submenu a.active {
  color: #fff;
  font-weight: 600;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}

/* === Section / Page header === */
.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.section h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.card .tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Card with top image */
.card-img {
  padding: 0;
  overflow: hidden;
  box-shadow: none;
  mask-image:
    linear-gradient(to right, transparent, black 4%, black 96%, transparent 100%),
    linear-gradient(to bottom, black, black 85%, transparent 100%);
  -webkit-mask-image:
    linear-gradient(to right, transparent, black 4%, black 96%, transparent 100%),
    linear-gradient(to bottom, black, black 85%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}

.card-img:hover {
  box-shadow: none;
}

.card-img .card-bg {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

.card-img .card-body {
  padding: 0.75rem 1.5rem 1.5rem;
}

.card-img .card-body h4 {
  margin-top: 0;
}

.card-img .card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Page background decorative image */
.page-bg-img {
  position: absolute;
  top: 0;
  right: -2rem;
  width: 65%;
  max-height: 90vh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse at 80% 20%, black 10%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 20%, black 10%, transparent 60%);
}

.main-content > *:not(.page-bg-img) {
  position: relative;
  z-index: 1;
}

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-white);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text);
}

.quick-link:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--primary);
}

.quick-link .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.quick-link span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* === News items === */
.news-item {
  background: linear-gradient(to right, var(--bg-white) 60%, transparent 100%);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
}

.news-item .date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.news-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem 0;
}

.news-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* === Tables === */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

thead {
  background: var(--primary);
  color: #fff;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--bg-light);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* === Person cards === */
.person-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.person-card .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.person-card .info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.15rem 0;
}

.person-card .info .role {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.person-card .info p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0.1rem 0;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

/* === Info box === */
.info-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-box h4 {
  color: var(--primary-dark);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.info-box p, .info-box ul {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.25rem 0;
}

.info-box ul {
  padding-left: 1.25rem;
}

.info-box ul li {
  margin-bottom: 0.25rem;
}

/* === Content lists === */
.content-list {
  list-style: none;
  padding: 0;
}

.content-list li {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.content-list li strong {
  color: var(--primary-dark);
}

/* === Breadcrumb === */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 0.35rem;
}

/* === Footer === */
.footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* === Responsive === */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 4.5rem 1.25rem 2rem;
  }

  .page-bg-img {
    display: none;
  }

  .news-item {
    background: var(--bg-white);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
  }

  .people-grid {
    grid-template-columns: 1fr;
  }

  .person-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 500px) {
  .quick-links {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 4rem 1rem 1.5rem;
  }

  table {
    font-size: 0.82rem;
  }

  th, td {
    padding: 0.5rem 0.65rem;
  }
}
