* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}



html {
  scroll-behavior: smooth;
}


body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

.about-school {
  padding: 80px 20px;
  line-height: 1.7;
}

.about-school .section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 40px;
  color: #258a1e;
}

.container1 {
  max-height: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(to right, #5050501e, #d7d7d759);
  backdrop-filter: blur(4px);
  border-radius: 30px;
  padding: 30px;
}


.about-school .lead {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
}

.about-block {
  margin-bottom: 30px;
}

.about-block h3 {
  font-size: 22px;
  color: #06b800;
  margin-bottom: 10px;
}

.about-block p {
  font-size: 16px;
}

.end-text {
  font-weight: bold;
  margin-top: 40px;
  font-size: 18px;
}


.header {
  background: linear-gradient(90deg, #358a1e, #2feb25);
  color: #fff;
  padding: 10px 5px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}


.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.nav a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0%;
  height: 3px;
  background-color: #ffc107;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 4px;
}

.nav a:hover::before {
  width: 100%;
}

.nav a:hover {
  color: #ffeb3b;
}


.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.hero {
  background: linear-gradient(to right, #28af1e, #64f63b);
  color: white;
  text-align: center;
  padding: 100px 20px;
  border-radius: 0 0 60px 60px;
}

.hero h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
}

.navbtns {
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 28px;
  background: #3def37;
  color: #ffffff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.5s;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn:hover {
  background: #ffffff07;
  transform: translateY(-2px);
  color: #09ff00;
  border: 1px solid #09ff00;
}

.section {
  padding: 80px 20px;
  text-align: center;
}

.section h2 {
  font-size: 30px;
  margin-bottom: 30px;
  color: #358a1e;
}

.section p,
.section li {
  font-size: 18px;
  color: #444;
}

ul {
  list-style: none;
  padding: 0;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: 0.3s;
  font-weight: 500;
  width: 300px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px #258a1e;
  background-color: #3def37;
  color: white;
}

.footer {
  background: #258a1e;
  color: #fff;
  padding: 60px 20px 20px;
}

.footer h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #ffc107;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-grid p, .footer-grid li, .footer-grid a {
  font-size: 14px;
  line-height: 1.6;
  color: #e0e0e0;
  text-decoration: none;
}

.footer-grid li {
  list-style: none;
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: #ffeb3b;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #ccc;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
}

/* Кнопка гамбургер */
.nav-toggle {
  display: none; /* по умолчанию скрыта */
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0;
}

.nav-toggle:hover {
  transform: scale(1.1);
  animation: pulse 2s infinite;
}

/* Улучшения для сенсорных устройств */
@media (hover: none) and (pointer: coarse) {
  .nav-toggle:hover {
    transform: none;
    animation: none;
  }
  
  .nav-toggle:active {
    transform: scale(0.95);
  }
  
  .nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 25px;
    transform: none;
  }
  
  .nav a:active {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 35px;
    transform: translateX(5px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Уважение пользовательских настроек анимации */
@media (prefers-reduced-motion: reduce) {
  .nav-toggle,
  .nav-toggle::before,
  .nav-toggle::after,
  .nav-toggle span,
  .nav,
  .nav a,
  .nav a::before {
    transition: none !important;
    animation: none !important;
  }
  
  .nav a {
    opacity: 1;
    transform: none;
  }
  
  .nav.show {
    opacity: 1;
    transform: none;
  }
}

.nav-toggle:active {
  transform: scale(0.95);
}

/* Анимированные линии бургер меню */
.nav-toggle::before,
.nav-toggle::after,
.nav-toggle span {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  left: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.nav-toggle::before {
  top: 6px;
}

.nav-toggle span {
  top: 13px;
}

.nav-toggle::after {
  top: 20px;
}

/* Анимация при открытии меню */
.nav-toggle.active::before {
  transform: rotate(45deg);
  top: 13px;
}

.nav-toggle.active span {
  opacity: 0;
  transform: scale(0);
}

.nav-toggle.active::after {
  transform: rotate(-45deg);
  top: 13px;
}

/* Очень маленькие экраны */
@media (max-width: 354px) {
  .logo{
    width: 50px;
  }
  
  .nav-toggle {
    width: 25px;
    height: 25px;
  }
  
  .nav-toggle::before {
    top: 5px;
  }
  
  .nav-toggle span {
    top: 11px;
  }
  
  .nav-toggle::after {
    top: 17px;
  }
  
  .nav a {
    padding: 10px 15px;
    font-size: 13px;
  }
  
  .nav.show {
    max-height: 85vh;
    padding: 15px 0 25px 0;
  }
}


/* Планшеты и мобильные устройства */
@media (max-width: 856px) {
  .nav-toggle {
    display: block;
  }
  
  .nav {
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(135deg, #358a1e, #2feb25);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    box-sizing: border-box;
  }

  .nav.show {
    max-height: 90vh;
    padding: 20px 0 30px 0;
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }

  .nav.show::-webkit-scrollbar {
    width: 6px;
  }

  .nav.show::-webkit-scrollbar-track {
    background: transparent;
  }

  .nav.show::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
  }

  .nav.show::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
  }

  /* Анимация появления пунктов меню */
  .nav a {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav:not(.show) a {
    opacity: 0 !important;
    transform: translateX(-20px) !important;
    pointer-events: none;
  }
  

  .nav.show a {
    opacity: 1;
    transform: translateX(0);
  }

  /* Убираем задержки - все пункты появляются одновременно */

  .nav a {
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
    display: block;
    box-sizing: border-box;
  }

  .nav a::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .nav a:hover::before {
    left: 100%;
  }

  .nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 35px;
    transform: translateX(5px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* Исправление для длинных текстов */
  .nav a[href="#deep-about"] {
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
  }



  .nav a:last-child {
    border-bottom: none;
  }

  /* Предотвращение проблем с переполнением */
  .nav a {
    word-break: break-word;
    hyphens: auto;
  }

  /* Убеждаемся, что все пункты видны */
  .nav.show a:last-child {
    margin-bottom: 0;
    border-bottom: none;
  }

  .header {
    padding: 15px 5px;
  }
}

/* Очень узкие экраны (портретная ориентация) */
@media (max-width: 400px) and (orientation: portrait) {
  .nav {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  
  .nav a {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 40px;
  }
  
  .nav.show {
    max-height: 75vh;
    padding: 15px 0 20px 0;
  }
  
  .header {
    padding: 10px 5px;
  }
}

/* Очень маленькие экраны по ширине и высоте */
@media (max-width: 360px) and (max-height: 640px) {
  .nav.show {
    max-height: 65vh;
    padding: 10px 0 15px 0;
  }
  
  .nav a {
    padding: 8px 15px;
    font-size: 12px;
    min-height: 32px;
  }
  
  .nav-toggle {
    width: 22px;
    height: 22px;
  }
  
  .nav-toggle::before {
    top: 4px;
  }
  
  .nav-toggle span {
    top: 9px;
  }
  
  .nav-toggle::after {
    top: 14px;
  }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 856px) and (orientation: landscape) {
  .nav {
    max-height: 300px;
    overflow-y: auto;
  }
  
  .nav a {
    padding: 10px 25px;
    font-size: 15px;
  }
  
  .header {
    padding: 10px 5px;
  }
}

/* Экраны с маленькой высотой */
@media (max-height: 600px) and (orientation: portrait) {
  .nav.show {
    max-height: 60vh;
    padding: 10px 0 15px 0;
  }
  
  .nav a {
    padding: 8px 20px;
    font-size: 13px;
    min-height: 35px;
  }
}

/* Средние экраны (планшеты в портретном режиме) */
@media (max-width: 768px) and (min-width: 481px) {
  .nav {
    max-height: 500px;
  }
  
  .nav a {
    padding: 18px 30px;
    font-size: 17px;
  }
  
  .nav-toggle {
    width: 32px;
    height: 32px;
  }
  
  .nav-toggle::before {
    top: 7px;
  }
  
  .nav-toggle span {
    top: 14px;
  }
  
  .nav-toggle::after {
    top: 21px;
  }
}




.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Анимации при загрузке */
.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

.logo-animate {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s ease;
}

.logo-animate.show {
  opacity: 1;
  transform: scale(1);
}

.btn-animate {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.5s ease 0.6s;
}

.btn-animate.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.deep-about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.info-card {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: 0.3s, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 16px #258a1e;
  background-color: #50f44b;
  color: white;
}

.icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: #1e3a8a;
}

.info-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.info-card p {
  font-size: 14px;
  line-height: 1.6;
}

.header .container {
  display: flex;
  justify-content: space-between; /* логотип слева, кнопка справа */
  align-items: center;            /* вертикальное центрирование */
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.staff-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.staff-card:hover {
  transform: translateY(-5px);
}



.staff-card.director {
  background: #09ff00; /* нежно-зелёный фон */
  border: none;
  transform: scale(1.05); /* слегка увеличим */
  box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}

.staff-card.director:hover {
  transform: scale(1.08);
}

.staff-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  margin-bottom: 15px;
}

.staff-card.director {
  padding: 10px 10px 20px 10px; /* убираем отступ сверху — его займёт фото */
}

.hero {
  color: white;
  text-align: center;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
}
.hero-green {
  background-image: url('./img/20250618_131549.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-attachment: fixed;
}

.hero-green h2 {
  font-size: 36px;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-green p {
  font-size: 18px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.admin-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: 0.5s;
}

.admin-card:hover {
  transform: translateY(-5px);
}

.admin-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid transparent;
}

.admin-card h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.admin-card p {
  font-size: 14px;
  color: #666;
}

/* Особый стиль для директора */
.admin-card.director img {
  border-color: #2ecc71; /* зелёная рамка */
}

.admin-card.director {
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3);
  position: relative;
  transition: 0.5s;
  background-color: white;
  color: #000;
}

.admin-card.director::after {
  content: "Директор";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2ecc71;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
}


.admin-card:hover {
  background-color: #07ca00;
  color: white;
}

.lang-toggle {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

#lang-btn {
  background: #ffffff;
  color: #000;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

#lang-btn:hover {
  background: #09ff00;
}

.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  background-color: #fff;
  min-width: 140px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 5px;
  list-style: none;
}

.lang-dropdown li {
  padding: 10px;
  cursor: pointer;
  font-weight: 500;
  color: #000;
}

.lang-dropdown li:hover {
  background-color: #f2f2f2;
}

.lang-toggle.open .lang-dropdown {
  display: block;
}


.forum-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}



.forum-form input,
.forum-form textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
}

#form-status {
  margin-top: 10px;
  color: green;
  font-weight: bold;
}

/* Стили для переключателя темы */
.theme-toggle {
  margin-left: 15px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #3def37;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

body.dark-theme {
  background: #000000;
  color: #e0e0e0;
}

body.dark-theme .card,
body.dark-theme .info-card,
body.dark-theme .staff-card,
body.dark-theme .admin-card {
  background: #1e1e1e;
  color: #eee;
} 

body.dark-theme .admin-card:hover {
  background-color: #06c100;
}

body.dark-theme #about-school p {
  color: rgb(205, 205, 205);
}

body.dark-theme #program li {
  color: rgb(205, 205, 205);
}

body.dark-theme .info-card p {
  color: rgb(205, 205, 205);
}

body.dark-theme .admin-card p {
  color: rgb(205, 205, 205);
}

body.dark-theme #forum p {
  color: rgb(205, 205, 205) ;
}

body.dark-theme #contacts p {
  color: rgb(205, 205, 205);
}

body.dark-theme .footer {
  background: #1a1a1a;
}

body.dark-theme .header {
  background: #1e1e1e;
}

body.dark-theme .btn {
  background: #333;
  color: white;
}

body.dark-theme .btn:hover {
  background: #33333325;
  color: #3def37;
  border: 1px solid #3def37;
}

body.dark-theme .card:hover {
  background-color: #06b000;
}

body.dark-theme .admin-card:hover {
  background-color: #07ca00;
}

body.dark-theme .mobile-menu {
  background: linear-gradient(to bottom, #1f1f1f, #2c2c2c);
}

body.dark-theme .mobile-menu li a {
  color: #f0f0f0;
  border-bottom: 1px solid #333;
}

/* Светлая тема по умолчанию */
.mobile-menu {
  background: linear-gradient(to bottom, #27d91b, #1da71d);
  color: white;
}

.mobile-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu li a {
  color: white;
}

/* Тёмная тема */
body.dark-theme .nav {
  background: #1e1e1e;
}

body.dark-theme .nav li {
  border-bottom: 1px solid #444;
}

body.dark-theme .nav li a {
  color: #f9f9f9;
}

/* Стили для бургер меню в темной теме */
body.dark-theme .nav-toggle::before,
body.dark-theme .nav-toggle::after,
body.dark-theme .nav-toggle span {
  background: #ffffff;
}

@media (max-width: 856px) {
  body.dark-theme .nav {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
  
  body.dark-theme .nav a:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

body.dark-theme .branch-card {
  background-color: #1e1e1e;
  color: #ffffff;
}

body.dark-theme .branch-card p {
  color: #ffffff;
}

body.dark-theme .branch-card:hover {
  background-color: #3def37;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.branch-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
  text-align: center;
}


.branch-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.branch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px #258a1e;
  background-color: #3def37;
  color: white;
}

.branch-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.branch-card p {
  font-size: 16px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  font-size: 20px;
  text-decoration: none;
  color: #fff;
  background: #258a1e;
  padding: 12px;
  border-radius: 50%;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
   background: #3def3700;
  border: 1px solid #3def37;
  color: #3def37;
  transform: scale(1.1);
}

.news-section {
  padding: 80px 20px;
}

.section-title {
  font-size: 36px;
  text-align: center;
  color: #1a237e;
  margin-bottom: 50px;
}

.news-section {
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  font-size: 36px;
  color: #06b800;
  margin-bottom: 40px;
}

.news-swiper {
  padding-bottom: 40px;
}

.news-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-align: left;
  height: 400px;
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card h3 {
  font-size: 20px;
  margin: 16px;
  color: #1da71d;
}

.news-card p {
  font-size: 14px;
  margin: 0 16px 16px;
  color: #444;
}

/* Адаптивность */
@media (min-width: 768px) {
  .news-card {
    max-width: 600px;
    margin: 0 auto;
  }
}

body.dark-theme .news-card {
  background: #1c1c1c;
  color: #f0f0f0;
}

body.dark-theme .news-card p {
  color: white;
}

/* --- Модальное окно входа ученика --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.modal-content {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  margin: 60px auto;
  padding: 35px 40px 25px 40px;
  border-radius: 20px;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  animation: fadeIn 0.4s;
  border: 1px solid rgba(9, 255, 0, 0.1);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.close:hover { 
  color: #09ff00; 
  background: rgba(9, 255, 0, 0.1);
  transform: scale(1.1);
}
.login-error {
  color: #d32f2f;
  margin-top: 10px;
  font-size: 15px;
  min-height: 20px;
}
.btn-login {
  background: #09ff00;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.2s;
}
.btn-login:hover { background: #07d600; }

/* --- Блок домашних заданий ученика --- */
.student-homeworks {
  max-width: 700px;
  margin: 40px auto 0 auto;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 30px 25px;
}
.student-homeworks h2 {
  color: #09ff00;
  margin-bottom: 20px;
  font-size: 26px;
  text-align: center;
}
.homework-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.homework-item {
  background: #f8f9fa;
  border-left: 4px solid #09ff00;
  border-radius: 8px;
  padding: 16px 18px 12px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.homework-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.homework-desc {
  color: #555;
  margin-bottom: 8px;
}
.homework-meta {
  font-size: 13px;
  color: #888;
  text-align: right;
}
@media (max-width: 600px) {
  .modal-content { max-width: 98vw; padding: 18px 6vw; }
  .student-homeworks { padding: 18px 4vw; }
}

/* --- Страница ученика --- */
.student-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 40px 0;
}

.student-header {
  text-align: center;
  margin-bottom: 40px;
}

.student-header h1 {
  color: #09ff00;
  font-size: 36px;
  margin-bottom: 10px;
}

.student-header p {
  color: #666;
  font-size: 18px;
}

.homeworks-section {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
  color: #333;
  font-size: 24px;
  margin: 0;
}

.section-header h2 i {
  color: #09ff00;
  margin-right: 10px;
}

.refresh-btn {
  background: #09ff00;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: #07d600;
  transform: translateY(-2px);
}

.refresh-btn i {
  margin-right: 5px;
}

.homeworks-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.homework-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #09ff00;
  transition: transform 0.3s ease;
}

.homework-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.homework-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.homework-header h3 {
  color: #333;
  font-size: 18px;
  margin: 0;
}

.teacher-name {
  background: #09ff00;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.homework-content p {
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.homework-footer {
  display: flex;
  justify-content: flex-end;
}

.homework-date {
  color: #888;
  font-size: 14px;
}

.homework-date i {
  margin-right: 5px;
}

.loading {
  text-align: center;
  color: #666;
  font-size: 16px;
  padding: 40px;
}

.no-homeworks {
  text-align: center;
  padding: 40px;
  color: #666;
}

.no-homeworks i {
  font-size: 48px;
  color: #09ff00;
  margin-bottom: 15px;
}

.no-homeworks h3 {
  color: #333;
  margin-bottom: 10px;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #d32f2f;
}

.error-message i {
  font-size: 48px;
  margin-bottom: 15px;
}

.student-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.student-info span {
  color: #09ff00;
  font-weight: 600;
}

.btn-logout {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.btn-logout:hover {
  background: #c82333;
}

/* --- Современный модал для входа ученика (универсально) --- */
.modal-student {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(5px);
}
.modal-student-content {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  margin: 60px auto;
  padding: 38px 44px 28px 44px;
  border-radius: 22px;
  max-width: 410px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  position: relative;
  animation: fadeIn 0.4s;
  border: 1.5px solid rgba(9, 255, 0, 0.13);
}
.modal-student-content h2 {
  text-align: center;
  color: #09ff00;
  margin-bottom: 22px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.modal-student-content .form-group label {
  color: #333;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.modal-student-content .form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 14px;
  transition: border-color 0.3s;
}
.modal-student-content .form-group input:focus {
  border-color: #09ff00;
  outline: none;
}
.modal-student-content .btn {
  width: 100%;
  background: #09ff00;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.modal-student-content .btn:hover { background: #07d600; }
.modal-student-content .login-error {
  min-height: 22px;
  text-align: center;
  margin-top: 10px;
  color: #d32f2f;
  font-size: 15px;
}
.modal-student-content .close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal-student-content .close:hover {
  color: #09ff00;
  background: rgba(9, 255, 0, 0.1);
  transform: scale(1.1);
}
@media (max-width: 600px) {
  .modal-student-content { max-width: 98vw; padding: 18px 6vw; }
}

/* --- Стили для админ-панели --- */
.admin-page {
  padding: 40px 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-header h1 {
  color: #09ff00;
  font-size: 32px;
  margin: 0;
}

.admin-header h1 i {
  margin-right: 10px;
}

.admin-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  color: #666;
  font-size: 16px;
  margin-bottom: 10px;
}

.stat-number {
  color: #09ff00;
  font-size: 32px;
  font-weight: bold;
  margin: 0;
}

.users-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.users-section h2 {
  color: #333;
  margin-bottom: 25px;
  font-size: 24px;
}

.users-section h2 i {
  color: #09ff00;
  margin-right: 10px;
}

.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.table tr:hover {
  background: #f8f9fa;
}

.admin-badge {
  background: #09ff00;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 8px;
}

.role-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.role-admin {
  background: #dc3545;
  color: white;
}

.role-director {
  background: #09ff00;
  color: white;
}

.role-deputy {
  background: #17a2b8;
  color: white;
}

.role-teacher {
  background: #ffc107;
  color: #333;
}

.role-student {
  background: #6c757d;
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  margin-right: 5px;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.no-users {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* --- Стили для профиля пользователя --- */
.user-profile-page {
  padding: 40px 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.profile-header h1 {
  color: #09ff00;
  font-size: 32px;
  margin: 0;
}

.profile-header h1 i {
  margin-right: 10px;
}

.btn-back {
  background: #6c757d;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.btn-back:hover {
  background: #5a6268;
  color: white;
}

.profile-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-info-section {
  margin-bottom: 30px;
}

.user-info-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 20px;
}

.user-info-section h2 i {
  color: #09ff00;
  margin-right: 10px;
}

.user-info {
  display: grid;
  gap: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.info-item label {
  font-weight: 600;
  color: #333;
  min-width: 120px;
  margin-right: 15px;
}

.info-item span {
  color: #666;
}

.user-details-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 20px;
}

.user-details-section h2 i {
  color: #09ff00;
  margin-right: 10px;
}

.homework-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 4px solid #09ff00;
}

.homework-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.homework-header h3 {
  color: #333;
  margin: 0;
  font-size: 18px;
}

.homework-date {
  color: #666;
  font-size: 14px;
}

.homework-content p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

.homework-teacher {
  color: #09ff00;
  font-size: 14px;
  font-weight: 600;
}

.homework-teacher i {
  margin-right: 5px;
}

.subject-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}

.subject-item i {
  color: #09ff00;
  margin-right: 10px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-actions {
    width: 100%;
  }
  
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .info-item label {
    margin-bottom: 5px;
    margin-right: 0;
  }
  
  .table {
    font-size: 14px;
  }
  
  .table th,
  .table td {
    padding: 8px;
  }
}

/* --- Стили для создания домашних заданий --- */
.create-homework-page {
  padding: 40px 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.page-header h1 {
  color: #09ff00;
  font-size: 32px;
  margin: 0;
}

.page-header h1 i {
  margin-right: 10px;
}

.homework-form-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 0 auto;
}

.homework-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #09ff00;
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  background: white;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-primary {
  background: #09ff00;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #07d600;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: #5a6268;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* --- Адаптивность для формы --- */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .homework-form-container {
    padding: 20px;
    margin: 0 10px;
  }
}

@media (max-width: 856px) {
  .nav {
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: 30px;
  }
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  color: black;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: none;
  z-index: 1000;
}

.lang-dropdown li {
  border-bottom: 1px solid #c0c0c0;
}

.lang-dropdown li:last-child {
  border-bottom: none;
}

.nav {
  pointer-events: none;
}
.nav.show {
  pointer-events: auto;
}


.lang-dropdown a {
  display: block;
  padding: 5px 5px;
  color: black;
  text-decoration: none;
}

.lang-dropdown a:hover {
  background: #f0f0f0;
}

/* Активное раскрытие */
.lang-toggle.open .lang-dropdown {
  display: block;
}



@media (min-width: 857px) {
  .nav {
    position: static !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: row !important;
  }

  .nav a {
    opacity: 1 !important;
    transform: none !important;
  }
}
