/* ==========================================================================
   Blog archive — /blog/, category, author, date and search listings.
   Pitch-style hero + two-column grid + sidebar, on Gadget Medics brand tokens.
   Everything is scoped under .gmb to stay clear of the site-wide styles.
   ========================================================================== */

.gmb {
    --gmb-ink: #222222;
    --gmb-ink-soft: #4a4a4c;
    --gmb-muted: #616162;
    --gmb-accent: #fc6464;
    --gmb-accent-deep: #e65b5b;
    --gmb-surface: #f7f7f8;
    --gmb-surface-strong: #f1f1f2;
    --gmb-line: #e4e4e4;
    --gmb-radius: 8px;
    --gmb-radius-pill: 100px;
    --gmb-gap: 32px;
    --gmb-sidebar-width: 380px;
    --gmb-heading-font: "Poppins", sans-serif;
    --gmb-body-font: "Inter", sans-serif;
    --gmb-tight: -0.03em;
    --gmb-shadow-float: 0 2px 6px rgba(34, 34, 34, 0.08), 0 14px 34px rgba(34, 34, 34, 0.12);
    --gmb-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    font-family: var(--gmb-body-font);
    color: var(--gmb-ink);
}

.gmb a {
    color: inherit;
    text-decoration: none;
}

.gmb :focus-visible {
    outline: 2px solid var(--gmb-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Page header
   -------------------------------------------------------------------------- */

.gmb .gmb-page-header {
    margin: 56px 0 40px;
}

.gmb .gmb-page-title {
    font-family: var(--gmb-heading-font);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
    margin: 0;
    text-transform: none;
}

.gmb .gmb-page-excerpt {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--gmb-muted);
    max-width: 720px;
    margin: 16px 0 0;
}

/* Hero slider
   -------------------------------------------------------------------------- */

.gmb .gmb-hero {
    position: relative;
    border-radius: var(--gmb-radius);
    overflow: hidden;
    margin-bottom: 64px;
    background-color: #2b2b2d;
}

.gmb .gmb-hero-track {
    position: relative;
    height: 540px;
}

.gmb .gmb-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s var(--gmb-ease), visibility 0.55s var(--gmb-ease);
}

.gmb .gmb-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.gmb .gmb-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(48%);
    transform: scale(1.02);
    transition: filter 0.4s var(--gmb-ease), transform 6s var(--gmb-ease);
}

.gmb .gmb-hero-slide.is-active .gmb-hero-image {
    transform: scale(1);
}

.gmb .gmb-hero:hover .gmb-hero-slide.is-active .gmb-hero-image {
    filter: brightness(40%);
}

.gmb .gmb-hero-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    /* Side padding clears the vertically-centred prev/next buttons, which a
       three-line headline would otherwise run into. */
    padding: 56px 72px;
}

.gmb .gmb-hero-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 18px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.gmb .gmb-hero-author,
.gmb .gmb-hero-date {
    opacity: 0.75;
}

.gmb .gmb-hero-date {
    position: relative;
}

.gmb .gmb-hero-date::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: var(--gmb-radius-pill);
    background-color: #fff;
    opacity: 0.4;
}

.gmb .gmb-hero-title {
    font-family: var(--gmb-heading-font);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: var(--gmb-tight);
    color: #fff;
    max-width: 780px;
    margin: 0;
    text-transform: none;
}

.gmb .gmb-hero-title-link {
    transition: color 0.25s var(--gmb-ease);
}

.gmb .gmb-hero-title-link:hover {
    color: #ffd8d8;
}

.gmb .gmb-hero-excerpt {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    opacity: 0.88;
    max-width: 620px;
    margin: 16px 0 0;
}

.gmb .gmb-hero-content .gmb-pill {
    margin-top: 26px;
}

/* Hero controls */

.gmb .gmb-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: var(--gmb-radius-pill);
    background-color: #fff;
    color: var(--gmb-ink);
    box-shadow: var(--gmb-shadow-float);
    cursor: pointer;
    transition: background-color 0.3s var(--gmb-ease), color 0.3s var(--gmb-ease), transform 0.25s var(--gmb-ease);
}

.gmb .gmb-hero-nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

.gmb .gmb-hero-nav--prev {
    left: 12px;
}

.gmb .gmb-hero-nav--next {
    right: 12px;
}

.gmb .gmb-hero-nav:hover {
    background-color: var(--gmb-accent);
    color: #fff;
}

.gmb .gmb-hero-nav--prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.gmb .gmb-hero-nav--next:hover {
    transform: translateY(-50%) translateX(3px);
}

.gmb .gmb-hero-dots {
    position: absolute;
    right: 72px;
    bottom: 56px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2px;
}

.gmb .gmb-hero-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.gmb .gmb-hero-dot span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: var(--gmb-radius-pill);
    background-color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s var(--gmb-ease), width 0.3s var(--gmb-ease), height 0.3s var(--gmb-ease);
}

.gmb .gmb-hero-dot:hover span {
    opacity: 0.85;
}

.gmb .gmb-hero-dot.is-active span {
    width: 12px;
    height: 12px;
    opacity: 1;
}

/* Layout
   -------------------------------------------------------------------------- */

.gmb .gmb-layout {
    display: flex;
    align-items: flex-start;
    column-gap: var(--gmb-gap);
    margin-bottom: 96px;
}

.gmb .gmb-feed {
    display: flex;
    flex-direction: column;
    gap: 56px;
    flex: 1 1 auto;
    min-width: 0;
}

.gmb .gmb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gmb-gap);
    row-gap: 56px;
}

/* Post card
   -------------------------------------------------------------------------- */

.gmb .gmb-card {
    display: grid;
    grid-template-rows: auto 1fr;
    row-gap: 22px;
    height: 100%;
}

.gmb .gmb-card-media {
    position: relative;
    overflow: hidden;
    border-radius: var(--gmb-radius);
    aspect-ratio: 1.3474;
    background-color: var(--gmb-surface-strong);
}

.gmb .gmb-card-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gmb .gmb-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.3s var(--gmb-ease), transform 0.5s var(--gmb-ease);
}

.gmb .gmb-card-image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gmb-heading-font);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-muted);
}

.gmb .gmb-card:hover .gmb-card-image {
    filter: brightness(92%);
    transform: scale(1.03);
}

.gmb .gmb-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gmb .gmb-card-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gmb-muted);
}

.gmb .gmb-card-date {
    position: relative;
}

.gmb .gmb-card-date::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: var(--gmb-radius-pill);
    background-color: #d4d4d6;
}

.gmb .gmb-card-title {
    font-family: var(--gmb-heading-font);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
    margin: 0;
    text-transform: none;
}

.gmb .gmb-card-title-link {
    transition: color 0.25s var(--gmb-ease);
}

.gmb .gmb-card-title-link:hover {
    color: var(--gmb-accent);
}

.gmb .gmb-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

/* Pills
   -------------------------------------------------------------------------- */

/* With no byline there is nothing to separate, so the leading dot goes too. */
.gmb .is-dateonly .gmb-card-date::before,
.gmb .is-dateonly .gmb-hero-date::before,
.gmb .is-dateonly .gmb-featured-date::before {
    content: none;
}

.gmb .gmb-pill {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-muted);
    background-color: var(--gmb-surface-strong);
    border-radius: var(--gmb-radius-pill);
    padding: 6px 14px;
    transition: background-color 0.3s var(--gmb-ease), color 0.3s var(--gmb-ease);
}

.gmb a.gmb-pill:hover {
    background-color: var(--gmb-accent);
    color: #fff;
}

.gmb .gmb-pill--ghost {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(2px);
}

/* Load more + pagination
   -------------------------------------------------------------------------- */

.gmb .gmb-load-more {
    align-self: center;
    font-family: var(--gmb-body-font);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
    background-color: var(--gmb-surface-strong);
    border: none;
    border-radius: var(--gmb-radius-pill);
    padding: 14px 32px;
    cursor: pointer;
    transition: background-color 0.3s var(--gmb-ease), color 0.25s var(--gmb-ease);
}

.gmb .gmb-load-more:hover {
    background-color: var(--gmb-accent);
    color: #fff;
}

.gmb .gmb-load-more[disabled] {
    opacity: 0.55;
    cursor: default;
}

.gmb .gmb-load-more[disabled]:hover {
    background-color: var(--gmb-surface-strong);
    color: var(--gmb-ink);
}

.gmb .gmb-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
}

/* `display: flex` above outranks the UA rule for [hidden], so the JS handoff
   from pagination to Load More needs this to actually take effect. */
.gmb .gmb-pagination[hidden] {
    display: none;
}

.gmb .gmb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    margin: 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gmb-ink);
    background-color: var(--gmb-surface-strong);
    border-radius: var(--gmb-radius-pill);
    transition: background-color 0.3s var(--gmb-ease), color 0.25s var(--gmb-ease);
}

.gmb .gmb-pagination .page-numbers:hover,
.gmb .gmb-pagination .page-numbers.current {
    background-color: var(--gmb-accent);
    color: #fff;
}

.gmb .gmb-pagination .page-numbers.dots {
    background: transparent;
}

.gmb .gmb-pagination .page-numbers.dots:hover {
    background: transparent;
    color: var(--gmb-ink);
}

.gmb .gmb-empty {
    font-size: 18px;
    color: var(--gmb-muted);
}

/* Sidebar
   -------------------------------------------------------------------------- */

.gmb .gmb-sidebar {
    width: var(--gmb-sidebar-width);
    flex: 0 0 var(--gmb-sidebar-width);
    padding-left: 40px;
    box-sizing: border-box;
}

.gmb .gmb-widget + .gmb-widget {
    padding-top: 40px;
    border-top: 1px solid var(--gmb-line);
}

.gmb .gmb-widget:not(:last-child) {
    margin-bottom: 40px;
}

.gmb .gmb-widget-title {
    font-family: var(--gmb-heading-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
    margin: 0 0 28px;
    text-transform: none;
}

/* About widget */

.gmb .gmb-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--gmb-surface);
    border-radius: var(--gmb-radius);
    padding: 36px;
}

.gmb .gmb-about-logo {
    font-family: var(--gmb-heading-font);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
}

.gmb .gmb-about-logo::after {
    content: ".";
    color: var(--gmb-accent);
}

.gmb .gmb-about-desc {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--gmb-muted);
    margin: 16px 0 0;
}

.gmb .gmb-about-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.gmb .gmb-about-social img {
    width: 24px;
    height: 24px;
    display: block;
    transition: opacity 0.25s var(--gmb-ease), transform 0.25s var(--gmb-ease);
}

.gmb .gmb-about-social:hover img {
    opacity: 0.75;
    transform: translateY(-2px);
}

/* Cost guides widget */

.gmb .gmb-featured-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gmb .gmb-featured-item {
    display: flex;
    gap: 14px;
}

.gmb .gmb-featured-item:not(:first-child) {
    padding-top: 24px;
    border-top: 1px solid var(--gmb-line);
}

.gmb .gmb-featured-thumb {
    position: relative;
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border-radius: var(--gmb-radius);
    background-color: var(--gmb-surface-strong);
}

.gmb .gmb-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.3s var(--gmb-ease);
}

.gmb .gmb-featured-item:hover .gmb-featured-image {
    filter: brightness(90%);
}

.gmb .gmb-featured-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.gmb .gmb-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 25px;
    row-gap: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gmb-muted);
}

.gmb .gmb-featured-date {
    position: relative;
}

.gmb .gmb-featured-date::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: var(--gmb-radius-pill);
    background-color: #d4d4d6;
}

.gmb .gmb-featured-title {
    font-family: var(--gmb-heading-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink);
    margin: 0;
    text-transform: none;
}

.gmb .gmb-featured-title a {
    transition: color 0.25s var(--gmb-ease);
}

.gmb .gmb-featured-title a:hover {
    color: var(--gmb-accent);
}

/* Popular repairs widget */

.gmb .gmb-topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gmb .gmb-topic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--gmb-radius-pill);
    background-color: var(--gmb-surface-strong);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: var(--gmb-tight);
    color: var(--gmb-ink-soft);
    transition: background-color 0.3s var(--gmb-ease), color 0.25s var(--gmb-ease);
}

.gmb .gmb-topic:hover {
    background-color: var(--gmb-accent);
    color: #fff;
}

.gmb .gmb-topic-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 4px;
    border-radius: var(--gmb-radius-pill);
    background-color: #fff;
    color: var(--gmb-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

/* CTA widget */

.gmb .gmb-cta-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(252, 100, 100, 0.22) 0%, rgba(252, 100, 100, 0) 60%),
        #1f1f21;
    border-radius: var(--gmb-radius);
    padding: 36px;
}

.gmb .gmb-cta-title {
    font-family: var(--gmb-heading-font);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: var(--gmb-tight);
    color: #fff;
    margin: 0;
}

.gmb .gmb-cta-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    margin: 12px 0 0;
}

.gmb .gmb-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 13px 26px;
    border-radius: var(--gmb-radius-pill);
    background-color: var(--gmb-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: var(--gmb-tight);
    transition: background-color 0.3s var(--gmb-ease), transform 0.2s var(--gmb-ease);
}

.gmb .gmb-cta-btn:hover {
    background-color: var(--gmb-accent-deep);
    transform: translateY(-1px);
}

.gmb .gmb-cta-link {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.62);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    transition: color 0.25s var(--gmb-ease), border-color 0.25s var(--gmb-ease);
}

.gmb .gmb-cta-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .gmb {
        --gmb-sidebar-width: 340px;
    }

    .gmb .gmb-hero-track {
        height: 480px;
    }

    .gmb .gmb-hero-content {
        padding: 44px 64px;
    }

    .gmb .gmb-hero-dots {
        right: 64px;
        bottom: 44px;
    }

    .gmb .gmb-hero-title {
        font-size: 34px;
    }
}

@media (max-width: 1024px) {
    .gmb .gmb-layout {
        flex-direction: column;
        row-gap: 64px;
    }

    .gmb .gmb-sidebar {
        width: 100%;
        flex: 1 1 auto;
        padding-left: 0;
        padding-top: 48px;
        border-top: 1px solid var(--gmb-line);
    }

    .gmb .gmb-featured-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }

    .gmb .gmb-featured-item:nth-child(2) {
        padding-top: 0;
        border-top: none;
    }
}

@media (max-width: 767px) {
    .gmb .gmb-page-header {
        margin: 32px 0 28px;
    }

    .gmb .gmb-page-title {
        font-size: 32px;
    }

    .gmb .gmb-page-excerpt {
        font-size: 16px;
    }

    .gmb .gmb-hero {
        margin-bottom: 44px;
    }

    .gmb .gmb-hero-track {
        height: 420px;
    }

    .gmb .gmb-hero-content {
        padding: 24px;
    }

    .gmb .gmb-hero-meta {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .gmb .gmb-hero-title {
        font-size: 25px;
        line-height: 1.2;
    }

    .gmb .gmb-hero-excerpt {
        font-size: 15px;
        margin-top: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .gmb .gmb-hero-content .gmb-pill {
        margin-top: 16px;
    }

    /* No room for side buttons without pushing the headline into a column —
       swipe and the dots drive the slider on phones. */
    .gmb .gmb-hero-nav {
        display: none;
    }

    .gmb .gmb-hero-dots {
        right: 24px;
        bottom: 24px;
    }

    .gmb .gmb-grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 40px;
    }

    .gmb .gmb-feed {
        gap: 40px;
    }

    .gmb .gmb-card-title {
        font-size: 20px;
    }

    .gmb .gmb-layout {
        row-gap: 48px;
        margin-bottom: 64px;
    }

    .gmb .gmb-featured-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .gmb .gmb-featured-item:nth-child(2) {
        padding-top: 24px;
        border-top: 1px solid var(--gmb-line);
    }

    .gmb .gmb-about,
    .gmb .gmb-cta-box {
        padding: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gmb *,
    .gmb *::before,
    .gmb *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .gmb .gmb-card:hover .gmb-card-image {
        transform: none;
    }
}
