/* Современные стили для детского образования */
:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #45b7d1;
  --success-color: #96ceb4;
  --warning-color: #feca57;
  --light-bg: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
}

/* Фоновые эмодзи */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 1.8rem;
  opacity: 0.08;
  z-index: -1;
  animation: float 25s ease-in-out infinite;
  pointer-events: none;
  word-spacing: 1.5rem;
  line-height: 2.5rem;
  overflow: hidden;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

/* Навигация */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  border-bottom: 3px solid var(--primary-color);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.5rem;
}

.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

/* Заголовки */
.title {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

h2 {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 0;
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Секции */
section {
  margin: 4rem 0;
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}

/* Карточки */
.card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* Стиль для всех изображений - скругленный квадрат с тенью */
.card img {
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  object-fit: cover;
  transition: all 0.3s ease;
}

.card img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.card-title {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.3rem;
}

.card-text {
  color: var(--text-light);
  line-height: 1.6;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Модальное окно */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 20px 20px 0 0;
  border: none;
}

.modal-title {
  font-weight: 700;
  font-size: 1.3rem;
}

.form-control {
  border-radius: 15px;
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* Карусель */
.carousel-item img {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  object-fit: cover;
  transition: all 0.3s ease;
}

.carousel-item img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.carousel-control-prev,
.carousel-control-next {
  background: rgba(255, 107, 107, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
}

/* Футер */
footer {
  background: linear-gradient(45deg, var(--text-dark), var(--accent-color));
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p {
  margin: 0;
  font-weight: 500;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }
  
  .card {
    margin-bottom: 2rem;
  }
  
  .carousel-item img {
    height: 300px;
  }
  
  /* Скругленный квадрат для фотографий на мобильных */
  .rounded {
    border-radius: 20px !important;
    object-fit: cover;
    aspect-ratio: 1;
    width: 100%;
    height: auto;
  }
}

@media screen and (max-width: 576px) {
  .title {
    font-size: 2rem;
  }
  
  .card img {
    height: 250px;
  }
  
  .carousel-item img {
    height: 250px;
  }
  
  /* Дополнительные стили для скругленных квадратов на маленьких экранах */
  .rounded {
    border-radius: 15px !important;
    object-fit: cover;
    aspect-ratio: 1;
    max-width: 100%;
    height: auto;
    width: 100%;
    min-height: 200px;
    max-height: 300px;
  }
  
  body::before {
    font-size: 1.5rem;
    word-spacing: 1rem;
    line-height: 2rem;
  }
}


/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card, .modal-content {
  animation: fadeInUp 0.6s ease-out;
}

/* Дополнительные стили для детской тематики */
.lead {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 500;
}

.btn-lg {
  padding: 15px 40px;
  font-size: 1.1rem;
  border-radius: 30px;
}