/* Основные переменные цветов */
:root {
  --primary-color: #6B46C1;
  --primary-light: #8B5CF6;
  --primary-dark: #553C9A;
  --secondary-color: #EC4899;
  --accent-color: #F59E0B;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-accent: #F3F4F6;
  --border-color: #E5E7EB;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #F472B6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* HEADER STYLES */
header {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-medium);
 /* position: sticky; */
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;

}

/*
.logo_img{
  height: 70px;
}
*/
.logo::before {
  /* content: "🌙";
  font-size: 2rem; */
}

/* NAVIGATION STYLES */
.sonnik-menu-wrapper {
  position: relative;
}

.desktop-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* СТИЛИ ПОИСКА */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form {
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-form:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-form:focus-within {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.search-input {
  border: none;
  background: transparent;
  padding: 0.75rem 1.25rem;
  color: white;
  font-size: 1rem;
  width: 250px;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.search-input:focus {
  width: 300px;
  color: white;
  background: transparent;
}

.search-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 4px;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
  color: white;
}

.search-btn:active {
  transform: scale(0.95);
}

.search-btn:focus {
  outline: none;
  color: white;
}

/* Хлебные крошки */
.breadcrumbs-section {
  margin-bottom: 2rem;
}

.breadcrumbs {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--primary-light);
}

.breadcrumbs .separator {
  color: var(--text-light);
  margin: 0 0.25rem;
}

.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 600;
}

/* FOOTER */
footer {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 2rem 3rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.footer-section {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-section h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  opacity: 0.9;
  line-height: 1.7;
  font-size: 1rem;
  flex-grow: 1;
  margin: 0;
}

/* RESPONSIVE DESIGN */
@media (min-width: 1024px) {
  .calendar-wrapper {
      flex-direction: row;
      align-items: flex-start;
      justify-content: center;
      max-width: 1200px;
      margin: 0 auto;
  }

  #eventDisplay {
      order: 2;
      max-width: 450px;
      flex-shrink: 0;
  }

  #calendar {
      order: 1;
      max-width: 500px;
      flex-shrink: 0;
  }
}

@media (max-width: 1024px) {
  .calendar-wrapper {
      flex-direction: column;
  }

  #eventDisplay {
      order: 1;
  }

  #calendar {
      order: 2;
  }

  .info-section-three-columns {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
      display: none;
  }

  .mobile-menu-toggle {
      display: block;
  }

  .header-container {
      padding: 1rem;
  }

  /* Поиск на планшетах */
  .search-input {
      width: 200px;
  }

  .search-input:focus {
      width: 220px;
  }

  main {
      padding: 1rem;
  }

  .alphabet-container {
      grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
      gap: 0.5rem;
  }

  .letter-btn {
      height: 50px;
      font-size: 1rem;
  }

  .info-section-two-columns {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }

  .footer-container {
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }

  .footer-section {
      padding: 1.5rem;
      min-height: auto;
  }

  .footer-section h4 {
      font-size: 1.2rem;
  }

  .footer-section p {
      font-size: 0.9rem;
  }

  .section-title {
      font-size: 1.5rem;
  }
}

/* МОБИЛЬНАЯ ВЕРСИЯ - ИСПРАВЛЕНО */
@media (max-width: 480px) {
  .header-container {
      flex-direction: column;
      gap: 1rem;
      padding: 1rem;
  }

  .logo {
      font-size: 1.6rem;
  }

  .sonnik-menu-wrapper {
      order: 1;
  }

  .search-container {
      order: 2;
      width: 100%;
      max-width: 300px; /* Ограничиваем максимальную ширину */
  }

  .search-form {
      width: 100%;
      max-width: 300px; /* Уменьшаем размер формы поиска */
  }

  .search-input {
      width: 200px; /* Фиксированная ширина для мобильных */
      font-size: 0.9rem;
      padding: 0.6rem 1rem;
  }

  .search-input:focus {
      width: 220px; /* Небольшое увеличение при фокусе */
  }

  .search-btn {
      padding: 0.6rem 0.8rem;
      font-size: 1rem;
  }

  .alphabet-section, .calendar-section {
      padding: 2rem 1rem;
  }

  .info-block {
      padding: 1.5rem;
  }

  .mobile-menu {
      width: 280px;
  }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ */
@media (max-width: 360px) {
  .search-container {
      max-width: 280px;
  }

  .search-form {
      max-width: 280px;
  }

  .search-input {
      width: 180px !important;
      font-size: 0.85rem;
  }

  .search-input:focus,
  .search-input:active,
  .search-input:hover {
      width: 200px !important;
  }

  .logo {
      font-size: 1.4rem;
  }
}

/* HIDDEN ELEMENTS */
#eventsData {
  display: none;
}


/* FOOTER */
footer {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 2rem 3rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.footer-section {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-section h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  opacity: 0.9;
  line-height: 1.7;
  font-size: 1rem;
  flex-grow: 1;
  margin: 0;
}

.footer-one {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  justify-content: space-between;
}

.foto-and-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.foto-and-title img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.foto-title h3 {
  font-size: 1.5rem;
  margin: 0;
  color: #FFCC2C;
  font-weight: 700;
}

.footer-one__text {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.95;
}

/* FOOTER NAVIGATION */
.footer-section nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section nav ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
}

.footer-section nav ul li a:hover {
  color: #FFCC2C;
  transform: translateX(5px);
}

.footer-section nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #FFCC2C;
  transition: width 0.3s ease;
}

.footer-section nav ul li a:hover::after {
  width: 100%;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-section {
    padding: 1.5rem;
    min-height: auto;
  }

  .footer-one {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-section {
    padding: 1.5rem;
    min-height: auto;
  }

  .footer-section h4 {
    font-size: 1.2rem;
  }

  .footer-section p {
    font-size: 0.9rem;
  }

  .foto-and-title {
    gap: 1rem;
  }

  .foto-and-title img {
    width: 80px;
    height: 80px;
  }

  .foto-title h3 {
    font-size: 1.2rem;
  }

  .footer-one__text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 2rem 1rem;
  }

  .footer-container {
    gap: 1rem;
  }

  .footer-section {
    padding: 1rem;
  }

  .footer-one {
    flex-direction: column;
    text-align: center;
  }

  .foto-and-title {
    justify-content: center;
  }

  .foto-and-title img {
    width: 70px;
    height: 70px;
  }

  .foto-title h3 {
    font-size: 1rem;
  }

  .footer-one__text {
    font-size: 0.9rem;
  }

  .footer-section nav ul {
    gap: 0.8rem;
  }
}