/* ========================================
   DATE & TIME TOPICS - EDUCATIONAL CONTENT
   Purple/Cyan theme matching date-time.css
======================================== */

.dt-topics-section {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 var(--gap-md);
}

.dt-topics-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.dt-topics-header {
    padding: 2rem var(--gap-lg);
    background: linear-gradient(135deg, #581c87 0%, #9333ea 100%);
    color: white;
    text-align: center;
}

.dt-topics-header h2 {
    font-size: 1.375rem;
    font-weight: 800;
    margin: 0 0 0.75rem 0;
}

.dt-topics-header p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #d8b4fe;
    margin: 0;
    max-width: 700px;
    margin-inline: auto;
}

/* Tabs */
.dt-topic-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: #faf5ff;
    border-bottom: 2px solid #c084fc;
}

.dt-topic-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.85rem 0.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    touch-action: manipulation;
}

.dt-topic-tab i {
    font-size: 1rem;
}

.dt-topic-tab:hover {
    color: #6b21a8;
    background: #e9d5ff;
}

.dt-topic-tab.active {
    color: #9333ea;
    border-bottom-color: #9333ea;
    background: white;
}

/* Content */
.dt-topic-content {
    display: none;
    padding: 1.5rem var(--gap-md);
}

.dt-topic-content.active {
    display: block;
}

/* Hero */
.dt-topic-hero {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #faf5ff;
}

.dt-topic-hero h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.dt-topic-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Concept Block */
.dt-concept-block {
    margin-bottom: 2rem;
}

.dt-concept-block h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
}

.dt-concept-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #9333ea;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
}

.dt-concept-block>p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 1rem 0;
}

/* Insight */
.dt-insight {
    display: flex;
    gap: 0.75rem;
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
    border: 2px solid #c084fc;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.75rem 0;
}

.dt-insight i {
    color: #7e22ce;
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.dt-insight span {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #581c87;
}

/* Formula Box */
.dt-formula-box {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
    border: 2px solid #c084fc;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 1rem 0;
    text-align: center;
}

.dt-formula-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: #6b21a8;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.75rem;
}

.dt-formula-break {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dt-formula-break span {
    font-size: 0.75rem;
    color: #581c87;
    font-family: 'Courier New', monospace;
}

/* Equations Table */
.dt-eq-table {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1rem 0;
}

.dt-eq-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.dt-eq-row:last-child {
    border-bottom: none;
}

.dt-eq-row:nth-child(even) {
    background: #faf5ff;
}

.dt-eq-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.dt-eq-note {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Two Column */
.dt-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.dt-info-col {
    background: #faf5ff;
    border: 2px solid #d8b4fe;
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.dt-info-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7e22ce;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.dt-info-col p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 0.5rem 0;
}

/* Comparison Table */
.dt-compare {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1rem 0;
    font-size: 0.75rem;
}

.dt-compare-head {
    display: grid;
    grid-template-columns: 1fr repeat(2, 1fr);
    background: #581c87;
}

.dt-compare-head .dt-compare-cell {
    color: white !important;
    font-weight: 700 !important;
    font-size: 0.65rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dt-compare-row {
    display: grid;
    grid-template-columns: 1fr repeat(2, 1fr);
    border-bottom: 1px solid #f1f5f9;
}

.dt-compare-row:last-child {
    border-bottom: none;
}

.dt-compare-row:nth-child(even) {
    background: #faf5ff;
}

.dt-compare-cell {
    padding: 0.6rem 0.5rem;
    color: #475569;
    font-size: 0.7rem;
    line-height: 1.4;
}

.dt-label-cell {
    font-weight: 700;
    color: #1e293b;
}

/* Code Box */
.dt-code-box {
    background: #1e293b;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.dt-code-box pre {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #d8b4fe;
    line-height: 1.5;
    margin: 0;
    white-space: pre;
}

/* Worked Examples */
.dt-example {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-xl);
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.dt-ex-header {
    background: linear-gradient(135deg, #581c87 0%, #6b21a8 100%);
    padding: 1rem 1.25rem;
}

.dt-ex-badge {
    display: inline-block;
    background: #fbbf24;
    color: #1e293b;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.dt-ex-header h5 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.dt-ex-problem {
    padding: 1.25rem;
    background: #fef2f2;
    border-bottom: 2px solid #fecaca;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #7f1d1d;
}

.dt-ex-solution {
    padding: 1.25rem;
}

.dt-sol-step {
    margin-bottom: 1.25rem;
}

.dt-sol-step:last-child {
    margin-bottom: 0;
}

.dt-sol-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #7e22ce;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e2e8f0;
}

.dt-sol-content {
    padding-left: 0.5rem;
}

.dt-sol-content p {
    font-size: 0.825rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 0.5rem 0;
}

.dt-math {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #1e293b;
    padding: 0.3rem 0;
    line-height: 1.5;
}

.dt-result {
    background: linear-gradient(135deg, #faf5ff, #e9d5ff);
    border: 1px solid #c084fc;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    color: #581c87;
    display: inline-block;
    margin: 0.25rem 0;
}

.dt-ex-answer {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
    border-top: 2px solid #c084fc;
    font-size: 0.825rem;
    line-height: 1.6;
    color: #581c87;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (min-width: 576px) {
    .dt-topic-tabs {
        grid-template-columns: repeat(6, 1fr);
    }

    .dt-topic-tab {
        font-size: 0.6rem;
        padding: 0.75rem 0.25rem;
    }

    .dt-two-col {
        grid-template-columns: 1fr 1fr;
    }

    .dt-topic-content {
        padding: 2rem 1.5rem;
    }

    .dt-topic-hero h3 {
        font-size: 1.375rem;
    }
}

@media (min-width: 768px) {
    .dt-topics-section {
        max-width: 800px;
    }

    .dt-topics-header h2 {
        font-size: 1.5rem;
    }

    .dt-topic-tab {
        font-size: 0.65rem;
        padding: 1rem 0.5rem;
    }

    .dt-topic-tab i {
        font-size: 1.1rem;
    }

    .dt-formula-main {
        font-size: 1.375rem;
    }
}

@media (min-width: 1024px) {
    .dt-topics-section {
        max-width: 900px;
    }

    .dt-topic-content {
        padding: 2rem;
    }
}

@media print {
    .dt-topic-tabs {
        display: none;
    }

    .dt-topic-content {
        display: block !important;
        break-inside: avoid;
    }

    .dt-example {
        break-inside: avoid;
    }
}