/* ========================================
   ARTICLE TEMPLATE - Enhanced UX & Visual Sections
   ======================================== */

/* Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--color-brand-green);
    z-index: 1001;
    transition: width 0.2s ease;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-brand-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(27, 127, 87, 0.3);
    z-index: 100;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-brand-blue);
    transform: translateY(-4px);
}

/* Article Content Container */
.article-content {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.breadcrumbs a {
    color: var(--color-brand-green);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

/* Arabic Title in Hero */
.arabic-title {
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    color: var(--color-brand-green);
    font-weight: 600;
    direction: rtl;
    text-align: center;
    margin: 1rem 0;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.article-meta .category {
    background: var(--color-gold-light);
    color: var(--color-primary-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Highlighting on Scroll */
.article-section {
    padding: 3rem 0;
    margin: 2rem 0;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.article-section.active {
    background: rgba(232, 245, 240, 0.5);
    box-shadow: 0 0 0 2px var(--color-brand-green);
    padding: 3rem 2rem;
}

/* Intro Section */
.intro {
    background: linear-gradient(135deg, #f0f9f4 0%, #ffffff 100%);
    padding: 2rem;
    border-left: 4px solid var(--color-brand-green);
    border-radius: 8px;
    margin: 2rem 0;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Concept Box - Visual Distinction */
.concept-box {
    background: linear-gradient(135deg, #e8f5f0 0%, #f0f9f4 100%);
    border-left: 6px solid var(--color-brand-green);
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(27, 127, 87, 0.1);
}

.gram-rule {
    font-family: var(--font-arabic);
    font-size: 2rem;
    color: var(--color-brand-green);
    font-weight: 700;
    direction: rtl;
    text-align: right;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

/* Bilingual Tables */
.bilingual-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.bilingual-table thead {
    background: var(--color-brand-green);
    color: white;
}

.bilingual-table th {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    text-align: left;
    font-size: 1rem;
}

.bilingual-table tbody tr {
    background: white;
    transition: background 0.2s;
}

.bilingual-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.bilingual-table tbody tr:hover {
    background: var(--color-primary-light);
}

.bilingual-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.bilingual-table .arabic {
    font-family: var(--font-arabic);
    font-size: 1.6rem;
    text-align: right;
    direction: rtl;
    font-weight: 500;
}

/* Warning Box - Errores Comunes */
.warning-box {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border-left: 6px solid #ffc107;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.warning-box h3 {
    color: #f57c00;
    margin-top: 0;
}

.warning-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.warning-box li {
    margin-bottom: 1rem;
}

/* Exercise Box */
.exercise-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
    border-left: 6px solid #1976d2;
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}

.exercise-box h3 {
    color: #1565c0;
    margin-top: 0;
}

.exercise-box ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.exercise-box li {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

/* Related Topics */
.related-topics {
    background: linear-gradient(135deg, #f3e5f5 0%, #faf5fb 100%);
    padding: 2rem 2.5rem;
    margin: 2.5rem 0;
    border-radius: 12px;
    border-left: 6px solid #9c27b0;
}

.related-topics h2 {
    color: #7b1fa2;
    margin-top: 0;
}

.related-topics ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-topics li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.related-topics li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #9c27b0;
    font-weight: bold;
}

.related-topics a {
    color: var(--color-brand-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.related-topics a:hover {
    color: var(--color-brand-green);
    text-decoration: underline;
}

/* FAQ Section */
.faq {
    background: white;
    padding: 2.5rem;
    margin: 2.5rem 0;
    border-radius: 12px;
    border: 2px solid var(--color-border);
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: var(--color-brand-blue);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* CTA Box - Academia Árabe */
.cta-box {
    background: linear-gradient(135deg, var(--color-brand-green) 0%, #15654a 100%);
    color: white;
    padding: 3rem 2.5rem;
    text-align: center;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 8px 24px rgba(27, 127, 87, 0.3);
}

.cta-box h2 {
    color: white;
    margin-top: 0;
    font-size: 2rem;
}

.cta-box p {
    font-size: 1.15rem;
    margin: 1rem 0 2rem;
    opacity: 0.95;
}

.cta-box .btn-main {
    background: white;
    color: var(--color-brand-green);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-box .btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: #f0f9f4;
}

/* Article Navigation - Prev/Next */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s;
    display: block;
}

.nav-card:hover {
    border-color: var(--color-brand-green);
    box-shadow: 0 4px 12px rgba(27, 127, 87, 0.15);
    transform: translateY(-2px);
}

.nav-card .nav-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.nav-card .nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-brand-blue);
}

.nav-card.next {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .article-content {
        padding: 0 1rem;
    }

    .arabic-title {
        font-size: 1.8rem;
    }

    .gram-rule {
        font-size: 1.5rem;
    }

    .concept-box,
    .warning-box,
    .exercise-box,
    .related-topics,
    .cta-box {
        padding: 1.5rem;
    }

    .article-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .bilingual-table {
        font-size: 0.9rem;
    }

    .bilingual-table th,
    .bilingual-table td {
        padding: 1rem;
    }
}