/* Estilos específicos para la página de Glosario de Trading */

/* Learning Points */
.learning-points-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid #7c3aed;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.learning-points-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #3b82f6, #06b6d4, #1d4ed8);
}

.learning-points-container h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learning-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.learning-point {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learning-point:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.point-number {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.point-text {
    color: #374151;
    font-weight: 500;
    line-height: 1.5;
}

/* Terms Grid */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.term-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
}

.term-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #3b82f6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.term-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #7c3aed;
}

.term-card:hover::before {
    opacity: 1;
}

.term-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.term-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #3b82f6, #06b6d4);
    opacity: 0.3;
}

.term-icon {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
}

.term-card:hover .term-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.term-name {
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.term-content {
    padding: 1.5rem;
}

.term-definition {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.term-example {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
}

.term-example::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 0 12px 0 40px;
    opacity: 0.1;
}

.term-example h5 {
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.term-example p {
    color: #92400e;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

/* Alphabetical Section Headers */
.article-section h2 {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Special styling for letter sections */
.article-section[id^="glossary-"] h2 {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    font-size: 2rem;
    letter-spacing: 2px;
}

/* Introduction and Conclusion sections - usar el mismo estilo que las otras secciones */
.article-section#introduction h2,
.article-section#conclusion h2 {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: normal;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1px solid #7c3aed;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.highlight-box p {
    color: #5b21b6;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .learning-points-grid,
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .learning-point {
        flex-direction: column;
        text-align: center;
    }
    
    .term-header {
        flex-direction: column;
        text-align: center;
    }
    
    .term-icon {
        align-self: center;
    }
    
    .article-section h2 {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
    }
    
    .article-section[id^="glossary-"] h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .learning-points-container,
    .term-content {
        padding: 1rem;
    }
    
    .term-header {
        padding: 1rem;
    }
    
    .learning-point {
        padding: 1rem;
    }
}

/* Animation for term cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.term-card {
    animation: fadeInUp 0.6s ease-out;
}

.learning-point {
    animation: slideInFromLeft 0.5s ease-out;
}

/* Staggered animation for multiple cards */
.term-card:nth-child(1) { animation-delay: 0.1s; }
.term-card:nth-child(2) { animation-delay: 0.2s; }
.term-card:nth-child(3) { animation-delay: 0.3s; }
.term-card:nth-child(4) { animation-delay: 0.4s; }
.term-card:nth-child(5) { animation-delay: 0.5s; }
.term-card:nth-child(6) { animation-delay: 0.6s; }
.term-card:nth-child(7) { animation-delay: 0.7s; }
.term-card:nth-child(8) { animation-delay: 0.8s; }

.learning-point:nth-child(1) { animation-delay: 0.1s; }
.learning-point:nth-child(2) { animation-delay: 0.2s; }
.learning-point:nth-child(3) { animation-delay: 0.3s; }
.learning-point:nth-child(4) { animation-delay: 0.4s; }
