:root {
  --bg-color: #ebcc99;
  --container-bg: #eec481;
  --text-color: #4f332b;
  --primary-color: #4f332b;
  --secondary-color: #4f332b;
  --accent-color: #4f332b;
  --border-color: #eec481;
  --link-color: #4f332b;
  --link-hover: #953623;
  --button-bg: #4f332b;
  --button-hover: #953623;
  --card-bg: #953623;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #011616;
  --container-bg: #002626;
  --text-color: #ead4b2;
  --primary-color: #eec481;
  --secondary-color: #eec481;
  --accent-color: #eec481;
  --border-color: #eec481;
  --link-color: #ffd29d;
  --link-hover: #386641;
  --button-bg: #386641;
  --button-hover: #011616;
  --card-bg: #386641;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

html {
  margin: 0;
  padding: 0;
}

/* Основные стили контейнера и навигации */
.links-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: var(--bg-color);
  padding: 15px 0;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.link {
  color: var(--link-color);
  text-decoration: none;
  margin: 0 15px;
  padding: 5px 10px;
  font-size: 18px;
  transition: all 0.3s ease;
}

.link:hover,
.link.active {
  color: var(--link-hover);
  text-decoration: underline;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background-color: var(--container-bg);
  border-radius: 10px;
  box-shadow: 0 0 20px var(--shadow-color);
  padding: 20px;
}

.gallery-container h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 30px;
}

/* Стили для Owl Carousel */
.owl-carousel {
  position: relative;
}

.owl-carousel .owl-stage-outer {
  padding: 10px 0;
}

.owl-carousel .item {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px var(--shadow-color);
  margin: 0 10px;
  transition: transform 0.3s ease;
}

.owl-carousel .item:hover {
  transform: scale(1.03);
}

.owl-carousel .gallery-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.owl-carousel .item:hover .gallery-image {
  opacity: 0.9;
}

.owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.owl-nav button {
  pointer-events: auto;
  background: var(--button-bg) !important;
  color: white !important;
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  font-size: 24px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.owl-nav button:hover {
  background: var(--button-hover) !important;
  transform: scale(1.1);
}

.owl-nav button span {
  position: relative;
  top: -2px;
}

.owl-dots {
  text-align: center;
  margin-top: 20px;
}

.owl-dots button.owl-dot {
  width: 15px;
  height: 15px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--button-bg) !important;
  transition: all 0.3s ease;
}

.owl-dots button.owl-dot.active {
  background: var(--primary-color) !important;
  transform: scale(1.2);
}

@keyframes zoom {
  from {
    transform: scale(0.1);
  }

  to {
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover {
  color: var(--primary-color);
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 18px;
}

.theme-switcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.theme-btn {
  background-color: var(--button-bg);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 0 10px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  transform: scale(1.1);
  background-color: var(--button-hover);
}

/* Адаптивность */
@media (max-width: 768px) {
  .owl-carousel .gallery-image {
    height: 200px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }
}

@media (max-width: 480px) {
  .links-container {
    flex-direction: column;
    align-items: center;
  }

  .link {
    margin: 5px 0;
  }

  .owl-carousel .gallery-image {
    height: 180px;
  }

  .owl-nav {
    padding: 0 5px;
  }

  .owl-nav button {
    width: 30px;
    height: 30px;
    font-size: 18px !important;
  }
}