/* Esittely- ja kasvatussivun otsikkoalue */
.content-page .hero-content {
  height: 294px;
}

.content-page .main-panel {
  margin-top: -590px;
}

/* Esittelysivun kolme yhtenäistä tekstialuetta */
.about-page .main-panel {
  margin-bottom: 30px;
}

.about-page .side-photo img {
  object-position: 45% center;
}

.about-sheet {
  width: 1180px;
  margin: 0 auto 30px;
  background: var(--paper);
  border: 1px solid rgba(36, 73, 75, .08);
  box-shadow: 0 14px 36px rgba(60, 59, 43, .09);
}

.about-estate {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
}

.about-estate-photo {
  position: relative;
  min-height: 400px;
  margin: 0;
  overflow: hidden;
}

.about-estate-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
}

.about-sheet-copy {
  padding: 36px 34px 34px;
}

.about-kicker {
  display: block;
  margin-bottom: 11px;
  color: var(--amber-ink);
  font: 600 12px/1.5 var(--label);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.about-sheet h2 {
  margin: 0 0 18px;
  color: var(--petrol);
  font: 400 37px/1.2 var(--heading);
  letter-spacing: -.012em;
}

.about-sheet h3 {
  margin: 0 0 13px;
  color: var(--petrol);
  font: 400 26px/1.25 var(--heading);
}

.about-sheet p {
  margin: 0 0 15px;
  color: #4F5C57;
}

.about-sheet p:last-child,
.about-page .intro p:last-child {
  margin-bottom: 0;
}

.about-principles {
  padding: 34px 40px 36px;
}

.about-text-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-top: 24px;
}

.about-sheet .about-signature {
  margin-top: 14px;
  color: var(--petrol);
  text-align: right;
  font: 400 32px/1 "bickham-script-pro-3", cursive;
}

.about-sheet p a {
  color: var(--link-amber);
  font-weight: 500;
  text-decoration: none;
  transition: color .22s ease;
}

.about-sheet p a:hover,
.about-sheet p a:focus-visible {
  color: var(--amber-ink);
}

@media (prefers-reduced-motion: reduce) {
  .about-sheet p a {
    transition: none;
  }
}


/* Kasvatustiedot ja vuosittainen kasvattilista */
.breeding-page .main-panel {
  margin-bottom: 30px;
}

.breeding-page .intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breeding-page .intro p {
  line-height: 1.65;
}

.breeding-page .intro p:last-child {
  margin-bottom: 0;
}

.breeding-page .side-photo {
  min-height: 360px;
}

.breeding-page .side-photo img {
  object-position: center 38%;
}

.breeding-page .breeding-section {
  position: relative;
  z-index: 2;
  width: 1180px;
  margin: 0 auto 30px;
  padding: 30px 34px;
  border: 1px solid rgba(36, 73, 75, .08);
  background: var(--paper);
  box-shadow: 0 14px 36px rgba(60, 59, 43, .06);
  font: 17px/1.65 var(--body);
}

.breeding-page .breeding-section h2 {
  margin: 0 0 22px;
  color: var(--petrol);
  font: 400 32px/1.25 var(--heading);
}

.breeding-page .breeding-section a {
  color: var(--link-amber);
  text-decoration: none;
}

.breeding-page .breeding-section a:hover,
.breeding-page .breeding-section a:focus-visible {
  color: var(--amber-ink);
}

.breeding-page .sale-terms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 36px;
  margin: 0;
  padding-left: 18px;
}

.breeding-page .sale-terms li {
  padding-left: 4px;
}

.breeding-page .sale-terms li::marker {
  content: "◇  ";
  color: var(--amber-ink);
  font-size: 11px;
}

.breeding-page .sale-link {
  margin: 20px 0 0;
  font-size: 16px;
}

.breeding-page .foal-register-title {
  margin: 32px 0 13px;
  color: var(--petrol);
  font: 400 24px/1.25 var(--heading);
}

.foal-register {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 3px;
  font: 14px/1.45 var(--body);
}

.foal-register .register-birth { width: 10%; }
.foal-register .register-breed { width: 5%; }
.foal-register .register-sex { width: 8%; }
.foal-register .register-name { width: 23%; }
.foal-register .register-parent { width: 17%; }
.foal-register .register-owner { width: 20%; }

.foal-register th,
.foal-register td {
  padding: 9px 8px;
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
}

.foal-register th {
  color: var(--muted);
  font: 500 12px/1.5 var(--body);
}

.foal-register time {
  white-space: nowrap;
}

.foal-register tbody tr:nth-child(even) td {
  background: rgba(36, 73, 75, .035);
}

.foal-register tbody td:first-child { border-radius: 6px 0 0 6px; }
.foal-register tbody td:last-child { border-radius: 0 6px 6px 0; }

.breeding-page .foal-register .register-foal-link {
  color: var(--petrol);
  font: 400 18px/1.3 var(--heading);
}

.breeding-page .foal-register .register-foal-link:hover,
.breeding-page .foal-register .register-foal-link:focus-visible {
  color: var(--link-amber);
}

/* Myyntikasvattien kortit */
.sales-page .main-panel {
  padding: 30px 34px 34px;
  margin-bottom: 30px;
}

.sales-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}

.sales-heading h2 {
  margin: 0;
  color: var(--petrol);
  font: 400 37px/1.2 var(--heading);
}

.sales-heading a {
  font: 15px/1.5 var(--body);
}

.sales-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
}

.sales-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(36, 73, 75, .035);
}

.sales-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.sales-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 25%;
}

.sales-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
  font: 15px/1.6 var(--body);
}

.sales-card h3 {
  margin: 0 0 6px;
  color: var(--petrol);
  font: 400 25px/1.25 var(--heading);
}

.sales-name,
.sales-more {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.sales-name {
  color: inherit;
  font: inherit;
}

.sales-card p {
  margin: 0 0 12px;
}

.sales-card .sales-card-details {
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
}

.sales-card .sales-card-pedigree {
  color: var(--muted);
  font: italic 400 17px/1.4 var(--display);
}

.sales-more {
  align-self: flex-start;
  margin-top: auto;
  color: var(--link-amber);
  font: 500 14px/1.5 var(--body);
}

.sales-page a,
.sales-dialog a {
  color: var(--link-amber);
  text-decoration: none;
}

.sales-page a:hover,
.sales-dialog a:hover,
.sales-name:hover,
.sales-more:hover {
  color: var(--amber-ink);
}

.sales-photo:focus-visible,
.sales-name:focus-visible,
.sales-more:focus-visible,
.sales-close:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 4px;
}

/* Kasvatin oma pieni esittelyikkuna */
.sales-dialog {
  width: min(1000px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 80px rgba(24, 54, 56, .3);
  font: 15px/1.45 var(--body);
}

.sales-dialog::backdrop {
  background: rgba(24, 54, 56, .68);
}

.sales-dialog-content {
  position: relative;
  padding: 24px;
}

.sales-close-form {
  position: absolute;
  top: 12px;
  right: 14px;
  margin: 0;
}

.sales-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--petrol);
  font: 400 26px/1 var(--body);
  cursor: pointer;
}

.sales-dialog-overview {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  align-items: center;
  gap: 30px;
}

.sales-dialog h2 {
  margin: 0 0 10px;
  color: var(--petrol);
  font: 400 30px/1.2 var(--heading);
}

.sales-dialog h3 {
  margin: 0 0 10px;
  color: var(--petrol);
  font: 400 21px/1.25 var(--heading);
}

.sales-dialog-basics p {
  margin: 0 0 3px;
}

.sales-dialog-basics .sales-dialog-breed {
  margin-bottom: 8px;
  font: italic 400 18px/1.3 var(--display);
}

.sales-dialog-photo {
  width: 100%;
  max-width: 380px;
  justify-self: end;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 7px;
  box-shadow: 0 6px 20px rgba(24, 54, 56, .13);
}

.sales-dialog-story {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sales-dialog-story p {
  margin: 0 0 8px;
  font: 14px/1.5 var(--body);
}

.sales-dialog-family {
  margin-top: 18px;
}

.sales-pedigree {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}

.sales-pedigree td {
  padding: 3px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--petrol);
  font: 400 13px/1.25 var(--display);
  text-transform: uppercase;
}

.sales-dialog .sales-pedigree a {
  color: var(--petrol);
}

.sales-dialog .sales-pedigree a:hover,
.sales-dialog .sales-pedigree a:focus-visible {
  color: var(--link-amber);
}

.sales-pedigree tr:last-child td {
  border-bottom: 0;
}

.sales-pedigree small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 11px/1.4 var(--body);
  text-transform: none;
}

.sales-pedigree sup {
  margin-left: 3px;
  color: var(--muted);
  font: 9px/1 var(--body);
  text-transform: none;
}

/* Painotus ja vanhempien tietoihin pohjautuvat malliarviot */
.sales-card .sales-card-discipline {
  margin-bottom: 14px;
  color: var(--petrol);
  font-weight: 500;
}

.sales-dialog-basics .sales-dialog-colors {
  margin-bottom: 9px;
}

.sales-dialog-basics .sales-dialog-potential {
  color: var(--muted);
  font-size: 14px;
}

/* Esittelysivun maisemagalleria */
.about-gallery-wrap {
  width: 1180px;
  margin: 34px auto;
}

.about-gallery {
  --gallery-height: 150px;
  --gallery-max-height: 180px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}

.about-gallery a {
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 7px 18px rgba(36, 73, 75, .14);
}

.about-gallery img {
  display: block;
  width: auto;
  height: var(--gallery-height);
  max-width: none;
}

.about-gallery a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 5px;
}

.about-gallery-credit {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font: italic 12px/1.5 var(--body);
}

.about-gallery-credit a {
  text-decoration: none;
}

.about-gallery-credit a:hover {
  color: var(--link-amber);
}

/* Kuvien lightbox */
.photo-lightbox {
  width: max-content;
  max-width: calc(100vw - 100px);
  max-height: calc(100vh - 60px);
  padding: 18px 64px 14px;
  border: 1px solid rgba(237, 192, 102, .25);
  border-radius: 5px;
  background: #173638;
  color: #fff;
  overflow: visible;
}

.photo-lightbox::backdrop {
  background: rgba(10, 26, 27, .88);
}

.photo-lightbox figure {
  margin: 0;
}

.photo-lightbox img {
  max-width: calc(100vw - 240px);
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.photo-lightbox figcaption {
  margin-top: 12px;
  text-align: center;
  font: 400 14px/1.5 var(--body);
}

.photo-lightbox button {
  position: absolute;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 400 26px/34px var(--body);
  cursor: pointer;
}

.photo-lightbox button:hover {
  color: var(--amber-light);
  border-color: var(--amber-light);
}

.photo-lightbox button:focus-visible {
  outline: 2px solid var(--amber-light);
  outline-offset: 4px;
}

.lightbox-close {
  top: 10px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  top: calc(50% - 18px);
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 18px;
  margin: 0;
  color: var(--amber-light);
  font-size: 12px;
}


