/*
Theme Name: Astra Obzor AI Child
Template: astra
Version: 2.0.0
Author: obzor-ai
*/

@import url('../astra/style.css');

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

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555555;
    --text-light: #888888;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --link: #2563eb;
    --link-hover: #1d4ed8;
    --accent-bg: #f8f9fa;
    --code-bg: #f4f4f5;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 17px;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
}
.logo span { color: var(--text-light); font-weight: 400; }
.nav { display: flex; gap: 28px; }
.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
}

.hero-simple {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    text-align: center;
}
.hero-simple h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hero-simple p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 24px;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.tag {
    background: var(--accent-bg);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
}

.article-header {
    padding: 40px 20px 20px;
    max-width: 720px;
    margin: 0 auto;
}
.article-header h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.article-meta {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.breadcrumb {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--link); }

.article-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
.article-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 40px 0 16px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
.article-content h3 {
    font-size: 21px;
    font-weight: 600;
    margin: 32px 0 12px;
    line-height: 1.3;
}
.article-content p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 20px;
}
.article-content p strong { font-weight: 600; }
.article-content a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-content a:hover { color: var(--link-hover); }
.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 28px;
}
.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 17px;
}
.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
}
.article-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 20px;
    margin: 24px 0;
    color: var(--text-secondary);
    font-style: italic;
}
.article-content code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 15px;
}

.cta-box {
    background: var(--accent-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
}
.cta-box h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 0;
}
.cta-box p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.cta-box a {
    color: var(--link);
    font-weight: 600;
    text-decoration: none;
}
.cta-box a:hover { text-decoration: underline; }

.telegram-cta {
    background: #f0f9ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 20px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.telegram-cta-icon { font-size: 28px; }
.telegram-cta-content { flex: 1; }
.telegram-cta h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    margin-top: 0;
}
.telegram-cta p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== AI FUTURISTIC BUTTON ===== */
.ai-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 50%, #0c4a6e 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 8px;
    border: 1px solid rgba(36, 161, 222, 0.4);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.ai-btn-text {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
}

/* Prevent browser :visited color on mobile */
.ai-btn:visited,
.ai-btn:visited .ai-btn-text,
.telegram-cta .ai-btn:visited,
.telegram-cta .ai-btn:visited .ai-btn-text {
    color: #ffffff !important;
}

.ai-btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(36, 161, 222, 0.2), rgba(56, 189, 248, 0.15), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.ai-btn:hover {
    border-color: rgba(36, 161, 222, 0.7);
    box-shadow: 0 0 20px rgba(36, 161, 222, 0.25), 0 0 40px rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}

.ai-btn:hover .ai-btn-glow {
    left: 100%;
}

.ai-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(36, 161, 222, 0.15);
}

/* ===== HIDE DEFAULT ASTRA SCROLL TO TOP ===== */
#ast-scroll-top,
.ast-scroll-top-icon,
.ast-scroll-top-icon-wrap,
.ast-scroll-to-top,
.ast-scroll-to-top-wrap,
.ast-scroll-to-top-icon,
.ast-scroll-to-top-icon-wrap,
[data-section="section-scroll-to-top"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

[class*="ast-scroll-top"][style*="display: block"],
[class*="ast-scroll-top"][style*="display:block"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ===== AI SCROLL-TO-TOP BUTTON ===== */
.ai-scroll-top {
    position: fixed !important;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 99999;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.ai-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ai-scroll-top svg {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #38bdf8 !important;
    stroke: #38bdf8 !important;
}

.ai-scroll-top:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), 0 0 50px rgba(139, 92, 246, 0.1), 0 4px 20px rgba(15, 23, 42, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.ai-scroll-top:hover svg {
    transform: translateY(-2px);
}

.ai-scroll-top:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
    color: #38bdf8 !important;
}

.ai-scroll-top:active svg {
    color: #38bdf8 !important;
    stroke: #38bdf8 !important;
}

.ai-scroll-top-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.15), rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.ai-scroll-top:hover .ai-scroll-top-glow {
    left: 100%;
}

@keyframes ai-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
    50% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.08); }
}

.ai-scroll-top.visible {
    animation: ai-pulse 3s ease-in-out infinite;
}

.ai-scroll-top.visible:hover {
    animation: none;
}

.article-footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-light);
}
.article-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}
.article-footer a:hover { color: var(--link); }

.guides-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.guides-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.guides-section .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}
.guides-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.guide-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.guide-item:hover {
    border-color: var(--text-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.guide-item-tag {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.guide-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}
.guide-item h3 a {
    color: var(--text);
    text-decoration: none;
}
.guide-item h3 a:hover { color: var(--link); }
.guide-item p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}
.guide-item-meta {
    font-size: 13px;
    color: var(--text-light);
}

.prompt-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    background: var(--bg);
}
.prompt-block-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.prompt-block-text {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 14px;
    background: var(--code-bg);
    padding: 12px 16px;
    border-radius: 6px;
    line-height: 1.5;
    overflow-x: auto;
}
.prompt-block-result {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.5;
}

.about-stats {
    display: flex;
    gap: 32px;
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    justify-content: center;
    flex-wrap: wrap;
}
.about-stat { text-align: center; }
.about-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}
.about-stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 20px 24px;
    background: var(--bg);
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
}
.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}
.footer-bottom a {
    color: var(--text-light);
    text-decoration: none;
}

.not-found {
    text-align: center;
    padding: 80px 20px;
}
.not-found h1 {
    font-size: 80px;
    font-weight: 800;
    color: var(--border);
    margin-bottom: 16px;
}
.not-found p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .nav { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .nav.active { display: flex; }
    .nav a { font-size: 16px; padding: 8px 0; }
    .mobile-menu-btn { display: block; }
    .hero-simple h1 { font-size: 28px; }
    .article-header h1 { font-size: 26px; }
    .article-content h2 { font-size: 22px; }
    .article-content h3 { font-size: 18px; }
    .guides-list { grid-template-columns: 1fr; }
    .about-stats { gap: 16px; }
    .telegram-cta { flex-direction: column; text-align: center; }
    .ai-btn { width: 100%; justify-content: center; }
    .ai-scroll-top {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .ai-scroll-top svg {
        width: 20px;
        height: 20px;
    }
    .not-found h1 { font-size: 60px; }
}


/* ===== FIX: Prevent visited link color on mobile ===== */
.ai-btn:visited,
.ai-btn:visited .ai-btn-text,
a.ai-btn:visited {
    color: #ffffff !important;
}

.telegram-cta .ai-btn:visited,
.telegram-cta .ai-btn:visited .ai-btn-text {
    color: #ffffff !important;
}
