/* Slate House Farm Herbal Library
 * Designed to sit quietly inside the existing farm theme and inherit its fonts.
 */
:root {
    --shh-ink: #292a27;
    --shh-muted: #696a63;
    --shh-paper: #f7f5ef;
    --shh-card: #ffffff;
    --shh-line: #d8d4ca;
    --shh-sage: #596850;
    --shh-sage-dark: #394633;
    --shh-warm: #8a5c3d;
    --shh-warning-bg: #fbf6ef;
}

.sh-herbal-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: clamp(2rem, 5vw, 4.5rem) auto;
    color: var(--shh-ink);
    font-family: inherit;
    line-height: 1.7;
}

.sh-herbal-profile {
    background: transparent;
}

.sh-herbal-header,
.sh-herbal-archive-header {
    max-width: 820px;
    margin: 0 auto clamp(1.75rem, 4vw, 3rem);
    text-align: center;
}

.sh-herbal-header h1,
.sh-herbal-archive-header h1 {
    margin: 0 0 .35rem;
    color: var(--shh-ink);
    font-family: inherit;
    font-size: clamp(2.2rem, 6vw, 4.1rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.025em;
}

.sh-herbal-archive-header p {
    max-width: 680px;
    margin: .8rem auto 0;
    color: var(--shh-muted);
    font-size: 1.06rem;
}

.sh-herbal-latin {
    margin: 0;
    color: var(--shh-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.sh-herbal-hero {
    margin-bottom: 1.5rem;
    background: #e9e6dd;
    overflow: hidden;
}

.sh-herbal-hero img {
    display: block;
    width: 100%;
    height: clamp(300px, 55vw, 650px);
    object-fit: cover;
}

.sh-herbal-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 1.5rem;
    border-top: 1px solid var(--shh-line);
    border-bottom: 1px solid var(--shh-line);
}

.sh-herbal-meta div {
    min-width: 0;
    padding: 1.1rem 1.25rem;
    color: var(--shh-muted);
}

.sh-herbal-meta div + div {
    border-left: 1px solid var(--shh-line);
}

.sh-herbal-meta strong {
    display: block;
    margin-bottom: .18rem;
    color: var(--shh-ink);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sh-herbal-intro {
    max-width: 850px;
    margin: 2rem auto;
    font-size: 1.06rem;
}

.sh-herbal-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.sh-herbal-panel {
    margin-top: 1.5rem;
    padding: clamp(1.35rem, 3vw, 2rem);
    background: var(--shh-paper);
    border-top: 4px solid var(--shh-sage);
}

.sh-herbal-two-col .sh-herbal-panel {
    margin-top: 0;
}

.sh-herbal-panel h2,
.sh-herbal-panel h3,
.sh-herbal-panel h4 {
    color: var(--shh-ink);
    font-family: inherit;
}

.sh-herbal-panel h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 500;
}

.sh-herbal-panel h3 {
    margin: -.4rem 0 1.25rem;
    color: var(--shh-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.28rem;
    font-style: italic;
    font-weight: 400;
}

.sh-herbal-panel h4 {
    margin: 0 0 .75rem;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sh-herbal-panel ul,
.sh-herbal-panel ol {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.sh-herbal-panel li + li {
    margin-top: .55rem;
}

.sh-herbal-warning {
    background: var(--shh-warning-bg);
    border-top-color: var(--shh-warm);
}

.sh-herbal-recipe {
    margin-top: 1.5rem;
    background: #fff;
    border: 1px solid var(--shh-line);
    border-top: 4px solid var(--shh-warm);
}

.sh-herbal-recipe-grid {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.7fr);
    gap: clamp(1.5rem, 4vw, 3rem);
}

.sh-herbal-back {
    margin: 2rem 0 0;
    text-align: center;
}

.sh-herbal-back a,
.sh-herbal-card h2 a {
    color: var(--shh-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.sh-herbal-directory {
    width: 100%;
}

.sh-herbal-search {
    display: block;
    width: min(100%, 580px);
    margin: 0 auto 2rem;
    padding: .9rem 1rem;
    border: 1px solid var(--shh-line);
    border-radius: 0;
    background: #fff;
    color: var(--shh-ink);
    font: inherit;
}

.sh-herbal-search:focus {
    border-color: var(--shh-sage);
    outline: 2px solid rgba(89, 104, 80, .18);
    outline-offset: 2px;
}

.sh-herbal-grid {
    display: grid;
    grid-template-columns: repeat(var(--sh-columns, 3), minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}

.sh-herbal-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: var(--shh-card);
    border: 1px solid var(--shh-line);
    transition: transform .18s ease, box-shadow .18s ease;
}

.sh-herbal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 31, 28, .10);
}

.sh-herbal-card[hidden] {
    display: none;
}

.sh-herbal-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e9e6dd;
}

.sh-herbal-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.sh-herbal-card:hover .sh-herbal-card-image img {
    transform: scale(1.025);
}

.sh-herbal-placeholder {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--shh-muted);
    text-align: center;
}

.sh-herbal-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
}

.sh-herbal-card h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.7rem);
    font-weight: 500;
    line-height: 1.15;
}

.sh-herbal-card h2 a {
    text-decoration: none;
}

.sh-herbal-card .sh-herbal-latin {
    margin-top: .35rem;
    font-size: 1rem;
}

.sh-herbal-groups {
    margin: .8rem 0 0;
    color: var(--shh-sage-dark);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.sh-herbal-card-body > p:not(.sh-herbal-latin):not(.sh-herbal-groups) {
    color: var(--shh-muted);
}

.sh-herbal-button {
    display: inline-block;
    margin-top: auto;
    padding: .7rem 1rem;
    background: var(--shh-sage-dark);
    color: #fff !important;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-decoration: none;
    text-transform: uppercase;
}

.sh-herbal-button:hover,
.sh-herbal-button:focus {
    background: var(--shh-ink);
    color: #fff !important;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 820px) {
    .sh-herbal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .sh-herbal-wrap {
        width: min(100% - 20px, 1180px);
        margin: 2rem auto;
    }

    .sh-herbal-meta,
    .sh-herbal-two-col,
    .sh-herbal-recipe-grid,
    .sh-herbal-grid {
        grid-template-columns: 1fr;
    }

    .sh-herbal-meta div + div {
        border-top: 1px solid var(--shh-line);
        border-left: 0;
    }

    .sh-herbal-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-herbal-card,
    .sh-herbal-card-image img {
        transition: none;
    }
}

.sh-herbal-picture-placeholder {
    display: grid;
    min-height: clamp(260px, 45vw, 520px);
    place-items: center;
    margin-bottom: 1.5rem;
    border: 1px dashed var(--shh-line);
    background: var(--shh-paper);
    color: var(--shh-muted);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-style: italic;
}

.sh-herbal-section-block h2 {
    margin-top: 0;
    font-weight: 500;
}

.sh-herbal-empty {
    margin: 0;
    color: var(--shh-muted);
    font-style: italic;
}
