/* ===== RESET & BASE (ГОСТ, деловой стиль) ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  --accent-color: #ffd700;
  --text-color: white;
  --btn-primary-bg: #4CAF50;
  --btn-primary-hover: #45a049;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.2);
  --border-radius-sm: 12px;
  --border-radius-lg: 24px;
  --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Основные цвета из css.css */
  --primary-dark: #1e3c72;
  --primary: #2a5298;
  --primary-light: #3a7ca5;
  --primary-soft: #6ea8c7;
  --accent-blue: #2c7da0;
  --deep-indigo: #1e3a5f;
  --accent-gold: #ffd700;
  --gray-100: #f5f9ff;
  --gray-200: #e9f0f5;
  --gray-300: #dce5ec;
  --gray-600: #4a627a;
  --gray-700: #2c4a6e;
  --gray-800: #1f3a4b;
  --black: #0a1c2a;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  --border-radius: 0.5rem;
}

html, body {
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  scroll-behavior: smooth;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Шрифт для заголовков (строгость) */
h1, h2, h3, h4, .logo, .nav-menu a, .btn {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-100);

}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  border-left: 5px solid var(--primary);
  padding-left: 1rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: none;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== ПРЕЛОАДЕР ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-300);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== АНИМАЦИИ ===== */
.page-fade-in {
  animation: pageFade 0.4s ease-out;
}

@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== HEADER (сине-золотая палитра) ===== */
.header {
  background: var(--primary-gradient);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo2 {
  font-size: 2rem;
  color: var(--accent-gold);
  text-decoration: none;
  transition: all 0.2s;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #ffed4e 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.logo2:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-buttons .btn-primary {
  background: linear-gradient(135deg, var(--btn-primary-bg) 0%, var(--btn-primary-hover) 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.05);
}

/* Стили для кнопок входа/регистрации */
.btn-login {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-login:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.btn-register {
    background: linear-gradient(135deg, #2a5298 0%, #3a7ca5 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05);
}
.btn-contact {
    background: rgb(58 167 82);;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-contact:hover {
    background: linear-gradient(135deg, var(--btn-primary-bg) 0%, var(--btn-primary-hover) 100%);
    transform: translateY(-2px);
}

.separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0;
}

.nav-menu {
  background: rgb(251 253 255);
  backdrop-filter: blur(16px);
  padding: 0.5rem 0;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  background-color: rgb(43 70 137);
  backdrop-filter: blur(16px);
  padding: 8px;
  border-radius: var(--border-radius-lg);
  gap: 4px;
  max-width: 1000px; /* ограничение максимальной ширины вместо фиксированной */
  margin: 0 auto; /* центрирование через auto-отступы */
  margin-bottom: 10px;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 0.25rem;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
  letter-spacing: 0.3px;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: width 0.2s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu a:hover {
  color: var(--accent-gold);
}

.nav-menu a.active {
  color: var(--accent-gold);
}

.nav-menu a.active::after {
  width: 100%;
  background-color: var(--accent-gold);
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ПРОФИЛЯ ===== */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.profile-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1e3c72;
    padding: 8px 16px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', system-ui, sans-serif;
}
.profile-btn i:first-child {
    font-size: 1.1rem;
}
.profile-btn .fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}
.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05);
}
.profile-dropdown.active .profile-btn .fa-chevron-down {
    transform: rotate(180deg);
}
.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    min-width: 280px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}
.profile-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}
.dropdown-avatar i {
    font-size: 48px;
    color: #ffd700;
}
.dropdown-user-info {
    flex: 1;
}
.dropdown-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}
.dropdown-role {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dropdown-divider {
    height: 1px;
    background: #e9f0f5;
    margin: 8px 0;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1f3a4b;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.dropdown-item i {
    width: 20px;
    color: #2a5298;
    font-size: 1rem;
}
.dropdown-item:hover {
    background: #f5f9ff;
}
.logout-item {
    color: #dc2626;
}
.logout-item i {
    color: #dc2626;
}
.logout-item:hover {
    background: #fee2e2;
}

/* ===== SLIDER ===== */
.slider {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(30, 60, 114, 0.7), rgba(0, 0, 0, 0.4));
}

.slide-content {
  position: relative;
  z-index: 3;
  color: white;
  max-width: 700px;
  padding: 1rem;
}

.slide-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  border-left: none;
  color: white;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.slide-content p {
  font-size: 1.2rem;
  opacity: 0.95;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 300;
}

.slider-btn:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.prev {
  left: 2rem;
}

.next {
  right: 2rem;
}

.indicators {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.indicator.active {
  background: var(--accent-gold);
  transform: scale(1.2);
  width: 20px;
  border-radius: 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .slider {
    height: 380px;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .prev {
    left: 1rem;
  }

  .next {
    right: 1rem;
  }

  .indicator {
    width: 6px;
    height: 6px;
  }

  .indicator.active {
    width: 20px;
  }
}

@media (max-width: 480px) {
  .slider-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .prev {
    left: 0.75rem;
  }

  .next {
    right: 0.75rem;
  }
}

/* ===== ПОИСК ===== */
.search-section {
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--white) 100%);
  padding: 2rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.search-form {
  max-width: 550px;
  margin: 0 auto;
}

.search-input-wrapper {
  display: flex;
  gap: 0.75rem;
  background: var(--white);
  border-radius: 3rem;
  padding: 0.25rem;
  box-shadow: var(--shadow-md);
}

#search-input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 3rem;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

#search-input:focus {
  outline: none;
}

.search-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  padding: 0 2rem;
  border-radius: 3rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.search-results {
  max-width: 800px;
  margin: 1.5rem auto 0;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  display: none;
}

.search-results.show {
  display: block;
}

/* ===== HERO ===== */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-left {
  flex: 1;
}

.hero-left h1 {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-left p {
  margin: 1.5rem 0 2rem;
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.05);
}

.hero-right {
  flex: 1;
  text-align: center;
}

.home-news-section {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
}

.home-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-news-header h2 {
  margin-bottom: 0;
}

.home-news-vk-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(42, 82, 152, 0.08);
  color: var(--primary);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.home-news-vk-link:hover {
  background: rgba(42, 82, 152, 0.15);
  color: var(--primary-light);
}

.home-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-news-card {
  background: var(--white);
  border: 1px solid rgba(30, 90, 125, 0.12);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.home-news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.home-news-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.home-news-content {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-news-date {
  font-size: 0.85rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.home-news-text {
  color: var(--gray-700);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
  white-space: pre-wrap;
}

.home-news-read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #3f69b1;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.93rem;
  background: #edf0f4;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  width: fit-content;
  transition: all 0.2s ease;
}

.home-news-read-link:hover {
  color: #2f58a1;
  background: #e5eaf2;
}

.home-news-read-link i {
  font-size: 0.92rem;
}

.home-news-loading,
.home-news-empty {
  background: var(--white);
  border-radius: 1rem;
  border: 1px dashed var(--gray-300);
  padding: 1.2rem;
  color: var(--gray-600);
}

@media (max-width: 992px) {
  .home-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-news-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-news-grid {
    grid-template-columns: 1fr;
  }

  .home-news-image {
    height: 210px;
  }
}

.image-placeholder {
  max-width: 100%;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
}

.image-placeholder:hover {
  transform: scale(1.02);
}

/* ===== FEATURES (карточки) ===== */
.features {
  padding: 4rem 0;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(30, 90, 125, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  height: 100%;
}

/* Контент внутри карточки */
.feature .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.feature h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.feature p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transform: translateX(-100%);
  transition: transform 0.3s;
  z-index: 1;
}

.feature:hover::before {
  transform: translateX(0);
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
  border-color: rgba(30, 90, 125, 0.3);
}

/* Для мобильных устройств */
@media (max-width: 768px) {
  .feature {
    min-height: 280px;
    padding: 1.5rem;
  }

  .feature h3 {
    font-size: 1.2rem;
  }

  .feature p {
    font-size: 0.9rem;
  }

  .feature .icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .feature {
    min-height: 260px;
    padding: 1.25rem;
  }

  .feature h3 {
    font-size: 1.1rem;
  }

  .feature p {
    font-size: 0.85rem;
  }
}

/* ===== КАРТА ===== */
.map-section {
  padding: 4rem 0;
  background: var(--white);
}

.map-section h2 {
  margin-bottom: 2rem;
}

#yandex-map {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-300);
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: var(--gray-200);
  padding: 20px 0 20px;
  margin-top: auto;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer .container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 4fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer__external-links,
.footer__links {
  display: flex;
  flex-direction: column;
}

.footer__external-links {
  margin-left: 160px;
}

.footer__links {
  margin-left: 45px;
}

.footer__external-links h4,
.footer__links h4 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--accent-gold);
  position: relative;
  display: inline-block;
}

.footer__external-links h4::after,
.footer__links h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  background-color: var(--accent-gold);
}

.footer__external-links h4::after {
  width: 195px;
}

.footer__links h4::after {
  width: 110px;
}

.footer__external-links ul,
.footer__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__external-links li,
.footer__links li {
  margin-bottom: 12px;
}

.footer__external-links a,
.footer__links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

.footer__external-links a::before,
.footer__links a::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer__external-links a:hover,
.footer__links a:hover {
  color: white;
  padding-left: 20px;
}

.footer__external-links a:hover::before,
.footer__links a:hover::before {
  opacity: 1;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer__brand .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-decoration: none;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #ffed4e 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--accent-gold);
  transform: translateY(-2px);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__bottom a:hover {
  color: white;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ===== */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__brand,
  .footer__external-links,
  .footer__links {
    text-align: center;
    align-items: center;
    margin-left: 0;
  }

  .footer__brand .logo {
    font-size: 1.25rem;
  }

  .footer__brand p {
    text-align: center;
  }

  .footer__external-links h4,
  .footer__links h4 {
    font-size: 1rem;
    display: inline-block;
  }

  .footer__external-links h4::after,
  .footer__links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer__external-links ul,
  .footer__links ul {
    text-align: center;
  }

  .footer__external-links li,
  .footer__links li {
    text-align: center;
  }

  .footer__external-links a,
  .footer__links a {
    padding-left: 0;
  }

  .footer__external-links a::before,
  .footer__links a::before {
    display: none;
  }

  .footer__external-links a:hover,
  .footer__links a:hover {
    padding-left: 0;
    transform: translateY(-2px);
  }

  .social-links {
    justify-content: center;
  }

  .footer__grid > *:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
  }
  
  .profile-dropdown .profile-name { display: none; }
  .dropdown-content { min-width: 260px; right: -50px; }
  .nav-buttons { justify-content: center; width: 100%; }
}

@media (max-width: 480px) {
  .footer {
    padding: 1.5rem 0 1rem;
  }

  .footer .container {
    padding: 0 1rem;
  }

  .footer__grid {
    gap: 1.5rem;
  }

  .footer__brand .logo {
    font-size: 1.1rem;
  }

  .footer__brand p {
    font-size: 0.85rem;
  }

  .footer__external-links h4,
  .footer__links h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .footer__external-links h4::after,
  .footer__links h4::after {
    width: 30px;
    bottom: -6px;
  }

  .footer__external-links li,
  .footer__links li {
    margin-bottom: 0.5rem;
  }

  .footer__external-links a,
  .footer__links a {
    font-size: 0.85rem;
  }

  .footer__bottom {
    padding-top: 1.5rem;
    font-size: 0.75rem;
  }

  .footer__grid > *:not(:last-child) {
    padding-bottom: 1rem;
  }

  .social-link {
    width: 35px;
    height: 35px;
  }
  .dropdown-content { min-width: 240px; right: -80px; }
  .nav-buttons { gap: 0.5rem; }
  .nav-buttons .btn-primary, .nav-buttons .btn-profile, .nav-buttons .btn-login, .nav-buttons .btn-register { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
}

@media (max-width: 360px) {
  .footer__brand .logo {
    font-size: 1rem;
  }

  .footer__brand p {
    font-size: 0.8rem;
  }

  .footer__external-links h4,
  .footer__links h4 {
    font-size: 0.9rem;
  }

  .footer__external-links a,
  .footer__links a {
    font-size: 0.8rem;
  }

  .footer__bottom {
    font-size: 0.7rem;
  }

  .social-link {
    width: 30px;
    height: 30px;
  }
}

/* ===== ОБЩАЯ АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header-top {
    flex-direction: column;
    text-align: center;
  }

  .nav-menu ul {
    gap: 0;
    flex-wrap: wrap;
  }

  .slider {
    height: 380px;
  }

  .slide-content h2 {
    font-size: 1.8rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .features-grid {
    gap: 1.25rem;
  }

  .slider-btn {
    font-size: 1.2rem;
    padding: 0.3rem 0.7rem;
  }

  .feature {
    padding: 1.5rem;
  }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ===== */
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

a {
  transition: all 0.2s ease;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ===== СТРАНИЦА НОВОСТЕЙ ===== */
.news-section {
  padding: 1rem 0;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
  min-height: calc(100vh - 400px);
}

.news-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 2.2rem;
  border: none;
}

#news-container {
  max-width: 900px;
  margin: 0 auto;
}

.vk-post {
  background: var(--white);
  border-radius: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 90, 125, 0.1);
}

.vk-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 90, 125, 0.2);
}

.post-text {
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-date {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.post-date::before {
  content: '\f073';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  font-size: 0.8rem;
}

.post-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.post-photo {
  width: calc(25% - 0.75rem);
  min-width: 100px;
  max-width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.post-photo:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.post-photos:has(.post-photo:only-child) .post-photo {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 300px;
}

.post-photos:has(.post-photo:nth-child(2):last-child) .post-photo {
  width: calc(50% - 0.75rem);
  max-width: none;
}

.post-photos:has(.post-photo:nth-child(3):last-child) .post-photo {
  width: calc(33.333% - 0.75rem);
  max-width: none;
}

/* ===== ЛАЙТБОКС ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
  font-weight: 300;
}

.close-lightbox:hover {
  color: var(--primary-light);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-300);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

.loading-text {
  color: var(--gray-600);
  font-size: 1rem;
}

.error-container {
  text-align: center;
  padding: 4rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.error-icon {
  font-size: 3rem;
  color: #dc2626;
  margin-bottom: 1rem;
}

.error-text {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.error-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.error-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.highlight {
  background-color: #fef9c3;
  color: var(--gray-800);
  padding: 0 2px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

/* Адаптивность для страницы новостей */
@media (max-width: 768px) {
  .news-section {
    padding: 2rem 0;
  }

  .news-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .vk-post {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .post-text {
    font-size: 0.95rem;
  }

  .post-date {
    font-size: 0.8rem;
  }

  .post-photo {
    width: calc(33.333% - 0.75rem);
    height: 90px;
  }

  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
  }

  .close-lightbox {
    font-size: 2rem;
    top: 15px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .news-section {
    padding: 1.5rem 0;
  }

  .news-section h2 {
    font-size: 1.5rem;
  }

  .vk-post {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .post-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .post-date {
    font-size: 0.75rem;
  }

  .post-photo {
    width: calc(50% - 0.75rem);
    height: 80px;
    min-width: auto;
  }

  .post-photos:has(.post-photo:only-child) .post-photo {
    height: auto;
    max-height: 200px;
  }

  .lightbox-nav {
    font-size: 1.2rem;
    padding: 0.5rem 0.8rem;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .close-lightbox {
    font-size: 1.8rem;
    top: 10px;
    right: 15px;
  }

  .counter {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    bottom: 15px;
  }
}

/* ===== ССЫЛКА НА ГРУППУ ВКОНТАКТЕ ===== */
.vk-link-container {
  margin-top: 1rem;
  text-align: right;
  border-top: 1px solid var(--gray-300);
  padding-top: 1rem;
}

.vk-group-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background: rgba(30, 90, 125, 0.05);
}

.vk-group-link i {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.vk-group-link:hover {
  color: var(--primary-light);
  background: rgba(30, 90, 125, 0.1);
  gap: 0.75rem;
}

.vk-group-link:hover i {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .vk-group-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .vk-group-link i {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .vk-link-container {
    text-align: center;
  }

  .vk-group-link {
    font-size: 0.8rem;
  }
}

/* ===== СТРАНИЦА "О ШКОЛЕ" ===== */
.hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-left {
  flex: 1;
}

.hero-left h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-left p {
  margin: 1rem 0;
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-right {
  flex: 1;
  text-align: center;
}

.hero-right .gallery img {
  max-width: 100%;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.hero-right .gallery img:hover {
  transform: scale(1.02);
}

.features {
  padding: 4rem 0;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.features h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  border-left: none;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  width: 100%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(30, 90, 125, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  height: 100%;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transform: translateX(-100%);
  transition: transform 0.3s;
  z-index: 1;
}

.feature:hover::before {
  transform: translateX(0);
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
  border-color: rgba(30, 90, 125, 0.3);
}

.feature .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.feature h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.feature p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.gallery {
  padding: 4rem 0;
  background: var(--white);
}

.gallery h1 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2rem;
  color: var(--primary-dark);
}

.gallery-item {
  margin-bottom: 2.5rem;
}

.gallery-item h3 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary);
}

.gallery-photos {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0 1rem 0;
  scroll-behavior: smooth;
}

.gallery-photos .popup-image {
  width: 400px;
  height: 400px;
  object-fit: cover;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0.5rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.gallery-item .popup-image:hover {
  transform: scale(1.03);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
  font-weight: 300;
}

.close:hover {
  color: var(--primary-light);
  transform: scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.2s;
}
.modal-nav:hover {
  background: rgba(255, 255, 255, 0.35);
}
.modal-prev {
  left: 20px;
}
.modal-next {
  right: 20px;
}

body.modal-open {
  overflow: hidden;
}

.history {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
}

.history h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
  width: 100%;
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
}

.timeline-item {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 90, 125, 0.1);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 90, 125, 0.2);
}

.timeline-item h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-soft);
}

.timeline-item h3:first-of-type {
  margin-top: 0;
}

.timeline-item p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.timeline-item p:last-child {
  margin-bottom: 0;
}

.timeline-item b {
  color: var(--primary-dark);
  font-weight: 600;
}

/* Адаптивность для страницы "О школе" */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0;
  }

  .hero-left h1 {
    font-size: 2rem;
  }

  .hero-left p {
    font-size: 0.95rem;
  }

  .hero-right .gallery img {
    width: 100%;
    height: auto;
  }

  .features {
    padding: 2rem 0;
  }

  .features h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .feature {
    min-height: 240px;
    padding: 1.5rem;
  }

  .feature h3 {
    font-size: 1.2rem;
  }

  .feature p {
    font-size: 0.9rem;
  }

  .feature .icon {
    font-size: 2.5rem;
  }

  .gallery {
    padding: 2rem 0;
  }

  .gallery h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .gallery-item h3 {
    font-size: 1.2rem;
  }

  .gallery-item .popup-image {
    width: calc(50% - 1rem);
    height: 160px;
  }

  .history {
    padding: 2rem 0;
  }

  .history h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .timeline-item {
    padding: 1.5rem;
  }

  .timeline-item h3 {
    font-size: 1.3rem;
  }

  .close {
    font-size: 2rem;
    top: 15px;
    right: 20px;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-left h1 {
    font-size: 1.75rem;
  }

  .hero-left p {
    font-size: 0.9rem;
  }

  .features-grid {
    gap: 1rem;
  }

  .feature {
    min-height: 220px;
    padding: 1.25rem;
  }

  .feature h3 {
    font-size: 1.1rem;
  }

  .feature p {
    font-size: 0.85rem;
  }

  .feature .icon {
    font-size: 2rem;
  }

  .gallery-item .popup-image {
    width: calc(100% - 1rem);
    height: 200px;
    margin: 0.5rem 0;
  }

  .gallery-item h3 {
    font-size: 1.1rem;
    text-align: center;
    border-left: none;
    border-bottom: 2px solid var(--primary);
    padding-left: 0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }

  .timeline-item {
    padding: 1rem;
  }

  .timeline-item h3 {
    font-size: 1.2rem;
  }

  .timeline-item p {
    font-size: 0.9rem;
  }

  .close {
    font-size: 1.8rem;
    top: 10px;
    right: 15px;
  }
}

/* ===== MODERN COLLAPSIBLE MODULES ===== */
.schedule-panel {
    max-width: 1400px;  /* Увеличиваем максимальную ширину (было стандартно ~1100-1200px) */
    width: 95%;         /* Занимает 95% от экрана на маленьких мониторах */
    margin: 20px auto;  /* Центрирование */
    padding: 0 15px;
}

.collapsible-module {
    width: 100%;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 20px;  /* Увеличиваем закругление углов */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;     /* Чтобы содержимое не вылезало за скругленные углы */
    transition: all 0.3s ease;
}


.collapsible-module:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 90, 125, 0.15);
}

.module-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--white) 100%, var(--gray-100) 0%);
  transition: all 0.25s ease;
  user-select: none;
  position: relative;
}

.module-header:hover {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
}

.plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 600;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.module-header:hover .plus-icon {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.module-header .module-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: -0.2px;
  flex: 1;
}

.module-content {
  padding: 1.5rem 2rem 2rem 2rem;
  background: var(--white);
  border-top: 1px solid var(--gray-300);
  animation: moduleExpand 0.3s ease-out;
}

@keyframes moduleExpand {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== СТИЛИ ДЛЯ ТЕКСТА ВНУТРИ МОДУЛЕЙ ===== */
.module-content {
  text-align: justify;
}

.module-content h1 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
  text-align: center;
  width: auto;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.module-content h2 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem 0;
  padding-right: 1rem;
  border-right: none;
  text-align: left;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--primary-dark);
}

.module-content h3 {
  font-size: 1.2rem;
  margin: 1.25rem 0 0.75rem 0;
  padding-right: 0.75rem;
  border-right: none;
  text-align: left;
  color: var(--primary);
}

.module-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--gray-700);
  text-align: justify;
  text-justify: inter-word;
}

.module-content ul,
.module-content ol {
  margin: 1rem 0 1.5rem 0;
  padding-right: 1.5rem;
  padding-left: 0;
  list-style-position: outside;
  text-align: justify;
}

.module-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--gray-700);
  text-align: justify;
}

.module-content ul ul,
.module-content ol ul,
.module-content ul ol,
.module-content ol ol {
  margin: 0.5rem 0 0.5rem 0;
  padding-right: 1.5rem;
}

.module-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.module-content th,
.module-content td {
  border: 1px solid var(--gray-300);
  padding: 0.75rem 1rem;
  text-align: justify;
  vertical-align: top;
}

.module-content th {
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-100) 100%);
  font-weight: 600;
  color: var(--primary-dark);
  text-align: center;
}

.module-content td {
  color: var(--gray-700);
}

.module-content a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.module-content a:hover {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
}

.module-content .address,
.module-content .contact {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--gray-100);
  border-radius: 0.75rem;
  text-align: justify;
}

.module-content .highlight {
    background: rgba(30, 90, 125, 0.08);
    padding: 0.2rem;
    border-radius: 0.75rem;
    margin: 0rem 0;
    border-bottom: 3px solid var(--primary);
    text-align: justify;
}

.module-content address,
.module-content .contact-info {
  font-style: normal;
  text-align: justify;
  line-height: 1.6;
}

.module-content hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--gray-300);
}

.module-content strong,
.module-content b {
  color: var(--primary-dark);
  font-weight: 600;
}

.module-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1.5rem;
  border-right: 3px solid var(--primary);
  background: var(--gray-100);
  border-radius: 0.5rem;
  text-align: justify;
  font-style: italic;
}

/* Адаптивность для модулей */
@media (max-width: 768px) {
  .schedule-panel {
    padding: 0 1rem;
    margin: 1.5rem auto;
  }

  .module-header {
    padding: 1rem 1.25rem;
  }

  .module-header .module-title {
    font-size: 1.1rem;
  }

  .plus-icon {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .module-content {
    padding: 1.25rem 1.5rem;
  }

  .module-content h1 {
    font-size: 1.5rem;
  }

  .module-content h2 {
    font-size: 1.3rem;
  }

  .module-content h3 {
    font-size: 1.1rem;
  }

  .module-content p,
  .module-content li {
    font-size: 0.95rem;
  }

  .module-content th,
  .module-content td {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .schedule-panel {
    padding: 0 0.75rem;
    margin: 1rem auto;
  }

  .module-header {
    padding: 0.875rem 1rem;
  }

  .module-header .module-title {
    font-size: 1rem;
  }

  .plus-icon {
    width: 22px;
    height: 22px;
    font-size: 0.9rem;
  }

  .module-content {
    padding: 1rem 1.25rem;
  }

  .module-content h1 {
    font-size: 1.3rem;
  }

  .module-content h2 {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.75rem 0;
  }

  .module-content h3 {
    font-size: 1rem;
  }

  .module-content p,
  .module-content li {
    font-size: 0.9rem;
  }

  .module-content th,
  .module-content td {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }

  .module-content ul,
  .module-content ol {
    padding-right: 1rem;
  }
}

@media (max-width: 360px) {
  .module-header {
    padding: 0.75rem 0.875rem;
  }

  .module-header .module-title {
    font-size: 0.9rem;
  }

  .plus-icon {
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
  }

  .module-content {
    padding: 0.875rem 1rem;
  }

  .module-content h1 {
    font-size: 1.2rem;
  }

  .module-content h2 {
    font-size: 1.1rem;
  }

  .module-content p,
  .module-content li {
    font-size: 0.85rem;
  }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ РАСПИСАНИЯ ===== */

/* Блок фильтров */
.filter-block {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    margin: 2rem auto;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(30, 90, 125, 0.1);
}

.filter-block label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.btn-filter {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
    border: 1px solid var(--gray-300);
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

.btn-filter:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-filter:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 82, 152, 0.2);
}

/* Контейнер таблицы */
.table-container {
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
    overflow-x: auto;
}

/* Таблица расписания */
.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    font-size: 0.95rem;
}

.table-container thead {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.table-container th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.table-container td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    vertical-align: middle;
}

.table-container tbody tr {
    transition: all 0.2s ease;
}

.table-container tbody tr:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.03) 0%, rgba(42, 82, 152, 0.05) 100%);
    transform: scale(1.01);
}

.table-container tbody tr:last-child td {
    border-bottom: none;
}

/* Стиль для пустой строки */
.table-container .empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-100);
}

/* Выделение предмета */
.table-container td strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Номер урока и время */
.table-container td:first-child {
    font-weight: 500;
    color: var(--primary);
    background-color: rgba(42, 82, 152, 0.03);
    width: 130px;
}

/* Адаптивность таблицы */
@media (max-width: 768px) {
    .filter-block {
        padding: 1rem 1.25rem;
        margin: 1.5rem auto;
        gap: 1rem;
    }

    .filter-block label {
        font-size: 0.9rem;
    }

    .btn-filter {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .table-container {
        padding: 0 1rem;
        margin: 0 auto 2rem auto;
    }

    .table-container th,
    .table-container td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .table-container td:first-child {
        width: 110px;
    }

    .table-container .empty {
        padding: 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .filter-block {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        margin: 1rem;
    }

    .filter-block label {
        display: inline-block;
        margin-bottom: -0.25rem;
    }

    .btn-filter {
        width: 100%;
        text-align: center;
    }

    .table-container th,
    .table-container td {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .table-container td:first-child {
        width: 95px;
        font-size: 0.75rem;
    }

    .table-container .empty {
        padding: 1.5rem;
        font-size: 0.85rem;
    }
}

/* Стиль для выделения при поиске */
.highlight {
    background-color: #fef9c3;
    color: var(--gray-800);
    padding: 0 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Анимация появления страницы */
.page-loaded {
    animation: pageFadeIn 0.5s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Анимация для элементов при скролле */
.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Дополнительные стили для улучшения читаемости таблицы */
.table-container table {
    border-radius: 1rem;
}

.table-container th:first-child {
    border-top-left-radius: 1rem;
}

.table-container th:last-child {
    border-top-right-radius: 1rem;
}

/* Стили для четных строк (зебра) */
.table-container tbody tr:nth-child(even) {
    background-color: rgba(42, 82, 152, 0.02);
}

.table-container tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.03) 0%, rgba(42, 82, 152, 0.06) 100%);
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ И РЕКВИЗИТОВ (contact2.html) ===== */

/* Секция истории/контактов */
.history {
    padding: 2rem 0 4rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    min-height: calc(100vh - 400px);
}

.history .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.history h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    color: var(--gray-100);
    position: relative;
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Таймлайн (основной блок с информацией) */
.timeline {
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--white);
    border-radius: 1.5rem;
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 90, 125, 0.1);
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(30, 90, 125, 0.2);
}

/* Заголовки внутри timeline */
.timeline-item h2 {
    font-size: 1.6rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--primary-dark);
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--primary-dark);
}

.timeline-item h2:first-of-type {
    margin-top: 0;
}

.timeline-item h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--primary);
    border-bottom: 2px solid rgba(42, 82, 152, 0.2);
    padding-bottom: 0.5rem;
}

.timeline-item h3:first-of-type {
    margin-top: 0;
}

/* Параграфы */
.timeline-item p {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.timeline-item p:last-child {
    margin-bottom: 0;
}

/* Жирный текст */
.timeline-item b,
.timeline-item strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Списки */
.timeline-item ul {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.5rem;
    list-style-type: none;
}

.timeline-item li {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: -2px;
}

/* Ссылки */
.timeline-item a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.timeline-item a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Адресные блоки */
.timeline-item address {
    font-style: normal;
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 0.75rem 0;
    border-left: 3px solid var(--primary);
}

/* Специальный стиль для email и телефона */
.timeline-item p strong:first-child {
    display: inline-block;
    min-width: 200px;
}

/* Карточки с контактной информацией */
.contact-card {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    margin: 1rem 0;
    border: 1px solid rgba(30, 90, 125, 0.1);
}

.contact-card h4 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-card h4 i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Разделитель */
.timeline-item hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--gray-300);
}

/* Выделение важной информации */
.info-highlight {
    background: linear-gradient(135deg, rgba(42, 82, 152, 0.05) 0%, rgba(30, 60, 114, 0.08) 100%);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary);
}

/* Адаптивность для страницы контактов */
@media (max-width: 992px) {
    .timeline-item {
        padding: 1.5rem 2rem;
    }

    .timeline-item h2 {
        font-size: 1.4rem;
    }

    .timeline-item h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .history {
        padding: 1.5rem 0 3rem 0;
    }

    .history h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .history .container {
        padding: 0 1rem;
    }

    .timeline-item {
        padding: 1.25rem 1.5rem;
        border-radius: 1rem;
    }

    .timeline-item h2 {
        font-size: 1.3rem;
        padding-left: 0.75rem;
    }

    .timeline-item h3 {
        font-size: 1.1rem;
    }

    .timeline-item p,
    .timeline-item li {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .timeline-item li {
        padding-left: 1.25rem;
    }

    .timeline-item p strong:first-child {
        min-width: auto;
        display: inline;
    }

    .contact-card {
        padding: 1rem;
    }

    .info-highlight {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .history {
        padding: 1rem 0 2rem 0;
    }

    .history h1 {
        font-size: 1.5rem;
    }

    .timeline-item {
        padding: 1rem 1.25rem;
    }

    .timeline-item h2 {
        font-size: 1.2rem;
        margin: 1rem 0 0.75rem 0;
    }

    .timeline-item h3 {
        font-size: 1rem;
        margin: 1rem 0 0.75rem 0;
    }

    .timeline-item p,
    .timeline-item li {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .timeline-item li {
        margin-bottom: 0.5rem;
        padding-left: 1rem;
    }

    .timeline-item li::before {
        font-size: 1rem;
        top: -1px;
    }

    .timeline-item ul {
        margin: 0.75rem 0 1rem 0;
        padding-left: 0;
    }

    .contact-card {
        padding: 0.875rem;
    }

    .contact-card h4 {
        font-size: 1rem;
    }

    .info-highlight {
        padding: 0.75rem 0.875rem;
    }
}

@media (max-width: 360px) {
    .timeline-item {
        padding: 0.875rem 1rem;
    }

    .timeline-item h2 {
        font-size: 1.1rem;
    }

    .timeline-item h3 {
        font-size: 0.95rem;
    }

    .timeline-item p,
    .timeline-item li {
        font-size: 0.85rem;
    }
}

/* Анимация для элементов при скролле на странице контактов */
.history .timeline-item {
    opacity: 0;
    transform: translateY(20px);
    animation: contactFadeInUp 0.6s ease forwards;
}

@keyframes contactFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержки для анимации */
.history .timeline-item {
    animation-delay: 0.1s;
}

/* Стили для печати (если нужна печать контактов) */
@media print {
    .header,
    .footer,
    .nav-menu,
    .nav-buttons {
        display: none;
    }

    .history {
        padding: 0;
        background: white;
    }

    .timeline-item {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 1rem;
    }

    .timeline-item a {
        color: black;
        text-decoration: none;
    }

    .timeline-item li::before {
        color: black;
    }
}

/* Стиль для копирования текста (визуальный фидбек) */
.copiable {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0.1rem 0.3rem;
    border-radius: 0.375rem;
}

.copiable:hover {
    background: rgba(42, 82, 152, 0.1);
}

.copiable:active {
    background: rgba(42, 82, 152, 0.2);
}

/* Иконки рядом с контактной информацией */
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.contact-item i {
    width: 1.5rem;
    color: var(--primary);
    font-size: 1.1rem;
    text-align: center;
}

.contact-item span {
    color: var(--gray-700);
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Сетка для контактов (2 колонки на больших экранах) */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.contacts-grid .contact-card {
    margin: 0;
    height: 100%;
}

/* Заголовок с иконкой */
.section-title-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-title-icon i {
    font-size: 1.8rem;
    color: var(--primary);
}

.section-title-icon h2 {
    margin: 0;
    flex: 1;
}

/* ===== СТРАНИЦА ПЕДАГОГИЧЕСКИЙ КОЛЛЕКТИВ (teachers) ===== */

/* Основная секция */
.teachers {
    padding: 2rem 0 4rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    min-height: calc(100vh - 400px);
}

.teachers .table-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow-x: auto;
}

.teachers h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Стилизация таблицы */
.teachers table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    font-size: 0.95rem;
    border: none;
}

.teachers thead {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.teachers th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 1rem;
    letter-spacing: 0.3px;
    border: none;
}

.teachers td {
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    vertical-align: top;
    line-height: 1.5;
    border: none;
}

/* Чередование строк (зебра) */
.teachers tbody tr:nth-child(even) {
    background-color: rgba(42, 82, 152, 0.02);
}

.teachers tbody tr {
    transition: all 0.2s ease;
}

.teachers tbody tr:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.03) 0%, rgba(42, 82, 152, 0.06) 100%);
    transform: scale(1.01);
}

/* Стиль для первой колонки (номер) */
.teachers td:first-child {
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(42, 82, 152, 0.03);
    width: 70px;
    text-align: center;
    vertical-align: middle;
}

/* Стиль для колонки ФИО */
.teachers td:nth-child(2) {
    font-weight: 500;
    color: var(--primary-dark);
}

/* Стиль для колонки с учебным заведением */
.teachers td:nth-child(3) {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Стиль для колонки стажа */
.teachers td:nth-child(4) {
    text-align: center;
    width: 80px;
}

/* Стиль для колонки предмета */
.teachers td:nth-child(5) {
    font-weight: 500;
    color: var(--primary);
}

/* Пустое состояние */
.teachers .empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-100);
    border-radius: 1rem;
}

/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .teachers {
        padding: 1.5rem 0 3rem 0;
    }

    .teachers h1 {
        font-size: 1.8rem;
        margin-bottom: 1.8rem;
    }

    .teachers th,
    .teachers td {
        padding: 0.875rem 0.75rem;
        font-size: 0.9rem;
    }

    .teachers td:nth-child(3) {
        font-size: 0.85rem;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .teachers {
        padding: 1rem 0 2rem 0;
    }

    .teachers .table-container {
        padding: 0 1rem;
    }

    .teachers h1 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    /* Горизонтальная прокрутка для таблицы на мобильных */
    .teachers .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .teachers table {
        min-width: 650px;
        font-size: 0.85rem;
    }

    .teachers th {
        padding: 0.75rem 0.6rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .teachers td {
        padding: 0.75rem 0.6rem;
    }

    .teachers td:first-child {
        width: 60px;
    }

    .teachers td:nth-child(3) {
        font-size: 0.8rem;
    }

    .teachers td:nth-child(4) {
        width: 70px;
    }
}

@media (max-width: 480px) {
    .teachers h1 {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .teachers .table-container {
        padding: 0 0.75rem;
    }

    .teachers table {
        min-width: 580px;
        font-size: 0.8rem;
    }

    .teachers th {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    .teachers td {
        padding: 0.6rem 0.5rem;
    }

    .teachers td:first-child {
        width: 50px;
        font-size: 0.75rem;
    }

    .teachers td:nth-child(3) {
        font-size: 0.75rem;
    }

    .teachers td:nth-child(4) {
        width: 60px;
        font-size: 0.75rem;
    }

    .teachers td:nth-child(5) {
        font-size: 0.8rem;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 360px) {
    .teachers h1 {
        font-size: 1.3rem;
    }

    .teachers table {
        min-width: 520px;
        font-size: 0.75rem;
    }

    .teachers th {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }

    .teachers td {
        padding: 0.5rem 0.4rem;
    }

    .teachers td:first-child {
        width: 45px;
    }

    .teachers td:nth-child(4) {
        width: 55px;
    }
}

/* Стиль для скроллбара таблицы (для WebKit) */
.teachers .table-container::-webkit-scrollbar {
    height: 8px;
}

.teachers .table-container::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 4px;
}

.teachers .table-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.teachers .table-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Анимация появления строк таблицы */
.teachers tbody tr {
    opacity: 0;
    animation: teacherFadeIn 0.3s ease forwards;
}

@keyframes teacherFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Задержки для строк таблицы */
.teachers tbody tr:nth-child(1) { animation-delay: 0.05s; }
.teachers tbody tr:nth-child(2) { animation-delay: 0.10s; }
.teachers tbody tr:nth-child(3) { animation-delay: 0.15s; }
.teachers tbody tr:nth-child(4) { animation-delay: 0.20s; }
.teachers tbody tr:nth-child(5) { animation-delay: 0.25s; }
.teachers tbody tr:nth-child(6) { animation-delay: 0.30s; }
.teachers tbody tr:nth-child(7) { animation-delay: 0.35s; }
.teachers tbody tr:nth-child(8) { animation-delay: 0.40s; }
.teachers tbody tr:nth-child(9) { animation-delay: 0.45s; }
.teachers tbody tr:nth-child(10) { animation-delay: 0.50s; }
.teachers tbody tr:nth-child(11) { animation-delay: 0.55s; }
.teachers tbody tr:nth-child(12) { animation-delay: 0.60s; }
.teachers tbody tr:nth-child(13) { animation-delay: 0.65s; }
.teachers tbody tr:nth-child(14) { animation-delay: 0.70s; }
.teachers tbody tr:nth-child(15) { animation-delay: 0.75s; }
.teachers tbody tr:nth-child(16) { animation-delay: 0.80s; }
.teachers tbody tr:nth-child(17) { animation-delay: 0.85s; }
.teachers tbody tr:nth-child(18) { animation-delay: 0.90s; }
.teachers tbody tr:nth-child(19) { animation-delay: 0.95s; }
.teachers tbody tr:nth-child(20) { animation-delay: 1.00s; }

/* Стили для выделения при поиске (если используется) */
.teachers .highlight {
    background-color: #fef9c3;
    color: var(--gray-800);
    padding: 0 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Стили для печати */
@media print {
    .teachers {
        padding: 0;
        background: white;
    }

    .teachers .table-container {
        padding: 0;
        overflow: visible;
    }

    .teachers table {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .teachers thead {
        background: #f0f0f0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .teachers th {
        color: #333;
    }

    .teachers tbody tr:hover {
        background: none;
        transform: none;
    }

    .teachers tbody tr {
        opacity: 1;
        animation: none;
    }
}

/* ===== ВЕРСИЯ ДЛЯ СЛАБОВИДЯЩИХ ===== */
.vision-toggle {
    transition: all 0.2s ease !important;
    background: linear-gradient(135deg, #1f8a44 0%, #2aa95a 100%) !important;
}
.vision-toggle.active-vision {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

#vision-panel {
    position: sticky;
    top: 0;
    z-index: 10000;
    background: linear-gradient(120deg, #112a4f 0%, #1a3a6b 55%, #1f467f 100%);
    color: #ffffff;
    border-bottom: 2px solid #ffd700;
    box-shadow: 0 10px 24px rgba(6, 15, 33, 0.36);
    backdrop-filter: blur(5px);
}

.vision-panel-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.75rem 1rem 0.85rem;
}

.vision-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.vision-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.vision-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.vision-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.vision-col {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.vision-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    font-size: 0.84rem;
}

.vision-btn {
    border: 1px solid #8fb4e8;
    background: linear-gradient(120deg, #2a5fa4 0%, #3b72ba 100%);
    color: #fff;
    border-radius: 8px;
    padding: 0.38rem 0.62rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vision-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.vision-btn.active {
    background: #ffd700;
    color: #0b2244;
    border-color: #ffd700;
}

.vision-close-btn {
    background: linear-gradient(120deg, #c32020 0%, #a51414 100%);
    border-color: #ff5f5f;
}

.vision-reset-btn {
    background: linear-gradient(120deg, #f3be00 0%, #e6aa00 100%);
    border-color: #ffd24a;
    color: #1e2d4c;
}

.vision-scale-controls {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.45rem;
    align-items: center;
}

.vision-range {
    width: 100%;
    accent-color: #ffd700;
}

.vision-scale-value {
    min-width: 44px;
    text-align: right;
    font-weight: 700;
    color: #ffd700;
    font-size: 0.88rem !important;
    line-height: 1 !important;
    transform: none !important;
}

body.vision-mode-active .vision-scale-value,
body.vision-mode-active #vision-panel .vision-scale-value {
    font-size: 0.88rem !important;
    line-height: 1 !important;
}

.vision-schemes,
.vision-voice-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.vision-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    margin-left: 0.2rem;
}

.speech-highlight {
    outline: 2px solid #facc15 !important;
    background: rgba(250, 204, 21, 0.2) !important;
    border-radius: 4px;
}

body.vision-mode-active {
    letter-spacing: 0.02em;
    word-spacing: 0.04em;
}

/* Цветовые схемы */
body.vision-scheme-default {
    filter: none;
}

body.vision-mode-active.vision-scheme-bw,
body.vision-mode-active.vision-scheme-bw *:not(#vision-panel):not(#vision-panel *),
body.vision-mode-active.vision-scheme-bw *:not(#vision-panel):not(#vision-panel *)::before,
body.vision-mode-active.vision-scheme-bw *:not(#vision-panel):not(#vision-panel *)::after {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #222 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

body.vision-mode-active.vision-scheme-dark,
body.vision-mode-active.vision-scheme-dark *:not(#vision-panel):not(#vision-panel *),
body.vision-mode-active.vision-scheme-dark *:not(#vision-panel):not(#vision-panel *)::before,
body.vision-mode-active.vision-scheme-dark *:not(#vision-panel):not(#vision-panel *)::after {
    background-color: #0a0a0a !important;
    color: #f5f5f5 !important;
    border-color: #8a8a8a !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

body.vision-mode-active.vision-scheme-blue,
body.vision-mode-active.vision-scheme-blue *:not(#vision-panel):not(#vision-panel *),
body.vision-mode-active.vision-scheme-blue *:not(#vision-panel):not(#vision-panel *)::before,
body.vision-mode-active.vision-scheme-blue *:not(#vision-panel):not(#vision-panel *)::after {
    background-color: #001a3b !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

body.vision-mode-active.vision-scheme-dark a,
body.vision-mode-active.vision-scheme-blue a,
body.vision-mode-active.vision-scheme-bw a {
    text-decoration: underline !important;
}

body.vision-mode-active.vision-scheme-bw :where(input, textarea, select, button),
body.vision-mode-active.vision-scheme-dark :where(input, textarea, select, button),
body.vision-mode-active.vision-scheme-blue :where(input, textarea, select, button) {
    appearance: none;
}

body.vision-mode-active.vision-scheme-bw :where(svg, svg *, path, circle, rect, line, polyline, polygon) {
    fill: #000 !important;
    stroke: #000 !important;
}

body.vision-mode-active.vision-scheme-dark :where(svg, svg *, path, circle, rect, line, polyline, polygon) {
    fill: #f5f5f5 !important;
    stroke: #f5f5f5 !important;
}

body.vision-mode-active.vision-scheme-blue :where(svg, svg *, path, circle, rect, line, polyline, polygon) {
    fill: #ffeb3b !important;
    stroke: #ffeb3b !important;
}

@media (max-width: 920px) {
    .vision-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .vision-panel-inner {
        padding: 0.55rem 0.55rem 0.65rem;
    }
    .vision-col {
        padding: 0.5rem;
    }
    .vision-btn {
        padding: 0.34rem 0.55rem;
        font-size: 0.78rem;
    }
    .vision-label {
        font-size: 0.78rem;
    }
    .vision-title {
        font-size: 0.86rem;
    }
    .vision-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .vision-top-actions {
        width: 100%;
    }
    .vision-top-actions .vision-btn {
        flex: 1;
    }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ АВТОРИЗАЦИИ/РЕГИСТРАЦИИ (login.php, register.php) ===== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 15px;
    box-sizing: border-box;
    min-height: calc(100vh - 280px);
}
.auth-container {
    background: white;
    margin: 0 auto;
    border-radius: 40px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
    padding: 32px 28px;
    border: 1px solid #e9edf2;
    transition: all 0.2s;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
}
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrapper input {
    padding-right: 45px !important;
}
.password-input-wrapper input::-ms-reveal,
.password-input-wrapper input::-ms-clear {
    display: none;
}
.password-input-wrapper input::-webkit-credentials-auto-fill-button,
.password-input-wrapper input::-webkit-strong-password-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1rem;
    line-height: 1;
}
.password-toggle:hover {
    color: var(--primary);
}
.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}
.auth-container .form-group {
    margin-bottom: 20px;
}
.auth-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}
.auth-container .form-group input, 
.auth-container .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}
.auth-container .form-group input:focus, 
.auth-container .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}
.auth-container .btn-auth {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.auth-container .btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.auth-container .btn-auth:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.auth-container .error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}
.auth-container .success-message {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}
.auth-container .auth-link {
    text-align: center;
    margin-top: 20px;
}
.auth-container .auth-link a {
    color: var(--primary);
    text-decoration: none;
}
.auth-container .auth-link a:hover {
    text-decoration: underline;
}
.auth-container .role-info {
    background: var(--gray-100);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--gray-600);
}

/* ===== УНИВЕРСАЛЬНЫЕ СТИЛИ ФОРМ (по всему сайту) ===== */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary-dark);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 14px;
    font-size: 16px;
    background: white;
    color: var(--gray-800);
    transition: var(--transition-fast);
    box-shadow: 0 1px 0 rgba(10, 28, 42, 0.04);
}
.form-group textarea {
    resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(74, 98, 122, 0.75);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.12);
}
.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    box-shadow: var(--shadow-md);
}
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.btn-auth:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}
.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
}
.success-message {
    background: #dcfce7;
    color: #16a34a;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
}
.auth-container .role-info i {
    color: var(--primary);
    margin-right: 8px;
}
.auth-container .admin-note {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: var(--gray-600);
}

/* ===== СТИЛИ ДЛЯ ЛИЧНОГО КАБИНЕТА (profile.php) ===== */
.profile-container {
    max-width: 1100px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}
.profile-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}
.profile-info h2 {
    color: white;
    border: none;
    margin: 0 0 10px 0;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}
.profile-info p {
    margin: 5px 0;
    opacity: 0.9;
}
.profile-actions {
    display: flex;
    gap: 10px;
}
.profile-actions .btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}
.profile-actions .btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}
.profile-actions .btn-admin {
    background: var(--accent-gold);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
}
.schedule-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-md);
}
.profile-content {
    display: grid;
    gap: 30px;
}
.profile-panel {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    min-height: 520px;
    display: flex;
    flex-direction: column;
}
.profile-panel h3 {
    margin-bottom: 20px;
    color: var(--primary-dark);
}
.profile-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.profile-panel-text {
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 24px 0;
}
.profile-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: auto;
}
.profile-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff 0%, #fff 100%);
    border: 1px solid var(--gray-200);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    min-height: 72px;
    transition: all 0.2s;
}
.profile-quick-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(42, 82, 152, 0.25);
}
.profile-quick-link i {
    color: var(--primary);
    font-size: 1.2rem;
}
.profile-panel .empty-schedule {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.schedule-section.profile-panel {
    min-height: 520px;
    width: 100%;
}
.schedule-content {
    min-height: 380px;
}
.schedule-content .empty-schedule {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.schedule-section h3 {
    margin-bottom: 20px;
    color: var(--primary-dark);
}
.day-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .day-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.day-btn {
    padding: 10px 12px;
    background: var(--gray-200);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
    font-weight: 500;
    text-decoration: none;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    box-sizing: border-box;
}
.day-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: transparent;
}
.day-btn:hover {
    background: var(--gray-300);
}
.day-btn.active:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.schedule-table {
    width: 100%;
    border-collapse: collapse;
}
.schedule-table th, .schedule-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
.schedule-table th {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    font-weight: 600;
}
.schedule-table tr:hover {
    background: rgba(42, 82, 152, 0.05);
}
.empty-schedule {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}
.class-info {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}
.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}
.notif-badge-lg {
    min-width: auto;
    height: auto;
    padding: 4px 10px;
    font-size: 13px;
}
.btn-with-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.profile-notifications {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}
.profile-notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.profile-notifications-header h3 {
    margin: 0;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.profile-notifications-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.profile-notifications-link:hover {
    text-decoration: underline;
}
.profile-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profile-notif-item {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}
.profile-notif-item.is-new {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}
.profile-notif-item.is-read {
    opacity: 0.92;
}
.profile-notif-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.profile-notif-title {
    font-weight: 800;
    color: var(--primary-dark);
}
.profile-notif-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.profile-notif-item.is-new .profile-notif-status {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}
.profile-notif-item.is-read .profile-notif-status {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.profile-notif-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.profile-notif-body {
    color: var(--gray-700);
    white-space: pre-wrap;
    line-height: 1.6;
}
.profile-notif-actions {
    margin: 12px 0 0 0;
    display: flex;
    justify-content: flex-end;
}
.btn-notif-read {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

/* ===== СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ (admin.php) ===== */
.admin-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}
.admin-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 25px 30px;
    color: white;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.admin-header h1 {
    color: white;
    margin: 0;
    border: none;
    background: none;
}
.stats {
    display: flex;
    gap: 20px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
}
.stat-card .number {
    font-size: 24px;
    font-weight: bold;
}
.users-table {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}
.users-table table {
    width: 100%;
    border-collapse: collapse;
}
.users-table th, .users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}
.users-table th {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
}
.users-table tr:hover {
    background: rgba(42, 82, 152, 0.05);
}
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-admin { background: #f59e0b; color: white; }
.badge-teacher { background: #10b981; color: white; }
.badge-student { background: #3b82f6; color: white; }
.badge-parent { background: #8b5cf6; color: white; }
.badge-blocked { background: #ef4444; color: white; }
.badge-active { background: #22c55e; color: white; }
.btn-block, .btn-unblock {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-block {
    background: #ef4444;
    color: white;
}
.btn-unblock {
    background: #22c55e;
    color: white;
}

/* ===== ПЛАВАЮЩАЯ КНОПКА ОБРАТНОЙ СВЯЗИ ===== */
.floating-feedback-btn {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 66px;
    height: 66px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    box-shadow: 0 18px 30px rgba(30, 60, 114, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: 2px solid rgba(255, 215, 0, 0.42);
}
.floating-feedback-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.03);
    box-shadow: 0 22px 40px rgba(30, 60, 114, 0.35);
}
.floating-feedback-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 237, 78, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}
.floating-feedback-icon i {
    color: var(--primary-dark);
    font-size: 24px;
}
.floating-feedback-q {
    position: absolute;
    right: -4px;
    top: -6px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(30, 60, 114, 0.25);
}
@media (max-width: 520px) {
    .floating-feedback-btn { right: 18px; bottom: 18px; width: 60px; height: 60px; }
}

/* Подсветка совпадений после перехода из поиска */
.search-highlight-mark {
    background: #fde047;
    color: #1f2937;
    border-radius: 4px;
    padding: 0 2px;
}


/* ===== UI POLISH: HEADER + MOBILE TABLES ===== */
.header {
  background: linear-gradient(135deg, #17356a 0%, #254f97 55%, #2f65ad 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.header-top {
  padding: 0.8rem 1.2rem;
}
.logo2 {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.nav-menu {
  background: transparent;
  padding: 0.35rem 0 0.7rem 0;
}
.nav-menu ul {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(16, 28, 52, 0.18);
}
.nav-menu a {
  border-radius: 10px;
}
.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-block:hover, .btn-unblock:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.message {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: #dcfce7;
    color: #16a34a;
}
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary);
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.tab-btn {
    padding: 10px 20px;
    background: var(--gray-200);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}
.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.btn-save {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* ===== НОВАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (кроме header) ===== */
@media (max-width: 900px) {
  :where(.hero, .features, .home-news-section, .map-section, .news-section, .history, .teachers, .schedule-section) {
    padding: 2rem 0;
  }

  :where(.hero-content, .features-grid, .home-news-grid, .footer__grid, .profile-header, .admin-header, .admin-tabs) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .container,
  .profile-container,
  .admin-container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.05rem; }

  .hero-left p,
  .feature p,
  .post-text {
    font-size: 0.93rem;
    line-height: 1.5;
  }

  .card,
  .auth-container,
  .users-table,
  .schedule-section,
  .timeline-item,
  .vk-post,
  .feature,
  .home-news-card {
    border-radius: 12px;
    padding: 0.9rem;
  }

  .search-input-wrapper {
    flex-direction: column;
    border-radius: 14px;
    padding: 0.45rem;
    gap: 0.45rem;
  }

  .search-btn {
    width: 100%;
    min-height: 42px;
  }

  /* Унифицированные мобильные таблицы: скролл + аккуратный вид */
  .table-container,
  .users-table,
  .teachers .table-container,
  .module-content,
  .schedule-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .table-container table,
  .users-table table,
  .teachers table,
  .module-content table {
    min-width: 680px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
  }

  .table-container th,
  .table-container td,
  .users-table th,
  .users-table td,
  .teachers th,
  .teachers td,
  .module-content th,
  .module-content td {
    padding: 0.65rem 0.7rem;
    font-size: 0.85rem;
    white-space: normal;
    vertical-align: top;
  }

  .table-container td:first-child,
  .teachers td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f5f9ff;
    box-shadow: 2px 0 0 rgba(220, 229, 236, 0.9);
  }

  /* Таблица расписания в профиле: карточками */
  .schedule-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table tr {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.55rem;
  }

  .schedule-table td {
    border: none;
    padding: 0.26rem 0;
    white-space: normal;
    font-size: 0.88rem;
  }

  .schedule-table td::before {
    display: inline-block;
    min-width: 110px;
    font-weight: 700;
    color: var(--gray-600);
    margin-right: 6px;
  }

  .schedule-table td:nth-child(1)::before { content: "Урок:"; }
  .schedule-table td:nth-child(2)::before { content: "Предмет:"; }
  .schedule-table td:nth-child(3)::before { content: "Учитель:"; }
  .schedule-table td:nth-child(4)::before { content: "Кабинет:"; }
}

@media (max-width: 600px) {
  .container,
  .profile-container,
  .admin-container,
  .teachers .table-container,
  .table-container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.22rem; }

  .slider {
    height: 270px;
    margin-bottom: 1rem;
  }

  .slide-content h2 {
    font-size: 1.25rem;
  }

  .slide-content p {
    font-size: 0.86rem;
  }

  .slider-btn {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .home-news-image {
    height: 170px;
  }

  .feature {
    min-height: 220px;
  }

  .table-container table,
  .users-table table,
  .teachers table,
  .module-content table {
    min-width: 620px;
  }

  .table-container th,
  .table-container td,
  .users-table th,
  .users-table td,
  .teachers th,
  .teachers td {
    font-size: 0.8rem;
    padding: 0.55rem 0.56rem;
  }
}