/* Knowledge Center — public searchable use-case library.
   Brand: green #2AA466, text #454B54, headings #2c3e50. */

.kc-page {
    background: #f7f9f8;
    min-height: 60vh;
    padding: 0 0 64px;
}

.kc-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Hero + search ---- */
.kc-hero {
    text-align: center;
    padding: 48px 16px 28px;
}
.kc-title {
    color: #2c3e50;
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 10px;
}
.kc-subtitle {
    color: #454B54;
    font-size: 17px;
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.5;
}
.kc-search {
    max-width: 560px;
    margin: 0 auto;
}
.kc-search-input {
    position: relative;
}
.kc-search-input input {
    padding-right: 44px !important;
    background: #fff;
}
.kc-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---- Category chips ---- */
.kc-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 26px 0 34px;
}
.kc-chip {
    border: 1px solid #cdcfd4;
    background: #fff;
    color: #454B54;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.kc-chip:hover {
    border-color: #2AA466;
    color: #2AA466;
}
.kc-chip.active {
    background: #2AA466;
    border-color: #2AA466;
    color: #fff;
}

/* ---- Card grid ---- */
.kc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.kc-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: #fff;
    border: 1px solid #e7eae9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: box-shadow .18s ease, transform .18s ease;
}
.kc-card:hover {
    box-shadow: 0 10px 28px rgba(42, 164, 102, .14);
    transform: translateY(-3px);
    border-color: #d7efe3;
}
.kc-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #e9efed;
}
.kc-card-thumb--placeholder {
    background-image: linear-gradient(135deg, #2AA466 0%, #1f8a55 100%);
}
.kc-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(23, 24, 26, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.kc-card:hover .kc-play {
    background: #2AA466;
}
.kc-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(23, 24, 26, .78);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}
.kc-card-body {
    padding: 16px 18px 20px;
}
.kc-card-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #2AA466;
    margin-bottom: 8px;
}
.kc-card-title {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}
.kc-card-summary {
    color: #454B54;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ---- States ---- */
.kc-state {
    text-align: center;
    color: #454B54;
    padding: 60px 16px;
}
.kc-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #d7efe3;
    border-top-color: #2AA466;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: kc-spin .8s linear infinite;
}
@keyframes kc-spin { to { transform: rotate(360deg); } }

/* ---- Modal (rides on the global .popup-main shell) ---- */
/* 80% of the screen height. Uses % (not vh) on purpose: the .popup-wrapper is a
   fixed full-viewport box, so % is true to the real screen, while the site-wide
   `html { zoom: 0.8 }` (>=1024px) makes vh resolve to only ~64% visually. */
.kc-popup .popup-inner {
    max-width: 940px;
    width: 94vw;
    height: 80%;
    max-height: 80%;
}
/* global .popup-content centers text; the use-case body reads left-aligned */
.kc-popup .popup-content {
    text-align: left;
}
.kc-video-wrap {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}
.kc-video-wrap video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    background: #000;
}

/* Footer: a single centered Close button with breathing room below */
.kc-popup .popup-footer {
    display: flex;
    justify-content: center;
    padding: 6px 20px 26px;
}
.kc-popup .popup-footer .btn {
    min-width: 220px;
    width: auto;
    margin: 0;
    justify-content: center;
}
.kc-popup-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #2AA466;
    margin-bottom: 8px;
}
.kc-popup-summary {
    color: #454B54;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 18px;
}
.kc-steps-heading {
    color: #2c3e50;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 12px;
}
.kc-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: kc-step;
}
.kc-steps li {
    position: relative;
    counter-increment: kc-step;
    padding: 0 0 16px 44px;
    color: #454B54;
    font-size: 15px;
    line-height: 1.55;
}
.kc-steps li::before {
    content: counter(kc-step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2AA466;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kc-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 30px;
    bottom: 4px;
    width: 2px;
    background: #d7efe3;
}

body.kc-popup-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .kc-title { font-size: 30px; }
    .kc-grid { grid-template-columns: 1fr; }
}
