/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,600;0,6..12,700;0,6..12,800;1,6..12,400&display=swap');

/* ── Wrapper ── */
.tvcs-resources-wrap {
    font-family: 'Nunito Sans', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Search ── */
.tvcs-search-wrap {
    margin-bottom: 24px;
}

.tvcs-search-inner {
    position: relative;
    max-width: 540px;
}

.tvcs-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.tvcs-search {
    font-family: 'Nunito Sans', sans-serif;
    width: 100%;
    padding: 13px 46px 13px 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 15px;
    color: #222;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}

.tvcs-search::placeholder {
    color: #aaa;
}

.tvcs-search:focus {
    border-color: #FDC30D;
    box-shadow: 0 0 0 3px rgba(253,195,13,0.3);
}

/* ── No results ── */
.tvcs-no-results {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    padding: 12px 0;
    font-weight: 600;
}

/* ── Accordion ── */
.tvcs-accordion {
    margin-bottom: 20px;
}

/* Accordion header button — looks like a tab */
.tvcs-accordion-btn {
    font-family: 'Nunito Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    background: #fff;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #140ACC;
    text-align: left;
    transition: background 0.2s;
    position: relative;
}

/* Collapsed = fully rounded */
.tvcs-accordion-btn[aria-expanded="false"] {
    border-radius: 8px;
}

.tvcs-accordion-btn:hover {
    background: #f0f0ff;
}

.tvcs-accordion-btn:focus-visible {
    outline: 3px solid #FDC30D;
    outline-offset: 2px;
    border-radius: 8px;
}

.tvcs-acc-title {
    flex: 0 0 auto;
}

.tvcs-acc-count {
    background: #140ACC;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 50px;
    line-height: 1.7;
    min-width: 20px;
    text-align: center;
}

.tvcs-acc-chevron {
    width: 17px;
    height: 17px;
    color: #140ACC;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.tvcs-accordion-btn[aria-expanded="false"] .tvcs-acc-chevron {
    transform: rotate(-90deg);
}

/* ── Accordion body — NO background, transparent ── */
.tvcs-accordion-body {
    background: transparent;
    padding: 16px 0 4px 0;
}

.tvcs-accordion-body[hidden] {
    display: none;
}

/* ── Cards Grid ── */
.tvcs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

/* ── Card ── */
.tvcs-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
}

.tvcs-card:hover {
    border-color: #FDC30D;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateY(-3px);
}

.tvcs-card:focus-within {
    border-color: #FDC30D;
    box-shadow: 0 0 0 3px rgba(253,195,13,0.35);
}

.tvcs-card-body {
    padding: 20px 20px 12px;
    flex: 1;
}

.tvcs-card-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #140ACC;
    margin: 0 0 8px;
    line-height: 1.35;
}

.tvcs-card-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

.tvcs-card-footer {
    padding: 12px 20px 18px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tvcs-card-date {
    font-size: 12.5px;
    color: #999;
    font-weight: 600;
}

.tvcs-card-link {
    font-family: 'Nunito Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: #140ACC;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1.5px;
    transition: color 0.15s;
    width: fit-content;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.tvcs-card-link:hover,
.tvcs-card-link:focus {
    color: #0a068c;
    text-decoration-color: #FDC30D;
}

.tvcs-card-link:focus-visible {
    outline: 3px solid #FDC30D;
    outline-offset: 3px;
    border-radius: 3px;
    text-decoration: none;
}

/* ── File Icons ── */
.tvcs-file-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tvcs-icon-pdf    { stroke: #e53e3e; }
.tvcs-icon-word   { stroke: #2b579a; }
.tvcs-icon-excel  { stroke: #217346; }
.tvcs-icon-ppt    { stroke: #d24726; }

/* ── Search: hidden card / hidden accordion ── */
.tvcs-card--hidden {
    display: none !important;
}

.tvcs-accordion--hidden {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .tvcs-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .tvcs-cards-grid {
        grid-template-columns: 1fr;
    }
    .tvcs-search-inner {
        max-width: 100%;
    }
    .tvcs-accordion-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tvcs-card,
    .tvcs-acc-chevron {
        transition: none;
    }
}

/* ── Search results panel (shown instead of accordions) ── */
.tvcs-search-results {
    display: none;
    margin-bottom: 20px;
}

.tvcs-search-results .tvcs-cards-grid {
    /* same grid, no extra styling needed */
}
