/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a6fb5;
  --primary-dark: #145a94;
  --primary-light: #e8f1f8;
  --text: #2c3e50;
  --text-light: #6b7c8d;
  --bg: #ffffff;
  --bg-alt: #f7f9fb;
  --border: #e2e8f0;
  --radius: 8px;
  --max-width: 1100px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

ul { list-style: none; }

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 36px;
  width: auto;
}

.logo span {
  white-space: nowrap;
}

/* Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.main-nav ul {
  display: flex;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* === Section === */
.section {
  padding: 64px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-title {
  margin-bottom: 32px;
  text-align: center;
}

.section-title h2 {
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-light);
}

/* === About block on homepage === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: 16px;
}

.about-text p {
  margin-bottom: 12px;
  color: var(--text-light);
}

.about-text ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-light);
}

.about-text li {
  margin-bottom: 6px;
}

/* === Portals === */
.portals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.portal-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}

.portal-link:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.portal-link img {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.portal-link span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

/* === Page content === */
.page-hero {
  background: var(--bg-alt);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  text-align: center;
}

.page-content {
  padding: 48px 0 80px;
}

.page-content .content {
  max-width: 800px;
  margin: 0 auto;
}

.content p {
  margin-bottom: 16px;
}

.content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.content li {
  margin-bottom: 8px;
}

.content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

/* === News grid === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.news-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-body {
  padding: 20px;
}

.news-card-date {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.news-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-body h3 a {
  color: var(--text);
}

.news-card-body h3 a:hover {
  color: var(--primary);
}

.news-card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* === Document list === */
.doc-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.doc-list li {
  margin-bottom: 0 !important;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  color: var(--text);
  transition: box-shadow var(--transition);
}

.doc-item:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--primary);
}

.doc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.doc-item span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* === Contact info === */
.contact-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.contact-block h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.contact-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.contact-row strong {
  flex-shrink: 0;
  min-width: 200px;
}

/* === PDF preview === */
.pdf-section {
  margin-bottom: 24px;
}

.pdf-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.pdf-toggle:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--primary);
}

.pdf-toggle .doc-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.pdf-toggle span {
  font-weight: 500;
  font-size: 0.95rem;
  flex: 1;
}

.pdf-toggle .toggle-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-light);
  transition: transform var(--transition);
}

.pdf-section.open .pdf-toggle .toggle-icon {
  transform: rotate(180deg);
}

.pdf-viewer {
  display: none;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f0f0;
  padding: 16px;
  text-align: center;
}

.pdf-section.open .pdf-viewer {
  display: block;
}

.pdf-viewer canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.1);
}

.pdf-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.pdf-controls button {
  padding: 6px 16px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pdf-controls button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pdf-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-light);
  min-width: 60px;
}

.pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.pdf-download:hover {
  background: var(--primary);
  color: #fff;
}

/* === Team grid === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.team-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.team-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.team-card-body {
  padding: 20px;
}

.team-card-body h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.team-card-body p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* === Placeholder === */
.placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.placeholder p {
  font-size: 1.1rem;
}

/* === Footer === */
.site-footer {
  background: var(--text);
  color: #cbd5e1;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .contact-row {
    flex-direction: column;
    gap: 2px;
  }

  .contact-row strong {
    min-width: auto;
  }
}
