/**
 * Sofia Implant Centre - Blog Layout
 * Clean build matching the Figma design exactly.
 */

/* ==========================================================================
   Container
   ========================================================================== */

.sic-blog {
    padding: 30px 0 60px;
}

.sic-blog__title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 25px;
}

.sic-blog__container {
    max-width: 1132px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.sic-blog__search {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
}

.sic-blog__search-input {
    width: 100%;
    padding: 10px 44px 10px 16px;
    border: 2px solid #00afc5;
    border-radius: 24.5px;
    background: #fff;
    color: #000;
    font-size: 15px;
    line-height: 1.2;
    outline: none;
    transition: box-shadow 0.2s ease;
}

.sic-blog__search-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 175, 197, 0.2);
}

.sic-blog__search-input::placeholder {
    color: #8a8a8a;
}

.sic-blog__search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #00afc5;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.sic-blog__search-btn:hover {
    background: #008fa3;
}

/* ==========================================================================
   Category Filters
   ========================================================================== */

.sic-blog__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.sic-blog__filter {
    display: inline-block;
    padding: 8px 28px;
    border-radius: 24.5px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid #00afc5;
    color: #00afc5;
    background: transparent;
    transition: all 0.2s ease;
}

.sic-blog__filter:hover {
    background: #00afc5;
    color: #fff;
    text-decoration: none;
}

.sic-blog__filter--active {
    background: #00afc5;
    color: #fff;
}

/* ==========================================================================
   Two-column Layout: posts + sidebar
   ========================================================================== */

.sic-blog__layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

/* A grid (and flex) "1fr" track has an implicit min-width:auto, so wide content
   — iframes, figures, the TrustIndex widget — can force the posts column wider
   than the viewport and break the layout. min-width:0 lets the column shrink. */
.sic-blog__posts {
    min-width: 0;
}

/* Belt-and-braces: keep any embedded media inside the content column.
   .post-teaser is the wrapper around the_content() on single posts. */
.sic-blog__posts img,
.sic-blog__posts figure,
.sic-blog__posts iframe,
.sic-blog__posts video,
.sic-blog__posts embed,
.sic-blog__posts object,
.sic-blog__posts .ti-widget,
.sic-blog__posts [class*="trustindex"] {
    max-width: 100%;
}

.sic-blog__posts figure {
    height: auto;
    margin-inline: 0;
}

.sic-blog__posts iframe {
    width: 100%;
}

/* Final safety net for any long unbreakable strings / odd embeds. */
.sic-blog__posts .post-teaser {
    overflow-wrap: break-word;
}

/* ==========================================================================
   Blog Card
   ========================================================================== */

.sic-blog-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* ---------- Thumbnail (left) ---------- */

.sic-blog-card__thumb {
    padding: 16px;
}

.sic-blog-card__thumb a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.sic-blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sic-blog-card__no-image {
    width: 100%;
    height: 100%;
    min-height: 140px;
    background: #e8e8e8;
    border-radius: 12px;
}

/* ---------- Body (right) ---------- */

.sic-blog-card__body {
    padding: 20px 20px 20px 0;
    display: flex;
    flex-direction: column;
}

/* Header: title + date badge */
.sic-blog-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

/* Title */
.sic-blog-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.sic-blog-card__title a {
    color: #000;
    text-decoration: none;
}

.sic-blog-card__title a:hover {
    color: #00afc5;
}

/* Date badge — teal circle */
.sic-blog-card__date {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #00afc5;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sic-blog-card__day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.sic-blog-card__month {
    font-size: 11px;
    font-weight: 400;
    text-transform: lowercase;
    line-height: 1;
    margin-top: 1px;
}

/* Excerpt */
.sic-blog-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    flex: 1;
    margin-bottom: 12px;
}

/* Read more link */
.sic-blog-card__more {
    color: #00afc5;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.sic-blog-card__more:hover {
    color: #0097aa;
    text-decoration: none;
}

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

.sic-blog__pagination {
    margin-top: 30px;
    text-align: center;
}

.sic-blog__pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.sic-blog__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.sic-blog__pagination .page-numbers.current,
.sic-blog__pagination .page-numbers:hover {
    background: #00afc5;
    color: #fff;
    border-color: #00afc5;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sic-blog__sidebar {
    font-size: 14px;
}

.sic-sidebar__widget {
    margin-bottom: 35px;
}

.sic-sidebar__widget h3 {
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
    color: #000;
    margin: 0 0 15px;
}

/* ---------- Recent Posts ---------- */

.sic-sidebar__recent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

.sic-sidebar__recent:last-child {
    border-bottom: none;
}

.sic-sidebar__recent-thumb {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
}

.sic-sidebar__recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sic-sidebar__recent-text {
    flex: 1;
    min-width: 0;
}

.sic-sidebar__recent-title {
    display: block;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.sic-sidebar__recent-title:hover {
    color: #00afc5;
}

.sic-sidebar__recent-date {
    display: block;
    font-size: 12px;
    color: #999;
}

/* ---------- Categories ---------- */

.sic-sidebar__categories {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.sic-sidebar__categories li {
    margin-bottom: 6px;
    font-size: 14px;
    color: #00afc5;
}

.sic-sidebar__categories li::marker {
    color: #00afc5;
}

.sic-sidebar__categories a {
    color: #000;
    text-decoration: none;
}

.sic-sidebar__categories a:hover {
    color: #00afc5;
}

/* ---------- Tags ---------- */

.sic-sidebar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sic-sidebar__tags a {
    display: inline-block;
    padding: 5px 14px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    color: #000;
    text-decoration: none;
    background: #F8F8F8;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sic-sidebar__tags a:hover {
    background: #00afc5;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
    .sic-blog__layout {
        grid-template-columns: 1fr;
    }

    .sic-blog__sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 600px) {
    .sic-blog-card {
        grid-template-columns: 1fr;
    }

    .sic-blog-card__thumb {
        height: 200px;
    }

    .sic-blog-card__body {
        padding: 0 16px 16px;
    }

    .sic-blog__filter {
        font-size: 14px;
        padding: 6px 18px;
    }
}

/* ==========================================================================
   WPBakery video-testimonial grids pasted inside post content
   (5 × [vc_column width="1/5"] of stacked [vc_video]) render as cramped,
   overlapping tiles in the narrow article column. Reflow them into a
   responsive grid instead.
   ========================================================================== */

.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner > .wpb_wrapper {
    display: contents;
}

.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) .wpb_video_widget {
    margin: 0;
    width: 100%;
}

.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) .wpb_video_wrapper {
    border-radius: 8px;
    overflow: hidden;
}

/* Clearfix pseudo-elements on the flattened row/columns would otherwise
   become empty grid cells — suppress them. */
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5)::before,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5)::after,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5::before,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5::after,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner::before,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner::after,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner > .wpb_wrapper::before,
.sic-blog__posts .vc_row:has(> .vc_col-sm-1\/5) > .vc_col-sm-1\/5 > .vc_column-inner > .wpb_wrapper::after {
    display: none;
}
