/* ============================================================
   Docs (Tutorial) Page Styles
   Applies on top of main.css
   ============================================================ */

/* === Docs Hero === */
.docs-hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0a192f 60%, #112240 100%);
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
}
.docs-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 104, 160, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.docs-hero-label {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7899b8;
    margin-bottom: 20px;
    font-weight: 400;
}
.docs-hero-title {
    font-size: 52px;
    font-weight: 100;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}
.docs-hero-desc {
    font-size: 16px;
    color: #a0b4c8;
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 300;
}
.docs-hero-platforms {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.docs-hero-platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.05);
}
.docs-hero-platform-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}
.docs-hero-platform-btn i { font-size: 15px; }

/* === Sticky Platform Tabs === */
.docs-tabs-wrapper {
    position: sticky;
    top: var(--header-height);
    z-index: 800;
    background: #fff;
    border-bottom: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.docs-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.docs-tabs::-webkit-scrollbar { display: none; }
.docs-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    height: 52px;
    font-size: 14px;
    color: var(--text-gray);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    font-weight: 400;
}
.docs-tab i { font-size: 16px; }
.docs-tab:hover { color: var(--brand-blue); }
.docs-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    font-weight: 500;
}

/* === Platform Section === */
.docs-platform-section {
    padding: 64px 0;
    border-bottom: 1px solid #f0f0f0;
}
.docs-platform-section:last-of-type { border-bottom: none; }

.docs-platform-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}
.docs-platform-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}
.docs-platform-header h2 {
    font-size: 26px;
    font-weight: 300;
    color: #111;
    margin-bottom: 4px;
}
.docs-platform-header p {
    font-size: 14px;
    color: var(--text-light-gray);
}

/* Platform icon backgrounds (same as download page) */
.windows-bg { background: linear-gradient(135deg, #0078d4, #005fa3); }
.macos-bg   { background: linear-gradient(135deg, #6c6c6c, #333); }
.android-bg { background: linear-gradient(135deg, #3ddc84, #2ea468); }
.ios-bg     { background: linear-gradient(135deg, #555, #111); }
.linux-bg   { background: linear-gradient(135deg, #f7b731, #e67e22); }

/* === Client Selector Tabs === */
.client-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}
.client-sel-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: 1px solid #dde1e7;
    background: #fff;
    color: var(--text-gray);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
}
.client-sel-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}
.client-sel-btn.active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}
.sel-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    letter-spacing: 0.3px;
}
.client-sel-btn:not(.active) .sel-badge {
    background: var(--bg-light);
    color: var(--text-light-gray);
}
.client-sel-btn.active .sel-badge-blue { background: rgba(255,255,255,0.25); }
.client-sel-btn:not(.active) .sel-badge-blue { background: #dbeafe; color: #1d4ed8; }
.client-sel-btn:not(.active) .sel-badge-green { background: #d1fae5; color: #065f46; }
.client-sel-btn:not(.active) .sel-badge-gray { background: #f3f4f6; color: #6b7280; }

/* === Client Tutorial Block === */
.client-tutorial { display: block; }
.client-tutorial.hidden { display: none; }

/* Tutorial Intro */
.tutorial-intro {
    margin-bottom: 32px;
}
.tutorial-intro h3 {
    font-size: 20px;
    font-weight: 300;
    color: #111;
    margin-bottom: 8px;
}
.tutorial-intro p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    font-weight: 300;
    max-width: 720px;
}

/* === Tutorial Steps List === */
.tutorial-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
}
.tutorial-step-item {
    display: flex;
    gap: 0;
    position: relative;
}
.tutorial-step-item + .tutorial-step-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    z-index: 0;
}
.step-badge {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--brand-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    margin-right: 24px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}
.step-badge-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
    margin-top: 20px;
}
.step-content {
    flex: 1;
    min-width: 0;
    padding: 24px 0 28px;
    border-bottom: 1px solid #f3f4f6;
}
.tutorial-step-item:last-child .step-content { border-bottom: none; }
.step-content h4 {
    font-size: 16px;
    font-weight: 400;
    color: #111;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.step-content h4 i { color: var(--brand-blue); font-size: 15px; }
.step-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 12px;
}

/* Substeps */
.step-substeps {
    margin: 10px 0 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.step-substeps li {
    font-size: 13.5px;
    color: #555;
    line-height: 1.6;
    font-weight: 300;
    padding-left: 4px;
    list-style: decimal;
}
.step-substeps li strong { font-weight: 500; color: #333; }

/* Step Note */
.step-note {
    overflow: hidden;
    background: #fff8e1;
    border: 1px solid #fdd835;
    border-left: 3px solid #f9a825;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #5f4000;
    line-height: 1.6;
    margin-bottom: 14px;
    word-break: break-word;
}
.step-note > i:first-child {
    float: left;
    color: #f9a825;
    margin-right: 8px;
    margin-top: 2px;
}

/* Step Tip */
.step-tip {
    overflow: hidden;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 3px solid var(--brand-blue);
    padding: 10px 14px;
    font-size: 12.5px;
    color: #1e3a5f;
    line-height: 1.6;
    margin-bottom: 14px;
    word-break: break-word;
}
.step-tip > i:first-child {
    float: left;
    color: var(--brand-blue);
    margin-right: 8px;
    margin-top: 2px;
}
.step-tip strong { font-weight: 500; }

/* Download link inside step */
.step-dl-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-blue);
    color: #fff;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 400;
    transition: background 0.25s ease;
    margin-top: 6px;
}
.step-dl-link:hover { background: var(--brand-blue-hover); color: #fff; }
.step-dl-link i:last-child { font-size: 11px; }

/* === Mode Compare Grid === */
.tutorial-mode-compare {
    background: var(--bg-light);
    border: 1px solid #dde1e7;
    padding: 28px 32px;
    margin-top: 8px;
}
.tutorial-mode-compare h4 {
    font-size: 15px;
    font-weight: 400;
    color: #111;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tutorial-mode-compare h4 i { color: var(--brand-blue); }
.mode-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.mode-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 20px 24px;
}
.mode-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mode-card-title i { color: var(--brand-blue); }
.mode-card ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    list-style: none;
    padding: 0;
}
.mode-card ul li {
    font-size: 13px;
    color: #555;
    font-weight: 300;
    line-height: 1.5;
    padding-left: 14px;
    position: relative;
}
.mode-card ul li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--brand-blue);
    font-weight: 700;
}
.mode-card-rec {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.mode-card-rec-alt {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

/* === Architecture Guide === */
.arch-guide {
    background: #fff8e1;
    border: 1px solid #fdd835;
    border-left: 4px solid #f9a825;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #5f4000;
    line-height: 1.7;
}
.arch-guide strong { font-weight: 500; }

/* === iOS Notice === */
.ios-notice {
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    border: 1px solid #c7d7f5;
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.ios-notice-icon {
    font-size: 24px;
    color: var(--brand-blue);
    flex-shrink: 0;
    margin-top: 2px;
}
.ios-notice h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--brand-blue);
    margin-bottom: 6px;
}
.ios-notice p {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}
.ios-notice p strong { font-weight: 500; }

/* === Apple ID Box === */
.apple-id-box {
    background: var(--bg-light);
    border: 1px solid #dde1e7;
    padding: 20px 28px 4px;
    margin-bottom: 4px;
}
.apple-id-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 400;
    color: #111;
    margin-bottom: 4px;
}
.apple-id-box-header i {
    font-size: 18px;
    color: var(--brand-blue);
}

/* === Mode Tags (Android) === */
.mode-tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.mode-tag {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-light);
    border: 1px solid #e5e7eb;
    font-size: 13px;
}
.mode-tag strong {
    flex-shrink: 0;
    color: var(--brand-blue);
    font-weight: 500;
    min-width: 70px;
}
.mode-tag span {
    color: #555;
    font-weight: 300;
    line-height: 1.5;
}
.mode-tag strong + span strong { font-weight: 500; color: #333; }

/* === Distro Guide (Linux) === */
.distro-guide {
    display: flex;
    gap: 16px;
    margin: 12px 0 16px;
    flex-wrap: wrap;
}
.distro-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid #dde1e7;
    font-size: 13px;
}
.distro-item strong { color: #111; font-weight: 500; }
.distro-item span { color: #666; font-weight: 300; }

/* === Linux CLI Code Block (reuse from download.css pattern) === */
.linux-cli {
    background: #0d1117;
    padding: 24px 28px;
    margin: 12px 0;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.linux-cli-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.linux-cli-header span {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #7d8590;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.linux-cli-dots {
    display: flex;
    gap: 5px;
    margin-right: 10px;
    flex-shrink: 0;
}
.linux-cli-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}
.dot-red   { background: #ff5f57; }
.dot-yellow{ background: #ffbd2e; }
.dot-green { background: #28ca41; }
.linux-cli code {
    font-family: 'SF Mono', 'Consolas', 'Fira Code', monospace;
    font-size: 13px;
    color: #e6edf3;
    display: block;
    line-height: 1.85;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
}
.linux-cli code .cmd-prompt { color: #3fb950; }
.linux-cli code .cmd-comment { color: #8b949e; }
.linux-cli code .cmd-flag { color: #79c0ff; }
.linux-cli-copy {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #aaa;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.linux-cli-copy:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* === Compare Table Section === */
.compare-section {
    background: var(--bg-light);
    padding: 72px 0;
    border-top: 1px solid #e5e7eb;
}
.compare-header {
    margin-bottom: 36px;
}
.compare-header .section-label {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-light-gray);
    margin-bottom: 16px;
    display: block;
}
.compare-header h2 {
    font-size: 32px;
    font-weight: 100;
    color: #111;
    margin-bottom: 8px;
}
.compare-header p {
    font-size: 15px;
    color: var(--text-gray);
    font-weight: 300;
}
.compare-table-wrap {
    overflow-x: auto;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    min-width: 560px;
}
.compare-table th,
.compare-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.compare-table th {
    background: var(--brand-blue);
    color: #fff;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.3px;
}
.compare-table td { color: #444; font-weight: 300; }
.compare-table td:first-child {
    font-weight: 400;
    color: #111;
    white-space: nowrap;
}
.compare-table td i { margin-right: 6px; color: var(--brand-blue); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #fafafa; }
.table-link {
    color: var(--brand-blue);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}
.table-link:hover { opacity: 0.7; }

/* === FAQ Section === */
.faq-section {
    padding: 72px 0;
    background: #fff;
}
.faq-header {
    margin-bottom: 40px;
}
.faq-header .section-label {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-light-gray);
    margin-bottom: 16px;
    display: block;
}
.faq-header h2 {
    font-size: 32px;
    font-weight: 100;
    color: #111;
    margin-bottom: 8px;
}
.faq-header p {
    font-size: 15px;
    color: var(--text-gray);
    font-weight: 300;
}
.faq-list { max-width: 860px; }
.faq-item {
    border-bottom: 1px solid #dde1e7;
    overflow: hidden;
}
.faq-item:first-child { border-top: 1px solid #dde1e7; }
.faq-item summary {
    padding: 20px 8px 20px 0;
    font-size: 15px;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    gap: 16px;
    transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 22px;
    font-weight: 300;
    color: var(--text-light-gray);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--brand-blue);
}
.faq-item[open] summary { color: var(--brand-blue); }
.faq-answer {
    padding: 0 8px 22px;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    font-weight: 300;
}
.faq-answer p + p { margin-top: 12px; }
.faq-answer a { color: var(--brand-blue); text-decoration: underline; text-underline-offset: 3px; }
.faq-answer code {
    background: var(--bg-light);
    padding: 1px 6px;
    font-size: 12.5px;
    font-family: 'SF Mono', 'Consolas', monospace;
    border: 1px solid #dde1e7;
    color: #333;
}

/* === CTA Section === */
.docs-cta {
    background: var(--bg-dark);
    padding: 72px 0;
}
.docs-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.docs-cta-text .section-label {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7899b8;
    margin-bottom: 16px;
    display: block;
}
.docs-cta-text h2 {
    font-size: 32px;
    font-weight: 100;
    color: #fff;
    margin-bottom: 12px;
}
.docs-cta-text p {
    font-size: 15px;
    color: #a0b4c8;
    font-weight: 300;
    max-width: 480px;
    line-height: 1.6;
}
.docs-cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--brand-blue);
    color: #fff;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.25s ease;
}
.btn-cta-primary:hover { background: var(--brand-blue-hover); color: #fff; }
.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: rgba(255,255,255,0.75);
    padding: 13px 26px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.25s ease;
}
.btn-cta-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

/* ============================================================
   Responsive Styles
   ============================================================ */
@media (max-width: 1024px) {
    .mode-compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .docs-hero-title { font-size: 38px; }
    .docs-tabs-wrapper { top: var(--header-height); }
    .docs-tab { padding: 0 16px; font-size: 13px; }
    .docs-tab span { display: none; }
    .docs-tab { gap: 0; }
    .docs-cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .docs-hero { padding: 50px 0 44px; }
    .docs-hero-title { font-size: 30px; }
    .docs-hero-platforms { gap: 8px; }
    .docs-hero-platform-btn { padding: 8px 14px; font-size: 13px; }
    .docs-platform-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .step-badge { margin-right: 14px; }
    .client-selector { gap: 8px; }
    .client-sel-btn { padding: 8px 14px; font-size: 12px; }
    .tutorial-mode-compare { padding: 20px 18px; }
    .apple-id-box { padding: 16px 18px 0; }
    .compare-section { padding: 52px 0; }
    .faq-section { padding: 52px 0; }
    .docs-cta { padding: 52px 0; }
    .docs-cta-text h2 { font-size: 24px; }
    .docs-cta-actions { flex-direction: column; }
    .btn-cta-primary,
    .btn-cta-secondary { width: 100%; justify-content: center; }
    .distro-guide { flex-direction: column; }
    .mode-tags { gap: 8px; }
    .linux-cli {
        padding: 16px 14px;
        font-size: 12px;
    }
    .linux-cli code {
        font-size: 12px;
        white-space: pre;
        word-break: normal;
        overflow-wrap: normal;
    }
    .linux-cli-header span { font-size: 11px; }
    .step-content h4 { font-size: 15px; }
    .step-content p { word-break: break-word; overflow-wrap: break-word; }
    .mode-tag { flex-direction: column; gap: 4px; }
    .mode-tag strong { min-width: unset; }
    .compare-table-wrap { -webkit-overflow-scrolling: touch; }
    .compare-table { font-size: 13px; }
    .compare-table th,
    .compare-table td { padding: 10px 12px; }
    .tutorial-intro p { word-break: break-word; overflow-wrap: break-word; }
    .step-substeps li { word-break: break-word; overflow-wrap: break-word; }
    .faq-item summary { font-size: 14px; }
    .faq-answer { font-size: 13px; }
    .docs-cta-text p { font-size: 14px; }
    .ios-notice { flex-direction: column; gap: 10px; }
}
