/* Arabian Horse Breeder Site — Shared Stylesheet
   Color palette:
     Sand:       #c8a96e
     Deep brown: #4a2c0a
     Cream:      #f9f3e8
     Accent:     #8b4513  (saddlebrown)
     Slate:      #5a5a5a
     White:      #ffffff
*/

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    background-color: #f9f3e8;
    color: #3a2a1a;
    line-height: 1.7;
}

a {
    color: #8b4513;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #4a2c0a;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-family: Georgia, serif;
    color: #4a2c0a;
    line-height: 1.3;
}

/* ── Site Header ── */
.site-header {
    background-color: #4a2c0a;
    color: #f9f3e8;
    padding: 0;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-header .farm-name {
    font-size: 2rem;
    color: #c8a96e;
    letter-spacing: 0.04em;
}

.site-header .farm-tagline {
    font-size: 0.95rem;
    color: #d4b88a;
    font-style: italic;
    margin-top: 0.2rem;
}

/* ── Navigation ── */
nav {
    background-color: #3a2010;
    border-top: 2px solid #c8a96e;
}

nav ul {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

nav ul li a {
    display: block;
    color: #f9f3e8;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    transition: background-color 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #c8a96e;
    color: #4a2c0a;
    text-decoration: none;
}

/* ── Page Wrapper ── */
.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

/* ── Page Hero Banner ── */
.page-hero {
    background-color: #e8dcc8;
    border-bottom: 3px solid #c8a96e;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.page-hero p {
    color: #5a5a5a;
    font-style: italic;
}

/* ── Horse Listing Grid (index.html) ── */
.section-title {
    font-size: 1.6rem;
    margin: 2rem 0 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #c8a96e;
}

.horse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: 1rem;
}

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

@media (max-width: 520px) {
    .horse-grid {
        grid-template-columns: 1fr;
    }
}

.horse-card {
    background: #ffffff;
    border: 1px solid #d4b88a;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(74, 44, 10, 0.10);
    transition: box-shadow 0.2s, transform 0.2s;
}

.horse-card:hover {
    box-shadow: 0 6px 18px rgba(74, 44, 10, 0.18);
    transform: translateY(-2px);
}

.horse-card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #e0d0b8;
}

.horse-card-photo-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #e0d0b8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-style: italic;
    font-size: 0.9rem;
}

.horse-card-body {
    padding: 1rem 1.1rem 1.25rem;
}

.horse-card-body h2 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.horse-card-meta {
    font-size: 0.88rem;
    color: #5a5a5a;
    margin-bottom: 0.75rem;
    font-family: Arial, Helvetica, sans-serif;
}

.horse-card-meta span {
    display: inline-block;
    margin-right: 0.6rem;
}

.btn {
    display: inline-block;
    background-color: #8b4513;
    color: #ffffff;
    padding: 0.45rem 1rem;
    border-radius: 3px;
    font-size: 0.88rem;
    font-family: Arial, Helvetica, sans-serif;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #4a2c0a;
    text-decoration: none;
    color: #ffffff;
}

/* ── Individual Horse Page ── */

/* Hero photo */
.horse-hero {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    object-position: center 30%;
    border-bottom: 3px solid #c8a96e;
    background-color: #e0d0b8;
}

.horse-hero-placeholder {
    width: 100%;
    height: 340px;
    background-color: #e0d0b8;
    border-bottom: 3px solid #c8a96e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-style: italic;
}

.horse-detail-header {
    margin: 1.5rem 0 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1rem;
}

.horse-detail-header h1 {
    font-size: 2rem;
}

.horse-price {
    font-size: 1.1rem;
    color: #8b4513;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
}

/* Key stats bar */
.horse-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    background-color: #e8dcc8;
    border: 1px solid #d4b88a;
    border-radius: 4px;
    padding: 0.85rem 1.2rem;
    margin: 1rem 0 1.75rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
}

.horse-stats dt {
    font-weight: bold;
    color: #4a2c0a;
    margin-bottom: 0.1rem;
}

.horse-stats dd {
    color: #3a2a1a;
}

/* Info sections */
.info-section {
    margin-bottom: 2.2rem;
}

.info-section h2 {
    font-size: 1.4rem;
    border-bottom: 2px solid #c8a96e;
    padding-bottom: 0.35rem;
    margin-bottom: 1rem;
}

/* AHA info definition list */
.aha-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.3rem 1.5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
}

.aha-dl dt {
    font-weight: bold;
    color: #4a2c0a;
    white-space: nowrap;
}

.aha-dl dd {
    color: #3a2a1a;
}

/* Pedigree table */
.pedigree-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
}

.pedigree-table td {
    border: 1px solid #d4b88a;
    padding: 0.55rem 0.85rem;
    vertical-align: middle;
}

.pedigree-table .col-horse {
    background-color: #4a2c0a;
    color: #f9f3e8;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    width: 22%;
}

.pedigree-table .col-parent {
    background-color: #c8a96e;
    color: #3a2010;
    font-weight: bold;
    width: 28%;
}

.pedigree-table .col-grandparent {
    background-color: #f9f3e8;
    width: 25%;
}

.pedigree-table .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    display: block;
    margin-bottom: 0.1rem;
}

/* ── Photo Gallery / CSS-only Lightbox ── */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.photo-gallery a.thumb-link {
    display: block;
    overflow: hidden;
    border: 2px solid #d4b88a;
    border-radius: 3px;
    transition: border-color 0.2s;
}

.photo-gallery a.thumb-link:hover {
    border-color: #8b4513;
}

.photo-gallery .thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background-color: #e0d0b8;
    transition: transform 0.2s;
}

.photo-gallery a.thumb-link:hover .thumb {
    transform: scale(1.04);
}

/* Lightbox overlay */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox:target {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border: 3px solid #c8a96e;
    border-radius: 3px;
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    color: #f9f3e8;
    font-size: 1.5rem;
    font-family: Arial, sans-serif;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    background: rgba(74, 44, 10, 0.7);
    border-radius: 3px;
    line-height: 1.4;
}

.lightbox-close:hover {
    background: #8b4513;
    color: #ffffff;
    text-decoration: none;
}

.lightbox-caption {
    color: #d4b88a;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.6rem;
    font-family: Arial, Helvetica, sans-serif;
}

/* ── Breeder Page ── */
.breeder-profile {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

@media (max-width: 660px) {
    .breeder-profile {
        grid-template-columns: 1fr;
    }
}

.breeder-photo {
    width: 100%;
    border: 3px solid #c8a96e;
    border-radius: 4px;
    background-color: #e0d0b8;
}

.breeder-photo-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #e0d0b8;
    border: 3px solid #c8a96e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b7355;
    font-style: italic;
    font-size: 0.9rem;
}

.breeder-bio h2 {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
}

.breeder-bio p {
    margin-bottom: 1rem;
}

/* Contact block */
.contact-block {
    background-color: #e8dcc8;
    border: 1px solid #d4b88a;
    border-left: 4px solid #8b4513;
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    font-family: Arial, Helvetica, sans-serif;
}

.contact-block h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.contact-block p {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

/* ── Footer ── */
.site-footer {
    background-color: #3a2010;
    color: #c8a96e;
    text-align: center;
    padding: 1.25rem 2rem;
    margin-top: 3rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.88rem;
}

.site-footer a {
    color: #d4b88a;
}

.site-footer a:hover {
    color: #f9f3e8;
}

/* ── Utility ── */
.placeholder-note {
    background-color: #fff8e1;
    border: 1px dashed #c8a96e;
    border-radius: 3px;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: #7a5c00;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
}
