/* ============================================
   Multi-SIM Detection — GitHub Pages Styles
   ============================================ */

:root {
    --blue: #0c5adb;
    --blue-dark: #0944b0;
    --blue-light: #e8f0fe;
    --text: #1a1a2e;
    --text-light: #555;
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --border: #e0e6f0;
    --code-bg: #1e2235;
    --code-text: #e8eaf6;
    --insight-bg: #f0f4ff;
    --insight-border: #0c5adb;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(12, 90, 219, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.75;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, #0c5adb 0%, #0944b0 100%);
    color: white;
    padding: 80px 0 64px;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    max-width: 720px;
    margin: 0 auto 20px;
    line-height: 1.3;
}

.hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 620px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn.primary {
    background: white;
    color: var(--blue);
}

.btn.primary:hover {
    background: #f0f4ff;
}

.btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn.secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ============ SECTIONS ============ */
.section {
    padding: 64px 0;
}

.section.alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
}

.section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--blue);
}

.section p {
    margin-bottom: 16px;
    color: var(--text);
}

/* ============ SECTION IMAGE ============ */
.section-image {
    width: 100%;
    max-width: 780px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 24px 0;
    display: block;
    border: 1px solid var(--border);
}

/* ============ CODE BLOCKS ============ */
pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 20px 0;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
}

/* ============ APPROACH COMPARE ============ */
.approach-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 620px) {
    .approach-compare {
        grid-template-columns: 1fr;
    }
}

.approach-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.approach-box h4 {
    color: var(--blue);
    margin-bottom: 10px;
}

/* ============ TRANSFORM GRID ============ */
.transform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

@media (max-width: 620px) {
    .transform-grid {
        grid-template-columns: 1fr;
    }
}

.transform-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.transform-card h4 {
    font-size: 1.05rem;
    color: var(--blue);
    margin-bottom: 6px;
}

.transform-card .example {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ============ DOMAIN GRID ============ */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 24px 0;
}

@media (max-width: 620px) {
    .domain-grid {
        grid-template-columns: 1fr;
    }
}

.domain-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.domain-card .domain-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.domain-card h4 {
    color: var(--blue);
    margin-bottom: 10px;
}

.domain-card ul {
    list-style: disc;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.domain-card ul li {
    margin-bottom: 5px;
}

/* ============ LOOP DIAGRAM ============ */
.loop-diagram {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--blue-light);
    border-radius: var(--radius);
}

.loop-step {
    background: var(--blue);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.loop-arrow {
    color: var(--blue);
    font-size: 1.3rem;
    font-weight: bold;
}

/* ============ PIPELINE STEPS ============ */
.pipeline-steps {
    counter-reset: step;
    margin: 24px 0;
}

.pipeline-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.pipeline-step:last-child {
    border-bottom: none;
}

.pipeline-step .step-num {
    background: var(--blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pipeline-step .step-content strong {
    display: block;
    margin-bottom: 4px;
}

.pipeline-step .step-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ============ CLEAN LIST ============ */
.clean-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.clean-list li {
    padding: 9px 0 9px 22px;
    position: relative;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.clean-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: bold;
}

/* ============ INSIGHT BOX ============ */
.insight-box {
    background: var(--insight-bg);
    border-left: 4px solid var(--insight-border);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 28px 0;
}

.insight-box p {
    margin: 0;
    font-style: italic;
    color: var(--text);
}

/* ============ PHASE BADGE ============ */
.phase-badge {
    display: inline-block;
    background: var(--blue);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
}

/* ============ DETAILS / SUMMARY ============ */
details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--blue);
    font-size: 1.05rem;
    padding: 6px 0;
}

details pre {
    margin-top: 16px;
}

/* ============ FOOTER ============ */
footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 36px 0;
    font-size: 0.9rem;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 620px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .section {
        padding: 44px 0;
    }

    .section h2 {
        font-size: 1.4rem;
    }
}
