/* Corbett Fish House - article pages (loaded only on the new articles) */

.cfh-article-page .site-inner {
    padding-left: 24px;
    padding-right: 24px;
}

.cfh-article,
.cfh-article *,
.cfh-article *::before,
.cfh-article *::after {
    box-sizing: border-box;
}

.cfh-article {
    color: #222;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 48px;
}

.entry-content .cfh-article p {
    margin: 0 0 18px;
}

.entry-content .cfh-article p:last-child {
    margin-bottom: 0;
}

.cfh-article figure {
    margin: 0;
}

.cfh-article img {
    display: block;
    width: 100%;
    max-width: none;
}

/* Links inside article text */
.cfh-article a {
    color: #843323;
    text-decoration: underline;
    text-decoration-color: rgba(132, 51, 35, .45);
    text-underline-offset: 3px;
}

.cfh-article a:hover {
    color: #333;
    text-decoration-color: currentColor;
}

.cfh-article a:focus-visible {
    outline: 2px solid #e5554e;
    outline-offset: 2px;
}

/* Headings */
.cfh-article h1 {
    margin: 0 0 28px;
    overflow-wrap: break-word;
}

.cfh-article h2 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 22px;
}

.cfh-prose > h2 {
    border-bottom: 1px dotted #007647;
    padding-bottom: 12px;
}

/* Sections rhythm */
.cfh-sec {
    margin-top: 60px;
}

/* Lead: photo with the intro card laid over its edge */
.cfh-lead__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
}

.cfh-lead__photo {
    grid-column: 7 / 13;
    grid-row: 1;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 6 / 5;
}

.cfh-lead__photo img {
    height: 100%;
    object-fit: cover;
}

.cfh-lead__card {
    grid-column: 1 / 8;
    grid-row: 1;
    position: relative;
    z-index: 1;
    background: #fff;
    border-top: 5px solid #007647;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #e2e2e2;
    padding: 40px 44px;
    font-size: 18px;
    line-height: 1.7;
}

/* Key paragraph */
.entry-content .cfh-article p.cfh-key {
    border-left: 4px solid #007647;
    color: #622f23;
    font-size: 19px;
    line-height: 1.6;
    padding: 4px 0 4px 22px;
}

/* Split: photo flush to one side of a panel */
.cfh-split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    background: #f2f2f2;
    border-radius: 10px;
    overflow: hidden;
}

.cfh-split__photo {
    position: relative;
    min-height: 420px;
}

.cfh-split__photo img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
}

.cfh-split__body {
    padding: 48px 52px;
}

.cfh-split--rev {
    grid-template-columns: 7fr 5fr;
}

.cfh-split--rev .cfh-split__photo {
    order: 2;
}

/* Band: wide photo with a card pulled up over it */
.cfh-band__photo {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 7 / 3;
}

.cfh-band__photo img {
    height: 100%;
    object-fit: cover;
}

.cfh-band__card {
    position: relative;
    margin: -110px 48px 0;
    background: #fff;
    border-top: 5px solid #007647;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #e2e2e2;
    padding: 40px 48px;
}

/* Note: allergy and labeling cautions */
.cfh-note {
    background: #fdf1f0;
    border-left: 6px solid #e5554e;
    border-radius: 0 10px 10px 0;
    padding: 40px 48px;
}

.cfh-note h2 {
    color: #622f23;
}

/* Two plates side by side */
.cfh-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 6px 0 24px;
}

.cfh-pair__card {
    background: #f2f2f2;
    border-top: 5px solid #007647;
    border-radius: 10px;
    padding: 30px 32px;
}

.cfh-pair__card + .cfh-pair__card {
    border-top-color: #843323;
}

/* Table */
.cfh-table {
    margin: 6px 0 0;
}

.cfh-table table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    line-height: 1.6;
    table-layout: fixed;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.cfh-table tbody {
    border: 0;
}

.cfh-table th {
    background: #007647;
    color: #fff;
    font-size: 15px;
    text-transform: none;
    padding: 14px 22px;
    vertical-align: middle;
}

.cfh-table th:first-child {
    width: 22%;
}

.cfh-table td {
    border-top: 1px solid #e2e2e2;
    padding: 20px 22px;
    vertical-align: top;
}

.cfh-table tbody tr:first-child td {
    border-top: 0;
}

.cfh-table tbody tr:nth-child(even) td {
    background: #f7f7f7;
}

.cfh-table td:first-child {
    color: #622f23;
    font-size: 17px;
    font-weight: 700;
}

.entry-content .cfh-article p.cfh-aside {
    color: #555;
    font-size: 15px;
    margin-top: 16px;
}

/* Closing band */
.cfh-close {
    background: #007647;
    border-radius: 10px;
    color: #fff;
    padding: 44px 52px;
}

.cfh-close h2 {
    color: #fff;
}

.cfh-close a,
.cfh-close a:hover {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, .7);
}

.cfh-close a:hover {
    text-decoration-color: #fff;
}

.cfh-close a:focus-visible {
    outline-color: #fff;
}

/* Tablet */
@media only screen and (max-width: 1023px) {
    .cfh-lead__photo {
        grid-column: 6 / 13;
        aspect-ratio: 4 / 5;
    }

    .cfh-lead__card {
        grid-column: 1 / 7;
        padding: 30px 30px;
        font-size: 16px;
    }

    .cfh-split,
    .cfh-split--rev {
        grid-template-columns: 1fr 1fr;
    }

    .cfh-split__body {
        padding: 36px 36px;
    }
}

@media only screen and (max-width: 768px) {
    .cfh-article-page .site-inner {
        padding-left: 5%;
        padding-right: 5%;
    }

    .cfh-sec {
        margin-top: 44px;
    }

    .cfh-lead__grid {
        display: flex;
        flex-direction: column;
    }

    .cfh-lead__photo {
        order: -1;
        aspect-ratio: 4 / 3;
    }

    .cfh-lead__card {
        margin: -48px 14px 0;
        padding: 26px 24px;
        font-size: 17px;
    }

    .cfh-split,
    .cfh-split--rev {
        display: block;
    }

    .cfh-split__photo {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .cfh-split__body {
        padding: 30px 24px;
    }

    .cfh-band__photo {
        aspect-ratio: 16 / 9;
    }

    .cfh-band__card {
        margin: -40px 12px 0;
        padding: 28px 24px;
    }

    .cfh-note {
        padding: 30px 24px;
    }

    .cfh-pair {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cfh-pair__card {
        padding: 24px;
    }

    .cfh-close {
        padding: 32px 24px;
    }

    /* Table becomes a stack of cards */
    .cfh-table table,
    .cfh-table tbody,
    .cfh-table tr,
    .cfh-table td {
        display: block;
        width: 100%;
    }

    .cfh-table table {
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .cfh-table thead {
        display: none;
    }

    .cfh-table tr {
        border: 1px solid #ddd;
        border-top: 5px solid #007647;
        border-radius: 10px;
        margin-bottom: 16px;
        overflow: hidden;
    }

    .cfh-table td,
    .cfh-table tbody tr:nth-child(even) td {
        background: #fff;
        border-top: 1px solid #e2e2e2;
        padding: 14px 20px;
    }

    .cfh-table td:first-child {
        background: #f2f2f2;
        border-top: 0;
    }

    .cfh-table td[data-label]:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        color: #007647;
        font-weight: 700;
        font-size: 14px;
        margin-bottom: 4px;
    }
}

@media only screen and (max-width: 480px) {
    .cfh-article h1 {
        font-size: 26px;
    }

    .cfh-article h2 {
        font-size: 23px;
    }

    .entry-content .cfh-article p.cfh-key {
        font-size: 17px;
        padding-left: 16px;
    }
}
