/* ══════════════════════════════════════════════
   Thunderbird 100 Million Learners — Styles
   Cintana IT-OPS · v1.0.0
   ══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
    --tbc-gold:       #FFB310;
    --tbc-gold-dark:  #C8880A;
    --tbc-maroon:     #8C1D40;
    --tbc-navy:       #1A2B4A;
    --tbc-navy-light: #2D4270;
    --tbc-bg:         #F7F8FC;
    --tbc-surface:    #FFFFFF;
    --tbc-text:       #1C1F2E;
    --tbc-muted:      #6B7280;
    --tbc-border:     #E2E6EF;
    --tbc-radius:     12px;
    --tbc-radius-sm:  6px;
    --tbc-shadow:     0 2px 12px rgba(26,43,74,0.09);
    --tbc-shadow-hover: 0 8px 28px rgba(26,43,74,0.18);
    --tbc-transition: 0.22s cubic-bezier(0.4,0,0.2,1);
    --tbc-font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── RESET SCOPE ── */
.tbc-app *, .tbc-modal * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── APP WRAPPER ── */
.tbc-app {
    font-family: var(--tbc-font);
    color: var(--tbc-text);
    background: var(--tbc-bg);
    min-height: 400px;
    padding-bottom: 48px;
}

/* ── HEADER ── */
.tbc-header {
    background: linear-gradient(135deg, var(--tbc-navy) 0%, var(--tbc-navy-light) 60%, var(--tbc-maroon) 100%);
    padding: 48px 24px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tbc-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.tbc-header-inner { position: relative; z-index: 1; }

.tbc-badge {
    display: inline-block;
    background: var(--tbc-gold);
    color: var(--tbc-navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.tbc-title {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.tbc-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.02em;
}

/* ── CONTROLS ── */
.tbc-controls {
    background: var(--tbc-surface);
    border-bottom: 1px solid var(--tbc-border);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(26,43,74,0.06);
}

.tbc-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.tbc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tbc-muted);
    font-size: 16px;
    pointer-events: none;
}

.tbc-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--tbc-border);
    border-radius: var(--tbc-radius-sm);
    font-size: 14px;
    font-family: var(--tbc-font);
    color: var(--tbc-text);
    background: var(--tbc-bg);
    transition: border-color var(--tbc-transition), box-shadow var(--tbc-transition);
    outline: none;
}

.tbc-search-input:focus {
    border-color: var(--tbc-gold);
    box-shadow: 0 0 0 3px rgba(255,179,16,0.18);
}

.tbc-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.tbc-select {
    padding: 10px 32px 10px 12px;
    border: 1.5px solid var(--tbc-border);
    border-radius: var(--tbc-radius-sm);
    font-size: 13px;
    font-family: var(--tbc-font);
    color: var(--tbc-text);
    background: var(--tbc-bg);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color var(--tbc-transition);
    outline: none;
}

.tbc-select:focus { border-color: var(--tbc-gold); }

.tbc-btn-reset {
    padding: 9px 16px;
    background: transparent;
    border: 1.5px solid var(--tbc-border);
    border-radius: var(--tbc-radius-sm);
    font-size: 13px;
    font-family: var(--tbc-font);
    color: var(--tbc-muted);
    cursor: pointer;
    transition: all var(--tbc-transition);
}

.tbc-btn-reset:hover {
    border-color: var(--tbc-maroon);
    color: var(--tbc-maroon);
}

.tbc-results-count {
    font-size: 13px;
    color: var(--tbc-muted);
    white-space: nowrap;
    margin-left: auto;
}

.tbc-results-count span {
    font-weight: 700;
    color: var(--tbc-navy);
}

/* ── GRID ── */
.tbc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 32px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

/* ── CARD ── */
.tbc-card {
    background: var(--tbc-surface);
    border-radius: var(--tbc-radius);
    box-shadow: var(--tbc-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--tbc-transition), box-shadow var(--tbc-transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tbc-border);
}

.tbc-card:hover, .tbc-card:focus {
    transform: translateY(-4px);
    box-shadow: var(--tbc-shadow-hover);
    outline: none;
    border-color: var(--tbc-gold);
}

.tbc-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tbc-navy) 0%, var(--tbc-navy-light) 100%);
}

.tbc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--tbc-transition);
}

.tbc-card:hover .tbc-card-image img {
    transform: scale(1.04);
}

.tbc-card-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbc-card-placeholder-icon {
    font-size: 48px;
    opacity: 0.3;
}

.tbc-card-pathway {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--tbc-gold);
    color: var(--tbc-navy);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}

.tbc-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbc-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tbc-navy);
    line-height: 1.35;
}

.tbc-card-desc {
    font-size: 13px;
    color: var(--tbc-muted);
    line-height: 1.6;
    flex: 1;
}

.tbc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--tbc-border);
    margin-top: auto;
}

.tbc-card-curators {
    font-size: 12px;
    color: var(--tbc-muted);
}

.tbc-card-cta {
    font-size: 12px;
    font-weight: 700;
    color: var(--tbc-gold-dark);
    letter-spacing: 0.03em;
}

/* ── EMPTY STATE ── */
.tbc-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--tbc-muted);
}

.tbc-empty-icon { font-size: 48px; margin-bottom: 16px; }
.tbc-empty p    { font-size: 16px; margin-bottom: 20px; }

.tbc-btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--tbc-navy);
    color: #fff;
    border: none;
    border-radius: var(--tbc-radius-sm);
    font-size: 14px;
    font-family: var(--tbc-font);
    cursor: pointer;
    transition: background var(--tbc-transition);
}

.tbc-btn-secondary:hover { background: var(--tbc-navy-light); }

/* ── ERROR ── */
.tbc-error {
    background: #FFF5F5;
    border: 1px solid #FCA5A5;
    border-radius: var(--tbc-radius-sm);
    padding: 20px;
    margin: 24px;
    color: #991B1B;
    font-size: 14px;
}

/* ── MODAL OVERLAY ── */
.tbc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.72);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: tbc-fadeIn 0.2s ease;
}

@keyframes tbc-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── MODAL BOX ── */
.tbc-modal {
    background: var(--tbc-surface);
    border-radius: var(--tbc-radius);
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: tbc-slideUp 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}

@keyframes tbc-slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.tbc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--tbc-bg);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--tbc-muted);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--tbc-transition), color var(--tbc-transition);
}

.tbc-modal-close:hover {
    background: var(--tbc-maroon);
    color: #fff;
}

/* ── MODAL CONTENT ── */
.tbc-modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--tbc-radius) var(--tbc-radius) 0 0;
    display: block;
}

.tbc-modal-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--tbc-navy), var(--tbc-navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    border-radius: var(--tbc-radius) var(--tbc-radius) 0 0;
}

.tbc-modal-content {
    padding: 28px 32px 36px;
}

.tbc-modal-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tbc-modal-pathway {
    display: inline-block;
    background: var(--tbc-gold);
    color: var(--tbc-navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 20px;
}

.tbc-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--tbc-navy);
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.tbc-modal-desc {
    font-size: 14px;
    color: var(--tbc-muted);
    line-height: 1.75;
    margin-bottom: 24px;
}

.tbc-modal-section {
    margin-bottom: 24px;
}

.tbc-modal-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tbc-muted);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tbc-border);
}

/* ── CURATORS ── */
.tbc-curators-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tbc-curator-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbc-curator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tbc-navy), var(--tbc-navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.tbc-curator-info { flex: 1; }

.tbc-curator-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tbc-navy);
}

.tbc-curator-link {
    font-size: 12px;
    color: var(--tbc-gold-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tbc-curator-link:hover { text-decoration: underline; }

/* ── LANGUAGES TAGS ── */
.tbc-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tbc-lang-tag {
    background: var(--tbc-bg);
    border: 1px solid var(--tbc-border);
    border-radius: 20px;
    font-size: 11px;
    color: var(--tbc-muted);
    padding: 3px 10px;
}

/* ── CTA BUTTON ── */
.tbc-modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--tbc-navy);
    color: #fff;
    text-decoration: none;
    border-radius: var(--tbc-radius-sm);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background var(--tbc-transition), transform var(--tbc-transition);
    border: none;
    cursor: pointer;
}

.tbc-modal-cta:hover {
    background: var(--tbc-maroon);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .tbc-controls { padding: 14px 16px; gap: 10px; }
    .tbc-grid     { grid-template-columns: 1fr; padding: 20px 16px; gap: 16px; }
    .tbc-header   { padding: 32px 16px 28px; }
    .tbc-modal-content { padding: 20px 20px 28px; }
    .tbc-results-count { display: none; }
}
