/* Guide System Styles */
.guide-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.guide-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 166, 35, 0.3);
}

.guide-card-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 1) 0%, rgba(20, 20, 20, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.guide-card-image::after {
    content: '📚';
    position: absolute;
    font-size: 5rem;
    opacity: 0.8;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.guide-card:hover .guide-card-image::after {
    transform: scale(1.2) rotate(10deg);
    opacity: 1;
}

.guide-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.2s;
}

.guide-card:hover .guide-card-title {
    color: var(--accent-primary);
}

.guide-card-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex: 1;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-card-actions {
    margin-top: auto;
}

.btn-read-more {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn-read-more:hover {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

/* Article Detail View */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease;
}

.article-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--text-primary);
    /* fallback */
}

.article-meta {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin-top: 56px;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.article-content h2 {
    font-size: 2rem;
    border-left: 4px solid var(--accent-primary);
    padding-left: 16px;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 24px;
    color: #d4d4d4;
}

.article-content a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(245, 166, 35, 0.3);
    transition: all 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--accent-primary);
    background: rgba(245, 166, 35, 0.1);
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.article-content blockquote {
    border-left: 4px solid var(--accent-primary);
    font-style: italic;
    color: var(--text-secondary);
    margin: 32px 0;
    background: linear-gradient(to right, rgba(245, 166, 35, 0.05), transparent);
    padding: 24px 32px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.2rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.article-actions {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .guide-card-grid {
        gap: 24px;
    }
}

/* Search Bar Styles */
.search-container {
    max-width: 600px;
    margin: 24px auto 0;
    position: relative;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    pointer-events: none;
}

#guide-search {
    width: 100%;
    padding: 14px 14px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#guide-search:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
    outline: none;
}

#guide-search::placeholder {
    color: var(--text-muted);
}

/* Featured Guide Styles Removed */
.guide-card-image.has-image {
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
}

.guide-card-image.has-image::after {
    display: none;
}

/* Code Copier Styles */
.code-block-wrapper {
    position: relative;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
}

.btn-copy-code {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-copy-code.copied {
    background: rgba(46, 160, 67, 0.2);
    border-color: rgba(46, 160, 67, 0.4);
    color: #3fb950;
}

/* Related Guides */
.related-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    font-weight: 700;
}

/* ========== Download Banner ========== */
.download-banner-wrapper {
    margin-top: 32px;
    margin-bottom: 8px;
}

.download-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.08) 0%, rgba(245, 166, 35, 0.03) 100%);
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 24px rgba(245, 166, 35, 0.06);
    animation: fadeIn 0.4s ease;
}

.download-banner.download-banner-locked {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.download-banner-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.download-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.download-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.download-banner-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-download-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent-gradient);
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-download-doc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
    color: #111;
    text-decoration: none;
}

.btn-download-locked {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-download-locked:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

@media (max-width: 600px) {
    .download-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 14px;
    }

    .btn-download-doc {
        width: 100%;
        justify-content: center;
    }
}

/* ========== OpenClaw Banner ========== */
.openclaw-banner-wrapper {
    margin-top: 32px;
    margin-bottom: 0;
}

.openclaw-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(124, 58, 237, 0.04) 100%);
    border: 1px solid rgba(167, 139, 250, 0.40);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 28px rgba(124, 58, 237, 0.10);
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
}

.openclaw-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.openclaw-banner-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.openclaw-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.openclaw-banner-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.30);
    border-radius: 50px;
    padding: 2px 10px;
    margin-bottom: 6px;
}

.openclaw-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.openclaw-banner-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-openclaw {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-openclaw:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    color: #fff;
    text-decoration: none;
    filter: brightness(1.1);
}

@media (max-width: 600px) {
    .openclaw-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 14px;
    }

    .btn-openclaw {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Banner Row Dual (Extension + Download song song) ========== */
.banner-row-dual {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    margin-bottom: 8px;
    align-items: stretch;
}

.banner-row-dual > * {
    flex: 1;
    min-width: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Responsive: stack dọc trên tablet/mobile */
@media (max-width: 900px) {
    .banner-row-dual {
        flex-direction: column;
    }
}

/* ========== Extension Download Banner ========== */
.extension-banner-wrapper {
    margin-top: 16px;
}

.extension-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 28px;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0.04) 100%);
    border: 1px solid rgba(6, 182, 212, 0.40);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 28px rgba(6, 182, 212, 0.10);
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.extension-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.extension-banner-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.extension-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.extension-banner-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.30);
    border-radius: 50px;
    padding: 2px 10px;
    margin-bottom: 6px;
}

.extension-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.extension-banner-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.extension-banner-desc strong {
    color: #22d3ee;
    font-weight: 700;
}

.btn-extension-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-extension-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
    color: #fff;
    text-decoration: none;
    filter: brightness(1.1);
}

@media (max-width: 600px) {
    .extension-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 14px;
    }

    .btn-extension-download {
        width: 100%;
        justify-content: center;
    }
}