/* ==========================================================================
   Triton Resources Page - Complete CSS Stylesheet
   ========================================================================== */

:root {
    /*     --base-color: #40454D;
    --insights-blue: #2B6EDB;
    --light-grey: #9FA2A6;
    --dark-grey: #30333B;
    --dark-yellow: #7E6B1B;
    --light-yellow: #FFF5D2;
    --base-white: #fff;
    --dark-purple: #330D6B;
    --light-purple: #D0C4E3;
    --primary-dark-blue: #0F2954;
    --light-dark-blue: #CADBF6;
    --light-pink: #F6CDFD;
    --secondary-dark-blue: #1C3354;
    --dim-light-grey: #F5F5F7;
    --black: #30333B;
    --dark-blue-142640: #142640;
    --dark-pink-a329ba: #A329BA; */

    /* Shared chevron/arrow icon — used by .arrow-button and .btn-load-more */
    --arrow-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z'/></svg>");
}

/* 2. Search Input Container */
.triton-resources-wrapper .triton-search-container {
    margin-bottom: 32px;
    position: relative;
}

.triton-resources-wrapper #triton-search-input {
    width: 100%;
    padding: 14px 75px 14px 20px;
    background-color: var(--dark-blue-142640);
    border: 1px solid var(--base-white);
    border-radius: 12px;
    color: var(--base-white);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.triton-resources-wrapper #triton-search-input::placeholder {
    color: var(--base-white);
}

.triton-resources-wrapper #triton-search-input:focus {
    border-color: var(--insights-blue);
}

/* Search Icon - SVG magnifying glass */
.triton-resources-wrapper .triton-search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: var(--base-white);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'><path fill='none' stroke='%23000' stroke-miterlimit='10' stroke-width='32' d='M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z'/><path fill='none' stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32' d='M338.29 338.29 448 448'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg stroke='currentColor' fill='currentColor' stroke-width='0' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'><path fill='none' stroke='%23000' stroke-miterlimit='10' stroke-width='32' d='M221.09 64a157.09 157.09 0 1 0 157.09 157.09A157.1 157.1 0 0 0 221.09 64z'/><path fill='none' stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32' d='M338.29 338.29 448 448'/></svg>") no-repeat center / contain;
    pointer-events: auto;
    cursor: pointer;
    opacity: 1;
    z-index: 10;
}

.triton-resources-wrapper .triton-search-clear-icon {
    display: none;
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: var(--base-white);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%23000' d='M289.94 256l95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%23000' d='M289.94 256l95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z'/></svg>") no-repeat center / contain;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.triton-resources-wrapper .triton-search-clear-icon:hover {
    opacity: 1;
}

/* 3. Filter Bar & Category Pills */
.triton-resources-wrapper .triton-filter-nav-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.triton-resources-wrapper .triton-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 0;
    align-items: stretch;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0;
    flex-grow: 1;
    cursor: grab;
    user-select: none;
}

.triton-resources-wrapper .triton-filter-bar::-webkit-scrollbar {
    display: none;
}

.triton-resources-wrapper .triton-filter-bar.active-drag {
    cursor: grabbing;
}

.triton-resources-wrapper .triton-filter-bar.active-drag .filter-pill {
    cursor: grabbing;
}

.triton-resources-wrapper .triton-filter-nav-controls {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    flex-shrink: 0;
    z-index: 15;
}

.triton-resources-wrapper .triton-filter-scroll-btn {
    display: none;
    background: none;
    border: none;
    color: var(--base-white);
    cursor: pointer;
    padding: 0;
    margin-left: 0;
    align-items: center;
    justify-content: center;
    z-index: 15;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.triton-resources-wrapper .triton-filter-scroll-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.triton-resources-wrapper .triton-filter-scroll-btn svg {
    width: 34px;
    height: 34px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
}

.triton-resources-wrapper .triton-filter-scroll-btn:not(.is-disabled):hover svg {
    opacity: 1;
    transform: scale(1.08);
}

.triton-resources-wrapper .triton-filter-scroll-btn:not(.is-disabled):active svg {
    transform: scale(0.95);
}

.triton-resources-wrapper .filter-pill {
    position: relative;
    background-color: transparent;
    color: var(--base-white);
    padding: 14px 28px;
    cursor: pointer;
    text-transform: uppercase;
    transition: none;
    z-index: 1;
    border: 1px solid var(--secondary-dark-blue);
    border-radius: 21px !important;
    border-bottom-left-radius: 0px !important;
    white-space: nowrap;
}

.triton-resources-wrapper .filter-pill:first-child {
    border-bottom-left-radius: 0px !important;
    background: var(--secondary-dark-blue);
}

.triton-resources-wrapper .filter-pill span {
    position: relative;
    z-index: 5;
}

.triton-resources-wrapper .filter-pill:hover span {
    color: var(--base-white);
}

.triton-resources-wrapper .filter-pill.active {
    background-color: var(--secondary-dark-blue);
    color: var(--base-white);
    z-index: 10;
}

/* Inward rounded corner (fillet) on the RIGHT side of every tab */
.triton-resources-wrapper .filter-pill::after {
    content: "";
    position: absolute;
    bottom: 0px;
    right: -20px;
    width: 20px;
    height: 20px;
    background-color: transparent;
    border-bottom-left-radius: 20px;
    box-shadow: -10px 10px 0 10px var(--secondary-dark-blue);
    pointer-events: none;
    z-index: 1;
}

/* Inactive tabs background overlay */
.triton-resources-wrapper .filter-pill:not(.active)::before {
    content: "";
    position: absolute;
    inset: 0px;
    background-color: var(--dark-blue-142640);
    border-radius: 21px !important;
    z-index: 2;
}

/* For active tabs, ::before acts as the LEFT fillet */
.triton-resources-wrapper .filter-pill.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -20px;
    width: 20px;
    height: 20px;
    background-color: transparent;
    border-bottom-right-radius: 20px;
    box-shadow: 10px 10px 0 10px var(--secondary-dark-blue);
    pointer-events: none;
    z-index: 1;
}

/* Hide outer fillets at the edges of the filter bar */
.triton-resources-wrapper .filter-pill.active:first-child::before {
    display: none !important;
}

/* 4. Grid Layout & Content Card Container */
.triton-resources-wrapper .triton-content-card {
    background-color: var(--secondary-dark-blue);
    border-radius: 12px;
    border-top-left-radius: 0px;
    padding-bottom: 40px;
    transition: opacity 0.2s ease;
}

.triton-resources-wrapper .triton-content-card.first-active {
    border-top-left-radius: 0px !important;
}

.triton-resources-wrapper .triton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background-color: transparent;
    padding: 40px 40px 10px 40px;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1024px) {
    .triton-resources-wrapper .triton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .triton-resources-wrapper .triton-grid {
        grid-template-columns: 1fr;
        padding: 40px 20px 0px 20px;
    }
}

/* 5. Resource Card Styling */
.triton-resources-wrapper .resource-card {
    background-color: var(--dark-blue-142640);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.triton-resources-wrapper .resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Card Image */
.triton-resources-wrapper .card-image {
    width: 100%;
    overflow: hidden;
}

.triton-resources-wrapper .card-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.triton-resources-wrapper .image-placeholder {
    width: 100%;
    height: 200px;
    background-color: var(--dark-blue-142640);
}

/* Card Body */
.triton-resources-wrapper .card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Card Badges / Tags */
.triton-resources-wrapper .card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

/* Card Typography */
.triton-resources-wrapper .card-title {
    color: var(--base-white);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}

.triton-resources-wrapper .card-title a {
    color: var(--base-white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.triton-resources-wrapper .card-title a:hover {
    color: var(--insights-blue);
}

.triton-resources-wrapper .card-excerpt {
    color: #fff;
    margin-bottom: 24px;
}

.triton-resources-wrapper .card-excerpt p {
    margin: 0;
}

.triton-resources-wrapper .card-date {
    color: #fff;
    margin-bottom: 24px;
    font-size: var(--p-12-to-16);
}

/* Action Link Pinned to Bottom */
.triton-resources-wrapper .card-action {
    margin-top: auto;
    padding-top: 4px;
}

/* .triton-resources-wrapper .action-link {
    color: var(--base-white);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.triton-resources-wrapper .action-link:hover {
    color: var(--light-dark-blue);
} */

.triton-resources-wrapper .action-icon {
    stroke: currentColor;
    margin-top: 1px;
}

/* Shared chevron/arrow — used on card action links AND the load-more button */
.triton-resources-wrapper .arrow-button::after,
.triton-resources-wrapper .btn-load-more::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask: var(--arrow-icon) no-repeat center / contain;
    mask: var(--arrow-icon) no-repeat center / contain;
    vertical-align: middle;
    flex-shrink: 0;
}

/* 6. Load More Section */
.triton-resources-wrapper .triton-load-more-wrapper {
    text-align: center;
    margin-top: 20px;
}

.triton-resources-wrapper .btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    width: 177px;
    height: 69px;
    padding: 18.5px 26.5px;
    background-color: transparent;
    color: var(--base-white);
    border: 1px solid var(--base-white);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: center;
    box-sizing: border-box;
}

.triton-resources-wrapper .btn-load-more:hover {
    background-color: var(--insights-blue);
    border: 1px solid var(--insights-blue);
}

.triton-resources-wrapper .btn-load-more:active {
    transform: scale(0.98);
}

/* 7. Empty State / No Results */
.triton-resources-wrapper .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--base-white);
    font-size: 16px;
}

.triton-resources-wrapper .clickable-category-badge {
    cursor: pointer;
}