/* ===== Глобальные стили ===== */
:root {
  --primary: #1e90ff;
  --primary-dark: #1560bd;
  --secondary: #cd0074;
  --secondary-dark: #27ae60;
  --dark: #2c3e50;
  --light: #fbf4f6;
  --white: #ffffff;
  --gray: #95a5a6;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-btn: 50px;
}

:root[data-theme="dark"] {
  --primary: #90caf9;
  --primary-dark: #42a5f5;
  --secondary: #ff1b9c;
  --secondary-dark: #4bd786;
  --dark: #ecf0f1;
  --light: #2c3e50;
  --white: #1a1a1a;
  --gray: #bdc3c7;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1 {
  font-size: 2rem;  
}
h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Шапка ===== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--light);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5px;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 50px;
  transition: var(--transition);
}

.school-info h1 {
  font-size: 1.4rem;
  margin-bottom: 3px;
  color: var(--dark);
}

.school-info p {
  font-size: 0.8rem;
  color: var(--primary);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.main-nav li {
  position: relative;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  font-weight: 500;
  color: var(--dark);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--secondary);
}

.dropdown-menu {
  gap: 5px !important;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  left: -20%;
  min-width: 220px;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 15px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.dropdown-menu.show {
  opacity: 0;
  visibility: visible;
  transform: translateY(0);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0 25px;
}

.dropdown-menu .nav-link {
  display: block;
  padding: 8px 0;
}

.dropdown-icon {
  margin-left: 5px;
  font-size: 0.8em;
  transition: var(--transition);
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

.menu-line {
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--dark);
  left: 0;
  transition: var(--transition);
}

.menu-line:nth-child(1) {
  top: 0;
}

.menu-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-line:nth-child(3) {
  bottom: 0;
}

[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 10px);
}

[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -10px);
}

.header-right {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 10px;
}

/* Theme- */
.theme-switcher {
  aspect-ratio: 1 / 1;
  display: inline-flex;
  background: var(--white);
  border-radius: 50%;
  padding: 8px;
  box-shadow: var(--shadow-inset);
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
}

#theme-toggle.dark {
  background: var(--white);
}

.light-mode {
  display: inline-block;
}

.dark-mode {
  display: none !important;
}

#theme-toggle.dark .light-mode {
  display: none;
}

#theme-toggle.dark .dark-mode {
  display: inline-block !important;
}

/*  -- lang start  --  */
.language-switcher {
  position: relative;
  display: inline-flex;
  background: var(--white);
  border-radius: 50px;
  padding: 4px 6px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  /* margin-right: 15px; */
}

.lang-btn {
  position: relative;
  width: 44px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  border-radius: 50px;
  outline: none;
}

.lang-btn.active {
  animation: pulse-active 3s infinite ease-in-out;
  color: var(--white);
}

.lang-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 46px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50px;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

/* Анимация переключения */
.language-switcher[data-active-lang="uz"] .lang-slider {
  transform: translateX(100%);
}

/* Эффекты при наведении */
.lang-btn:not(.active):hover {
  color: var(--primary);
  transform: translateY(-1px);
}

/* Микро-анимация активной кнопки */
@keyframes pulse-active {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.95);
  }
}

.language-switcher:hover .lang-btn.active {
  animation: none;
}

/*  -- phone number start --  */
.minimal-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background-color: var(--white);
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.phone-pulse-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  animation: pulse 1.5s infinite ease-in-out;
  font-size: 16px;
}

.bouncing-phone-number {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
  text-decoration: none;
  animation: bounce 1.5s infinite ease-in-out;
  display: inline-block;
}

/* Эффекты при наведении */
.minimal-phone:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.minimal-phone:hover .phone-pulse-icon,
.minimal-phone:hover .bouncing-phone-number {
  animation: none;
}

.minimal-phone:hover .phone-pulse-icon {
  background: var(--primary-dark);
  transform: scale(1.1) rotate(15deg);
}

.minimal-phone:hover .bouncing-phone-number {
  color: var(--primary);
  transform: translateY(-3px);
}

/* Анимация пульсации иконки */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    /*box-shadow: 1px 1px 10px 5px var(--primary-dark);*/
  }

  50% {
    /*box-shadow: 1px 1px 0px 0px var(--primary-dark);*/
    transform: scale(1.1);
  }
}

/* Анимация движения номера */
@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* Мини-оптимизации */
.wow {
  will-change: transform, opacity;
}

.divider {
  width: 80px;
  height: 3px;
  background: var(--primary);
  margin: 0 auto 20px;
  position: relative;
}

.divider::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 3px;
  background: var(--secondary);
  right: -40px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 15px;
}

.section-header p {
  color: var(--gray);
  font-size: 1.1rem;
}

/* ===== Подвал ===== */
.main-footer {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.footer-map h3 {
  font-size: 1.3rem;
  position: relative;
  padding-bottom: 10px;
  transform: translateX(20px);
}

.footer-column p {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* КАРТА */
.footer-column iframe {
  max-width: 100%;
  min-height: 400px;
  height: auto;
}

.footer-map iframe {
  width: 80%;
  max-width: 100%;
  min-height: 40vh;
  height: auto;
  text-align: center;
  margin: auto;
}

/* ======== */
.footer-column .social-links {
  display: flex;
  gap: 15px;
}

.footer-map {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-column .social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-column .social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--gray);
}

/* Стили для иконок в адресе */
.address i {
  color: var(--primary);
}

/* Ленивая загрузка */
img[loading="lazy"] {
  transition: opacity 0.3s;
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

iframe[loading="lazy"] {
  transition: opacity 0.3s;
  opacity: 0;
}

iframe[loading="lazy"].loaded {
  opacity: 1;
}

/*для формы обратной связи */
/* Стили для формы записи */
.appointment-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.error {
  border-color: #e74c3c !important;
}

.error-message {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 5px;
}

.success-message {
  background: #2ecc71;
  color: white;
  padding: 15px;
  border-radius: var(--radius);
  margin-top: 20px;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

.success-message i {
  margin-right: 10px;
}

/* ===== Адаптивность ===== */
@media (max-width: 992px) {
  .header-container {
    padding: 15px 20px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    /* right: -100%; */
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    padding: 80px 30px 30px;
    transition: var(--transition);
    z-index: 1000;
    /* transform: translateX(100%); */
    transform: translateX(300px);
    opacity: 0;
    visibility: hidden;
  }

  .main-nav.active {
    /* right: 0; */
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .no-scroll {
    overflow: hidden;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 15px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0;
    margin-top: 10px;
    margin-left: 15px;
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(0px, 9px);
  }

  .mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(0px, -9px);
  }
}

@media (max-width: 575px) {

  .language-switcher,
  .minimal-phone {
    display: none;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .divider {
    width: 60px;
  }
}