/*
 * IntelQI LMS — Enterprise Learning Platform
 * Bento Grid Section Styles
 *
 * Copyright © 2025 Euclideum Solutions Private Limited.
 */

/* ============================================
   Bento Section Base
   ============================================ */
.bento-section {
    padding: 24px 20px;
    background-color: #f8fafc;
}

[data-theme="dark"] .bento-section {
    background-color: #0c1222;
}

@media (min-width: 768px) {
    .bento-section {
        padding: 28px 24px;
    }
}

@media (min-width: 1024px) {
    .bento-section {
        padding: 32px 24px;
    }
}

@media (min-width: 1400px) {
    .bento-section {
        padding: 32px 40px;
    }
}

.bento-container {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 1400px) {
    .bento-container {
        max-width: 1336px;
    }
}

/* ============================================
   Bento Grid - 3-Column Layout
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: 280px 1fr 260px;
        gap: 16px;
        height: auto;
    }
}

@media (min-width: 1200px) {
    .bento-grid {
        grid-template-columns: 300px 1fr 280px;
        gap: 18px;
    }
}

@media (min-width: 1400px) {
    .bento-grid {
        grid-template-columns: 320px 1fr 300px;
        gap: 20px;
    }
}

/* ============================================
   Center Column Container
   ============================================ */
.bento-center-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .bento-center-column {
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    .bento-center-column {
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .bento-center-column {
        gap: 18px;
    }
}

@media (min-width: 1400px) {
    .bento-center-column {
        gap: 20px;
    }
}

/* ============================================
   Right Column Container
   ============================================ */
.bento-right-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 768px) {
    .bento-right-column {
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    .bento-right-column {
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .bento-right-column {
        gap: 18px;
    }
}

@media (min-width: 1400px) {
    .bento-right-column {
        gap: 20px;
    }
}

/* ============================================
   Bento Card Base
   ============================================ */
.bento-card {
    background-color: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .bento-card {
    background-color: #111a2e;
}

@media (min-width: 768px) {
    .bento-card {
        border-radius: 20px;
    }
}

@media (min-width: 1024px) {
    .bento-card {
        border-radius: 24px;
    }
}

/* ============================================
   Card 1: Learning Path (Left Column - Full Height)
   ============================================ */
.bento-card--learning {
    display: flex;
    flex-direction: column;
}

.bento-card--learning .bento-card-content {
    padding: 16px;
}

@media (min-width: 768px) {
    .bento-card--learning .bento-card-content {
        padding: 18px;
    }
}

@media (min-width: 1024px) {
    .bento-card--learning .bento-card-content {
        padding: 20px;
    }
}

.bento-card--learning .bento-card-image {
    flex: 1;
    min-height: 120px;
    padding: 0 16px 16px 16px;
    display: flex;
}

@media (min-width: 768px) {
    .bento-card--learning .bento-card-image {
        padding: 0 18px 18px 18px;
        min-height: 140px;
    }
}

@media (min-width: 1024px) {
    .bento-card--learning .bento-card-image {
        min-height: 0;
        padding: 0 20px 20px 20px;
    }
}

.bento-card--learning .bento-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    flex: 1;
}

@media (min-width: 768px) {
    .bento-card--learning .bento-card-image img {
        border-radius: 14px;
    }
}

/* ============================================
   Card 2: Hero Image (Center Top)
   ============================================ */
.bento-card--hero-image {
    min-height: 180px;
    padding: 0;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .bento-card--hero-image {
        flex: none;
        min-height: 0;
        height: 320px;
    }
}

@media (min-width: 1200px) {
    .bento-card--hero-image {
        height: 350px;
    }
}

@media (min-width: 1400px) {
    .bento-card--hero-image {
        height: 380px;
    }
}

.bento-card--hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Card 3: 70% Stat (Right Top) - Brand Dark Blue
   ============================================ */
.bento-card--stat-dark {
    background: linear-gradient(145deg, #1e3a5f 0%, #0f172a 100%);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .bento-card--stat-dark {
    background: linear-gradient(145deg, #1c3a5a 0%, #0c1322 100%);
    border: 1px solid #1e3a5f;
}

@media (min-width: 768px) {
    .bento-card--stat-dark {
        padding: 18px;
    }
}

@media (min-width: 1024px) {
    .bento-card--stat-dark {
        flex: 0 0 auto;
        min-height: 0;
        padding: 20px;
    }
}

/* Dotted pattern */
.bento-card--stat-dark::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
}

.bento-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #4ade80;
    align-self: flex-end;
}

@media (min-width: 768px) {
    .bento-stat-badge {
        font-size: 12px;
    }
}

.bento-stat-badge::after {
    content: '↗';
    font-size: 14px;
    font-weight: 700;
    color: #4ade80;
    line-height: 1;
}

.bento-stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .bento-stat-number {
        font-size: 54px;
    }
}

@media (min-width: 1200px) {
    .bento-stat-number {
        font-size: 62px;
    }
}

.bento-stat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bento-stat-label {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .bento-stat-label {
        font-size: 13px;
    }
}

.bento-stat-icon {
    width: 36px;
    height: 36px;
    background: #e8f4fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #154f95;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .bento-stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
}

.bento-stat-icon svg {
    width: 18px;
    height: 18px;
}

@media (min-width: 768px) {
    .bento-stat-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   Center Bottom Row Container
   ============================================ */
.bento-center-bottom {
    display: contents;
}

@media (min-width: 1024px) {
    .bento-center-bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        flex: 0 0 auto;
    }
}

@media (min-width: 1200px) {
    .bento-center-bottom {
        gap: 18px;
    }
}

@media (min-width: 1400px) {
    .bento-center-bottom {
        gap: 20px;
    }
}

/* ============================================
   Card 4: Collaborative (Center Bottom Left)
   ============================================ */
.bento-card--collaborative {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .bento-card--collaborative {
        padding: 18px;
    }
}

@media (min-width: 1024px) {
    .bento-card--collaborative {
        padding: 18px;
    }
}

.bento-card--collaborative .bento-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

@media (min-width: 768px) {
    .bento-card--collaborative .bento-card-footer {
        padding-top: 16px;
    }
}

.bento-card-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.bento-card-stat-number {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .bento-card-stat-number {
    color: #f1f5f9;
}

@media (min-width: 768px) {
    .bento-card-stat-number {
        font-size: 28px;
    }
}

.bento-card-stat-text {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

[data-theme="dark"] .bento-card-stat-text {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .bento-card-stat-text {
        font-size: 13px;
    }
}

.bento-card-arrow {
    width: 38px;
    height: 38px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

[data-theme="dark"] .bento-card-arrow {
    background-color: #334155;
    border-color: #334155;
    color: #f1f5f9;
}

@media (min-width: 768px) {
    .bento-card-arrow {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
}

.bento-card-arrow svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .bento-card-arrow svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   Card 5: Stats Grid (Center Bottom Right) - Brand Dark Blue
   ============================================ */
.bento-card--stats-grid {
    background: linear-gradient(145deg, #1e3a5f 0%, #0f172a 100%);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="dark"] .bento-card--stats-grid {
    background: linear-gradient(145deg, #1c3a5a 0%, #0c1322 100%);
    border: 1px solid #1e3a5f;
}

@media (min-width: 768px) {
    .bento-card--stats-grid {
        padding: 14px;
        gap: 12px;
    }
}

.bento-stats-item {
    border-radius: 14px;
    padding: 14px;
    flex: 1;
}

@media (min-width: 768px) {
    .bento-stats-item {
        padding: 16px;
        border-radius: 16px;
    }
}

/* Dark stat item (40%) */
.bento-stats-item--dark {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* White stat item (80%) */
.bento-stats-item--white {
    background-color: #ffffff;
    border: 2px solid #0f172a;
}

[data-theme="dark"] .bento-stats-item--white {
    background-color: #111a2e;
    border-color: #f1f5f9;
}

.bento-stats-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bento-stats-item-icon {
    width: 32px;
    height: 32px;
    background: #e8f4fc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #154f95;
}

[data-theme="dark"] .bento-stats-item-icon {
    background: rgba(50, 148, 227, 0.15);
    color: #60a5fa;
}

@media (min-width: 768px) {
    .bento-stats-item-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
}

.bento-stats-item-icon svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .bento-stats-item-icon svg {
        width: 18px;
        height: 18px;
    }
}

.bento-stats-item-icon--green {
    background: #e8f4fc;
    color: #154f95;
}

[data-theme="dark"] .bento-stats-item-icon--green {
    background: rgba(50, 148, 227, 0.15);
    color: #60a5fa;
}

.bento-stats-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #4ade80;
}

@media (min-width: 768px) {
    .bento-stats-item-badge {
        font-size: 12px;
    }
}

.bento-stats-item-badge::after {
    content: '↗';
    font-size: 13px;
    font-weight: 700;
    color: #4ade80;
    line-height: 1;
}

/* Green badge variant for white card */
.bento-stats-item-badge--green {
    color: #16a34a;
}

.bento-stats-item-badge--green::after {
    color: #22c55e;
}

[data-theme="dark"] .bento-stats-item--white .bento-stats-item-badge--green {
    color: #4ade80;
}

.bento-stats-item-number {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .bento-stats-item-number {
        font-size: 32px;
    }
}

/* Dark number for white card */
.bento-stats-item--white .bento-stats-item-number {
    color: #0f172a;
}

[data-theme="dark"] .bento-stats-item--white .bento-stats-item-number {
    color: #f1f5f9;
}

.bento-stats-item-label {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 3px;
}

@media (min-width: 768px) {
    .bento-stats-item-label {
        font-size: 12px;
    }
}

/* Dark label for white card */
.bento-stats-item--white .bento-stats-item-label {
    color: #64748b;
}

[data-theme="dark"] .bento-stats-item--white .bento-stats-item-label {
    color: #94a3b8;
}

/* ============================================
   Card 6: Analytics (Right Bottom)
   ============================================ */
.bento-card--analytics {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .bento-card--analytics {
        flex: 1;
    }
}

.bento-card--analytics .bento-card-content {
    padding: 16px;
}

@media (min-width: 768px) {
    .bento-card--analytics .bento-card-content {
        padding: 18px;
    }
}

@media (min-width: 1024px) {
    .bento-card--analytics .bento-card-content {
        padding: 18px;
    }
}

.bento-card--analytics .bento-card-image {
    flex: 1;
    min-height: 80px;
    padding: 0 16px 16px 16px;
    display: flex;
}

@media (min-width: 768px) {
    .bento-card--analytics .bento-card-image {
        padding: 0 18px 18px 18px;
        min-height: 100px;
    }
}

@media (min-width: 1024px) {
    .bento-card--analytics .bento-card-image {
        min-height: 0;
        padding: 0 20px 20px 20px;
    }
}

.bento-card--analytics .bento-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    flex: 1;
}

@media (min-width: 768px) {
    .bento-card--analytics .bento-card-image img {
        border-radius: 14px;
    }
}

/* ============================================
   Shared Card Elements
   ============================================ */
.bento-label {
    display: inline-block;
    width: fit-content;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

@media (min-width: 768px) {
    .bento-label {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 14px;
    }
}

.bento-label--green,
.bento-label--blue,
.bento-label--orange {
    background-color: #e8f4fc;
    color: #154f95;
    border: 1px solid #c7e4f7;
}

[data-theme="dark"] .bento-label--green,
[data-theme="dark"] .bento-label--blue,
[data-theme="dark"] .bento-label--orange {
    background-color: rgba(50, 148, 227, 0.15);
    color: #60a5fa;
    border-color: rgba(50, 148, 227, 0.3);
}

.bento-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

[data-theme="dark"] .bento-card-title {
    color: #f1f5f9;
}

@media (min-width: 768px) {
    .bento-card-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
}

@media (min-width: 1200px) {
    .bento-card-title {
        font-size: 22px;
    }
}

.bento-card-description {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
}

[data-theme="dark"] .bento-card-description {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .bento-card-description {
        font-size: 14px;
        line-height: 1.55;
    }
}
