:root {
  --nav-bg: #606e5a;
  --nav-text: #f8f4ec;
  --nav-shadow: 0 10px 26px rgba(24, 30, 24, 0.16);
  --nav-h: 60px;
  --max-width: 1100px;
  --underline-h: 4px;
  --underline-gap: 10px;

  --green: #606e5a;
  --green-soft: #e1e5da;
  --green-line: rgba(96, 110, 90, 0.14);

  --accent: #b79d76;
  --accent-soft: #d2c3a8;

  --text-main: #54564d;
  --text-soft: #72746b;
  --text-heading: #46483f;
  --text-title: #62645b;

  --section-light: #f1f3ed;
  --card-bg: #f7f8f2;
  --footer-bg: #e2e4da;
}

body {
  background: #eef0e8;
  color: #54564d;
}

.horse-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background: var(--section-light);
}

.horse-hero {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-bottom: 1px solid var(--green-line);
  background: var(--green-soft);
}

.horse-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.horse-wrap {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.horse-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 54px;
  padding: 14px 28px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--accent);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.horse-back:hover {
  background: var(--nav-bg);
  color: #f8f4ec;
  border-color: var(--nav-bg);
  transform: translateY(-1px);
}

.horse-card {
  margin-top: 36px;
  background: var(--card-bg);
  border: 1px solid rgba(96, 110, 90, 0.08);
  box-shadow: 0 12px 30px rgba(46, 40, 30, 0.08);
  padding: 42px;
}

.horse-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 440px;
  gap: 54px;
  align-items: start;
}

.horse-copy h1 {
  margin: 0 0 30px;
  color: var(--text-heading);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.horse-specs {
  display: grid;
  gap: 12px;
  padding: 26px 28px;
  margin-bottom: 30px;
  background: var(--section-light);
  border: 1px solid var(--green-line);
}

.spec-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: start;
}

.spec-label {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.55;
}

.spec-value {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.55;
}

.horse-text p {
  margin: 0 0 18px;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.85;
}

.horse-text p:last-child {
  margin-bottom: 0;
}

.horse-image-wrap {
  align-self: start;
}

.horse-gallery {
  background: var(--card-bg);
  border: 1px solid rgba(96, 110, 90, 0.08);
  box-shadow: 0 12px 30px rgba(46, 40, 30, 0.08);
  overflow: hidden;
}

.horse-gallery-main {
  position: relative;
}

.horse-gallery-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(248, 244, 236, 0.8);
  background: rgba(96, 110, 90, 0.72);
  color: #f8f4ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
  z-index: 2;
}

.gallery-arrow:hover {
  background: var(--nav-bg);
}

.gallery-arrow:focus-visible {
  outline: 2px solid rgba(248, 244, 236, 0.9);
  outline-offset: 2px;
}

.gallery-arrow--prev {
  left: 14px;
}

.gallery-arrow--next {
  right: 14px;
}

.gallery-arrow svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px 18px;
  background: var(--card-bg);
  border-top: 1px solid var(--green-line);
}

.gallery-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.gallery-dot.is-active {
  background: var(--accent);
  transform: scale(1.05);
}

.gallery-dot:focus-visible {
  outline: 2px solid rgba(96, 110, 90, 0.35);
  outline-offset: 3px;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(18, 22, 19, 0.84);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 1200;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox__dialog {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  width: auto;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(20, 25, 21, 0.86);
  color: #f8f4ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.gallery-lightbox__nav:hover {
  background: rgba(96, 110, 90, 0.96);
}

.gallery-lightbox__nav:focus-visible {
  outline: 2px solid rgba(248, 244, 236, 0.92);
  outline-offset: 3px;
}

.gallery-lightbox__nav svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.gallery-lightbox__nav--prev {
  left: -72px;
}

.gallery-lightbox__nav--next {
  right: -72px;
}

.gallery-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(20, 25, 21, 0.86);
  color: #f8f4ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.gallery-lightbox__close:hover {
  background: rgba(96, 110, 90, 0.96);
  transform: translateY(-1px);
}

.gallery-lightbox__close:focus-visible {
  outline: 2px solid rgba(248, 244, 236, 0.92);
  outline-offset: 3px;
}

.gallery-lightbox__close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.horse-extra {
  margin-top: 28px;
  padding: 28px 30px;
  background: var(--section-light);
  border: 1px solid var(--green-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.horse-extra-copy {
  flex: 1 1 320px;
}

.horse-extra h2 {
  margin: 0 0 14px;
  color: var(--text-heading);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.horse-extra p {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.8;
}

.horse-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 54px;
  padding: 14px 26px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--accent);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  align-self: center;
}

.horse-contact-button:hover {
  background: var(--nav-bg);
  color: #f8f4ec;
  border-color: var(--nav-bg);
  transform: translateY(-1px);
}

@media (min-width: 901px) {
  .gallery-arrow {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .horse-gallery-main:hover .gallery-arrow,
  .horse-gallery-main:focus-within .gallery-arrow {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 1200px) {
  .horse-grid {
    grid-template-columns: minmax(360px, 1fr) 380px;
    gap: 38px;
  }
}

@media (max-width: 900px) {
  .horse-wrap {
    width: min(760px, calc(100% - 32px));
    padding: 28px 0 50px;
  }

  .horse-hero {
    height: 180px;
  }

  .horse-card {
    padding: 26px;
  }

  .horse-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .horse-image-wrap {
    order: -1;
  }

  .horse-extra {
    padding: 22px;
  }
}

@media (max-width: 767px) {
  .horse-copy h1 {
    font-size: 1.55rem;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .horse-specs {
    padding: 20px;
  }

  .horse-contact-button {
    width: 100%;
    min-width: 0;
  }

  .gallery-arrow {
    width: 40px;
    height: 40px;
  }

  .gallery-lightbox {
    padding: 18px;
  }

  .gallery-lightbox__close {
    top: -10px;
    right: -10px;
    width: 38px;
    height: 38px;
  }

  .gallery-lightbox__nav {
    width: 42px;
    height: 42px;
  }

  .gallery-lightbox__nav--prev {
    left: 8px;
  }

  .gallery-lightbox__nav--next {
    right: 8px;
  }
}
