/* documentation/css/styles.css */
/* PortSpace Documentation - Complete Mobile Responsive */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.doc-header {
    background: #0f172a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1e293b;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.logo-text span {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-left: 5px;
}

.header-links {
    display: flex;
    gap: 12px;
}

.btn-outline,
.btn-primary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-outline {
    background: transparent;
    border: 1px solid #334155;
    color: #e2e8f0;
}

.btn-outline:hover {
    background: #1e293b;
    border-color: #475569;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
}

/* ===== MAIN LAYOUT ===== */
.doc-main {
    padding: 40px 0;
}

.doc-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

/* ===== SIDEBAR ===== */
.doc-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-inner {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px 0;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin: 2px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav a i {
    width: 20px;
    color: #94a3b8;
    font-size: 1rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #f1f5f9;
    color: #6366f1;
    border-left-color: #6366f1;
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
    color: #6366f1;
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #334155;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* ===== CONTENT ===== */
.doc-content {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 40px;
}

.doc-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.doc-section h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    word-break: break-word;
}

.doc-section h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-word;
}

.doc-section h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    color: #334155;
}

.doc-section p {
    color: #475569;
    margin-bottom: 15px;
    word-break: break-word;
}

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.alert.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.alert i {
    font-size: 1.4rem;
    color: #22c55e;
    flex-shrink: 0;
}

.alert strong {
    color: #166534;
    display: block;
    margin-bottom: 5px;
}

.alert p {
    color: #166534;
    margin: 0;
}

.alert a {
    color: #166534;
    font-weight: 600;
    word-break: break-word;
}

/* ===== LOGO LARGE ===== */
.logo-large {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.logo-large h2 {
    margin: 0;
    font-size: 2rem;
    color: #0f172a;
}

.logo-large p {
    margin: 5px 0 0;
    color: #64748b;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 2px;
}

/* ===== STATS ===== */
.stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat {
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 150px;
}

.stat .num {
    font-size: 1.2rem;
    font-weight: 700;
    color: #6366f1;
}

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

.feature {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.feature i {
    font-size: 1.8rem;
    color: #6366f1;
    margin-bottom: 10px;
}

.feature h4 {
    margin-bottom: 8px;
    color: #0f172a;
}

.feature p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    word-break: break-word;
}

/* ===== CODE BLOCK ===== */
.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== TABLE ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

.table th {
    text-align: left;
    padding: 12px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    word-break: break-word;
}

.table td code {
    background: #f1f5f9;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ===== COLOR DOT ===== */
.color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* ===== SECTIONS GRID ===== */
.sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.section-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.section-card .num {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #e2e8f0;
}

.section-card h4 {
    margin-bottom: 8px;
    color: #0f172a;
    padding-right: 40px;
    word-break: break-word;
}

.section-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
    word-break: break-word;
}

.section-card code {
    background: #e2e8f0;
    color: #334155;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    word-break: break-word;
}

/* ===== SUPPORT CARD ===== */
.support-card {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.support-card i {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 15px;
}

.support-card h3 {
    margin-bottom: 10px;
}

.support-card .email {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6366f1;
    padding: 10px 20px;
    background: #eff6ff;
    border-radius: 8px;
    margin: 15px 0;
    text-decoration: none;
    word-break: break-word;
}

.support-card .email:hover {
    background: #dbeafe;
}

.support-card p {
    color: #64748b;
    margin: 0;
    word-break: break-word;
}

/* ===== FOOTER ===== */
.doc-footer {
    text-align: center;
    padding: 30px 0 0;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-footer p {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.9rem;
    word-break: break-word;
}

.doc-footer .designer {
    color: #475569;
}

.doc-footer .designer span {
    color: #6366f1;
    font-weight: 600;
}

.doc-footer i {
    color: #ef4444;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

.mobile-menu-nav {
    padding: 20px 0;
}

.mobile-menu-nav li {
    list-style: none;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #475569;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.mobile-menu-nav a i {
    width: 20px;
}

.mobile-menu-nav a.active {
    background: #f1f5f9;
    color: #6366f1;
    border-left-color: #6366f1;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 1024px) {
    .doc-grid {
        gap: 30px;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Header */
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .header-links {
        width: 100%;
        justify-content: center;
    }

    /* Grid */
    .doc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Sidebar */
    .doc-sidebar {
        display: none;
    }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-left: auto;
    }

    /* Content */
    .doc-content {
        padding: 25px;
    }

    .doc-section h1 {
        font-size: 1.8rem;
    }

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

    /* Stats */
    .stats {
        flex-direction: column;
    }

    .stat {
        width: 100%;
    }

    /* Features */
    .features {
        grid-template-columns: 1fr;
    }

    /* Sections */
    .sections {
        grid-template-columns: 1fr;
    }

    /* Logo large */
    .logo-large {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Table */
    .table {
        font-size: 0.9rem;
    }

    .table td,
    .table th {
        padding: 8px;
    }

    /* Alert */
    .alert {
        flex-direction: column;
        text-align: center;
    }

    .alert i {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {

    /* Small mobile */
    .doc-header {
        padding: 0.8rem 0;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-text span {
        font-size: 0.8rem;
    }

    .btn-outline,
    .btn-primary {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .doc-main {
        padding: 20px 0;
    }

    .doc-content {
        padding: 20px;
    }

    .doc-section {
        margin-bottom: 35px;
    }

    .doc-section h1 {
        font-size: 1.5rem;
    }

    .doc-section h2 {
        font-size: 1.2rem;
    }

    .stat {
        min-width: 100%;
        justify-content: center;
    }

    .code-block {
        padding: 15px;
        font-size: 0.8rem;
    }

    .support-card {
        padding: 25px 15px;
    }

    .support-card .email {
        font-size: 1rem;
        padding: 8px 15px;
    }

    .section-card {
        padding: 15px;
    }

    .section-card .num {
        font-size: 1.5rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .doc-header,
    .doc-sidebar,
    .mobile-menu-toggle,
    .footer-links {
        display: none;
    }

    .doc-grid {
        grid-template-columns: 1fr;
    }

    .doc-content {
        box-shadow: none;
        border: none;
    }
}

/* ===== UTILITIES ===== */
.text-primary {
    color: #6366f1;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 25px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 25px;
}

.d-block {
    display: block;
}

.text-center {
    text-align: center;
}