/* Resource Bank section: tabs, resource rows, viewer. */

.resource-bank-content {
    max-width: 960px;
    margin: 0 auto;
}

/* Tabs */
.resource-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 2px solid #d9dbe1;
}

.resource-tabs .nav-link {
    color: var(--tla-ink);
    font-weight: 600;
    white-space: nowrap;
    border: 0;
    border-bottom: 3px solid transparent;
}

.resource-tabs .nav-link:hover {
    border-bottom-color: var(--tla-accent);
}

.resource-tabs .nav-link.active {
    color: var(--tla-ink);
    background: transparent;
    border-bottom-color: var(--tla-accent);
}

.resource-tab-content {
    padding-top: 1.5rem;
}

.topic-description {
    color: var(--tla-muted, #5b6172);
    margin-bottom: 1.5rem;
}

.topic-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tla-ink);
    margin-bottom: 1rem;
}

/* Resource rows */
.resource-row {
    background: #dedede;
    border: 1px solid #444e57;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.75rem;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 0.0625em 0.0625em, rgba(0, 0, 0, 0.25) 0px 0.125em 0.5em, rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.resource-row:hover {
    border-color: var(--tla-accent);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Compact rows (Latest Resources column): same border/background, shorter,
   smaller icon, single ellipsised title line — height sits close to buttons */
.resource-row-compact {
    padding: 0.35rem 0.65rem;
    min-height: 42px;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.resource-row-compact .resource-left {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.55rem !important;
}

.resource-row-compact .resource-right {
    flex: 0 0 auto;
    gap: 0.5rem !important;
}

.resource-row-compact .resource-icon-img {
    height: 24px;
}

.resource-row-compact .resource-title {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.resource-row-compact .resource-open {
    font-size: 0.95rem;
}

.resource-row-compact .resource-classroom {
    font-size: 0.72rem;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
}

.resource-row-compact .resource-classroom-icon {
    height: 14px;
}

.resource-icon-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.resource-title {
    font-weight: 600;
    color: var(--tla-ink);
}

.resource-open {
    color: var(--tla-ink);
    font-weight: 600;
    text-decoration: none;
}

/* Classroom button sits above the stretched-link so it stays clickable */
.resource-classroom {
    position: relative;
    z-index: 2;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000;
    padding:4px;
    text-decoration: none;
    border: 1px solid #000000;
    box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
    border-radius: 5px;
    padding: 0.25rem 0.6rem;
}

.resource-classroom:hover {
    color: #fff;
    background: #487905;
}

.resource-classroom-icon {
    height: 18px;
    width: auto;
    vertical-align: text-bottom;
}

/* Viewer modal */
#resourceViewerBody iframe,
#resourceViewerBody video {
    width: 100%;
    height: 75vh;
    border: 0;
}

#resourceViewerBody audio {
    width: 100%;
}

#resourceViewerBody .resource-viewer-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
}

/* --- CMS section layout: messages, videos, latest resources --- */

/* Message blocks (rich text) */
.section-message {
    background: #fff;
    border: 1px solid #d9dbe1;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--tla-ink);
}

.section-message :last-child {
    margin-bottom: 0;
}

.section-message img {
    max-width: 100%;
    height: auto;
}

.section-message iframe {
    max-width: 100%;
}

/* Main row keeps its own spacing regardless of the centred content width */
.section-main-row {
    margin-bottom: 1.5rem;
}

/* Videos (col-md-8): one large player, or a capped multi grid */
.section-video {
    margin: 0;
}

.section-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid #444e57;
    border-radius: 10px;
    overflow: hidden;
}

.section-video-frame iframe,
.section-video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.section-video-title {
    margin: 0.5rem 0 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tla-ink);
}

/* Multiple videos must not grow too tall */
.section-videos-multi .section-video-frame {
    aspect-ratio: auto;
    height: 25vh;
    max-height: 25vh;
}

/* Audio in the video slot: centre the player with generous side space */
.section-audio-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 1.75rem 2.5rem;
    background: #eceef3;
    border: 1px solid #444e57;
    border-radius: 10px;
}

.section-audio-frame audio {
    width: 100%;
    max-width: 420px;
}

.section-videos-multi .section-audio-frame {
    min-height: 25vh;
    max-height: 25vh;
}

/* Empty video slot: a gamified "section at a glance" card */
.section-video-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    height: 100%;
    min-height: 240px;
    padding: 1.5rem;
    text-align: center;
    background: #fff;
    border: 1px dashed #b9bdc9;
    border-radius: 12px;
}

.section-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.section-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 5.5rem;
}

.section-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    color: #fff;
    background: var(--tla-accent, #d4a017);
    border-radius: 50%;
    box-shadow: rgba(0, 0, 0, 0.18) 0px 3px 8px;
}

.section-stat-value {
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--tla-ink, #2c3e50);
}

.section-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tla-muted, #5b6172);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-stats-hint {
    margin: 0;
    font-size: 0.95rem;
    color: var(--tla-muted, #5b6172);
}

.section-stats-hint i {
    color: var(--tla-accent, #d4a017);
}

/* Latest resources (col-md-4) */
.section-latest-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0 1rem;
    color: var(--tla-ink);
}

.see-more-resources {
    margin-top: 0.25rem;
}

/* Full "Section Resources" page */
.section-resources-heading {
    font-weight: 700;
    color: var(--tla-ink);
}

.resource-tabs .topic-count {
    margin-left: 0.35rem;
}

.topic-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--tla-accent, #d4a017);
    border-radius: 999px;
}
