/* ========== Header & Nav ========== */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.nav {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  display: flex;
  align-items: center;
}

.nav__logo {
  height: 48px;
  width: auto;
}

.nav__menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

.nav__menu a:hover {
  background: var(--color-bg);
  color: var(--color-accent);
  text-decoration: none;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

.nav__toggle:hover {
  background: var(--color-bg);
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.nav--open .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav--open .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      padding 0.3s ease;
  }

  .nav--open .nav__menu {
    max-height: 320px;
    opacity: 1;
    padding: 1rem;
  }

  .nav__menu a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
  }
}

/* ========== Main layout ========== */
.main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ========== Slider ========== */
.slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
  max-height: 420px;
  background: var(--color-border);
}

.slider__track {
  display: flex;
  width: calc(100% * var(--slide-count, 13));
  height: 100%;
  transition: transform 0.4s ease-out;
}

.slider__item {
  flex: 0 0 calc(100% / var(--slide-count, 13));
  min-width: 0;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

.slider__item--active {
  opacity: 1;
  pointer-events: auto;
}

.slider__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition:
    background 0.2s,
    transform 0.2s;
}

.slider__btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.slider__btn--prev {
  left: 1rem;
}

.slider__btn--next {
  right: 1rem;
}

.slider__btn--fullscreen {
  top: 1rem;
  right: 1rem;
  left: auto;
  transform: none;
}

.slider__btn--fullscreen:hover {
  transform: scale(1.05);
}

.slider__btn--fullscreen.slider__btn--pulse {
  animation: slider-fullscreen-pulse 0.4s ease-in-out 2;
}

@keyframes slider-fullscreen-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Fullscreen image overlay */
.slider-fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.slider-fullscreen img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 480px) {
  .slider {
    aspect-ratio: 4 / 3;
    max-height: 280px;
  }

  .slider__btn {
    width: 40px;
    height: 40px;
  }

  .slider__btn--prev {
    left: 0.5rem;
  }
  .slider__btn--next {
    right: 0.5rem;
  }
  .slider__btn--fullscreen {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* ========== Sections ========== */
.section {
  margin-top: 3rem;
}

.section__title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border);
}

.section__img {
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  max-height: 400px;
  object-fit: contain;
}

/* Fullscreen button on content images */
.img-fullscreen-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-top: 1rem;
}

.img-fullscreen-wrap .section__img {
  display: block;
  margin-top: 0;
}

.img-fullscreen-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition:
    background 0.2s,
    transform 0.2s;
}

.img-fullscreen-btn:hover {
  background: #fff;
  transform: scale(1.05);
}

.img-fullscreen-btn svg {
  width: 20px;
  height: 20px;
}

/* ========== Home: two-col & address ========== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.two-col__item iframe {
  height: 280px;
  min-height: 220px;
  border-radius: var(--radius);
  background: var(--color-border);
}

.address-block {
  background: var(--color-surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.address-block > div + div {
  margin-top: 0.35rem;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .two-col__item iframe {
    height: 260px;
    min-height: 200px;
  }
}

/* ========== Rules: alerts ========== */
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.alert > div + div {
  margin-top: 0.4rem;
}

.alert--danger {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.alert--warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

/* ========== Cards ========== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: 1.25rem 1.5rem;
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.card__body p {
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.card__body p:last-of-type {
  margin-bottom: 0;
}

.card__list {
  list-style: none;
}

.card__list li {
  margin-bottom: 0.5rem;
}

.card__list a {
  color: var(--color-accent);
}

/* ========== Places grid ========== */
.places-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.places-grid .card__body iframe {
  height: 200px;
  min-height: 160px;
  border-radius: var(--radius-sm);
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .places-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .places-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .places-grid .card__body iframe {
    height: 180px;
  }
}

/* ========== Other places list ========== */
.other-places {
  background: var(--color-surface);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.other-places__title {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.other-places__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.35rem 1.5rem;
}

.other-places__list a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--color-accent);
}

.other-places__list a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .other-places__list {
    grid-template-columns: 1fr;
  }
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
}

/* ========== Contact ========== */
.contact-block > div,
.contact-block > a {
  margin-bottom: 0.5rem;
}

.contact-block a {
  color: var(--color-accent);
}

/* ========== Information section cards ========== */

#information .card__body .btn {
  margin-top: 0.5rem;
}
