/* =========================================================
   Stepman's Tea Blog Embed
   Matches the primary Stepman's Tea website design
   ========================================================= */

.ssb-embed-blog {
    --ssb-bg-main: var(--bg-main, #efebe4);
    --ssb-bg-soft: var(--bg-soft, #f5f1ea);
    --ssb-paper: var(--paper, #f2eee7);
    --ssb-line: var(--line, #d9d1c4);
    --ssb-text-main: var(--text-main, #332c26);
    --ssb-text-soft: var(--text-soft, #5e554b);
    --ssb-olive: var(--olive, #596041);
    --ssb-olive-hover: var(--olive-hover, #4c5237);
    --ssb-white-soft: var(--white-soft, #faf8f3);

    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--ssb-text-main);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.7;
}

.ssb-embed-blog *,
.ssb-embed-blog *::before,
.ssb-embed-blog *::after {
    box-sizing: border-box;
}

.ssb-embed-blog img {
    max-width: 100%;
    height: auto;
}

.ssb-embed-blog a,
.ssb-embed-blog button,
.ssb-embed-blog input {
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   Search and category tools
   ========================================================= */

.ssb-embed-tools {
    padding: 24px;
    margin-bottom: 34px;
    border: 1px solid rgba(170, 158, 144, 0.28);
    background: rgba(255, 255, 255, 0.16);
}

.ssb-embed-search {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
}

.ssb-embed-search input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 12px 18px;
    border: 1px solid var(--ssb-line);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.38);
    color: var(--ssb-text-main);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: none;
}

.ssb-embed-search input::placeholder {
    color: #857a6e;
    opacity: 1;
}

.ssb-embed-search input:focus {
    border-color: rgba(89, 96, 65, 0.55);
    background: rgba(255, 255, 255, 0.55);
}


/* =========================================================
   Shared buttons
   ========================================================= */

.ssb-embed-search button,
.ssb-embed-search a,
.ssb-embed-read,
.ssb-embed-pagination a,
.ssb-embed-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid var(--ssb-olive);
    border-radius: 999px;
    background: var(--ssb-olive);
    color: var(--ssb-white-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.ssb-embed-search button {
    cursor: pointer;
}

.ssb-embed-search button:hover,
.ssb-embed-search button:focus,
.ssb-embed-read:hover,
.ssb-embed-read:focus {
    border-color: var(--ssb-olive-hover);
    background: var(--ssb-olive-hover);
    color: var(--ssb-white-soft);
}

.ssb-embed-search a {
    background: transparent;
    color: var(--ssb-olive);
}

.ssb-embed-search a:hover,
.ssb-embed-search a:focus {
    background: var(--ssb-olive);
    color: var(--ssb-white-soft);
}


/* =========================================================
   Category navigation
   ========================================================= */

.ssb-embed-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.ssb-embed-categories a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid rgba(89, 96, 65, 0.48);
    border-radius: 999px;
    background: transparent;
    color: var(--ssb-olive);
    font-size: 0.98rem;
    line-height: 1.2;
    text-decoration: none;
}

.ssb-embed-categories a.active,
.ssb-embed-categories a:hover,
.ssb-embed-categories a:focus {
    border-color: var(--ssb-olive);
    background: var(--ssb-olive);
    color: var(--ssb-white-soft);
}


/* =========================================================
   Results heading
   ========================================================= */

.ssb-embed-results-label {
    margin: 0 0 24px;
    color: var(--ssb-text-soft);
    font-size: 1.05rem;
    line-height: 1.7;
}


/* =========================================================
   Featured post
   ========================================================= */

.ssb-embed-featured-post {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 34px;
    padding: 28px;
    margin-bottom: 42px;
    border: 1px solid rgba(170, 158, 144, 0.28);
    background: rgba(255, 255, 255, 0.16);
}

.ssb-embed-featured-post img {
    width: 100%;
    height: auto;
    max-height: 480px;
    display: block;
    object-fit: cover;
    border-radius: 20px 14px 22px 16px;
    filter: saturate(95%) contrast(98%);
}

.ssb-embed-featured-label {
    margin-bottom: 12px;
    color: var(--ssb-olive);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ssb-embed-featured-post h2 {
    margin: 0 0 14px;
    color: var(--ssb-text-main);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.ssb-embed-featured-post h2 a,
.ssb-embed-card h2 a {
    color: var(--ssb-text-main);
    text-decoration: none;
}

.ssb-embed-featured-post h2 a:hover,
.ssb-embed-featured-post h2 a:focus,
.ssb-embed-card h2 a:hover,
.ssb-embed-card h2 a:focus {
    color: var(--ssb-olive);
}


/* =========================================================
   Post metadata
   ========================================================= */

.ssb-embed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 15px;
    color: var(--ssb-text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.ssb-embed-meta strong {
    color: var(--ssb-text-main);
    font-weight: 500;
}

.ssb-embed-meta a {
    color: var(--ssb-olive);
    font-weight: 500;
    text-decoration: none;
}

.ssb-embed-meta a:hover,
.ssb-embed-meta a:focus {
    color: var(--ssb-olive-hover);
    text-decoration: underline;
}


/* =========================================================
   Excerpts and section headings
   ========================================================= */

.ssb-embed-excerpt {
    margin: 0 0 24px;
    color: var(--ssb-text-soft);
    font-size: 1.12rem;
    line-height: 1.8;
}

.ssb-embed-section-title {
    margin: 0 0 24px;
    color: var(--ssb-text-main);
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    font-weight: 500;
    line-height: 1.2;
}


/* =========================================================
   Article grid
   ========================================================= */

.ssb-embed-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.ssb-embed-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 18px;
    border: 1px solid rgba(170, 158, 144, 0.28);
    background: rgba(255, 255, 255, 0.14);
}

.ssb-embed-card:hover {
    border-color: rgba(89, 96, 65, 0.42);
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.ssb-embed-card img {
    width: 100%;
    height: 230px;
    display: block;
    object-fit: cover;
    border-radius: 16px 12px 18px 13px;
    filter: saturate(95%) contrast(98%);
}

.ssb-embed-card h2 {
    margin: 18px 0 11px;
    color: var(--ssb-text-main);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.3;
}

.ssb-embed-card .ssb-embed-excerpt {
    flex-grow: 1;
    font-size: 1.04rem;
    line-height: 1.75;
}

.ssb-embed-card .ssb-embed-read {
    align-self: flex-start;
}


/* =========================================================
   Missing image placeholder
   ========================================================= */

.ssb-embed-card-placeholder {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px dashed rgba(170, 158, 144, 0.55);
    border-radius: 16px 12px 18px 13px;
    background: rgba(245, 241, 234, 0.55);
    color: var(--ssb-text-soft);
    font-size: 1rem;
    text-align: center;
}


/* =========================================================
   Pagination
   ========================================================= */

.ssb-embed-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 38px;
}

.ssb-embed-pagination a,
.ssb-embed-pagination span {
    min-width: 46px;
    min-height: 46px;
    padding: 9px 15px;
}

.ssb-embed-pagination a {
    background: transparent;
    color: var(--ssb-olive);
}

.ssb-embed-pagination a:hover,
.ssb-embed-pagination a:focus {
    border-color: var(--ssb-olive);
    background: var(--ssb-olive);
    color: var(--ssb-white-soft);
}

.ssb-embed-pagination span.active {
    border-color: var(--ssb-text-main);
    background: var(--ssb-text-main);
    color: var(--ssb-white-soft);
}

.ssb-embed-pagination .ssb-pagination-dots {
    min-width: auto;
    padding: 9px 5px;
    border-color: transparent;
    background: transparent;
    color: var(--ssb-text-soft);
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 950px) {
    .ssb-embed-featured-post {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ssb-embed-featured-post img {
        max-height: none;
    }

    .ssb-embed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
    .ssb-embed-tools,
    .ssb-embed-featured-post {
        padding: 18px;
    }

    .ssb-embed-tools {
        margin-bottom: 28px;
    }

    .ssb-embed-featured-post {
        gap: 22px;
        margin-bottom: 34px;
    }

    .ssb-embed-featured-post h2 {
        font-size: 2rem;
    }

    .ssb-embed-excerpt {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .ssb-embed-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .ssb-embed-card img,
    .ssb-embed-card-placeholder {
        height: auto;
        min-height: 0;
    }

    .ssb-embed-card img {
        aspect-ratio: 16 / 10;
    }

    .ssb-embed-search {
        flex-direction: column;
    }

    .ssb-embed-search input,
    .ssb-embed-search button,
    .ssb-embed-search a {
        width: 100%;
    }

    .ssb-embed-search button,
    .ssb-embed-search a {
        text-align: center;
    }

    .ssb-embed-categories {
        gap: 8px;
    }

    .ssb-embed-categories a {
        flex: 1 1 calc(50% - 8px);
        padding-left: 12px;
        padding-right: 12px;
        text-align: center;
    }

    .ssb-embed-card {
        padding: 16px;
    }

    .ssb-embed-card h2 {
        font-size: 1.35rem;
    }

    .ssb-embed-pagination {
        margin-top: 30px;
    }
}