/* ============================================================
   STAFGROS Blog & Guides — Frontend CSS
   ============================================================ */

.sg-blog-wrap {
    font-family: 'Open Sans', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

/* ── Search bar ── */
.sg-blog-search-wrap { margin-bottom: 32px; }
.sg-blog-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 50px;
    padding: 10px 16px 10px 20px;
    transition: border-color .2s, box-shadow .2s;
}
.sg-blog-search-inner:focus-within {
    border-color: #D42B2B;
    box-shadow: 0 0 0 3px rgba(212,43,43,.08);
}
.sg-blog-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    color: #1a1a2e;
    background: transparent;
    min-width: 0;
}
.sg-blog-search-input::placeholder { color: #bbb; font-style: italic; }
.sg-blog-search-clear { color: #bbb; text-decoration: none; font-size: 13px; padding: 0 4px; line-height: 1; }
.sg-blog-search-btn {
    background: #D42B2B;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 8px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.sg-blog-search-btn:hover { background: #b52020; }

/* ── Category filters ── */
.sg-blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}
.sg-blog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 100px;
    border: 1.5px solid #e5e5e5;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.sg-blog-filter-pill:hover { border-color: #D42B2B; color: #D42B2B; }
.sg-blog-filter-pill.active { background: #D42B2B; border-color: #D42B2B; color: #fff; }
.sg-blog-filter-count {
    background: rgba(0,0,0,.07);
    color: #aaa;
    border-radius: 100px;
    padding: 1px 7px;
    font-size: 10px;
}
.sg-blog-filter-pill.active .sg-blog-filter-count { background: rgba(255,255,255,.25); color: #fff; }

/* ── Layout ── */
.sg-blog-layout { display: grid; grid-template-columns: 1fr; gap: 40px; }
.sg-blog-layout.has-sidebar { grid-template-columns: 1fr 300px; }
.sg-blog-results-info { font-size: 13px; color: #aaa; margin-bottom: 20px; }

/* ── Magazine grid ── */
.sg-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.sg-blog-card--large { grid-column: span 2; }

/* ── Article card ── */
.sg-blog-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebebeb;
    overflow: hidden;
    transition: border-color .25s, transform .2s;
    display: flex;
    flex-direction: column;
}
.sg-blog-card:hover { border-color: #D42B2B; transform: translateY(-3px); }

.sg-blog-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    display: block;
    background: #f5f4f0;
}
.sg-blog-card--large .sg-blog-card-img-wrap { aspect-ratio: 16/9; }
.sg-blog-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.sg-blog-card:hover .sg-blog-card-img { transform: scale(1.04); }
.sg-blog-card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #f5f4f0;
}
.sg-blog-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: #D42B2B;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 4px 12px;
    border-radius: 100px;
}
.sg-blog-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.sg-blog-cat-tag {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #D42B2B;
    margin-bottom: 8px;
    text-decoration: none;
}
.sg-blog-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    color: #0d1b2a;
    line-height: 1.3;
    margin-bottom: 8px;
}
.sg-blog-card--large .sg-blog-card-title { font-size: 19px; }
.sg-blog-card-title a { color: inherit; text-decoration: none; transition: color .2s; }
.sg-blog-card-title a:hover { color: #D42B2B; }
.sg-blog-card-excerpt {
    font-size: 12.5px;
    color: #888;
    line-height: 1.65;
    margin-bottom: 14px;
    flex: 1;
    font-weight: 300;
}
.sg-blog-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f5f4f0;
}
.sg-blog-card-date,
.sg-blog-card-read {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #bbb;
    font-weight: 500;
}

/* ── Pagination ── */
.sg-blog-pagination {
    display: flex;
    gap: 8px;
    margin-top: 40px;
    justify-content: center;
    flex-wrap: wrap;
}
.sg-blog-page-btn {
    width: 38px; height: 38px;
    border-radius: 8px;
    border: 1.5px solid #e5e5e5;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px; font-weight: 700;
    color: #888;
    text-decoration: none;
    transition: all .2s;
}
.sg-blog-page-btn:hover { border-color: #D42B2B; color: #D42B2B; }
.sg-blog-page-btn.active { background: #D42B2B; border-color: #D42B2B; color: #fff; }

/* ── Empty state ── */
.sg-blog-empty {
    text-align: center;
    padding: 72px 20px;
    color: #ccc;
}
.sg-blog-empty p { margin: 16px 0; font-size: 15px; color: #aaa; }
.sg-blog-empty-btn {
    display: inline-flex;
    align-items: center;
    background: #0d1b2a;
    color: #fff;
    padding: 12px 26px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
}
.sg-blog-empty-btn:hover { background: #D42B2B; color: #fff; }

/* ── Sidebar ── */
.sg-blog-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sg-sidebar-block {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebebeb;
    padding: 22px 20px;
}
.sg-sidebar-block-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #0d1b2a;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f4f0;
}

.sg-sidebar-popular { display: flex; flex-direction: column; gap: 14px; }
.sg-sidebar-pop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    transition: all .2s;
}
.sg-sidebar-pop-item:hover .sg-sidebar-pop-title { color: #D42B2B; }
.sg-sidebar-pop-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #f0eeeb;
    line-height: 1;
    flex-shrink: 0;
    min-width: 32px;
}
.sg-sidebar-pop-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #0d1b2a;
    line-height: 1.35;
    margin-bottom: 4px;
    transition: color .2s;
}
.sg-sidebar-pop-date { font-size: 11px; color: #bbb; }

.sg-sidebar-cats { display: flex; flex-direction: column; gap: 6px; }
.sg-sidebar-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #f0eeeb;
    background: #f8f7f4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    transition: all .2s;
}
.sg-sidebar-cat:hover,
.sg-sidebar-cat.active { background: #D42B2B; border-color: #D42B2B; color: #fff; }
.sg-sidebar-cat-count {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,.08);
    border-radius: 100px;
    padding: 2px 8px;
}
.sg-sidebar-cat.active .sg-sidebar-cat-count,
.sg-sidebar-cat:hover .sg-sidebar-cat-count { background: rgba(255,255,255,.25); color: #fff; }

.sg-sidebar-cta-mini {
    background: #0d1b2a;
    border-radius: 14px;
    padding: 22px 20px;
}
.sg-sidebar-cta-mini-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
}
.sg-sidebar-cta-mini p {
    font-size: 12.5px;
    color: rgba(255,255,255,.55);
    font-weight: 300;
    line-height: 1.55;
    margin-bottom: 16px;
}
.sg-sidebar-cta-mini-btn {
    display: block;
    text-align: center;
    background: #D42B2B;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    padding: 11px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s;
}
.sg-sidebar-cta-mini-btn:hover { background: #b52020; color: #fff; }

/* ── Newsletter ── */
.sg-blog-newsletter {
    background: #0d1b2a;
    border-radius: 16px;
    padding: 36px 40px;
    margin: 56px 0 0;
}
.sg-blog-newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.sg-blog-newsletter-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 240px;
}
.sg-blog-newsletter-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(212,43,43,.15);
    border: 1px solid rgba(212,43,43,.3);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sg-blog-newsletter-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 6px;
}
.sg-blog-newsletter-sub {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    font-weight: 300;
    line-height: 1.55;
    margin: 0;
}
.sg-blog-newsletter-form {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.sg-blog-newsletter-form input {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 9px;
    padding: 12px 18px;
    font-size: 13.5px;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    width: 260px;
    outline: none;
    transition: border-color .2s;
}
.sg-blog-newsletter-form input::placeholder { color: rgba(255,255,255,.35); font-style: italic; }
.sg-blog-newsletter-form input:focus { border-color: rgba(212,43,43,.5); }
.sg-blog-newsletter-form button {
    background: #D42B2B;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 12px 26px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.sg-blog-newsletter-form button:hover { background: #b52020; }
.sg-blog-newsletter-form button:disabled { opacity: .6; cursor: wait; }
.sg-blog-newsletter-msg {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.sg-msg-success { background: rgba(29,158,117,.15); color: #1D9E75; border: 1px solid rgba(29,158,117,.25); }
.sg-msg-error   { background: rgba(212,43,43,.12); color: #E07070; border: 1px solid rgba(212,43,43,.2); }

/* ── CTA Final ── */
.sg-blog-cta-final {
    background: #D42B2B;
    border-radius: 16px;
    padding: 36px 40px;
    margin: 20px 0 72px;
}
.sg-blog-cta-final-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.sg-blog-cta-final-left { flex: 1; min-width: 220px; }
.sg-blog-cta-eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 8px;
}
.sg-blog-cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 8px;
}
.sg-blog-cta-sub {
    font-size: 13.5px;
    color: rgba(255,255,255,.7);
    font-weight: 300;
    line-height: 1.65;
    margin: 0;
}
.sg-blog-cta-final-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}
.sg-blog-cta-btn-red {
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    color: #D42B2B;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    padding: 13px 28px;
    border-radius: 9px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}
.sg-blog-cta-btn-red:hover { background: #f5f0f0; color: #D42B2B; }
.sg-blog-cta-btn-outline {
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 9px;
    border: 1.5px solid rgba(255,255,255,.35);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .2s;
}
.sg-blog-cta-btn-outline:hover { border-color: rgba(255,255,255,.8); color: #fff; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .sg-blog-layout.has-sidebar { grid-template-columns: 1fr; }
    .sg-blog-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 680px) {
    .sg-blog-grid { grid-template-columns: 1fr 1fr; }
    .sg-blog-card--large { grid-column: span 2; }
    .sg-blog-newsletter-inner,
    .sg-blog-cta-final-inner { flex-direction: column; }
    .sg-blog-newsletter-form { width: 100%; flex-direction: column; }
    .sg-blog-newsletter-form input { width: 100%; }
    .sg-blog-cta-final-right { width: 100%; }
    .sg-blog-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .sg-blog-wrap { padding: 28px 14px 0; }
    .sg-blog-grid { grid-template-columns: 1fr; }
    .sg-blog-card--large { grid-column: span 1; }
    .sg-blog-newsletter { padding: 24px 18px; }
    .sg-blog-cta-final { padding: 24px 18px; }
    .sg-blog-search-btn { padding: 8px 14px; font-size: 11.5px; }
}
