/* ========================================
   FlowTrix User Manual - Professional Documentation Style
   ======================================== */

/* CSS Variables */
:root {
    /* Primary Colors */
    --bg-primary: #0a1220;
    --bg-secondary: #0d1829;
    --bg-tertiary: #111f33;
    --bg-card: #132337;

    /* Accent Colors */
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-tertiary: #93c5fd;
    --accent-glow: rgba(59, 130, 246, 0.15);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-heading: #ffffff;

    /* Border Colors */
    --border-primary: rgba(59, 130, 246, 0.2);
    --border-secondary: rgba(255, 255, 255, 0.08);

    /* Status Colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Dimensions */
    --sidebar-width: 300px;
    --header-height: 64px;
    --content-max-width: 820px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --gradient-text: linear-gradient(90deg, #fff 0%, var(--accent-secondary) 100%);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-secondary);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-secondary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Search Box */
.search-box {
    margin: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-box:hover {
    border-color: var(--border-primary);
}

.search-box i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box kbd {
    padding: 2px 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: inherit;
}

/* Table of Contents */
.toc {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.toc-section {
    margin-bottom: 8px;
}

.toc-title {
    display: block;
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.toc-list {
    list-style: none;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
}

.toc-link:hover {
    color: var(--text-primary);
    background: var(--accent-glow);
}

.toc-link.active {
    color: var(--accent-secondary);
    background: var(--accent-glow);
}

.toc-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--transition-fast);
}

.toc-link:hover .toc-indicator,
.toc-link.active .toc-indicator {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-secondary);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.version-info {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   MOBILE HEADER
   ======================================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-secondary);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-heading);
}

.btn-pdf-mobile {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 3px;
    background: var(--accent-primary);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 50;
    transition: transform 100ms linear;
}

/* Section Container */
.doc-section {
    padding: 60px 40px;
    border-bottom: 1px solid var(--border-secondary);
}

.section-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent-secondary);
}

.breadcrumb i {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--text-secondary);
}

/* Section Header */
.section-header {
    margin-bottom: 40px;
}

.section-number {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.section-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 12px;
    line-height: 1.3;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Content Article */
.content-article {
    margin-bottom: 40px;
}

/* Prose (Text Content) */
.prose {
    margin-bottom: 32px;
}

.prose p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.prose strong {
    color: var(--accent-secondary);
    font-weight: 600;
}

/* ========================================
   WELCOME BANNER
   ======================================== */
.welcome-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    margin-bottom: 32px;
}

.banner-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.banner-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
}

/* Signature Block */
.signature-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-secondary);
    text-align: right;
}

.signature-block p {
    margin-bottom: 4px;
    color: var(--text-muted);
}

.signature-block strong {
    color: var(--accent-secondary);
}

/* ========================================
   CALLOUTS (Info, Tip, Warning)
   ======================================== */
.callout {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 10px;
    margin: 24px 0;
    border-left: 4px solid;
}

.callout-info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--color-info);
}

.callout-tip {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: var(--color-success);
}

.callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--color-warning);
}

.callout-error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--color-error);
}

.callout-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.callout-info .callout-icon {
    color: var(--color-info);
}

.callout-tip .callout-icon {
    color: var(--color-success);
}

.callout-warning .callout-icon {
    color: var(--color-warning);
}

.callout-error .callout-icon {
    color: var(--color-error);
}

.callout-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.callout-content strong {
    color: var(--text-primary);
}

/* ========================================
   QUICK LINKS
   ======================================== */
.quick-links {
    margin-top: 48px;
}

.quick-links h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.quick-links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-link-card:hover {
    border-color: var(--border-primary);
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.quick-link-number {
    width: 44px;
    height: 44px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.quick-link-content {
    flex: 1;
}

.quick-link-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.quick-link-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.quick-link-card>i {
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.quick-link-card:hover>i {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* ========================================
   STEPS CONTAINER (Timeline Style)
   ======================================== */
.steps-container {
    margin: 32px 0;
}

.step {
    display: flex;
    gap: 24px;
    position: relative;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

.step-line {
    width: 2px;
    flex: 1;
    background: var(--border-primary);
    margin: 8px 0;
}

.step-content {
    flex: 1;
    padding-bottom: 40px;
}

.step:last-child .step-content {
    padding-bottom: 0;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.step-body {
    color: var(--text-secondary);
}

.step-body p {
    margin-bottom: 16px;
}

/* ========================================
   STEP IMAGES - RESPONSIVE
   ======================================== */
.step-image {
    margin: 20px 0;
    text-align: center;
}

.step-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    cursor: zoom-in;
}

.step-image img:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

.step-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

/* Image Sizes - Desktop */
.step-image.img-small img {
    max-width: 400px;
}

.step-image.img-medium img {
    max-width: 550px;
}

.step-image.img-large img {
    max-width: 750px;
}

.step-image.img-full img {
    max-width: 100%;
}

/* Image Placeholder (para cuando no hay imagen) */
.image-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-primary);
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.image-placeholder:hover {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.image-placeholder i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.image-placeholder span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   REQUIREMENTS BOX
   ======================================== */
.requirements-box {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.requirements-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.requirements-box h3 i {
    color: var(--accent-primary);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.requirement {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.requirement i {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.requirement div {
    display: flex;
    flex-direction: column;
}

.requirement strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.requirement span {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item[open] {
    border-color: var(--border-primary);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    transition: all var(--transition-fast);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: var(--accent-glow);
}

.faq-question span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.faq-question i {
    color: var(--accent-primary);
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-answer ul,
.faq-answer ol {
    margin: 12px 0;
    padding-left: 24px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer strong {
    color: var(--text-primary);
}

/* ========================================
   SUPPORT SECTION
   ======================================== */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all var(--transition-fast);
}

.support-card:hover {
    border-color: var(--border-primary);
    transform: translateY(-4px);
}

.support-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-glow);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.support-icon i {
    font-size: 1.6rem;
    color: var(--accent-primary);
}

.support-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.support-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.support-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    display: block;
}

.support-link:hover {
    color: var(--accent-tertiary);
}

.support-extension {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========================================
   PAGE NAVIGATION - FIXED
   ======================================== */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-secondary);
}

/* Solo mostrar el botón siguiente a la derecha */
.page-nav.page-nav-end {
    justify-content: flex-end;
}

/* Solo mostrar el botón anterior a la izquierda */
.page-nav.page-nav-start {
    justify-content: flex-start;
}

.page-nav-prev,
.page-nav-next {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    text-decoration: none;
    transition: all var(--transition-fast);
    min-width: 200px;
    max-width: 320px;
}

.page-nav-prev:hover,
.page-nav-next:hover {
    border-color: var(--border-primary);
    background: var(--bg-tertiary);
}

.page-nav-prev i,
.page-nav-next i {
    color: var(--accent-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.page-nav-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.page-nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-nav-next {
    margin-left: auto;
}

.page-nav-next .page-nav-text {
    text-align: right;
}

/* ========================================
   FOOTER - SITE FOOTER
   ======================================== */


.site-footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #060d18 100%);
    border-top: 1px solid var(--border-secondary);
}

/* Footer Main */
.footer-main {
    padding: 60px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 50px;
}

/* Footer Columns */
.footer-col {
    display: flex;
    flex-direction: column;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-text {
    font-weight: 700;
    font-size: 1.4rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* Footer Titles */
.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0 0 8px 0;
}

.footer-subtitle {
    font-size: 0.95rem;
    color: var(--accent-secondary);
    font-weight: 500;
    margin: 0 0 20px 0;
}

/* Footer Info */
.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.footer-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent-tertiary);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border-secondary);
    padding: 24px 40px;
    background: rgba(0, 0, 0, 0.2);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.footer-copyright-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

/* Footer Legal Links */
.footer-legal-links {
    display: flex;
    gap: 24px;
}

.footer-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-legal-links a:hover {
    color: var(--text-primary);
}

/* ========================================
   FOOTER RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
    }

    .footer-main {
        padding: 50px 30px 35px;
    }
}

@media (max-width: 768px) {
    .footer-main {
        padding: 40px 20px 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-col:first-child {
        grid-column: auto;
    }

    .footer-bottom {
        padding: 20px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .footer-social {
        order: -1;
    }
}

@media (max-width: 480px) {
    .footer-main {
        padding: 32px 16px 24px;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-col {
        text-align: center;
    }

    .footer-info {
        align-items: center;
    }

    .footer-logo-text {
        font-size: 1.3rem;
    }

    .footer-grid {
        gap: 28px;
    }

    .social-link {
        width: 38px;
        height: 38px;
    }

    .footer-legal-links {
        gap: 12px;
    }

    .footer-legal-links a {
        font-size: 0.8rem;
    }
}

/* ========================================
   PRINT - HIDE FOOTER SOCIAL
   ======================================== */
@media print {
    .site-footer {
        background: white;
        color: black;
        border-top: 1px solid #ddd;
    }

    .footer-social,
    .footer-legal-links {
        display: none;
    }

    .footer-logo-text {
        background: none;
        -webkit-text-fill-color: black;
        color: black;
    }
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 0.95rem;
}

/* ========================================
   SEARCH MODAL
   ======================================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 100%;
    max-width: 600px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-secondary);
}

.search-modal-header i {
    color: var(--text-muted);
}

.search-modal-header input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.search-modal-header input::placeholder {
    color: var(--text-muted);
}

.search-modal-header kbd {
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
}

.search-hint {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-bottom: 8px;
}

.search-result-item:hover {
    background: var(--accent-glow);
}

.search-result-item h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.search-result-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ========================================
   OVERLAY
   ======================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Large Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }

    .doc-section {
        padding: 50px 30px;
    }

    .section-header h1 {
        font-size: 2rem;
    }

    /* Images responsive */
    .step-image.img-small img,
    .step-image.img-medium img,
    .step-image.img-large img {
        max-width: 100%;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding-top: var(--header-height);
    }

    .reading-progress {
        left: 0;
        top: var(--header-height);
    }

    .doc-section {
        padding: 40px 20px;
    }

    .section-header h1 {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .step {
        gap: 16px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
    }

    /* Images - Full width on tablet */
    .step-image.img-small img,
    .step-image.img-medium img,
    .step-image.img-large img,
    .step-image.img-full img {
        max-width: 100%;
    }

    /* Page navigation stacked */
    .page-nav {
        flex-direction: column;
        gap: 12px;
    }

    .page-nav-prev,
    .page-nav-next {
        max-width: none;
        min-width: auto;
        width: 100%;
    }

    .page-nav-next {
        margin-left: 0;
    }

    .page-nav-next .page-nav-text {
        text-align: left;
    }

    .page-nav-next {
        flex-direction: row-reverse;
    }

    .page-nav.page-nav-end,
    .page-nav.page-nav-start {
        justify-content: stretch;
    }

    /* Support grid single column */
    .support-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .search-modal {
        padding: 20px;
        padding-top: 80px;
    }

    /* Requirements grid */
    .requirements-grid {
        grid-template-columns: 1fr;
    }

    /* Callouts stacked */
    .callout {
        flex-direction: column;
        gap: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .doc-section {
        padding: 30px 16px;
    }

    .section-header h1 {
        font-size: 1.4rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    .quick-link-card {
        padding: 16px;
    }

    .quick-link-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .step-title {
        font-size: 1rem;
    }

    .step-content {
        padding-bottom: 32px;
    }

    /* Even smaller images on mobile */
    .step-image img {
        border-radius: 8px;
    }

    .support-card {
        padding: 24px;
    }

    .support-icon {
        width: 56px;
        height: 56px;
    }

    .faq-question {
        padding: 16px;
    }

    .faq-answer {
        padding: 0 16px 16px;
    }

    .page-nav-prev,
    .page-nav-next {
        padding: 14px 16px;
    }

    .footer-logo {
        font-size: 1.1rem;
    }

    .doc-footer {
        padding: 30px 20px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .sidebar,
    .mobile-header,
    .back-to-top,
    .reading-progress,
    .search-box,
    .btn-download,
    .page-nav,
    .lightbox,
    .search-modal,
    .overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: white;
        color: black;
    }

    .doc-section {
        page-break-inside: avoid;
        border: none;
        padding: 20px 0;
    }

    .step-image img {
        max-width: 100% !important;
        border: 1px solid #ddd;
    }

    .callout {
        border: 1px solid #ddd;
        background: #f9f9f9 !important;
    }

    .requirements-box {
        border: 1px solid #ddd;
        background: #f9f9f9;
    }

    a {
        color: black;
        text-decoration: none;
    }
}