.horse-profile {
    padding: 50px 0;
    border-bottom: 1px solid #243d3120;
}

.horse-profile:first-of-type {
    padding-top: 10px;
}

.horse-profile:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.horse-profile-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
}

.horse-profile-heading h2 {
    margin: 14px 0 10px;
    font: 500 clamp(38px, 6vw, 65px) Georgia, serif;
}

.horse-profile-heading p {
    max-width: 700px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.horse-profile-index {
    color: #ded8cb;
    font: 500 70px Georgia, serif;
}

.horse-photo-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 170px;
    gap: 12px;
}

.horse-photo {
    overflow: hidden;
    padding: 0;
    background: #e8e3d9;
    border: 0;
    border-radius: 9px;
    cursor: zoom-in;
}

.horse-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.horse-photo:hover img {
    transform: scale(1.045);
}

.five-photos .horse-photo:nth-child(1),
.five-photos .horse-photo:nth-child(2) {
    grid-column: span 3;
    grid-row: span 2;
}

.five-photos .horse-photo:nth-child(n + 3) {
    grid-column: span 2;
}

.three-photos .horse-photo {
    grid-column: span 2;
    grid-row: span 2;
}

.mare-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-top: 40px;
}

.mare-card {
    overflow: hidden;
    background: white;
    border: 1px solid #243d3115;
    border-radius: 10px;
    box-shadow: 0 10px 30px #1b261d0d;
}

.mare-card:nth-child(1),
.mare-card:nth-child(2) {
    grid-column: span 3;
}

.mare-card:nth-child(n + 3) {
    grid-column: span 2;
}

.mare-gallery {
    display: grid;
    grid-template-columns: 1fr;
    height: 280px;
}

.mare-gallery.has-multiple {
    grid-template-columns: 1.35fr 0.65fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
}

.mare-gallery.has-multiple button:first-child {
    grid-row: 1 / 3;
}

.mare-gallery button {
    overflow: hidden;
    padding: 0;
    background: none;
    border: 0;
    cursor: zoom-in;
}

.mare-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.foal-list {
    display: grid;
    gap: 30px;
    margin-top: 45px;
}

.foal-card {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 40px;
    padding: 38px;
    background: white;
    border: 1px solid #243d3115;
    border-radius: 12px;
    box-shadow: 0 12px 35px #1b261d0c;
}

.foal-heading h3 {
    margin: 14px 0 10px;
    font: 500 38px Georgia, serif;
}

.foal-heading p {
    color: var(--muted);
    line-height: 1.65;
}

.pedigree-tree {
    display: grid;
    grid-template-columns: 1fr 44px 1fr;
    gap: 10px;
    align-items: center;
}

.pedigree-parent {
    padding: 20px;
    background: #f3f5f3;
    border-top: 3px solid #597c99;
    border-radius: 8px;
    text-align: center;
}

.pedigree-parent.dam {
    border-color: #ad7183;
}

.pedigree-parent span,
.pedigree-child span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pedigree-parent strong,
.pedigree-child strong {
    font: 500 21px Georgia, serif;
}

.pedigree-connector,
.pedigree-arrow {
    color: var(--gold);
    font: 500 30px Georgia, serif;
    text-align: center;
}

.pedigree-arrow {
    grid-column: 1 / 4;
}

.pedigree-child {
    grid-column: 1 / 4;
    justify-self: center;
    min-width: 230px;
    padding: 18px;
    color: white;
    background: var(--green);
    border-radius: 9px;
    text-align: center;
}

.pedigree-child img {
    width: 74px;
    height: 74px;
    margin: 0 auto 10px;
    border-radius: 50%;
    object-fit: cover;
}

.mare-card > div {
    padding: 24px;
}

.mare-card span,
.partner-logo-card span,
.included-grid article > span {
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.mare-card h3 {
    margin: 8px 0;
    font: 500 25px Georgia, serif;
}

.mare-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.image-lightbox {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    padding: 60px;
    background: #07100dda;
    place-items: center;
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox img {
    max-width: min(1200px, 94vw);
    max-height: 86vh;
    border-radius: 8px;
    box-shadow: 0 20px 70px #000b;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: white;
    font-size: 44px;
    background: none;
    border: 0;
    cursor: pointer;
}

.lightbox-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    color: white;
    background: #ffffff18;
    border: 1px solid #ffffff45;
    border-radius: 50%;
    font-size: 42px;
    cursor: pointer;
    place-items: center;
    transform: translateY(-50%);
}

.lightbox-previous {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    padding: 7px 12px;
    color: white;
    background: #0008;
    border-radius: 999px;
    transform: translateX(-50%);
}

.lightbox-open {
    overflow: hidden;
}

.pension-photo-stack {
    position: relative;
    min-height: 590px;
}

.pension-photo-stack img {
    position: absolute;
    width: 78%;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.pension-photo-stack img:last-child {
    right: 0;
    bottom: 0;
    width: 58%;
    height: 300px;
    border: 8px solid #fbfaf7;
}

.pension-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 40px;
}

.pension-plan {
    display: flex;
    min-height: 340px;
    padding: 28px;
    background: white;
    border: 1px solid #243d3115;
    border-radius: 10px;
    flex-direction: column;
}

.pension-plan > span {
    color: var(--gold);
    font: 500 18px Georgia, serif;
}

.pension-plan h3 {
    margin: 45px 0 14px;
    font: 500 28px Georgia, serif;
}

.pension-plan p {
    color: var(--muted);
    line-height: 1.65;
}

.pension-plan strong {
    margin-top: auto;
    color: var(--green);
    font: 500 22px Georgia, serif;
}

.included-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    overflow: hidden;
    background: #dcd8ce;
    border: 1px solid #dcd8ce;
    border-radius: 10px;
}

.included-grid article {
    min-height: 230px;
    padding: 30px;
    background: #fff;
}

.included-grid h3 {
    margin: 28px 0 10px;
    font: 500 25px Georgia, serif;
}

.included-grid p {
    color: var(--muted);
    line-height: 1.6;
}

.steps-list {
    padding: 0;
    list-style: none;
    counter-reset: pension-step;
}

.steps-list li {
    position: relative;
    display: flex;
    padding: 20px 0 20px 55px;
    border-bottom: 1px solid #243d311c;
    counter-increment: pension-step;
    flex-direction: column;
}

.steps-list li::before {
    position: absolute;
    left: 0;
    color: var(--gold);
    content: "0" counter(pension-step);
    font: 500 18px Georgia, serif;
}

.steps-list strong {
    font: 500 21px Georgia, serif;
}

.steps-list span {
    margin-top: 5px;
    color: var(--muted);
}

.installation-gallery {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    grid-template-rows: repeat(2, 260px);
    grid-auto-rows: 260px;
    gap: 14px;
}

@media (min-width: 951px) {
    .site-header nav {
        gap: 12px;
        font-size: 12px;
    }
}

.site-header nav a.active:not(.nav-sale) {
    color: var(--green);
    box-shadow: inset 0 -2px var(--gold);
}

.site-header nav .nav-sale.active {
    background: var(--gold);
}

body {
    overflow-x: hidden;
}

@media (max-width: 950px) {
    .site-header nav {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .site-header nav a {
        padding: 10px 12px;
    }

    .site-header nav a.active:not(.nav-sale) {
        color: white;
        background: var(--green);
        border-radius: 5px;
        box-shadow: none;
    }
}

.installation-gallery figure {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 10px;
}

.installation-gallery-main {
    grid-row: 1 / 3;
}

.installation-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.installation-gallery figure:hover img {
    transform: scale(1.035);
}

.installation-gallery figcaption {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 11px 14px;
    color: white;
    background: #102219c7;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
}

.partner-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.partner-logo-card {
    overflow: hidden;
    background: white;
    border: 1px solid #243d3115;
    border-radius: 12px;
    box-shadow: 0 10px 30px #1b261d0d;
}

.partner-logo-image {
    display: grid;
    height: 220px;
    padding: 25px;
    background: #f7f6f2;
    place-items: center;
    overflow: hidden;
}

.partner-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 160px;
}

.partner-logo-card > div:last-child {
    padding: 24px;
}

.partner-logo-card h2 {
    margin: 8px 0 0;
    font: 500 23px Georgia, serif;
}

.goat-photo-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 230px);
    gap: 12px;
}

.goat-photo-collage button {
    overflow: hidden;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 9px;
    cursor: zoom-in;
}

.goat-photo-collage button:first-child {
    grid-row: 1 / 3;
}

.goat-photo-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

.eco-grazing-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.eco-grazing-points {
    display: grid;
    gap: 12px;
}

.eco-grazing-points article {
    padding: 22px;
    background: white;
    border-left: 4px solid var(--gold);
    border-radius: 7px;
    box-shadow: 0 8px 25px #1b261d0c;
}

.eco-grazing-points strong,
.eco-grazing-points span {
    display: block;
}

.eco-grazing-points strong {
    margin-bottom: 6px;
    font: 500 22px Georgia, serif;
}

.eco-grazing-points span {
    color: var(--muted);
    line-height: 1.55;
}

.sale-list-section {
    padding-bottom: 90px;
}

.sale-horse-list {
    display: grid;
    gap: 45px;
}

.sale-horse-profile {
    overflow: hidden;
    background: white;
    border: 1px solid #243d3115;
    border-radius: 14px;
    box-shadow: 0 18px 55px #1b261d10;
}

.sale-profile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    padding: 38px;
    color: white;
    background: var(--green);
}

.sale-profile-top h2 {
    margin: 12px 0 10px;
    font: 500 clamp(42px, 6vw, 68px) Georgia, serif;
}

.sale-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sale-meta span {
    padding: 6px 10px;
    color: #dce5df;
    background: #ffffff12;
    border-radius: 999px;
    font-size: 12px;
}

.sale-price {
    text-align: right;
}

.sale-price small {
    display: block;
    color: #aebbb3;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sale-price strong {
    display: block;
    margin-top: 5px;
    color: #dbc49e;
    font: 500 30px Georgia, serif;
}

.sale-content-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 45px;
    padding: 38px;
}

.sale-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 135px;
    gap: 10px;
    align-content: start;
}

.sale-gallery button {
    overflow: hidden;
    padding: 0;
    background: #eee;
    border: 0;
    border-radius: 8px;
    cursor: zoom-in;
}

.sale-gallery .sale-main-photo {
    grid-column: 1 / 4;
    grid-row: span 3;
}

.sale-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sale-gallery button:hover img {
    transform: scale(1.04);
}

.sale-no-photo {
    display: grid;
    grid-column: 1 / 4;
    min-height: 380px;
    color: var(--muted);
    background: var(--cream);
    border-radius: 9px;
    place-items: center;
}

.sale-information > p {
    color: var(--muted);
    line-height: 1.7;
}

.sale-pedigree {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #243d3118;
}

.sale-pedigree h3,
.sale-videos-heading h3 {
    margin: 0 0 20px;
    font: 500 29px Georgia, serif;
}

.compact-tree .pedigree-parent {
    padding: 14px;
}

.compact-tree .pedigree-child {
    min-width: 190px;
    padding: 13px;
}

.sale-contact-button {
    margin-top: 25px;
}

.sale-videos {
    padding: 0 38px 38px;
}

.sale-videos-heading {
    padding-top: 30px;
    border-top: 1px solid #243d3118;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.video-grid video,
.video-grid iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border: 0;
    border-radius: 9px;
}


@media (max-width: 950px) {
    .pension-plan-grid,
    .partner-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .included-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mare-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mare-card:nth-child(n) {
        grid-column: span 1;
    }

    .foal-card {
        grid-template-columns: 1fr;
    }

    .eco-grazing-panel,
    .sale-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) and (min-width: 951px) {
    .site-header {
        padding-inline: 20px;
    }

    .site-header nav {
        gap: 8px;
        font-size: 11px;
    }

    .brand img {
        width: 145px;
    }
}

@media (max-width: 620px) {
    .horse-profile-heading {
        flex-direction: column-reverse;
    }

    .horse-profile-index {
        font-size: 45px;
    }

    .horse-photo-gallery {
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .five-photos .horse-photo:nth-child(n),
    .three-photos .horse-photo:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .mare-grid,
    .pension-plan-grid,
    .included-grid,
    .installation-gallery,
    .partner-logo-grid,
    .goat-photo-collage {
        grid-template-columns: 1fr;
    }

    .installation-gallery,
    .goat-photo-collage {
        grid-template-rows: none;
    }

    .installation-gallery figure,
    .installation-gallery-main,
    .goat-photo-collage button:first-child {
        grid-row: auto;
        height: 280px;
    }

    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    .lightbox-previous {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .pension-photo-stack {
        min-height: auto;
    }

    .pension-photo-stack img,
    .pension-photo-stack img:last-child {
        position: static;
        width: 100%;
        height: 280px;
        margin-bottom: 12px;
        border: 0;
    }

    .image-lightbox {
        padding: 20px;
    }

    .pedigree-tree {
        grid-template-columns: 1fr;
    }

    .pedigree-connector,
    .pedigree-arrow,
    .pedigree-child {
        grid-column: 1;
    }

    .sale-profile-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .sale-price {
        text-align: left;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}
