/* Generic content templates: inner pages, blog archive, single post, 404.
   Stage 2 replaces the page layouts here with per-type templates; the blog
   styles stay. */

.ce-page,
.ce-blog,
.ce-single,
.ce-404 {
    font-family: var(--font-primary);
    color: #444;
    padding: 70px 0 90px;
}

/* =============================================================
   Shared button
   ============================================================= */

.ce-btn {
    display: inline-block;
    padding: 14px 34px;
    background-color: var(--brand-orange);
    color: #fff;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: filter .25s ease, transform .25s ease;
}

.ce-btn:hover {
    color: #fff;
    filter: brightness(0.9);
    transform: translateY(-2px);
}

/* =============================================================
   Headings
   ============================================================= */

.ce-blog__eyebrow,
.ce-single__date,
.ce-card__date {
    display: block;
    color: var(--brand-orange);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 14px;
}

.ce-page__title,
.ce-blog__title,
.ce-single__title {
    font-family: var(--font-primary);
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--maine-black);
    margin: 0 0 24px;
}

.ce-blog__header,
.ce-single__header {
    max-width: 820px;
    margin-bottom: 50px;
}

/* =============================================================
   Long-form copy
   ============================================================= */

.ce-page__content,
.ce-single__content {
    max-width: 820px;
    font-size: 17px;
    line-height: 1.75;
}

.ce-page__content h2,
.ce-single__content h2 {
    font-size: 30px;
    font-weight: 700;
    color: var(--maine-black);
    margin: 44px 0 16px;
}

.ce-page__content h3,
.ce-single__content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--maine-black);
    margin: 34px 0 14px;
}

.ce-page__content h4,
.ce-single__content h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--maine-black);
    margin: 28px 0 12px;
}

.ce-page__content p,
.ce-single__content p {
    margin: 0 0 18px;
}

.ce-page__content a,
.ce-single__content a {
    color: var(--brand-orange);
    text-decoration: underline;
}

.ce-page__content ul,
.ce-page__content ol,
.ce-single__content ul,
.ce-single__content ol {
    margin: 0 0 20px;
    padding-left: 22px;
}

.ce-page__content li,
.ce-single__content li {
    margin-bottom: 8px;
}

.ce-page__content img,
.ce-single__content img {
    height: auto;
    max-width: 100%;
}

.ce-page__content blockquote,
.ce-single__content blockquote {
    margin: 28px 0;
    padding: 18px 26px;
    border-left: 3px solid var(--brand-orange);
    background: #fff8f4;
    font-style: italic;
}

.ce-single__media {
    max-width: 1000px;
    margin: 0 0 40px;
}

.ce-single__media img {
    display: block;
    width: 100%;
    height: auto;
}

/* =============================================================
   Blog grid
   ============================================================= */

.ce-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

@media (max-width: 640px) {
    .ce-blog__grid {
        grid-template-columns: 1fr;
    }
}

.ce-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ececec;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.ce-card:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 14px 44px rgba(0, 0, 0, .13);
    transform: translateY(-3px);
}

.ce-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
}

.ce-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.ce-card:hover .ce-card__media img {
    transform: scale(1.05);
}

.ce-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px;
}

/* Posts without a featured image: give the card a little more room and an
   accent rule so it still reads as a card rather than a bare box. */
.ce-card--text .ce-card__body {
    padding: 32px 26px;
    border-top: 3px solid var(--brand-orange);
}

.ce-card__date {
    margin-bottom: 10px;
}

.ce-card__title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.ce-card__title a {
    color: var(--maine-black);
    text-decoration: none;
}

.ce-card__title a:hover {
    color: var(--brand-orange);
}

.ce-card__excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0 0 18px;
}

.ce-card__more {
    margin-top: auto;
    color: var(--brand-orange);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
}

/* =============================================================
   Pagination and post navigation
   ============================================================= */

.pagination,
ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 50px;
    padding: 0;
    list-style: none;
}

.pagination .page-numbers,
ul.page-numbers .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ececec;
    color: var(--maine-black);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current,
ul.page-numbers .page-numbers:hover,
ul.page-numbers .page-numbers.current {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}

/* =============================================================
   Single post: meta, share, related, newsletter
   ============================================================= */

.ce-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #888;
}

.ce-single__meta li + li::before {
    content: "·";
    margin-right: 18px;
    color: #ccc;
}

.ce-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 820px;
    margin-top: 40px;
}

.ce-share__label {
    font-weight: 700;
    color: var(--maine-black);
    margin-right: 6px;
}

.ce-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #ececec;
    color: var(--maine-black);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.ce-share__btn:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}

.ce-related {
    margin-top: 70px;
}

.ce-related__title,
.ce-newsletter__title {
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 700;
    color: var(--maine-black);
    margin: 0 0 28px;
}

.ce-newsletter {
    margin-top: 70px;
    padding: 40px;
    background: #fff8f4;
}

.ce-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ce-newsletter__form input[type="text"],
.ce-newsletter__form input[type="email"] {
    flex: 1 1 220px;
    width: auto;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
    background: #fff;
}

.ce-newsletter__form input:focus {
    border-color: var(--brand-orange);
}

.ce-newsletter__note {
    flex: 1 1 100%;
    margin: 4px 0 0;
    font-size: 14px;
    color: #2e7d32;
}

.ce-newsletter__note--error {
    color: #c62828;
}

/* Honeypot — hidden from people, reachable by bots. */
.ce-hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ce-single__nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 820px;
    margin-top: 60px;
    padding-top: 26px;
    border-top: 1px solid #ececec;
    font-weight: 600;
}

.ce-single__nav a {
    color: var(--maine-black);
    text-decoration: none;
}

.ce-single__nav a:hover {
    color: var(--brand-orange);
}

/* =============================================================
   Search form
   ============================================================= */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin-top: 24px;
}

.search-form .search-field {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
}

.search-form .search-field:focus {
    border-color: var(--brand-orange);
}

.search-form .search-submit {
    background: var(--brand-orange);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    padding: 12px 24px;
    white-space: nowrap;
}

.search-form .search-submit:hover {
    background: #d9541a;
    color: #fff;
}
