/* ===============================
   Context-aware padding
   =============================== */

/* Inside normal content */
.entry-content .stirfr-feed,
.wp-block-post-content .stirfr-feed {
    padding-left: 0;
    padding-right: 0;
}

/* Header / footer / body injections */
body > .stirfr-feed,
header .stirfr-feed,
footer .stirfr-feed {
    padding-left: clamp(12px, 3vw, 36px);
    padding-right: clamp(12px, 3vw, 36px);
}

.stirfr-feed,
.stirfr-wrapper {
    --stirfr-card-bg: #ffffff;
    --stirfr-text-color: #111111;
    --stirfr-readmore-color: #0073aa;
}

.stirfr-wrapper,
.stirfr-feed {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
}

.stirfr-wrapper:not(.stirfr-grid),
.stirfr-feed:not(.stirfr-grid) {
    display: flex;
    flex-direction: column;
}

.stirfr-wrapper.stirfr-grid,
.stirfr-feed.stirfr-grid {
    display: grid;
    grid-template-columns: repeat(var(--stirfr-cols, 2), minmax(0, 1fr));
    gap: 14px;
	padding-bottom: 3%;
}

.stirfr-item,
.stirfr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 12px;
    background: var(--stirfr-card-bg);
    color: var(--stirfr-text-color);
    border: 1px solid rgb(0 0 0 / 0.08);
    box-shadow:
        0 1px 0 rgb(0 0 0 / 0.06),
        inset 0 0 0 1px rgb(0 0 0 / 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.stirfr-item:hover,
.stirfr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgb(0 0 0 / 0.18);
}

.stirfr-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: transparent;
}

.stirfr-content,
.stirfr-thumb,
.stirfr-title,
.stirfr-category,
.stirfr-excerpt,
.stirfr-powered {
    position: relative;
    z-index: 2;
}

.stirfr-title,
.stirfr-title a {
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--stirfr-text-color);
    text-decoration: none;
}

.stirfr-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 6px;
}

.stirfr-meta {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 6px;
}

.stirfr-thumb {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.stirfr-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    pointer-events: none;
}

.stirfr-excerpt {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--stirfr-text-color);
    opacity: 0.9;
}

/* ===============================
   Excerpt clamp
   =============================== */
.stirfr-excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--stirfr-text-color);
}

/* ===============================
   Read More – base
   =============================== */
.stirfr-read-more {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    text-decoration: none;
}

/* Link mode (button disabled) */
.stirfr-read-more:not(.stirfr-btn) {
    color: var(--stirfr-readmore-color);
    text-decoration: underline;
}

/* ===============================
   Button mode
   =============================== */
/* Read More button – auto-adjust to text */
.stirfr-read-more.stirfr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;

    white-space: normal;      /* 🔥 allow wrapping */
    word-break: break-word;   /* 🔥 break long words */
    line-height: 1.4;

    width: 100%;              /* full-width button */
    box-sizing: border-box;
}


/* Style 1 – solid */
.stirfr-read-more.stirfr-btn-style1 {
    background: var(--stirfr-readmore-color, #2271b1);
    border: none;
}

/* Style 2 – outline */
.stirfr-read-more.stirfr-btn-style2 {
    background: transparent;
    color: var(--stirfr-readmore-color);
    border: 2px solid var(--stirfr-readmore-color);
}

/* Hover */
.stirfr-read-more.stirfr-btn:hover {
    opacity: 0.9;
}

.stirfr-powered {
    margin-top: auto;
    font-size: 0.8rem;
    opacity: 0.65;
}

.stirfr-powered a {
    color: var(--stirfr-text-color);
    text-decoration: none;
}

.stirfr-powered a:hover {
    text-decoration: underline;
}

/* Columns */
.stirfr-cols-1 { --stirfr-cols: 1; }
.stirfr-cols-2 { --stirfr-cols: 2; }
.stirfr-cols-3 { --stirfr-cols: 3; }
.stirfr-cols-4 { --stirfr-cols: 4; }
.stirfr-cols-5 { --stirfr-cols: 5; }
.stirfr-cols-6 { --stirfr-cols: 6; }

.stirfr-feed.notice {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 900px) {
    .stirfr-wrapper.stirfr-grid,
    .stirfr-feed.stirfr-grid {
        grid-template-columns: repeat(
            min(2, var(--stirfr-cols)),
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 560px) {
    .stirfr-wrapper.stirfr-grid,
    .stirfr-feed.stirfr-grid {
        grid-template-columns: 1fr;
    }

    .stirfr-title {
        font-size: 1.25rem;
    }

    .stirfr-thumb img {
        height: 200px;
    }
}

/* Read More Button Base */
.stirfr-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stirfr-btn-style1 {
    background: var(--stirfr-readmore-color);
    color: #fff !important;
    border: 1px solid var(--stirfr-readmore-color);
}

.stirfr-btn-style1:hover {
    background: transparent;
    color: var(--stirfr-readmore-color) !important;
}

.stirfr-btn-style2 {
    background: transparent;
    color: var(--stirfr-readmore-color) !important;
    border: 1px solid var(--stirfr-readmore-color);
}

.stirfr-btn-style2:hover {
    background: var(--stirfr-readmore-color);
    color: #fff !important;
}

.stirfr-switch-label {
    font-size: 11px;
    opacity: 0.75;
}
.stirfr-feed {
	color: var(--stirfr-text-color, inherit);
}


/* =========================================
   FULL FIX: Remove left gap from grid feeds
   ========================================= */

.stirfr-feed.stirfr-grid {
    padding-left: 0;
    padding-right: 0;
    margin-left: calc(-1 * var(--wp--style--root--padding-left, 16px));
    margin-right: calc(-1 * var(--wp--style--root--padding-right, 16px));
}
