/* =====================================================
   KICKWISE v2 — HOME / ARCHIVE BLOG CARD SYSTEM
   Shared editorial cards + homepage responsive carousel.
===================================================== */

.kw-home-blog-grid,
.kw-home-blog-grid * {
    box-sizing: border-box;
}

.kw-home-blog-grid {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.kw-home-blog-grid__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
    align-items: stretch;
}

.kw-home-blog-grid--carousel .kw-home-blog-grid__items {
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 100%;
    min-width: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform .58s cubic-bezier(.22, .78, .24, 1);
    will-change: transform;
}

.kw-home-blog-grid--carousel .kw-home-blog-card {
    flex: 0 0 calc((100% - 60px) / 3);
}

.kw-home-blog-carousel {
    position: relative;
    margin-inline: -48px;
    padding-inline: 48px;
}

.kw-home-blog-carousel__viewport {
    overflow: hidden;
    padding: 2px 2px 10px;
}

.kw-home-blog-carousel__viewport:focus-visible {
    outline: 2px solid rgba(2,132,199,.36);
    outline-offset: 6px;
    border-radius: 16px;
}

.kw-home-blog-carousel__arrow {
    position: absolute;
    top: 42%;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0,49,114,.09);
    border-radius: 999px;
    background: rgba(255,255,255,.84);
    color: rgba(0,49,114,.68);
    box-shadow: 0 12px 28px rgba(0,49,114,.08);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}

.kw-home-blog-carousel__arrow:hover {
    border-color: rgba(0,49,114,.17);
    background: rgba(255,255,255,.98);
    color: #003172;
    box-shadow: 0 16px 34px rgba(0,49,114,.12);
    transform: translateY(-50%) scale(1.03);
}

.kw-home-blog-carousel__arrow:disabled {
    opacity: .28;
    cursor: default;
    box-shadow: none;
    transform: translateY(-50%);
}

.kw-home-blog-carousel__arrow svg {
    width: 17px;
    height: 17px;
}

.kw-home-blog-carousel__arrow--prev {
    left: 6px;
}

.kw-home-blog-carousel__arrow--next {
    right: 6px;
}

.kw-home-blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.kw-home-blog-card__image {
    position: relative;
    display: block;
    width: 100%;
    height: 250px;
    margin: 0 0 24px !important;
    overflow: hidden;
    border-radius: 0;
    background: #eef4fb;
    box-shadow: 0 12px 28px rgba(0,49,114,.045);
    text-decoration: none !important;
    isolation: isolate;
}

.kw-home-blog-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0,24,54,0) 0%, rgba(0,24,54,.035) 100%);
    pointer-events: none;
}

.kw-home-blog-card__image::before {
    content: "";
    position: absolute;
    top: -45%;
    left: -80%;
    z-index: 3;
    width: 52%;
    height: 190%;
    background: linear-gradient(105deg, transparent 0%, rgba(2,132,199,0) 28%, rgba(2,132,199,.11) 47%, rgba(50,145,133,.09) 55%, rgba(255,255,255,.20) 62%, transparent 78%);
    transform: rotate(18deg);
    opacity: 0;
    pointer-events: none;
}

.kw-home-blog-card__image:hover::before {
    animation: kwHomeBlogImageSweep .9s ease forwards;
}

@keyframes kwHomeBlogImageSweep {
    0% { left: -80%; opacity: 0; }
    18% { opacity: 1; }
    100% { left: 125%; opacity: 0; }
}

.kw-home-blog-card__thumb,
.kw-home-blog-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.kw-home-blog-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(233,243,255,.96), rgba(246,253,250,.96));
}

.kw-home-blog-card__placeholder-mark {
    color: rgba(0,49,114,.82);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1;
}

.kw-home-blog-card__placeholder-label {
    margin-top: 7px;
    color: rgba(0,49,114,.44);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .14em;
    line-height: 1;
    text-transform: uppercase;
}

.kw-home-blog-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.kw-home-blog-card__meta {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 8px !important;
    width: 100% !important;
    min-height: 31px !important;
    margin: 0 0 13px !important;
    color: rgba(17,24,39,.58) !important;
    font-family: "Manrope", "Inter", Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
}

.kw-home-blog-card__category,
.kw-home-blog-card__readmore {
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: start !important;
    min-height: 30px !important;
    padding: 6px 11px !important;
    border: 1px solid rgba(0,49,114,.14) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 10px 26px rgba(0,49,114,.08) !important;
    color: #003172 !important;
    font-family: "Manrope", "Inter", Arial, sans-serif !important;
    font-size: 10.2px !important;
    font-weight: 500 !important;
    letter-spacing: .035em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: box-shadow .25s ease, border-color .25s ease, background .25s ease, color .2s ease !important;
}

.kw-home-blog-card__category::before,
.kw-home-blog-card__readmore::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,.42) 50%, rgba(255,255,255,0) 65%, transparent 100%) !important;
    transform: translateX(-145%) !important;
    transition: transform .72s ease !important;
    pointer-events: none !important;
}

.kw-home-blog-card__category:hover::before,
.kw-home-blog-card__readmore:hover::before {
    transform: translateX(145%) !important;
}

.kw-home-blog-card__category:hover,
.kw-home-blog-card__readmore:hover {
    border-color: rgba(0,49,114,.18) !important;
    background: linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(233,243,255,.92) 62%, rgba(193,255,114,.16) 100%) !important;
    box-shadow: 0 12px 28px rgba(0,49,114,.10) !important;
    color: #003172 !important;
}

.kw-home-blog-card__category > span,
.kw-home-blog-card__readmore > span {
    position: relative;
    z-index: 1;
}

.kw-home-blog-card__date-share {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.kw-home-blog-card__date {
    color: rgba(17,24,39,.58) !important;
    font-family: "Manrope", "Inter", Arial, sans-serif !important;
    font-size: 11.2px !important;
    font-weight: 500 !important;
    letter-spacing: .035em !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    white-space: nowrap;
}

.kw-home-blog-card__title {
    display: -webkit-box;
    min-height: 66px;
    max-height: 66px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #003172;
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.24;
}

.kw-home-blog-card__title a {
    color: inherit;
    text-decoration: none !important;
    transition: color .18s ease;
}

.kw-home-blog-card__title a:hover {
    color: #0284c7;
}

.kw-home-blog-card__excerpt {
    display: -webkit-box;
    min-height: 65px;
    max-height: 65px;
    margin: 0 0 16px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: rgba(17,24,39,.66);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 13.2px;
    font-weight: 450;
    line-height: 1.62;
}

.kw-home-blog-card__footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    padding-bottom: 13px;
    border-top: 1px solid rgba(0,49,114,.065);
}

.kw-home-blog-card__footer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(0,49,114,.08) 0%, rgba(2,132,199,.44) 34%, rgba(50,145,133,.28) 58%, rgba(0,49,114,.08) 100%);
    background-size: 220% 100%;
    background-position: 100% 0;
    transition: background-position .55s ease, opacity .25s ease;
    pointer-events: none;
}

.kw-home-blog-card:hover .kw-home-blog-card__footer::after {
    background-position: 0 0;
}

.kw-home-blog-card__author {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: min(64%, 245px);
    gap: 10px;
    text-decoration: none !important;
}

.kw-home-blog-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef5fb;
    box-shadow: 0 0 0 1px rgba(0,49,114,.05);
}

.kw-home-blog-card__avatar span {
    color: rgba(0,49,114,.72);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.kw-home-blog-card__author-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.kw-home-blog-card__author-name {
    overflow: hidden;
    color: rgba(17,24,39,.78);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kw-home-blog-card__author-email {
    overflow: hidden;
    color: rgba(0,49,114,.48);
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-size: 11px;
    font-weight: 450;
    line-height: 1.1;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kw-home-blog-card__author-email:hover {
    color: #003172;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kw-home-blog-card__readmore {
    min-height: 31px !important;
    padding: 0 11px !important;
    margin-left: auto;
}

.kw-home-blog-pagination {
    margin-top: 34px;
}

.kw-home-blog-pagination nav {
    display: flex;
    justify-content: center;
}

.kw-home-blog-grid__empty {
    border: 1px dashed rgba(15,23,42,.16);
    border-radius: 20px;
    background: #fff;
    padding: 28px;
    color: #667085;
    font-family: "Manrope", "Inter", Arial, sans-serif;
    line-height: 1.65;
}

/* =====================================================
   DARK MODE
===================================================== */

html[data-theme="dark"] .kw-home-blog-card__date,
html[data-theme="dark"] .kw-home-blog-card__meta,
html[data-theme="dark"] .kw-home-blog-card__excerpt,
html[data-theme="dark"] .kw-home-blog-card__author-email {
    color: rgba(218,228,240,.66) !important;
}

html[data-theme="dark"] .kw-home-blog-card__title,
html[data-theme="dark"] .kw-home-blog-card__author-name {
    color: #f3f8ff;
}

html[data-theme="dark"] .kw-home-blog-card__title a {
    color: inherit;
}

html[data-theme="dark"] .kw-home-blog-card__title a:hover {
    color: #83c5ff;
}

html[data-theme="dark"] .kw-home-blog-card__category,
html[data-theme="dark"] .kw-home-blog-card__readmore {
    border-color: rgba(255,255,255,.10) !important;
    background: rgba(255,255,255,.055) !important;
    color: #e8f1fb !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] .kw-home-blog-card__image,
html[data-theme="dark"] .kw-home-blog-card__avatar,
html[data-theme="dark"] .kw-home-blog-grid__empty {
    background: rgba(255,255,255,.06);
}

html[data-theme="dark"] .kw-home-blog-card__placeholder {
    background: linear-gradient(135deg, rgba(25,53,84,.88), rgba(18,39,61,.92));
}

html[data-theme="dark"] .kw-home-blog-card__placeholder-mark,
html[data-theme="dark"] .kw-home-blog-card__placeholder-label,
html[data-theme="dark"] .kw-home-blog-card__avatar span {
    color: rgba(218,228,240,.78);
}

html[data-theme="dark"] .kw-home-blog-card__footer {
    border-top-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .kw-home-blog-carousel__arrow {
    border-color: rgba(255,255,255,.14);
    background: rgba(0,0,0,.78);
    color: rgba(232,241,251,.80);
    box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

html[data-theme="dark"] .kw-home-blog-carousel__arrow:hover {
    border-color: rgba(255,255,255,.22);
    background: rgba(0,0,0,.94);
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(0,0,0,.34);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 980px) {
    .kw-home-blog-grid__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kw-home-blog-grid--carousel .kw-home-blog-card {
        flex-basis: calc((100% - 30px) / 2);
    }
}

@media (max-width: 980px) {
    .kw-home-blog-carousel {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        column-gap: 10px;
        row-gap: 14px;
        margin-inline: -12px;
        padding-inline: 12px;
    }

    .kw-home-blog-carousel__viewport {
        order: 1;
        flex: 0 0 100%;
        width: 100%;
    }

    .kw-home-blog-carousel__arrow {
        position: static;
        order: 2;
        top: auto;
        left: auto;
        right: auto;
        width: 34px;
        height: 34px;
        margin-top: 2px;
        transform: none;
    }

    .kw-home-blog-carousel__arrow:hover,
    .kw-home-blog-carousel__arrow:disabled {
        transform: none;
    }
}

@media (max-width: 640px) {
    .kw-home-blog-grid__items {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .kw-home-blog-grid--carousel .kw-home-blog-grid__items {
        gap: 18px;
    }

    .kw-home-blog-grid--carousel .kw-home-blog-card {
        flex-basis: 100%;
    }

    .kw-home-blog-card__image {
        height: 224px;
        margin-bottom: 20px !important;
    }

    .kw-home-blog-card__meta {
        grid-template-columns: auto minmax(0, 1fr) !important;
        column-gap: 10px !important;
        row-gap: 0 !important;
        align-items: center !important;
    }

    .kw-home-blog-card__date-share {
        justify-self: end;
    }

    .kw-home-blog-card__footer {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }

    .kw-home-blog-card__author {
        max-width: calc(100% - 112px);
    }

    .kw-home-blog-card__readmore {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

html[data-theme="dark"] .kw-home-blog-card__author-email:hover {
    color: #ffffff;
}
