/* ============================================
   Stutteri Højgård — Heste CSS
   ============================================ */

/* --- Variabler --- */
:root {
    --sh-primary:    #3a5a40;   /* mørk skovgrøn */
    --sh-accent:     #a7c08e;   /* lys grøn */
    --sh-gold:       #c8a85a;   /* guld/brun */
    --sh-bg:         #faf9f7;
    --sh-text:       #2c2c2c;
    --sh-border:     #ddd6c8;
    --sh-radius:     8px;
    --sh-shadow:     0 2px 12px rgba(0,0,0,0.08);
    --sh-font:       'Georgia', serif;
}

/* ============================================
   HESTE GRID (liste)
   ============================================ */
.sh-heste-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

/* --- Horse Card --- */
.sh-horse-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sh-horse-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.sh-horse-card--salg {
    border-color: var(--sh-gold);
}
.sh-horse-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--sh-gold);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}
.sh-horse-card__img-link {
    display: block;
    overflow: hidden;
    height: 200px;
    background: var(--sh-bg);
}
.sh-horse-card__img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.sh-horse-card:hover .sh-horse-card__img-link img {
    transform: scale(1.05);
}
.sh-horse-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--sh-border);
}
.sh-horse-card__body {
    padding: 16px;
}
.sh-horse-card__name {
    font-family: var(--sh-font);
    font-size: 1.1rem;
    margin: 0 0 10px;
}
.sh-horse-card__name a {
    color: var(--sh-primary);
    text-decoration: none;
}
.sh-horse-card__name a:hover {
    color: var(--sh-gold);
}
.sh-horse-card__meta {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}
.sh-horse-card__meta strong {
    color: var(--sh-text);
}
.sh-horse-card__btn {
    display: inline-block;
    background: var(--sh-primary);
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}
.sh-horse-card__btn:hover {
    background: var(--sh-gold);
}

/* ============================================
   FILTER BAR
   ============================================ */
.sh-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: var(--sh-bg);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.sh-filter__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}
.sh-filter__group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--sh-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sh-filter__group select,
.sh-filter__group input {
    padding: 8px 12px;
    border: 1px solid var(--sh-border);
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}
.sh-filter__reset {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--sh-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}
.sh-filter__reset:hover {
    background: #eee;
}

/* ============================================
   STAMTRÆ
   ============================================ */
.sh-stammtree {
    margin: 40px 0;
    font-family: var(--sh-font);
}
.sh-stammtree__title {
    color: var(--sh-primary);
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sh-gold);
}
.sh-stammtree__grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr;
    gap: 0;
    align-items: center;
}

/* Kolonnerne */
.sh-stammtree__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sh-stammtree__col--self {
    justify-content: center;
}
.sh-stammtree__col--grandparents {
    gap: 6px;
}

/* Boksene */
.sh-stammtree__box {
    padding: 10px 14px;
    border-radius: var(--sh-radius);
    font-size: 13px;
    line-height: 1.4;
    position: relative;
}
.sh-stammtree__box--self {
    background: var(--sh-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    border-radius: var(--sh-radius);
}
.sh-stammtree__box--sire {
    background: #e8f0ea;
    border-left: 4px solid var(--sh-primary);
}
.sh-stammtree__box--dam {
    background: #f0ebe8;
    border-left: 4px solid var(--sh-gold);
}
.sh-stammtree__box--gp {
    background: #faf9f7;
    border: 1px solid var(--sh-border);
    font-size: 12px;
}
.sh-stammtree__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 4px;
}
.sh-stammtree__link {
    color: var(--sh-primary);
    text-decoration: none;
    font-weight: 600;
}
.sh-stammtree__link:hover {
    color: var(--sh-gold);
    text-decoration: underline;
}
.sh-stammtree__unknown {
    color: #bbb;
}

/* Forbindelseslinjer via pseudo-elementer */
.sh-stammtree__col--self .sh-stammtree__box--self::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: var(--sh-border);
    transform: translateY(-50%);
}

/* Responsiv stamtræ */
@media (max-width: 600px) {
    .sh-stammtree__grid {
        grid-template-columns: 1fr;
    }
    .sh-stammtree__col--self .sh-stammtree__box--self::after {
        display: none;
    }
}

/* ============================================
   HEST INFO FAKTABOKS
   ============================================ */
.sh-hest-info {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;
    background: var(--sh-bg);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    padding: 20px;
    margin: 24px 0;
    font-size: 14px;
}
.sh-hest-info dt {
    font-weight: 700;
    color: var(--sh-primary);
}
.sh-hest-info dd {
    margin: 0;
    color: var(--sh-text);
}

/* ============================================
   GALLERI
   ============================================ */
.sh-galleri {
    display: grid;
    gap: 8px;
    margin: 24px 0;
}
.sh-galleri--cols-2 { grid-template-columns: repeat(2, 1fr); }
.sh-galleri--cols-3 { grid-template-columns: repeat(3, 1fr); }
.sh-galleri--cols-4 { grid-template-columns: repeat(4, 1fr); }

.sh-galleri__item {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4/3;
}
.sh-galleri__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.sh-galleri__item:hover img {
    transform: scale(1.05);
}

/* ============================================
   BADGES
   ============================================ */
.sh-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.sh-badge--salg {
    background: var(--sh-gold);
    color: #fff;
}

/* ============================================
   PAGINATION
   ============================================ */
.sh-pagination {
    text-align: center;
    margin: 32px 0;
}
.sh-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border: 1px solid var(--sh-border);
    border-radius: 4px;
    color: var(--sh-primary);
    text-decoration: none;
}
.sh-pagination .page-numbers.current {
    background: var(--sh-primary);
    color: #fff;
    border-color: var(--sh-primary);
}

/* ============================================
   LOADING STATE
   ============================================ */
.sh-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}
.sh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px;
}
