/* ==============================================
   Tech Page Content — ORI Digital Studio
   Стилизация публичных страниц (оферта, политика и т.д.)
   ============================================== */

/* --- Section --- */
.tech-page-section {
    padding: 80px 0 100px;
    background: transparent;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

/* --- Grid Overlay --- */
.tech-page-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(38, 211, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 211, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* --- Corner Brackets (HUD Frame) --- */
.tech-page-frame {
    position: relative;
}

.tech-page-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(38, 211, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

.tech-page-corner--tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.tech-page-corner--tr {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}

.tech-page-corner--bl {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}

.tech-page-corner--br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

/* --- Main Content Card --- */
.tech-page-card {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 50px 55px;
    position: relative;
    z-index: 1;
}

.tech-page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #26d300, transparent);
    border-radius: 0 0 4px 4px;
}

/* --- Sidebar Card --- */
.tech-page-sidebar-card {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 28px;
    position: relative;
}

.tech-page-sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.5), transparent);
}

/* --- HUD Label --- */
.tech-page-hud {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px;
    color: rgba(38, 211, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding: 6px 14px;
    background: rgba(38, 211, 0, 0.05);
    border: 1px solid rgba(38, 211, 0, 0.15);
    border-radius: 6px;
}

.tech-page-hud i {
    font-size: 6px;
    animation: hudPulse 2s ease-in-out infinite;
}

@keyframes hudPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- Page Type Badge --- */
.tech-page-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #26d300;
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 5px 12px;
    background: rgba(38, 211, 0, 0.08);
    border: 1px solid rgba(38, 211, 0, 0.2);
    border-radius: 4px;
}

/* --- Scan Line Animation --- */
.tech-page-scan {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.4), transparent);
    animation: pageScanLine 6s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes pageScanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* --- Floating Accent Dots --- */
.tech-page-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #26d300;
    border-radius: 50%;
    opacity: 0.3;
    animation: dotFloat 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

.tech-page-dot:nth-child(1) { top: 15%; left: 5%; animation-delay: 0s; }
.tech-page-dot:nth-child(2) { top: 40%; right: 8%; animation-delay: 2s; }
.tech-page-dot:nth-child(3) { bottom: 20%; left: 12%; animation-delay: 4s; }

@keyframes dotFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-15px) scale(1.5); opacity: 0.5; }
}

/* ================================================
   Content Typography / Rich Text Styles
   ================================================ */
.tech-page-body {
    color: #d4d4d4;
    font-size: 16px;
    line-height: 1.9;
}

.tech-page-body h1 {
    font-size: 2rem;
    color: #ffffff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.6rem;
}

.tech-page-body h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #26d300;
    border-radius: 2px;
}

.tech-page-body h2 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(38, 211, 0, 0.2);
}

.tech-page-body h3 {
    font-size: 1.35rem;
    color: #26d300;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.tech-page-body h4 {
    font-size: 1.15rem;
    color: #e0e0e0;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.tech-page-body h5,
.tech-page-body h6 {
    color: #a3a3a3;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tech-page-body > *:first-child {
    margin-top: 0;
}

.tech-page-body p {
    margin-bottom: 1rem;
    color: #d4d4d4;
}

/* --- Lists --- */
.tech-page-body ul,
.tech-page-body ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
}

.tech-page-body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 0.6rem;
    color: #d4d4d4;
}

.tech-page-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border: 2px solid #26d300;
    border-radius: 2px;
    transform: rotate(45deg);
}

.tech-page-body ol {
    counter-reset: tech-counter;
}

.tech-page-body ol li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 0.6rem;
    counter-increment: tech-counter;
    color: #d4d4d4;
}

.tech-page-body ol li::before {
    content: counter(tech-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #26d300;
    font-weight: 600;
}

/* --- Nested Lists --- */
.tech-page-body ul ul,
.tech-page-body ol ol,
.tech-page-body ul ol,
.tech-page-body ol ul {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

/* --- Links --- */
.tech-page-body a {
    color: #26d300;
    text-decoration: none;
    border-bottom: 1px solid rgba(38, 211, 0, 0.3);
    transition: all 0.3s ease;
}

.tech-page-body a:hover {
    color: #33ff00;
    border-bottom-color: #33ff00;
    text-shadow: 0 0 8px rgba(38, 211, 0, 0.3);
}

/* --- Blockquote --- */
.tech-page-body blockquote {
    border-left: 3px solid #26d300;
    padding: 16px 24px;
    margin: 1.5rem 0;
    background: rgba(38, 211, 0, 0.04);
    border-radius: 0 10px 10px 0;
    position: relative;
}

.tech-page-body blockquote::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 48px;
    color: rgba(38, 211, 0, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
}

.tech-page-body blockquote p {
    color: #b0b0b0;
    font-style: italic;
}

/* --- Tables --- */
.tech-page-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tech-page-body table thead th {
    background: rgba(38, 211, 0, 0.08);
    color: #26d300;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(38, 211, 0, 0.15);
    text-align: left;
}

.tech-page-body table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #d4d4d4;
}

.tech-page-body table tbody tr:last-child td {
    border-bottom: none;
}

.tech-page-body table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Code --- */
.tech-page-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 2px 8px;
    background: rgba(38, 211, 0, 0.08);
    border: 1px solid rgba(38, 211, 0, 0.15);
    border-radius: 4px;
    color: #26d300;
}

.tech-page-body pre {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.tech-page-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #d4d4d4;
}

/* --- Images --- */
.tech-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 1rem 0;
}

/* --- HR --- */
.tech-page-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.3), transparent);
    margin: 2rem 0;
}

/* --- Strong / Em --- */
.tech-page-body strong {
    color: #ffffff;
    font-weight: 600;
}

.tech-page-body em {
    color: #b0b0b0;
}

/* ================================================
   Sidebar Elements
   ================================================ */

/* --- Table of Contents --- */
.tech-toc-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-toc-title i {
    color: #26d300;
    font-size: 12px;
}

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

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

.tech-toc-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #a3a3a3;
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
}

.tech-toc-list a::before {
    content: '';
    width: 5px;
    height: 5px;
    border: 1px solid rgba(38, 211, 0, 0.4);
    border-radius: 1px;
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.tech-toc-list a:hover,
.tech-toc-list a.active {
    color: #26d300;
    background: rgba(38, 211, 0, 0.05);
    border-left-color: #26d300;
}

.tech-toc-list a:hover::before,
.tech-toc-list a.active::before {
    border-color: #26d300;
    background: #26d300;
    box-shadow: 0 0 6px rgba(38, 211, 0, 0.5);
}

/* --- Page Info --- */
.tech-page-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-page-info li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.tech-page-info li:last-child {
    border-bottom: none;
}

.tech-page-info-label {
    color: #777;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tech-page-info-label i {
    color: rgba(38, 211, 0, 0.5);
    font-size: 11px;
    width: 14px;
    text-align: center;
}

.tech-page-info-value {
    color: #d4d4d4;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

/* --- Back Button --- */
.tech-page-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid rgba(38, 211, 0, 0.3);
    border-radius: 8px;
    color: #26d300;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-page-back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(38, 211, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.tech-page-back-btn:hover {
    background: rgba(38, 211, 0, 0.08);
    border-color: #26d300;
    color: #26d300;
    transform: translateX(-3px);
}

.tech-page-back-btn:hover::before {
    left: 100%;
}

/* --- Print Button --- */
.tech-page-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #a3a3a3;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tech-page-print-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* --- Footer Bar --- */
.tech-page-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 1199px) {
    .tech-page-card {
        padding: 40px 40px;
    }
}

@media (max-width: 991px) {
    .tech-page-section {
        padding: 60px 0 80px;
    }

    .tech-page-sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .tech-page-card {
        padding: 28px 22px;
        border-radius: 12px;
    }

    .tech-page-sidebar-card {
        padding: 22px;
    }

    .tech-page-body {
        font-size: 15px;
        line-height: 1.8;
    }

    .tech-page-body h1 {
        font-size: 1.6rem;
    }

    .tech-page-body h2 {
        font-size: 1.35rem;
    }

    .tech-page-body h3 {
        font-size: 1.15rem;
    }

    .tech-page-corner {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .tech-page-card {
        padding: 22px 16px;
    }

    .tech-page-body ol li {
        padding-left: 28px;
    }
}

/* --- Print Styles --- */
@media print {
    .tech-page-grid,
    .tech-page-dot,
    .tech-page-scan,
    .tech-page-corner,
    .tech-page-sidebar,
    .tech-page-footer,
    .line_animation,
    .global-tech-bg,
    header,
    footer,
    .tech-page-hud {
        display: none !important;
    }

    .tech-page-section {
        background: #fff !important;
        padding: 0 !important;
    }

    .tech-page-card {
        background: #fff !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .tech-page-card::before {
        display: none;
    }

    .tech-page-body,
    .tech-page-body p,
    .tech-page-body li,
    .tech-page-body td {
        color: #000 !important;
    }

    .tech-page-body h1,
    .tech-page-body h2,
    .tech-page-body h3,
    .tech-page-body h4,
    .tech-page-body strong {
        color: #000 !important;
    }

    .tech-page-body h2 {
        border-bottom-color: #000 !important;
    }

    .tech-page-body h3 {
        color: #333 !important;
    }

    .tech-page-body a {
        color: #000 !important;
        text-decoration: underline !important;
    }

    .tech-page-body table {
        border: 1px solid #ccc !important;
    }

    .tech-page-body table th,
    .tech-page-body table td {
        border: 1px solid #ccc !important;
        color: #000 !important;
    }
}
