/* Documentation Page Styles */

/* Section Layout */
.doc-page-section {
    padding: 60px 0;
    background-color: #F9FBFE;
}

/* Documentation Content Sections */
.doc-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.doc-section.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
.doc-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--main-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.doc-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    scroll-margin-top: 120px; /* For sticky header offset */
}

.doc-section h3 i {
    color: var(--main-color);
    font-size: 20px;
}

.doc-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    text-align: justify;
}

/* Image Placeholders */
.img-placeholder {
    width: 100%;
    height: 350px;
    background-color: #f8f9fa;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: #6b7280;
    transition: all 0.3s ease;
}

.img-placeholder:hover {
    border-color: var(--main-color);
    background-color: #f0f4ff;
}

.img-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #9ca3af;
}

/* Feature Grid (4 Points) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.feature-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: var(--main-color);
}

.feature-item h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.feature-item h4 i {
    width: 40px;
    height: 40px;
    background: rgba(253, 137, 0, 0.1);
    color: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    text-align: left;
}

/* Detailed Tables */
.spec-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.doc-table {
    width: 100%;
    margin-bottom: 0;
    background-color: #fff;
    border-collapse: collapse;
}

.doc-table th {
    background-color: #f4f6f9;
    color: #333;
    padding: 18px 20px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.doc-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 15px;
}

.doc-table tr:last-child td {
    border-bottom: none;
}

.doc-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.doc-table tr:hover {
    background-color: var(--main-color);
}

.doc-table tr:hover td {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

/* Q&A Section */
.qa-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qa-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 25px;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

.qa-box:hover {
    border-left-color: var(--main-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.qa-question {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.qa-question::before {
    content: "Q:";
    color: var(--main-color);
    font-weight: 900;
    font-size: 20px;
}

.qa-answer {
    color: #666;
    line-height: 1.7;
    padding-left: 30px;
    position: relative;
}

/* Vision / Intro Box */
.vision-box {
    background: linear-gradient(135deg, #fff 0%, #f9fbfe 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eef2f6;
    margin-bottom: 40px;
    text-align: center;
}

.vision-box h2 {
    border-bottom: none;
    margin-bottom: 15px;
    font-size: 28px;
}

.vision-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.vision-tag {
    background: rgba(253, 137, 0, 0.1);
    color: var(--main-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Application List Enhanced */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.app-item {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.app-item h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.app-item p {
    font-size: 14px;
    margin-bottom: 0;
    color: #666;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 700;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

@media (max-width: 991px) {
    .mobile-filter-toggle {
        display: flex;
    }
}

.mobile-filter-toggle i {
    font-size: 18px;
}

/* Floating TOC */
.doc-toc-floating {
    position: fixed;
    right: 0; /* Stuck to the right edge */
    top: 255px;
    width: 240px;
    background: #fff;
    border-radius: 10px 0 0 10px; /* Rounded corners only on left */
    box-shadow: -5px 5px 20px rgba(0,0,0,0.08); /* Shadow to the left */
    padding: 20px;
    z-index: 99;
    display: none; /* Hidden on mobile/tablet */
    border: 1px solid #f0f0f0;
    border-right: none; /* Remove right border */
    transition: all 0.3s ease;
}

@media (min-width: 1600px) {
    .doc-toc-floating {
        display: block;
        right: 0; /* Keep it stuck to edge even on large screens */
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .doc-toc-floating {
        display: block;
        right: 0;
        width: 200px;
    }
}

.toc-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333; /* Darker for better visibility */
    margin-bottom: 15px;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 10px;
    display: inline-block;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list li a {
    color: #555;
    font-size: 14px;
    display: block;
    padding: 5px 0;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 10px;
    position: relative;
}

.toc-list li a:hover,
.toc-list li a.active {
    color: var(--main-color);
    font-weight: 600;
    border-left-color: var(--main-color);
    background: linear-gradient(90deg, rgba(253, 137, 0, 0.05) 0%, rgba(255,255,255,0) 100%);
}

.toc-back-to-top {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.toc-back-to-top a {
    color: #888 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.toc-back-to-top a:hover {
    color: var(--main-color) !important;
    background: none !important;
    border-left-color: transparent !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .page-sidebar {
        display: none; /* Hidden by default on mobile */
        margin-bottom: 30px;
    }
    
    .page-sidebar.active {
        display: block;
    }
    
    .doc-section {
        padding: 25px;
    }
    
    .doc-section h2 {
        font-size: 26px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .spec-table-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .doc-table th, .doc-table td {
        padding: 12px 15px;
    }
}