/* ==========================================================================
   NB-IoT Offline Camera — Page-Specific Styles
   Builds on top of ../../css/hub.css (shared parent stylesheet)
   ========================================================================== */

/* ---------- Page Layout ---------- */
.nbiot-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* ==========================================================================
   Stat Grid (4-col → 2-col responsive)
   ========================================================================== */
.nbiot-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.nbiot-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    text-align: center;
}

.nbiot-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.nbiot-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
    font-weight: 600;
}

.nbiot-stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Coloured top border per stat */
.nbiot-stat[data-color="blue"]   { border-top: 3px solid #3b82f6; }
.nbiot-stat[data-color="green"]  { border-top: 3px solid #22c55e; }
.nbiot-stat[data-color="amber"]  { border-top: 3px solid #f59e0b; }
.nbiot-stat[data-color="purple"] { border-top: 3px solid #8b5cf6; }

@media (max-width: 900px) {
    .nbiot-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Section Headings
   ========================================================================== */
.nbiot-section {
    margin-bottom: 40px;
}

.nbiot-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* ==========================================================================
   Hardware / Software Cards (2-col)
   ========================================================================== */
.nbiot-hw-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.nbiot-hw-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.nbiot-hw-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nbiot-hw-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nbiot-hw-list li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.nbiot-hw-list li:last-child {
    border-bottom: none;
}

.nbiot-hw-list li strong {
    color: #1e293b;
}

@media (max-width: 700px) {
    .nbiot-hw-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   System Variants Grid (3-col → 1-col responsive)
   ========================================================================== */
.nbiot-variant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .nbiot-variant-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Daily Cycle Pipeline
   ========================================================================== */
.nbiot-pipeline {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 8px;
    overflow-x: auto;
}

.nbiot-pipe-step {
    flex: 1;
    min-width: 130px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    position: relative;
}

.nbiot-pipe-step + .nbiot-pipe-step {
    margin-left: 28px;
}

.nbiot-pipe-step + .nbiot-pipe-step::before {
    content: "\2192";
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
    font-weight: 300;
}

.nbiot-pipe-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.nbiot-pipe-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nbiot-pipe-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .nbiot-pipeline {
        flex-direction: column;
    }

    .nbiot-pipe-step + .nbiot-pipe-step {
        margin-left: 0;
        margin-top: 20px;
    }

    .nbiot-pipe-step + .nbiot-pipe-step::before {
        content: "\2193";
        left: 50%;
        top: -18px;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Key Links Grid (2-col)
   ========================================================================== */
.nbiot-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.nbiot-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.nbiot-link-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
    text-decoration: none;
    color: inherit;
}

.nbiot-link-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nbiot-link-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.nbiot-link-desc {
    font-size: 0.78rem;
    color: #64748b;
}

@media (max-width: 600px) {
    .nbiot-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Dark Mode Overrides
   ========================================================================== */
[data-theme="dark"] .nbiot-stat,
[data-theme="dark"] .nbiot-hw-card,
[data-theme="dark"] .nbiot-pipe-step,
[data-theme="dark"] .nbiot-link-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .nbiot-stat-value,
[data-theme="dark"] .nbiot-section-title,
[data-theme="dark"] .nbiot-hw-title,
[data-theme="dark"] .nbiot-pipe-label,
[data-theme="dark"] .nbiot-link-title {
    color: #e2e8f0;
}

[data-theme="dark"] .nbiot-stat-label,
[data-theme="dark"] .nbiot-pipe-sub,
[data-theme="dark"] .nbiot-link-desc {
    color: #94a3b8;
}

[data-theme="dark"] .nbiot-hw-list li {
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .nbiot-hw-list li strong {
    color: #e2e8f0;
}

[data-theme="dark"] .nbiot-section-title {
    border-color: #334155;
}

[data-theme="dark"] .nbiot-link-icon {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .nbiot-pipe-step + .nbiot-pipe-step::before {
    color: #475569;
}

[data-theme="dark"] .nbiot-stat-sub {
    color: #64748b;
}
