/*
Theme Name: School 229 Kyiv
Theme URI: https://kyiv229.school.org.ua
Author: Ant3D Studio
Author URI: https://ant3dstudio.com
Description: Офіційна тема для ЗОШ №229 м.Києва. Сучасний адаптивний дизайн на Bootstrap 5. Концепція Edu Clean — синьо-золота палітра, кольори України.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: school229
Tags: education, school, responsive, custom-post-types, bootstrap

Використовує Bootstrap 5 через плагін WP Bootstrap Starter або Bootstrap for WP.
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — School 229 Design System
   ============================================================ */
:root {
  /* Brand colors */
  --s229-navy:       #1B3A6B;
  --s229-navy-dark:  #122850;
  --s229-navy-light: #2557A7;
  --s229-gold:       #FFD700;
  --s229-gold-dark:  #E6C200;
  --s229-gold-light: #FFF3B0;

  /* Neutrals */
  --s229-white:      #FFFFFF;
  --s229-gray-50:    #F8F9FA;
  --s229-gray-100:   #F1F3F4;
  --s229-gray-200:   #E8EAED;
  --s229-gray-400:   #9AA0A6;
  --s229-gray-600:   #5F6368;
  --s229-gray-900:   #202124;

  /* Semantic */
  --s229-success:    #1E8E3E;
  --s229-warning:    #F29900;
  --s229-danger:     #D93025;
  --s229-info:       #1A73E8;

  /* Typography */
  --s229-font-heading: 'Raleway', 'Segoe UI', sans-serif;
  --s229-font-body:    'PT Sans', 'Segoe UI', system-ui, sans-serif;
  --s229-font-mono:    'Courier New', monospace;

  /* Spacing */
  --s229-header-h:   72px;
  --s229-radius:     8px;
  --s229-radius-lg:  16px;
  --s229-shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --s229-shadow:     0 2px 12px rgba(0,0,0,.12);
  --s229-shadow-lg:  0 8px 32px rgba(0,0,0,.16);

  /* Transitions */
  --s229-transition: .2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--s229-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--s229-gray-900);
  background: var(--s229-white);
  margin: 0;
  padding-top: var(--s229-header-h);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--s229-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--s229-navy);
  margin-top: 0;
}

a {
  color: var(--s229-navy-light);
  text-decoration: none;
  transition: color var(--s229-transition);
}
a:hover { color: var(--s229-navy); text-decoration: underline; }

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

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-navy    { color: var(--s229-navy) !important; }
.text-gold    { color: var(--s229-gold-dark) !important; }
.bg-navy      { background-color: var(--s229-navy) !important; }
.bg-gold      { background-color: var(--s229-gold) !important; }
.bg-navy-dark { background-color: var(--s229-navy-dark) !important; }
.section-title {
  font-family: var(--s229-font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--s229-navy);
  position: relative;
  padding-bottom: .6rem;
  margin-bottom: 1.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--s229-gold);
  border-radius: 2px;
}
.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================================
   FIXED HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--s229-header-h);
  background: var(--s229-navy);
  z-index: 1000;
  box-shadow: var(--s229-shadow);
  display: flex;
  align-items: center;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.logo-badge {
  width: 44px; height: 44px;
  background: var(--s229-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--s229-font-heading);
  font-weight: 800;
  font-size: 13px;
  color: var(--s229-navy);
  flex-shrink: 0;
}
.logo-text { line-height: 1.15; }
.logo-text .school-name {
  font-family: var(--s229-font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--s229-white);
}
.logo-text .school-sub {
  font-size: 10px;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Main nav */
.main-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: .25rem;
  align-items: center;
}
.main-nav ul li a {
  display: block;
  padding: .45rem .9rem;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--s229-radius);
  transition: background var(--s229-transition), color var(--s229-transition);
  text-decoration: none;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
  background: rgba(255,255,255,.12);
  color: var(--s229-gold);
}
.main-nav ul li.has-cta > a {
  background: var(--s229-gold);
  color: var(--s229-navy);
  font-weight: 700;
}
.main-nav ul li.has-cta > a:hover {
  background: var(--s229-gold-dark);
}

/* Dropdown */
.main-nav ul li { position: relative; }
.main-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 200px;
  background: var(--s229-white);
  border-radius: var(--s229-radius);
  box-shadow: var(--s229-shadow-lg);
  padding: .5rem 0;
  z-index: 200;
  flex-direction: column;
}
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul li ul li a {
  color: var(--s229-gray-900);
  font-size: 13px;
  padding: .5rem 1rem;
}
.main-nav ul li ul li a:hover {
  background: var(--s229-gray-50);
  color: var(--s229-navy);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--s229-white);
  margin: 4px 0;
  border-radius: 1px;
  transition: var(--s229-transition);
}

/* ============================================================
   ALERT BANNER (плагін School Alerts)
   ============================================================ */
.school-alert-bar {
  background: var(--s229-navy-dark);
  color: rgba(255,255,255,.9);
  padding: .5rem 0;
  font-size: 13px;
  text-align: center;
}
.school-alert-bar.alert-warning { background: var(--s229-warning); color: #fff; }
.school-alert-bar.alert-danger  { background: var(--s229-danger); color: #fff; }
.school-alert-bar.alert-success { background: var(--s229-success); color: #fff; }
.school-alert-bar a { color: inherit; text-decoration: underline; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider-section {
  position: relative;
  overflow: hidden;
  background: var(--s229-navy-dark);
  /* height задається першим активним слайдом */
}
/* Усі слайди — абсолютно поверх одне одного, приховані */
.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 480px;
  height: 100%;
  width: 100%;
  display: none;           /* приховано за замовчуванням */
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: var(--s229-navy-dark);
}
/* Тільки активний слайд видно */
.hero-slide.active {
  display: flex;
}
/* Обгортка задає висоту через padding-bottom trick */
.hero-slider-inner {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(27,58,107,.92) 0%, rgba(27,58,107,.6) 60%, transparent 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--s229-gold);
  color: var(--s229-navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: .3rem .75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--s229-font-heading);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--s229-white);
  margin-bottom: .75rem;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 1.5rem;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--s229-gold);
  color: var(--s229-navy);
  font-weight: 700;
  font-size: 14px;
  padding: .7rem 1.5rem;
  border-radius: var(--s229-radius);
  text-decoration: none;
  transition: background var(--s229-transition), transform var(--s229-transition);
}
.hero-btn:hover {
  background: var(--s229-gold-dark);
  color: var(--s229-navy);
  transform: translateY(-1px);
  text-decoration: none;
}
.hero-btn-outline {
  background: transparent;
  color: var(--s229-white);
  border: 2px solid rgba(255,255,255,.6);
  margin-left: .5rem;
}
.hero-btn-outline:hover {
  background: rgba(255,255,255,.1);
  color: var(--s229-white);
  border-color: var(--s229-white);
}

/* Bell widget inside hero */
.hero-bell-widget {
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,215,0,.3);
  border-radius: var(--s229-radius-lg);
  padding: 1.25rem 1.5rem;
  min-width: 200px;
}
.hero-bell-widget .bell-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--s229-gold);
  margin-bottom: .75rem;
}
.hero-bell-widget table {
  width: 100%;
  font-size: 12px;
  color: rgba(255,255,255,.9);
  border-collapse: collapse;
}
.hero-bell-widget table td { padding: .2rem 0; }
.hero-bell-widget table td:first-child {
  font-weight: 700;
  color: var(--s229-gold);
  width: 24px;
}

/* Slider controls */
.slider-controls {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 10;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  transition: background var(--s229-transition), transform var(--s229-transition);
  padding: 0;
}
.slider-dot.active {
  background: var(--s229-gold);
  transform: scale(1.4);
}
.slider-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--s229-white);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background var(--s229-transition);
  font-size: 20px;
  line-height: 1;
}
.slider-arrow:hover { background: rgba(0,0,0,.55); }
.slider-arrow.prev { left: 1.5rem; }
.slider-arrow.next { right: 1.5rem; }

/* ============================================================
   QUICK STATS BAR
   ============================================================ */
.quick-stats {
  background: var(--s229-navy);
  padding: .875rem 0;
}
.quick-stats .stat-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.quick-stats .stat-item .stat-icon {
  font-size: 18px;
  color: var(--s229-gold);
}
.quick-stats .stat-item + .stat-item {
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 1.5rem;
  margin-left: 1.5rem;
}

/* ============================================================
   NEWS SECTION
   ============================================================ */
.news-section { padding: 4rem 0; background: var(--s229-white); }

.news-card {
  background: var(--s229-white);
  border-radius: var(--s229-radius-lg);
  overflow: hidden;
  box-shadow: var(--s229-shadow-sm);
  border: 1px solid var(--s229-gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--s229-transition), transform var(--s229-transition);
}
.news-card:hover {
  box-shadow: var(--s229-shadow);
  transform: translateY(-3px);
}
.news-card .card-thumb {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--s229-gray-100);
}
.news-card .card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .card-thumb img { transform: scale(1.04); }
.news-card .card-category {
  position: absolute;
  top: .75rem; left: .75rem;
  background: var(--s229-navy);
  color: var(--s229-gold);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .25rem .6rem;
  border-radius: 4px;
}
.news-card .card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card .card-date {
  font-size: 11px;
  color: var(--s229-gray-400);
  margin-bottom: .4rem;
}
.news-card .card-title {
  font-family: var(--s229-font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--s229-navy);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.news-card .card-excerpt {
  font-size: .875rem;
  color: var(--s229-gray-600);
  line-height: 1.6;
  flex: 1;
}
.news-card .card-footer-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--s229-navy-light);
  margin-top: 1rem;
  text-decoration: none;
}
.news-card .card-footer-link:hover { color: var(--s229-navy); text-decoration: none; }
.news-card .card-footer-link::after { content: '→'; }

/* Featured news (wide card) */
.news-card.featured {
  flex-direction: row;
}
.news-card.featured .card-thumb {
  padding-top: 0;
  width: 40%;
  flex-shrink: 0;
}
.news-card.featured .card-thumb img {
  position: static;
  height: 100%;
}

/* ============================================================
   ANNOUNCEMENTS SECTION
   ============================================================ */
.announcements-section {
  background: var(--s229-gray-50);
  padding: 3rem 0;
  border-top: 1px solid var(--s229-gray-200);
}
.announcement-item {
  background: var(--s229-white);
  border-left: 4px solid var(--s229-navy);
  border-radius: 0 var(--s229-radius) var(--s229-radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--s229-shadow-sm);
}
.announcement-item.urgent { border-color: var(--s229-danger); }
.announcement-item.info   { border-color: var(--s229-info); }
.announcement-item.event  { border-color: var(--s229-gold-dark); }
.announcement-item .ann-date {
  font-size: 11px;
  color: var(--s229-gray-400);
  white-space: nowrap;
  min-width: 70px;
  padding-top: 2px;
}
.announcement-item .ann-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--s229-navy);
  margin-bottom: .2rem;
}
.announcement-item .ann-text {
  font-size: 13px;
  color: var(--s229-gray-600);
}

/* ============================================================
   BELL SCHEDULE WIDGET (shortcode output)
   ============================================================ */
.bell-schedule-widget {
  background: var(--s229-navy);
  color: var(--s229-white);
  border-radius: var(--s229-radius-lg);
  overflow: hidden;
}
.bell-schedule-widget .bsw-header {
  background: var(--s229-navy-dark);
  padding: .875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bell-schedule-widget .bsw-header h4 {
  color: var(--s229-gold);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0;
}
.bell-schedule-widget .bsw-tabs {
  display: flex;
  gap: .25rem;
}
.bell-schedule-widget .bsw-tab {
  font-size: 11px;
  padding: .25rem .6rem;
  border-radius: 4px;
  cursor: pointer;
  color: rgba(255,255,255,.6);
  border: 1px solid transparent;
  transition: var(--s229-transition);
}
.bell-schedule-widget .bsw-tab.active {
  background: rgba(255,255,255,.15);
  color: var(--s229-gold);
  border-color: rgba(255,215,0,.3);
}
.bell-schedule-widget .bsw-body {
  padding: .75rem 1.25rem;
}
.bell-schedule-widget table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.bell-schedule-widget table tr {
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.bell-schedule-widget table tr:last-child { border-bottom: none; }
.bell-schedule-widget table td {
  padding: .45rem 0;
}
.bell-schedule-widget table td.lesson-num {
  font-weight: 700;
  color: var(--s229-gold);
  width: 28px;
}
.bell-schedule-widget table td.lesson-time {
  font-variant-numeric: tabular-nums;
  color: var(--s229-white);
}
.bell-schedule-widget table td.lesson-break {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  text-align: right;
}
.bell-schedule-widget table tr.current-lesson {
  background: rgba(255,215,0,.1);
  border-radius: 4px;
}
.bell-schedule-widget table tr.current-lesson td.lesson-num { color: #fff; }

/* ============================================================
   USEFUL LINKS WIDGET
   ============================================================ */
.useful-links-section {
  padding: 3rem 0;
  background: var(--s229-navy-dark);
}
.useful-link-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.05);
  border-radius: var(--s229-radius);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 13px;
  transition: background var(--s229-transition), border-color var(--s229-transition);
  height: 100%;
}
.useful-link-item:hover {
  background: rgba(255,215,0,.1);
  border-color: rgba(255,215,0,.4);
  color: var(--s229-gold);
  text-decoration: none;
}
.useful-link-item .link-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.useful-link-item .link-name { font-weight: 600; font-size: 13px; }
.useful-link-item .link-desc { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; }

/* ============================================================
   STAFF (Custom Post Type)
   ============================================================ */
.staff-section { padding: 4rem 0; }
.staff-filter { margin-bottom: 2rem; }
.staff-filter .btn-filter {
  background: var(--s229-gray-100);
  border: 1px solid var(--s229-gray-200);
  color: var(--s229-gray-600);
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--s229-transition);
}
.staff-filter .btn-filter.active,
.staff-filter .btn-filter:hover {
  background: var(--s229-navy);
  border-color: var(--s229-navy);
  color: var(--s229-white);
}

.staff-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--s229-radius-lg);
  background: var(--s229-white);
  border: 1px solid var(--s229-gray-200);
  box-shadow: var(--s229-shadow-sm);
  height: 100%;
  transition: box-shadow var(--s229-transition), transform var(--s229-transition);
}
.staff-card:hover {
  box-shadow: var(--s229-shadow);
  transform: translateY(-2px);
}
.staff-card .staff-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--s229-gold);
  background: var(--s229-gray-100);
}
.staff-card .staff-photo-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--s229-navy);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--s229-font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--s229-gold);
  border: 3px solid var(--s229-gold);
}
.staff-card .staff-name {
  font-family: var(--s229-font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--s229-navy);
  margin-bottom: .25rem;
}
.staff-card .staff-position {
  font-size: 12px;
  color: var(--s229-gray-600);
  margin-bottom: .5rem;
}
.staff-card .staff-subject {
  display: inline-block;
  background: var(--s229-gold-light);
  color: var(--s229-navy);
  font-size: 11px;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 4px;
}
.staff-card .staff-contact {
  font-size: 12px;
  color: var(--s229-gray-400);
  margin-top: .5rem;
}

/* ============================================================
   SCHEDULE (Custom Post Type)
   ============================================================ */
.schedule-section { padding: 4rem 0; background: var(--s229-gray-50); }
.schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.schedule-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
}
.schedule-grid th {
  background: var(--s229-navy);
  color: var(--s229-white);
  padding: .75rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.schedule-grid th:first-child { text-align: left; }
.schedule-grid td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--s229-gray-200);
  vertical-align: middle;
}
.schedule-grid tr:nth-child(even) td { background: var(--s229-gray-50); }
.schedule-grid td.lesson-info {
  background: var(--s229-white) !important;
  font-weight: 600;
  color: var(--s229-navy);
  min-width: 90px;
}
.schedule-grid .subject-cell {
  text-align: center;
  line-height: 1.3;
}
.schedule-grid .subject-name { font-weight: 500; font-size: 12px; }
.schedule-grid .teacher-name { font-size: 10px; color: var(--s229-gray-400); }
.schedule-grid .room { font-size: 10px; color: var(--s229-navy-light); }
.schedule-day-tab {
  display: flex;
  gap: .25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.schedule-day-tab button {
  padding: .4rem 1rem;
  border: 1px solid var(--s229-gray-200);
  background: var(--s229-white);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--s229-gray-600);
  transition: var(--s229-transition);
}
.schedule-day-tab button.active {
  background: var(--s229-navy);
  border-color: var(--s229-navy);
  color: var(--s229-white);
  font-weight: 600;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-section { padding: 4rem 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--s229-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--s229-gray-100);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,58,107,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--s229-transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item .gallery-overlay .gallery-title {
  color: var(--s229-white);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: .5rem;
}

/* ============================================================
   CONTACTS SECTION
   ============================================================ */
.contacts-section { padding: 4rem 0; background: var(--s229-gray-50); }
.contact-card {
  background: var(--s229-white);
  border-radius: var(--s229-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--s229-shadow-sm);
  border: 1px solid var(--s229-gray-200);
  height: 100%;
}
.contact-card h4 {
  font-size: 1rem;
  color: var(--s229-navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--s229-gold);
}
.contact-card .contact-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .75rem;
  font-size: 14px;
}
.contact-card .contact-row .c-icon {
  font-size: 16px;
  color: var(--s229-navy);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-card .contact-row a { color: var(--s229-navy-light); }
.contact-card .contact-row a:hover { color: var(--s229-navy); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--s229-navy-dark);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}
.site-footer h5 {
  color: var(--s229-gold);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 1rem;
}
.site-footer a {
  color: rgba(255,255,255,.65);
  font-size: 13px;
  display: block;
  margin-bottom: .4rem;
  text-decoration: none;
  transition: color var(--s229-transition);
}
.site-footer a:hover { color: var(--s229-gold); text-decoration: none; }
.site-footer .footer-divider {
  border-color: rgba(255,255,255,.1);
  margin: 1.5rem 0;
}
.site-footer .footer-bottom {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.site-footer .footer-bottom a { display: inline; color: rgba(255,255,255,.4); }
.footer-partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}
.footer-partner-logos img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .5;
  transition: opacity var(--s229-transition);
}
.footer-partner-logos img:hover { opacity: 1; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  margin-bottom: 1.5rem;
}
.sidebar-widget .widget-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--s229-navy);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--s229-gold);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-section {
  background: var(--s229-gray-100);
  padding: .6rem 0;
  font-size: 13px;
  border-bottom: 1px solid var(--s229-gray-200);
}
.breadcrumb-section a { color: var(--s229-navy-light); }
.breadcrumb-section .separator { margin: 0 .4rem; color: var(--s229-gray-400); }
.breadcrumb-section .current { color: var(--s229-gray-600); }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
  padding: 3rem 0;
}
.entry-header .entry-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--s229-navy);
  margin-bottom: .5rem;
}
.entry-meta {
  font-size: 13px;
  color: var(--s229-gray-400);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.entry-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--s229-gray-900);
}
.entry-content h2 { font-size: 1.5rem; margin-top: 2rem; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.entry-content li { margin-bottom: .4rem; }
.entry-content blockquote {
  border-left: 4px solid var(--s229-gold);
  background: var(--s229-gray-50);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--s229-radius) var(--s229-radius) 0;
  color: var(--s229-gray-600);
  font-style: italic;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 14px;
}
.entry-content table th {
  background: var(--s229-navy);
  color: var(--s229-white);
  padding: .6rem .75rem;
  text-align: left;
}
.entry-content table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--s229-gray-200);
}
.entry-content table tr:nth-child(even) td { background: var(--s229-gray-50); }

/* ============================================================
   ACCESSIBILITY VERSION
   ============================================================ */
.accessibility-bar {
  background: var(--s229-gray-900);
  padding: .35rem 0;
  font-size: 12px;
  text-align: right;
}
.accessibility-bar a {
  color: rgba(255,255,255,.6);
  margin-left: .75rem;
  text-decoration: none;
  padding: .2rem .5rem;
  border-radius: 3px;
  border: 1px solid transparent;
}
.accessibility-bar a:hover {
  color: var(--s229-gold);
  border-color: rgba(255,215,0,.4);
}
.accessibility-bar a.font-inc, .accessibility-bar a.font-dec {
  font-weight: 600;
}

/* ============================================================
   HOMEPAGE SIDEBAR
   ============================================================ */
.homepage-sidebar {
  position: sticky;
  top: calc(var(--s229-header-h) + 1rem);
  align-self: flex-start;
}

/* Enrollment sidebar card */
.sidebar-enrollment-card {
  background: linear-gradient(135deg, #1B3A6B 0%, #2557A7 100%);
  border-radius: var(--s229-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--s229-white);
}
.sec-en-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.sec-en-icon { font-size: 2.25rem; line-height: 1; flex-shrink: 0; }
.sec-en-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  background: var(--s229-gold); color: var(--s229-navy);
  padding: .15rem .5rem; border-radius: 4px; display: inline-block; margin-bottom: .2rem;
}
.sec-en-title { font-family: var(--s229-font-heading); font-weight: 800; font-size: 1.1rem; color: #fff; }
.sec-en-text { font-size: 13px; color: rgba(255,255,255,.78); line-height: 1.5; margin-bottom: .75rem; }
.sec-en-list { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 12px; color: rgba(255,255,255,.8); }
.sec-en-list li { margin-bottom: .2rem; }
.sec-en-btn {
  display: block; text-align: center;
  background: var(--s229-gold); color: var(--s229-navy);
  font-weight: 700; font-size: 13px;
  padding: .6rem 1rem; border-radius: var(--s229-radius);
  text-decoration: none; margin-bottom: .5rem;
  transition: background var(--s229-transition);
}
.sec-en-btn:hover { background: var(--s229-gold-dark); color: var(--s229-navy); text-decoration: none; }
.sec-en-phone {
  display: block; text-align: center;
  color: rgba(255,255,255,.75); font-size: 12px; text-decoration: none;
  transition: color var(--s229-transition);
}
.sec-en-phone:hover { color: var(--s229-gold); text-decoration: none; }

/* Announcements sidebar block */
.sidebar-announcements-block {
  background: var(--s229-white);
  border: 1px solid var(--s229-gray-200);
  border-radius: var(--s229-radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.sab-header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--s229-gray-50); border-bottom: 1px solid var(--s229-gray-200);
  padding: .75rem 1rem;
}
.sab-title { font-size: .875rem; font-weight: 700; color: var(--s229-navy); margin: 0; }
.sab-all-link { font-size: 12px; font-weight: 600; color: var(--s229-navy-light); text-decoration: none; }
.sab-all-link:hover { text-decoration: underline; }
.sab-list { display: flex; flex-direction: column; }
.sab-item {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .7rem 1rem; text-decoration: none;
  border-bottom: 1px solid var(--s229-gray-200);
  transition: background var(--s229-transition);
  position: relative;
}
.sab-item:last-child { border-bottom: none; }
.sab-item:hover { background: var(--s229-gray-50); text-decoration: none; }
.sab-item--urgent { border-left: 3px solid var(--s229-danger); }
.sab-item--info   { border-left: 3px solid var(--s229-info); }
.sab-item--event  { border-left: 3px solid var(--s229-gold-dark); }
.sab-item--normal { border-left: 3px solid var(--s229-navy); }
.sab-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.sab-body { flex: 1; min-width: 0; }
.sab-item-title { font-size: 13px; font-weight: 600; color: var(--s229-navy); line-height: 1.3; }
.sab-item-date  { font-size: 11px; color: var(--s229-gray-400); margin-top: 2px; }
.sab-urgent-badge {
  position: absolute; top: .5rem; right: .75rem;
  background: var(--s229-danger); color: #fff;
  font-size: 10px; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Bell sidebar block */
.sidebar-bell-block {
  border-radius: var(--s229-radius-lg);
  overflow: hidden;
}
.sbb-header {
  background: var(--s229-navy);
  color: var(--s229-gold);
  font-size: 13px; font-weight: 700;
  padding: .6rem 1rem;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ============================================================
   ACHIEVEMENT CARDS
   ============================================================ */
.achievement-card {
  background: #fff;
  border-radius: var(--s229-radius-lg);
  padding: 1.25rem;
  height: 100%;
  border-left: 4px solid var(--s229-gold-dark);
  box-shadow: var(--s229-shadow-sm);
  transition: box-shadow var(--s229-transition), transform var(--s229-transition);
}
.achievement-card:hover { box-shadow: var(--s229-shadow); transform: translateY(-2px); }
.ach-thumb {
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden; margin-bottom: .75rem;
  border: 3px solid var(--s229-gold);
}
.ach-title { font-weight: 700; font-size: .9rem; color: var(--s229-navy); line-height: 1.3; margin-bottom: .25rem; }
.ach-text  { font-size: 12px; color: var(--s229-gray-600); }
.ach-date  { font-size: 11px; color: var(--s229-gray-400); margin-top: .4rem; }

/* ============================================================
   ENROLLMENT CTA (Прийом до 1 класу)
   ============================================================ */
   ============================================================ */
.enrollment-cta-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, #1B3A6B 0%, #2557A7 100%);
  border-bottom: 4px solid var(--s229-gold);
}
.enrollment-cta-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.enrollment-cta-icon {
  font-size: 3rem;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}
.enrollment-cta-body { flex: 1; min-width: 200px; }
.enrollment-cta-title {
  font-family: var(--s229-font-heading);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--s229-gold);
  margin: 0 0 .35rem;
  line-height: 1.2;
}
.enrollment-cta-text {
  font-size: .9rem;
  color: rgba(255,255,255,.82);
  margin: 0;
  line-height: 1.5;
}
.enrollment-cta-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.enrollment-btn-main {
  display: inline-flex;
  align-items: center;
  background: var(--s229-gold);
  color: var(--s229-navy);
  font-weight: 700;
  font-size: 15px;
  padding: .75rem 1.75rem;
  border-radius: var(--s229-radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--s229-transition), transform var(--s229-transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.enrollment-btn-main:hover {
  background: var(--s229-gold-dark);
  color: var(--s229-navy);
  transform: translateY(-2px);
  text-decoration: none;
}
.enrollment-btn-phone {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.12);
  color: var(--s229-white);
  font-size: 14px;
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-radius: var(--s229-radius);
  border: 1px solid rgba(255,255,255,.25);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--s229-transition);
}
.enrollment-btn-phone:hover {
  background: rgba(255,255,255,.2);
  color: var(--s229-white);
  text-decoration: none;
}
.enrollment-checklist {
  list-style: none; padding: 0; margin: .5rem 0 0;
  display: flex; flex-wrap: wrap; gap: .4rem .75rem;
  font-size: 12px; color: rgba(255,255,255,.8);
}
.enrollment-checklist li { white-space: nowrap; }
.enrollment-cta-badge {
  display: inline-block;
  background: var(--s229-gold); color: var(--s229-navy);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: .15rem .6rem; border-radius: 4px; margin-bottom: .4rem;
}
.enrollment-cta-year {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--s229-radius); padding: .5rem .9rem;
  font-size: 11px; color: rgba(255,255,255,.7); white-space: nowrap;
}
.enrollment-cta-year strong { font-size: 14px; color: var(--s229-gold); margin-top: 1px; }
@media(max-width:575px) {
  .enrollment-cta-card { flex-direction: column; text-align: center; }
  .enrollment-cta-actions { justify-content: center; }
}

/* ============================================================
   ANNOUNCEMENT CARDS (головна)
   ============================================================ */
.ann-card-link {
  display: block;
  text-decoration: none;
  height: 100%;
}
.announcement-card {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--s229-white);
  border: 1px solid var(--s229-gray-200);
  border-left: 4px solid var(--ann-color, var(--s229-navy));
  border-radius: 0 var(--s229-radius) var(--s229-radius) 0;
  padding: .875rem 1rem;
  height: 100%;
  transition: box-shadow var(--s229-transition), transform var(--s229-transition);
}
.ann-card-link:hover .announcement-card {
  box-shadow: var(--s229-shadow);
  transform: translateY(-2px);
}
.ann-card-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.ann-card-body { flex: 1; }
.ann-card-title {
  font-weight: 700;
  font-size: .875rem;
  color: var(--s229-navy);
  line-height: 1.35;
  margin-bottom: .2rem;
}
.ann-card-text {
  font-size: .78rem;
  color: var(--s229-gray-600);
  line-height: 1.5;
  margin-bottom: .3rem;
}
.ann-card-date { font-size: .72rem; color: var(--s229-gray-400); }

/* Section backgrounds */
.s229-info-section {
  background: var(--s229-gray-50);
  border-top: 1px solid var(--s229-gray-200);
}
.s229-achievements-section {
  background: var(--s229-gold-light);
  border-top: 3px solid var(--s229-gold);
}
.s229-staff-section {
  background: var(--s229-gray-50);
  border-top: 1px solid var(--s229-gray-200);
}
.s229-map-placeholder {
  background: var(--s229-gray-200);
  border-radius: var(--s229-radius-lg);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .5rem;
  color: var(--s229-gray-600);
  text-align: center;
  padding: 1rem;
}
.s229-map-placeholder p { font-size: 13px; margin: 0; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .site-header, .hero-slider-section, .quick-stats,
  .useful-links-section, .site-footer,
  .nav-toggle, .slider-controls { display: none !important; }
  body { padding-top: 0; font-size: 12pt; }
  .entry-content { font-size: 11pt; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: block;
    position: absolute;
    top: var(--s229-header-h);
    left: 0; right: 0;
    background: var(--s229-navy-dark);
    padding: 1rem;
    box-shadow: var(--s229-shadow-lg);
  }
  .main-nav.open ul { flex-direction: column; }
  .main-nav.open ul li ul {
    display: block;
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,.05);
    padding: 0 0 0 1rem;
  }
  .nav-toggle { display: block; }

  .hero-slide { min-height: 360px; }
  .hero-content { max-width: 100%; }
  .hero-bell-widget { display: none; }

  .news-card.featured { flex-direction: column; }
  .news-card.featured .card-thumb { width: 100%; padding-top: 50%; }

  .quick-stats .stat-item + .stat-item { border-left: none; padding-left: 0; margin-left: 0; }
}

@media (max-width: 575.98px) {
  :root { --s229-header-h: 62px; }
  .logo-text .school-sub { display: none; }
  .hero-title { font-size: 1.6rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .schedule-day-tab { gap: .2rem; }
  .schedule-day-tab button { padding: .3rem .7rem; font-size: 12px; }
}
