/* ===================================
   Pages Specific Styles
   =================================== */

.page-hero {
    background: #000000;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.page-content {
    padding: 3rem 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* ===================================
   Sidebar Navigation
   =================================== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-nav h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.sidebar-nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.95rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg-muted);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

/* ===================================
   Main Content Area
   =================================== */
.main-content {
    max-width: 900px;
}

.main-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.main-content h2:first-child {
    margin-top: 0;
}

.main-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.main-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.main-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.main-content section {
    margin-bottom: 3rem;
}

/* ===================================
   Lists
   =================================== */
.feature-list,
.main-content ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.feature-list li,
.main-content ul li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-secondary);
}

.feature-list li::before,
.main-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding-left: 3rem;
    position: relative;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-list li strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-list li p {
    margin: 0;
}

/* ===================================
   Info Boxes
   =================================== */
.info-box,
.tip-box,
.warning-box {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.info-box h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.info-box ul {
    margin: 0;
}

.tip-box {
    background: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.warning-box {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* ===================================
   Requirements Grid
   =================================== */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.requirement-card {
    background: var(--bg-muted);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.requirement-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.requirement-card ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.requirement-card ul li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
}

.requirement-card ul li::before {
    display: none;
}

/* ===================================
   Navigation Buttons
   =================================== */
.navigation-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

/* ===================================
   Code Blocks
   =================================== */
.code-block {
    background: var(--code-bg);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    position: relative;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================
   Tables
   =================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table thead {
    background: var(--primary-color);
    color: white;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
}

table tbody tr:hover {
    background: var(--bg-light);
}

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

/* ===================================
   Accordion
   =================================== */
.accordion {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-primary);
}

.accordion-header:hover {
    background: #e5e7eb;
}

.accordion-header::after {
    content: '▼';
    font-size: 0.8rem;
    transition: var(--transition);
}

.accordion.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content-inner {
    padding: 1.5rem;
}

/* ===================================
   Tabs
   =================================== */
.tabs {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===================================
   Download Buttons
   =================================== */
.download-section {
    background: var(--bg-muted);
    padding: 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    text-align: center;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   Screenshot Gallery
   =================================== */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.screenshot-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.screenshot-item p {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mobile-gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mobile-gallery .screenshot-item img {
    aspect-ratio: 9/19;
    object-fit: cover;
}

/* ===================================
   Responsive Design for Pages
   =================================== */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        background: var(--bg-light);
        padding: 1.5rem;
        border-radius: var(--radius);
    }

    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sidebar-nav a {
        display: inline-block;
        padding: 0.5rem 1rem;
    }

    .sidebar-nav a:hover,
    .sidebar-nav a.active {
        padding-left: 1rem;
    }
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .page-hero p {
        font-size: 1.1rem;
    }

    .main-content h2 {
        font-size: 1.75rem;
    }

    .main-content h3 {
        font-size: 1.25rem;
    }

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

    .navigation-buttons {
        flex-direction: column;
    }

    .navigation-buttons .btn {
        width: 100%;
        text-align: center;
    }

    table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
    }

    .screenshot-gallery {
        grid-template-columns: 1fr;
    }

    .mobile-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .content-layout {
        gap: 2rem;
    }

    .step-list li {
        padding-left: 2.5rem;
    }
}
