/* =============================================
   SCHOOL WEBSITE — MAIN STYLESHEET
   Primary: Green #1a5e2a | Accent: Gold #d4a017
   Banner: Blue #0077b6
   ============================================= */

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

:root {
  --green:      #1a5e2a;
  --green-dark: #0d3d1a;
  --green-mid:  #2e8b57;
  --blue:       #0077b6;
  --blue-dark:  #005a8e;
  --blue-light: #0096d6;
  --gold:       #d4a017;
  --gold-light: #f0c842;
  --white:      #ffffff;
  --gray-50:    #f8f9fa;
  --gray-100:   #f0f0f0;
  --gray-200:   #e0e0e0;
  --gray-500:   #888;
  --gray-700:   #444;
  --text:       #222;
  --radius:     6px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
}

body {
  font-family: 'Noto Sans', 'Noto Sans Cyrillic', sans-serif;
  color: var(--text);
  background: var(--gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ── TOP BAR ── */
.topbar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 13px;
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
}
.topbar-left  { display: flex; gap: 8px; align-items: center; }
.topbar-sep   { opacity: 0.4; }

/* Language dropdown */
.lang-select {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  padding: 2px 6px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.lang-select:hover { border-color: var(--green); }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Left: logo + name */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
}
.logo-wrap   { flex-shrink: 0; display: block; }
.site-logo {
  height: 72px; width: 72px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--gold);
}
.logo-placeholder {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.header-titles { min-width: 0; }
.site-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.site-tagline { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* Center: year motto */
.header-center {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}
.header-year-motto {
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

/* Right: emblem + external link */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* Logo 2: Year emblem (round seal image) */
.header-year-logo {
  height: 72px;
  width: 72px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Logo 3: External partner logo + link text */
.header-ext-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;
}
.header-ext-logo {
  height: 72px;
  width: 80px;
  object-fit: contain;
  border-radius: 4px;
}
.header-ext-label {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* ── NAV ── */
.site-nav {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0 12px;
  max-width: 1280px;
  margin: 0 auto;
}
.nav-item  { position: relative; }
.nav-link {
  display: block;
  color: rgba(255,255,255,0.95);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 13px;
  transition: background 0.2s;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.nav-link:hover      { background: rgba(255,255,255,0.15); }
.nav-arrow           { font-size: 10px; margin-left: 3px; opacity: 0.7; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: rgba(255,255,255,0.95);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  list-style: none;
  z-index: 200;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown-link {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  transition: all 0.2s;
}
.dropdown-link:hover { background: var(--gray-50); color: var(--green); padding-left: 22px; }

/* ── TICKER ── */
.ticker-bar { background: var(--gold); overflow: hidden; padding: 7px 0; white-space: nowrap; }
.ticker-inner {
  display: inline-block;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 100%;
}
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── HERO — FULL-WIDTH BACKGROUND IMAGE ── */
.hero-section {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Longhand properties — inline style="background-image:url(...)" overrides
     background-image only, while background-size/position still apply */
  background-color: var(--blue-dark);
  background-image: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Background image div — div has no intrinsic size so offsets stretch it cleanly */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Semi-transparent overlay so text stays readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 30, 60, 0.68) 0%,
    rgba(0, 50, 90, 0.50) 55%,
    rgba(0, 70, 110, 0.22) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 52px 48px;
  max-width: 680px;
}
.hero-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
  letter-spacing: 0.5px;
}
.hero-subtitle {
  color: rgba(255,255,255,0.9);
  margin-top: 16px;
  font-size: 15px;
  max-width: 520px;
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

/* (kept for backward-compat, no longer used in split layout) */
.hero-seal-default {
  width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.hero-seal-default svg { width: 200px; height: 200px; }

/* ── MAIN ── */
.site-main { flex: 1; }

/* ── TOPICS ── */
.topics-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 10px 20px;
}
.topics-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topics-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.topics-list { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  transition: all 0.2s;
}
.topic-chip:hover       { background: var(--green); color: var(--white); border-color: var(--green); }
.topic-chip-all         { background: var(--green); color: var(--white); border-color: var(--green); }
.topic-chip-all:hover   { background: var(--green-dark); border-color: var(--green-dark); }

/* ── HOME SECTIONS ── */
.home-section {
  padding: 28px 20px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.home-section-alt { background: var(--white); max-width: 100%; padding: 28px 0; }
.home-section-alt > * { max-width: 1280px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--green);
  padding-bottom: 4px;
}
.section-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.section-more:hover { background: var(--green); color: var(--white); }

/* ── NEWS GRID ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.news-grid-full { padding: 0; }
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  border: 1px solid var(--gray-200);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-link  { display: block; color: inherit; }
.news-img-wrap   { overflow: hidden; }
.news-img        { width: 100%; height: 190px; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .news-img { transform: scale(1.04); }
.news-img-placeholder {
  height: 190px;
  background: linear-gradient(135deg, #e8f5ed, #c8e6c9);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.news-card-body  { padding: 14px; }
.news-tag {
  display: inline-block;
  background: #e8f5ed;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-date       { font-size: 11px; color: var(--gray-500); display: block; margin-bottom: 6px; }
.news-card-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.news-card:hover .news-card-title { color: var(--green); }
.news-card-summary { font-size: 12px; color: var(--gray-500); line-height: 1.5; }

/* ── VIDEO GRID ── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.video-grid-full { padding: 0 20px 20px; }
.video-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  border: 1px solid var(--gray-200);
  display: block; color: inherit;
}
.video-card:hover           { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.video-thumb-wrap           { position: relative; overflow: hidden; }
.video-thumb                { width: 100%; height: 155px; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-thumb { transform: scale(1.04); }
.video-thumb-placeholder {
  height: 155px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  display: flex; align-items: center; justify-content: center;
}
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}
.video-thumb-placeholder .video-play-btn { position: static; }
.video-card:hover .video-play-btn        { background: rgba(0,0,0,0.4); }
.video-card-body  { padding: 12px; }
.video-card-title { font-size: 13px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.video-card:hover .video-card-title { color: var(--green); }

/* ── INNER PAGES ── */
.inner-page { max-width: 1280px; margin: 0 auto; padding: 20px 20px 40px; width: 100%; }
.page-breadcrumb {
  font-size: 12px; color: var(--gray-500);
  margin-bottom: 20px; padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}
.page-breadcrumb a:hover { color: var(--green); }
.page-breadcrumb span    { margin: 0 4px; }
.inner-page-title {
  font-size: 22px; font-weight: 800;
  color: var(--green); text-transform: uppercase;
  margin-bottom: 20px;
  border-left: 4px solid var(--gold);
  padding-left: 12px;
}
.inner-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}

/* ── ARTICLE ── */
.article-detail   { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.article-meta     { margin-bottom: 14px; }
.article-title    { font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 20px; color: var(--text); }
.article-hero-img { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.article-img      { width: 100%; max-height: 420px; object-fit: cover; }
.article-content  { line-height: 1.8; }
.rich-content p                    { margin-bottom: 1em; }
.rich-content h2, .rich-content h3 { color: var(--green); margin: 1.2em 0 0.5em; }
.rich-content img                  { border-radius: var(--radius); margin: 1em 0; max-width: 100%; }
.rich-content ul, .rich-content ol { padding-left: 1.5em; margin-bottom: 1em; }

/* ── VIDEO PLAYER ── */
.video-player-wrap { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-player      { width: 100%; max-height: 500px; display: block; }

/* ── SIDEBAR ── */
.sidebar-box {
  background: var(--white); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  margin-bottom: 18px; border-left: 4px solid var(--green);
}
.sidebar-title {
  font-size: 13px; font-weight: 700;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-100);
}
.sidebar-list           { list-style: none; }
.sidebar-list li        { border-bottom: 1px solid var(--gray-100); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  display: block; padding: 8px 0;
  font-size: 13px; color: var(--gray-700);
  transition: all 0.2s;
}
.sidebar-list a:hover, .sidebar-active { color: var(--green); font-weight: 600; padding-left: 6px; }
.sidebar-btn {
  display: inline-block; margin-top: 6px;
  background: var(--green); color: var(--white);
  padding: 8px 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; transition: background 0.2s;
}
.sidebar-btn:hover { background: var(--green-dark); }

/* ── RELATED ── */
.related-section { margin-top: 32px; }
.related-title {
  font-size: 18px; font-weight: 700; color: var(--green);
  margin-bottom: 16px; border-bottom: 2px solid var(--gray-200); padding-bottom: 8px;
}
.related-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  border-radius: var(--radius); border: 1px solid var(--gray-200);
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--text);
  transition: all 0.2s; padding: 0 8px;
}
.page-btn:hover { background: var(--green); color: var(--white); border-color: var(--green); }
.page-current   { background: var(--green); color: var(--white); border-color: var(--green); }

/* ── EMPTY ── */
.empty-msg { color: var(--gray-500); font-style: italic; padding: 20px 0; }

/* ── FOOTER ── */
.site-footer { background: var(--white); border-top: 3px solid var(--green); margin-top: 40px; color: var(--text); }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-logo  { height: 60px; width: 60px; object-fit: contain; border-radius: 50%; border: 2px solid var(--gold); margin-bottom: 12px; }
.footer-name  { font-size: 15px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; color: var(--green); text-transform: uppercase; }
.footer-text  { font-size: 13px; color: var(--gray-500); line-height: 1.6; }
.footer-head  { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.footer-contact {
  font-size: 13px; color: var(--gray-700);
  margin-bottom: 10px;
  display: flex; gap: 10px; align-items: flex-start; line-height: 1.5;
}
.footer-icon  { flex-shrink: 0; font-size: 15px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green); font-size: 11px; font-weight: 700;
  color: var(--white); transition: background 0.2s; text-transform: lowercase;
}
.footer-social a:hover { background: var(--gold); }
.footer-bottom {
  background: var(--green);
  text-align: center;
  padding: 12px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .inner-layout  { grid-template-columns: 1fr; }
  .inner-sidebar { display: flex; flex-wrap: wrap; gap: 16px; }
  .sidebar-box   { flex: 1; min-width: 240px; }
  .header-center { display: none; }
}

@media (max-width: 900px) {
  /* Show hamburger, hide desktop nav */
  .nav-toggle { display: flex; }
  .nav-list {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0;
    background: var(--green-dark);
  }
  .nav-list.nav-open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: normal;
  }
  /* Mobile dropdowns: static, revealed on .open */
  .dropdown {
    position: static;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    background: rgba(0,0,0,0.2);
    min-width: 0;
  }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown  { display: block; }
  .dropdown-link {
    padding: 10px 36px;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .dropdown-link:hover { background: rgba(255,255,255,0.1); color: var(--white); padding-left: 42px; }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar { padding: 5px 12px; font-size: 12px; }

  /* Header */
  .header-inner  { padding: 10px 12px; gap: 10px; }
  .header-center { display: none; }
  .header-right  { display: none; }
  .site-logo     { height: 54px; width: 54px; }
  .logo-placeholder { width: 54px; height: 54px; font-size: 24px; }
  .site-name     { font-size: 13px; }

  /* Hero */
  .hero-section  { min-height: 220px; }
  .hero-content  { padding: 28px 20px; max-width: 100%; }
  .hero-title    { font-size: 22px; }

  /* Footer */
  .footer-inner  { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }

  /* News grid */
  .news-grid     { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 480px) {
  /* Topbar */
  .topbar        { flex-direction: column; align-items: flex-start; gap: 4px; }
  .topbar-right  { align-self: flex-end; }

  /* Header */
  .site-name     { font-size: 12px; }
  .site-tagline  { display: none; }

  /* Hero */
  .hero-section  { min-height: 200px; }
  .hero-content  { padding: 22px 16px; }
  .hero-title    { font-size: 18px; }
  .hero-subtitle { font-size: 13px; margin-top: 10px; }

  /* Sections */
  .home-section  { padding: 18px 12px; }
  .section-title { font-size: 16px; }
  .news-grid     { grid-template-columns: 1fr; }
  .video-grid    { grid-template-columns: 1fr 1fr; }

  /* Topics */
  .topics-section { padding: 8px 12px; }
  .topic-chip    { font-size: 11px; padding: 3px 10px; }

  /* Inner pages */
  .inner-page    { padding: 14px; }
  .article-detail { padding: 16px; }
  .article-title { font-size: 18px; }

  /* Footer */
  .footer-inner  { padding: 20px 14px; }
}
