:root {
  --primary: #0d3b66;
  --secondary: #0f7b6c;
  --text: #1a2433;
  --muted: #6c7787;
  --bg: #f4f7fb;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.topbar {
  background: #0a2644;
  color: #dbe8f8;
  font-size: 0.9rem;
  padding: 0.45rem 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar p {
  margin: 0;
}

.navbar {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.brand h1 {
  margin: 0;
  color: var(--white);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.navbar a {
  color: #e8f0fa;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.navbar a:hover {
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
}

.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 24, 42, 0.85), rgba(8, 24, 42, 0.4));
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #f4f9ff;
}

.hero-end-logo {
  position: absolute;
  right: 2.2rem;
  bottom: 1.4rem;
  width: 82px;
  height: 82px;
  z-index: 3;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  max-width: 860px;
}

.hero p {
  max-width: 760px;
  margin-bottom: 1.1rem;
}

.counseling-code {
  font-size: clamp(1.65rem, 4.2vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 0.85rem;
  max-width: 760px;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill-wrap span {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #ecf7ff;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
}

.section {
  padding: 3rem 0;
}

.section h2 {
  margin-top: 0;
  font-size: 1.9rem;
  color: var(--primary);
}

.section h3 {
  color: #123f70;
}

.alt {
  background: #ebf2f9;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(31, 61, 87, 0.08);
}

.card h4 {
  margin: 0 0 0.65rem;
  color: #12437a;
}

.image-card {
  padding: 0;
  overflow: hidden;
}

.image-card h4,
.image-card p {
  padding: 0 0.9rem 0.9rem;
}

.link-list {
  margin: 0;
  padding-left: 1.1rem;
}

.link-list a {
  color: #0c4f8a;
  text-decoration: none;
  font-weight: 600;
}

.link-list a:hover {
  text-decoration: underline;
}

.disabled-link {
  color: #7b8794 !important;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none !important;
}

.note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.committee-signboards {
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.committees-heading {
  margin: 2rem 0 1rem;
  color: #123f70;
  font-size: 1.35rem;
}

.gallery-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.committee-signboard-card h4 {
  margin: 0 0 0.65rem;
}

.committee-signboard-link {
  display: block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef6;
  border: 1px solid #d0dce8;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.committee-signboard-link:hover {
  box-shadow: 0 8px 22px rgba(16, 43, 71, 0.18);
  transform: translateY(-2px);
}

.committee-signboard-link img {
  width: 100%;
  height: auto;
  max-height: min(560px, 85vh);
  object-fit: contain;
  display: block;
  margin: 0;
}

img {
  max-width: 100%;
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin-top: 0.5rem;
  object-fit: cover;
}

.card .committee-signboard-link img {
  margin-top: 0;
  border-radius: 0;
  object-fit: contain;
}

.image-card img {
  margin: 0;
  border-radius: 0;
  height: 180px;
}

iframe {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 8px;
  margin: 0 0.9rem 0.9rem;
}

.card form {
  display: grid;
  gap: 0.6rem;
  padding: 0 0.9rem 0.9rem;
}

.card input,
.card select,
.card textarea,
.card button {
  font: inherit;
}

.card input,
.card select,
.card textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #bfd3e8;
  border-radius: 8px;
  background: #fff;
}

.card textarea {
  resize: vertical;
}

.card button {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.card button:hover {
  background: #0f4b84;
}

.gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.gallery img {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(25, 50, 75, 0.12);
}

.gallery-linked a {
  display: block;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(25, 50, 75, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-linked a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(25, 50, 75, 0.18);
}

.gallery-linked img {
  box-shadow: none;
  display: block;
}

.equipment-gallery figure {
  margin: 0;
}

.equipment-gallery figcaption {
  margin-top: 0.45rem;
  text-align: center;
  font-weight: 600;
  color: #123f70;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  border: 1px solid #cfe0f2;
  padding: 0.65rem;
  text-align: center;
}

th {
  background: #dceafb;
}

footer {
  background: #0a2644;
  color: #d5e7f8;
  text-align: center;
  padding: 1rem 0;
}

@media (max-width: 840px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-end-logo {
    width: 64px;
    height: 64px;
    right: 1rem;
    bottom: 1rem;
  }
}
