/*  @import url('globals.css'); */

/* Сброс отступов и установка box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основной стиль для body */
body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

html {
    scroll-behavior: smooth; /* Плавная прокрутка по якорям */
}

/* ===================== */
/* === Header (шапка) === */
/* ===================== */

header {
    background-color: var(--color-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Верхняя панель: соцсети и языки */
.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    height: 40px;
}

.social-icons a img {
    width: 24px;
    margin-right: 10px;
}

.language-switch a {
    margin-left: 10px;
    text-decoration: none;
    font-weight: 700;
    color: var(--color-text);
}

.language-switch a img {
    width: 24px;
}

/* ===================== */
/* === Навигация (Menu) === */
/* ===================== */

/* Основная панель навигации */
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    height: 70px;
    position: sticky;
    top: 0;
    background-color: var(--color-primary); /* Добавляем фон для sticky */
    z-index: 1000;
}

/* Контейнер для гамбургера и логотипа на мобильных */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Логотип на мобильных устройствах (показывается в меню) */
.mobile-logo {
    height: 50px;
    margin-left: auto;
    margin-right: auto;
}

/* Стили для гамбургера */
.hamburger-menu {
    display: none; /* Скрыт по умолчанию */
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 20px;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: 0.3s;
}

/* Для ПК и больших экранов */
@media (min-width: 769px) {
    /* Логотип в шапке (на ПК) */
    .logo-bar {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Убираем лого в меню на ПК */
    .mobile-header {
        display: none;
    }

    /* Логотип в шапке */
    .logo {
        height: 160px; /* Устанавливаем высоту логотипа на ПК */
    }

    /* Убираем гамбургер-меню на ПК */
    .hamburger-menu {
        display: none;
    }

    /* Меню для ПК */
    .nav-links {
        display: flex;
        gap: 20px;
    }

     .nav-links a {
        padding: 10px 16px;
        border-radius: 12px;
        text-decoration: none;
        color: #fff;
        font-weight: 700;
        transition: all 0.5s ease;
        border: 3px solid transparent;
    }
    
    .nav-links a:hover {
        border: 3px solid var(--color-hover);
    }

    .nav-links a.active {
        background-color: var(--color-hover);
        color: white;
    }
}

/* Для мобильной версии */
@media (max-width: 768px) {
    /* Логотип в шапке на мобильных скрыт */
    .logo-bar {
        display: none;
    }

    /* Контейнер для гамбургера и логотипа */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: center; /* Центрируем гамбургер и логотип */
        gap: 15px;
    }

    /* Гамбургер */
    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 20px;
        top: 20px;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        cursor: pointer;
        z-index: 1002;
        transition: transform 0.3s ease-in-out;
    }

    /* Бар гамбургера */
    .hamburger-menu .bar {
        width: 30px;
        height: 3px;
        background-color: var(--color-white);
        border-radius: 5px;
        transition: all 0.3s ease-in-out;
    }

    /* Эффект для гамбургера при открытом меню */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* Меню (по умолчанию скрыто) */
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 50%;
        background: white;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
        z-index: 1001;
        transform: translateY(-100%); /* Скрываем меню */
        transition: transform 0.3s ease-in-out;
    }

    /* Стили при активном меню */
    .nav-links.active {
        display: flex;
        transform: translateY(0); /* Показываем меню */
    }

    /* Стили для ссылок внутри меню */
    .nav-links a {
        border-radius: 8px;
        text-decoration: none;
        color: #333;
        font-weight: 500;
        transition: transform 0.3s ease-in-out;
    }
    
     /* Стили для активных ссылок внутри меню */
    .nav-links a.active {
        background-color: var(--color-hover);
    }
}

/* Для экранов до 480px */
@media (max-width: 480px) {
    .main-nav a {
        display: block;
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
}








/* ============================= */
/* === Основной контент === */
/* ============================= */
main {
    margin-top: 20px;
}

main section {
    padding: var(--section-padding) 20px;
    max-width: var(--section-max-width);
    margin: auto;
    background-color: var(--color-white);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
    padding-top: 100px; /* Отступ сверху для каждой секции, чтобы избежать перекрытия */
    position: relative;
}

main section h2 {
    text-align: center;
}

section#booking {
    text-align: center;
}

section#booking p {
    margin: 10px auto;
    max-width: 700px;
}

section#booking .button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
}

/* Стили для слайдера */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 33.33%;
    /* 3 изображения по 33.33% ширины */
    box-sizing: border-box;
    padding: 10px;
    /* Зазор между изображениями */
}

.slider img {
    width: 100%;
    height: 300px;
    /* Все изображения одинаковой высоты */
    object-fit: cover;
    /* Изображения обрезаются для сохранения пропорций */
    border-radius: 8px;
    /* Добавление скруглений для более приятного вида */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Легкая тень для отделения изображений */
    cursor: pointer;
    /* Увеличение изображения по клику */
}

/* Кнопки для переключения */
.slider-container button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: 3px solid var(--color-hover);
    border-radius: 4px;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.6s ease;
}

.slider-container button.prev {
    left: 10px;
}

.slider-container button.next {
    right: 10px;
}

.slider-container button:hover {
    background-color: rgba(46, 119, 88, 0.6);
}

@media (max-width: 768px) {
    .slide {
        min-width: 100%;
        /* 1 изображение */
        box-sizing: border-box;
        /* padding: 10px; */
        /* Зазор между изображениями */
    }
}

/* ========================= */
/* === Модальное окно  ===== */
/* ========================= */


/* Тёмный фон */
/* Тёмный фон */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    visibility: hidden;
    /* Скрыто по умолчанию */
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Когда модалка видна */
.popup-overlay.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s 0s, opacity 0.3s ease;
}

/* Контейнер для картинки */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s 0s, opacity 0.3s ease;
}

.popup-content {
    background-color: var(--color-white);
    padding: 10px;
    /* Узкий белый фон вокруг изображения */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: auto;
    height: auto;
    display: inline-block;
    max-width: 90vw;
    max-height: 90vh;
}

.popup-content img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/*Карта прудов + модальное окно*/

/* Контейнер с уменьшенной картой */
.pond-map-wrapper {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.pond-map-wrapper img {
  max-width: 100%;
  height: auto;
  max-height: 300px; /* сохраняем "небольшой" размер в обычном виде */
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Модалка с увеличенной картой */
.pond-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1001;
  transition: opacity 0.3s ease;
  padding: 10px;
}

.pond-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.pond-modal img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Адаптивно для мобильных */
@media (max-width: 768px) {
  .pond-map-wrapper img {
    max-height: 300px;
  }
}


/* Карта в контактах */

iframe {
    max-width: 100%;
    /* Nodrošina, ka karte ir responsīva un neaizņem vairāk par 100% no sava konteinerkastes platuma */
    width: 100%;
    height: 450px;
    /* Iestatījusi sākotnējo augstumu */
    border-radius: 8px;
    /* Noapaļoti stūri */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    /* Pievienots ēnas efekts, lai izskatās labāk */
    margin-top: 20px;
    /* Attālums no iepriekšējā satura */
}

/* Ja nepieciešams pielāgot vēl vairāk mobilajiem ekrāniem */
@media (max-width: 768px) {
    iframe {
        height: 300px;
        /* Ja ekrāna izmērs ir mazāks, samazinām augstumu */
    }
}

/* Контакты */
.contacts-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
}

/* Левая колонка: адрес, телефон, email */
.contacts-info {
  flex: 1 1 300px;
  max-width: 600px;
}

.contacts-info p {
  margin-bottom: 12px;
}

.contacts-info em {
  font-style: italic;
  color: var(--color-text);
}

/* Кнопки под контактами */
.contacts-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.contacts-buttons .button {
  text-align: center;
  padding: 12px 16px;
  font-weight: 700;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: var(--color-primary);
  box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

/* Эффект при наведении */
.contacts-buttons .button:hover {
  background-color: var(--color-hover);
}

/* Карта */
.contacts-map {
  flex: 1 1 400px;
  max-width: 600px;
  display: flex;
  justify-content: center; /* Центрирует iframe на мобильных */
}

/* Сам iframe */
.contacts-map iframe {
  width: 100%;
  max-width: 100%;
  height: 520px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .contacts-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .contacts-map {
    width: 100%;
  }

  .contacts-map iframe {
    height: 320px;
  }

  .contacts-buttons {
    width: 100%;
  }

  .contacts-buttons .button {
    width: 100%;
  }
}


/* Картинка с кнопками */
.main-bg {
    position: relative;
}

.main-bg img {
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


.buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
}

.button {
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.5s ease;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

.button:hover {
    background-color: var(--color-hover);
}

/* ================== */
/* === Футер (подвал) === */
/* ================== */
footer {
  display: flex;
  flex-wrap: wrap;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 20px;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.footer-left {
  flex: 1 1 30%;
}

.footer-left ul {
  list-style: none;
  padding: 0;
}

.footer-left li {
  margin-bottom: 10px;
}

.footer-left a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-right {
  flex: 1 1 60%;
  text-align: right;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-right {
    text-align: center;
    margin-top: 20px;
  }
}

.post-section {
  max-width: 900px;
  margin: 60px auto;
  padding: 20px;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(46, 119, 88, 0.2);
}

.post-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.post-block {
  margin-bottom: 40px;
}

.post-block h3 {
  color: var(--color-primary);
  margin-bottom: 10px;
}

.post-content {
  line-height: 1.6;
}

.back-button-wrapper {
  text-align: center;
  margin-top: 30px;
}

.back-button {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: var(--color-hover);
}



/* ================== */
/* === Кнопки в админ редакторе стилей === */
/* ================== */

.bottom-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}
.bottom-buttons button,
.bottom-buttons .back-link {
    padding: 10px 20px;
    font-size: 14px;
}


/* ========================= */