/* ==========================================
   LEARN / LEARNING CENTER PAGES
   ========================================== */

.learn-page {
    min-height: 100vh;
    background: var(--bg-page, #f5f7fa);
}

[data-bs-theme="dark"] .learn-page,
.dark .learn-page {
    background: var(--bg-page, #0c0810);
    background-image:
        radial-gradient(ellipse at top, #37174d 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, #180d1c 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, #150a15 0%, transparent 40%);
    background-attachment: fixed;
}

.learn-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Gemini-style gradient title (matches homepage) */
.gemini-gradient {
    background: linear-gradient(90deg,
        #4285f4 0%,
        #9b72cb 9%,
        #d96570 20%,
        #d96570 24%,
        #9b72cb 35%,
        #4285f4 44%,
        #9b72cb 50%,
        #d96570 56%,
        #d96570 75%,
        #9b72cb 90%,
        #4285f4 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gemini-shine 3s linear infinite;
}

@keyframes gemini-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

[data-bs-theme="dark"] .gemini-gradient,
.dark .gemini-gradient {
    background: linear-gradient(90deg,
        #c4b5fd 0%,
        #e9d5ff 15%,
        #fda4af 30%,
        #fb7185 45%,
        #e9d5ff 60%,
        #c4b5fd 75%,
        #a78bfa 90%,
        #c4b5fd 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.learn-hero {
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    background: transparent;
    border-bottom: none;
}

.learn-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.learn-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #718096);
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ==========================================
   CATEGORY PILLS
   ========================================== */

.learn-categories {
    padding: 1.5rem 0;
    position: sticky;
    top: 64px;
    z-index: 30;
    background: rgba(245, 247, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border, #e2e8f0);
}

[data-bs-theme="dark"] .learn-categories,
.dark .learn-categories {
    background: rgba(12, 8, 16, 0.75);
    border-bottom-color: var(--border, #2a1f35);
}

.category-pills {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 100px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--bg-card, #ffffff);
    color: var(--text-secondary, #64748b);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .category-pill,
.dark .category-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border, #2a1f35);
    color: var(--text-secondary, #a0aec0);
}

.category-pill:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.category-pill.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.category-pill i {
    font-size: 0.8rem;
}

/* ==========================================
   ARTICLES GRID
   ========================================== */

.learn-articles-section {
    padding: 2.5rem 0 4rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--bg-surface, #ffffff);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .article-card,
.dark .article-card {
    background: var(--bg-surface, #150f18);
    border-color: var(--border, #2a1f35);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #6366f1), var(--primary-hover, #4f46e5));
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover::before {
    opacity: 1;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    text-decoration: none;
    color: inherit;
}

[data-bs-theme="dark"] .article-card:hover,
.dark .article-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.4);
}

.article-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.article-card-content {
    flex: 1;
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-primary, #1a202c);
    line-height: 1.4;
}

[data-bs-theme="dark"] .article-card-title,
.dark .article-card-title {
    color: var(--text-primary, #f5f0ff);
}

.article-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
    line-height: 1.6;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #e2e8f0);
}

[data-bs-theme="dark"] .article-card-footer,
.dark .article-card-footer {
    border-top-color: var(--border, #2a1f35);
}

.article-reading-time {
    font-size: 0.8rem;
    color: var(--text-tertiary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.article-read-more {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.2s ease;
}

.article-card:hover .article-read-more {
    gap: 0.625rem;
}

/* ==========================================
   BREADCRUMB
   ========================================== */

.learn-breadcrumb {
    padding: 1rem 0;
    background: transparent;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

[data-bs-theme="dark"] .learn-breadcrumb,
.dark .learn-breadcrumb {
    background: transparent;
    border-bottom-color: var(--border, #2a1f35);
}

.learn-breadcrumb .learn-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.learn-breadcrumb a {
    font-size: 0.85rem;
    color: #6366f1;
    text-decoration: none;
    transition: opacity 0.2s;
}

.learn-breadcrumb a:hover {
    opacity: 0.7;
}

.learn-breadcrumb span {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.breadcrumb-sep {
    font-size: 0.6rem;
    color: var(--text-tertiary, #94a3b8);
}

/* ==========================================
   ARTICLE PAGE
   ========================================== */

.learn-article {
    padding: 3rem 0 4rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary, #1a202c);
    margin: 0 0 1rem;
    line-height: 1.3;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

[data-bs-theme="dark"] .article-title,
.dark .article-title {
    color: var(--text-primary, #f5f0ff);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.article-meta-item {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Article Body */

.article-body {
    max-width: 720px;
    margin: 0 auto;
}

.article-intro {
    font-size: 1.125rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.8;
    margin: 0 0 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

[data-bs-theme="dark"] .article-intro,
.dark .article-intro {
    color: var(--text-secondary, #cbd5e0);
    border-bottom-color: var(--border, #2a1f35);
}

.article-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

[data-bs-theme="dark"] .article-heading,
.dark .article-heading {
    color: var(--text-primary, #f5f0ff);
}

.article-paragraph {
    font-size: 1rem;
    color: var(--text-secondary, #4a5568);
    line-height: 1.8;
    margin: 0 0 1.5rem;
}

[data-bs-theme="dark"] .article-paragraph,
.dark .article-paragraph {
    color: var(--text-secondary, #cbd5e0);
}

/* Steps */

.article-steps {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    counter-reset: step-counter;
}

.article-steps li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(99, 102, 241, 0.02));
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .article-steps li,
.dark .article-steps li {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

.article-steps li:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateX(4px);
}

[dir="rtl"] .article-steps li:hover {
    transform: translateX(-4px);
}

.article-steps li::before {
    content: counter(step-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.95rem;
    color: var(--text-primary, #374151);
    line-height: 1.6;
    padding-top: 3px;
}

[data-bs-theme="dark"] .step-text,
.dark .step-text {
    color: var(--text-primary, #e2e8f0);
}

/* Tips */

.article-tips {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
}

.article-tips li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-primary, #374151);
    line-height: 1.6;
    border-bottom: 1px solid var(--border, #f1f5f9);
}

[data-bs-theme="dark"] .article-tips li,
.dark .article-tips li {
    color: var(--text-primary, #e2e8f0);
    border-bottom-color: var(--border, #1a1525);
}

.article-tips li:last-child {
    border-bottom: none;
}

.article-tips li i {
    color: #10b981;
    margin-top: 4px;
    flex-shrink: 0;
}

/* CTA */

.article-cta {
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.article-cta-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1.25rem;
}

.article-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #ffffff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.article-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: #4f46e5;
    text-decoration: none;
}

/* ==========================================
   RELATED ARTICLES
   ========================================== */

.related-articles {
    padding: 3rem 0 4rem;
    background: transparent;
    border-top: 1px solid var(--border, #e2e8f0);
}

[data-bs-theme="dark"] .related-articles,
.dark .related-articles {
    background: transparent;
    border-top-color: var(--border, #2a1f35);
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a202c);
    margin: 0 0 1.5rem;
    text-align: center;
}

[data-bs-theme="dark"] .related-title,
.dark .related-title {
    color: var(--text-primary, #f5f0ff);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.related-card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--bg-card, #ffffff);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .related-card,
.dark .related-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border, #2a1f35);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    text-decoration: none;
    color: inherit;
}

.related-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.related-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary, #1a202c);
    line-height: 1.4;
}

[data-bs-theme="dark"] .related-card h3,
.dark .related-card h3 {
    color: var(--text-primary, #f5f0ff);
}

.related-reading-time {
    font-size: 0.8rem;
    color: var(--text-tertiary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .learn-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .learn-hero-title {
        font-size: 1.75rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-body {
        padding: 0 0.5rem;
    }

    .article-cta {
        padding: 2rem 1.5rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.4s ease forwards;
}

.article-card:nth-child(2) { animation-delay: 0.05s; }
.article-card:nth-child(3) { animation-delay: 0.1s; }
.article-card:nth-child(4) { animation-delay: 0.15s; }
.article-card:nth-child(5) { animation-delay: 0.2s; }
.article-card:nth-child(6) { animation-delay: 0.25s; }
.article-card:nth-child(7) { animation-delay: 0.3s; }
.article-card:nth-child(8) { animation-delay: 0.35s; }
