/* keithdetros v2.3 — Featured In: tabs, carousels, paginated grid */

/* Card */
.kd-fcard{display:flex;flex-direction:column;gap:0.5rem;min-width:0}
.kd-fcard[hidden]{display:none}
.kd-fcard-thumb{position:relative;aspect-ratio:16/9;overflow:hidden;background:#e7e3da;margin-bottom:0.35rem}
.kd-fcard-thumb img{width:100%;height:100%;object-fit:cover}
.kd-fcard-source{font-size:10px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:#8a877f}
.kd-fcard-title{font-family:'Fraunces',Georgia,serif;font-size:17px;line-height:1.3}
.kd-fcard:hover .kd-fcard-title{color:var(--accent,#2d5a3d)}
.kd-fcard-desc{font-size:13px;color:#4a4a46;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.kd-fcard-meta{display:flex;justify-content:space-between;font-size:12px;color:#8a877f;margin-top:auto;padding-top:0.25rem}
.kd-fcard-link{color:var(--accent,#2d5a3d);font-weight:500}
.kd-fcard.is-placeholder .kd-fcard-thumb{background:transparent;border:1px dashed rgba(26,26,26,0.22)}
.kd-fcard.is-placeholder .kd-fcard-title{color:#8a877f;font-style:italic}

/* Play badge */
.is-video::after{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:rgba(245,243,238,0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.6 2.4v5.2l4.2-2.6z' fill='%232d5a3d'/%3E%3C/svg%3E") center/20px no-repeat}
.kd-fcard.is-placeholder .is-video::after{opacity:0.35}

/* Rows and grids */
.kd-fcard-row,.kd-fcard-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.kd-fcard-grid{row-gap:2.75rem}

/* Homepage tabs: pill buttons, filled when active */
.kd-tablist{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:2.25rem}
.kd-tablist [role="tab"]{display:inline-flex;align-items:center;gap:10px;font-family:inherit;font-size:14px;font-weight:500;color:#2d5a3d;background:transparent;border:1px solid rgba(45,90,61,0.35);border-radius:999px;padding:11px 22px;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
.kd-tablist [role="tab"]:hover{background:rgba(45,90,61,0.08);border-color:#2d5a3d}
.kd-tablist [role="tab"][aria-selected="true"]{background:#2d5a3d;border-color:#2d5a3d;color:#f5f3ee}
.kd-tab-count{font-size:11px;font-weight:500;min-width:22px;height:22px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:rgba(45,90,61,0.1);color:#2d5a3d}
.kd-tablist [role="tab"][aria-selected="true"] .kd-tab-count{background:rgba(245,243,238,0.2);color:#f5f3ee}
@media (max-width:600px){.kd-tablist [role="tab"]{font-size:13px;padding:9px 16px}}
.kd-tabpanel-more{display:inline-block;margin-top:1.75rem;font-size:13px;color:var(--accent,#2d5a3d)}
.kd-tabpanel-more:hover{text-decoration:underline}

/* Featured In page */
.kd-fi-jump{display:flex;gap:8px;flex-wrap:wrap;padding-bottom:2rem;border-bottom:1px solid rgba(26,26,26,0.12)}
.kd-fi-jump a{font-size:12px;padding:7px 16px;border:1px solid rgba(26,26,26,0.12);border-radius:20px;color:#4a4a46}
.kd-fi-jump a:hover{border-color:rgba(45,90,61,0.3);color:var(--accent,#2d5a3d)}
.kd-fi-jump span{color:#8a877f;margin-left:4px}
.kd-fi-section{padding-top:3.5rem;scroll-margin-top:1rem}
.kd-fi-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1.5rem}
.kd-fi-section-title{font-family:'Fraunces',Georgia,serif;font-weight:300;font-size:clamp(1.75rem,3vw,2.25rem);line-height:1.1;margin:0}

/* Carousel */
.kd-carousel-nav{display:flex;gap:8px}
.kd-carousel-nav button{width:40px;height:40px;border-radius:50%;border:1px solid rgba(45,90,61,0.3);background:transparent;color:var(--accent,#2d5a3d);font-size:16px;cursor:pointer}
.kd-carousel-nav button:hover:not(:disabled){background:rgba(45,90,61,0.08)}
.kd-carousel-nav button:disabled{opacity:0.3;cursor:default}
[data-kd-carousel].is-static .kd-carousel-nav{visibility:hidden}
.kd-carousel-track{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 4rem) / 3);gap:2rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:4px}
.kd-carousel-track::-webkit-scrollbar{display:none}
.kd-carousel-track > .kd-fcard{scroll-snap-align:start}

/* Pager */
.kd-fi-pager{display:flex;gap:6px;flex-wrap:wrap;margin-top:2.5rem}
.kd-fi-pager button{font-family:inherit;font-size:13px;min-width:38px;height:38px;padding:0 12px;border:1px solid rgba(26,26,26,0.12);background:transparent;color:#4a4a46;border-radius:3px;cursor:pointer}
.kd-fi-pager button:hover{border-color:rgba(45,90,61,0.3);color:var(--accent,#2d5a3d)}
.kd-fi-pager button.active{background:var(--accent,#2d5a3d);border-color:var(--accent,#2d5a3d);color:#f5f3ee}

@media (max-width:900px){
  .kd-fcard-row,.kd-fcard-grid{grid-template-columns:1fr 1fr}
  .kd-carousel-track{grid-auto-columns:calc((100% - 2rem) / 2)}
}
@media (max-width:600px){
  .kd-fcard-row,.kd-fcard-grid{grid-template-columns:1fr}
  .kd-carousel-track{grid-auto-columns:85%}
}
@media (prefers-reduced-motion:reduce){.kd-carousel-track{scroll-behavior:auto}}
