/* Learn Page Styles */

/* Learn Container */
.learn-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Learn Header */
.learn-header {
    text-align: center;
    margin-bottom: 60px;
}

.learn-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.learn-subtitle {
    font-size: 20px;
    color: var(--primary-color);
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Subject Cards Grid - иконкасыз заманауи дизайн */
.subjects-grid {
    padding: 0 12px;
}

/* Responsive grid adjustments */
/* Жаңа: Learn topics grid */
.learn-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 22px;
    row-gap: 58px; /* қатарлар арасындағы ара-қашықтық */
    margin: 0 auto 70px;
    max-width: 1280px;
}

/* Learn бетінде үстіңгі бос орынды азайту */
#learn-page .learn-container { padding-top: 8px; }
#learn-page .learn-topics-grid { margin-top: 8px; }


.learn-topic-card {
    background: transparent;
    border: none;
    border-radius: 16px;
    overflow: visible;
    box-shadow: none;
    transition: transform .2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.learn-topic-card:hover { transform: translateY(-4px); }

.learn-topic-cover { width: 100%; aspect-ratio: 1 / 1; background: transparent; border-radius: 8px; overflow: hidden; }
.learn-topic-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.learn-topic-card:hover .learn-topic-cover img { transform: scale(1.02); }

.learn-topic-title {
    font-size: 18px; /* сәл кішірейтілді */
    line-height: 24px; /* көп жолға бөлінгенде аралық аз */
    font-weight: 500; /* аздап қалыңырақ */
    color: var(--primary-color);
    margin: 10px 0 4px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.learn-topic-summary {
    color: #6b7280;
    font-size: .92rem;
    margin: 0 14px 10px;
    line-height: 1.5;
}

.learn-topic-meta {
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.learn-topic-meta .meta-date { 
    color: var(--primary-color);
    font-size: 14px;
    line-height: 28px;
    font-weight: 300; /* жұқа шрифт */
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* 'Оқу' батырмасы */
.topic-read-btn {
    margin-left: auto; /* уводим кнопку вправо */
    padding: 5px 10px; /* уменьшенный внутренний отступ */
    border-radius: 999px; /* более скругленная граница */
    border: 1px solid #e5e7eb;
    background: transparent; /* без фона */
    color: var(--primary-color);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}
.topic-read-btn:hover {
    background: transparent; /* без фона и при hover */
    border-color: #dbe0e6;
    transform: translateY(-1px);
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px 0;
}

.subject-card {
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 50%, #3b82f6 100%);
    border: none;
    border-radius: 32px;
    padding: 60px 48px;
    text-decoration: none;
    color: white;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 
        0 8px 32px rgba(8, 145, 178, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Animated gradient overlay */
.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(255, 255, 255, 0.1) 40%, 
        rgba(255, 255, 255, 0.2) 60%, 
        transparent 80%
    );
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.subject-card:hover::before {
    transform: translateX(100%);
}

/* Rotating background pattern */
.subject-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(255, 255, 255, 0.03) 60deg,
        rgba(255, 255, 255, 0.08) 120deg,
        transparent 180deg,
        rgba(255, 255, 255, 0.03) 240deg,
        rgba(255, 255, 255, 0.08) 300deg,
        transparent 360deg
    );
    animation: rotate 20s linear infinite;
    opacity: 0.7;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.subject-card:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(8, 145, 178, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Информатика карточкасы - көк-жасыл градиент */
.subject-card.informatics {
    background: linear-gradient(135deg, 
        #0891b2 0%, 
        #0ea5e9 25%, 
        #3b82f6 50%, 
        #1d4ed8 75%, 
        #0f766e 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    box-shadow: 
        0 8px 32px rgba(8, 145, 178, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.subject-card.informatics:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(8, 145, 178, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Математика карточкасы - жылы қызғылт-сары градиент */
.subject-card.mathematics {
    background: linear-gradient(135deg, 
        #f59e0b 0%, 
        #ef4444 25%, 
        #ec4899 50%, 
        #8b5cf6 75%, 
        #6366f1 100%
    );
    background-size: 400% 400%;
    animation: gradientShiftMath 8s ease infinite;
    box-shadow: 
        0 8px 32px rgba(245, 158, 11, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.subject-card.mathematics:hover {
    transform: translateY(-16px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(245, 158, 11, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Математика үшін арнайы градиент анимациясы */
@keyframes gradientShiftMath {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Typography hierarchy */
.subject-name {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    color: white;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .subject-name {
        font-size: 36px;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .subject-name {
        font-size: 32px;
        margin-bottom: 16px;
    }
}

@media (max-width: 360px) {
    .subject-name {
        font-size: 28px;
        margin-bottom: 14px;
    }
}

.subject-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.7;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 400;
    max-width: 400px;
}

@media (max-width: 768px) {
    .subject-description {
        font-size: 16px;
        margin-bottom: 35px;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .subject-description {
        font-size: 15px;
        margin-bottom: 30px;
        max-width: 300px;
        line-height: 1.6;
    }
}

@media (max-width: 360px) {
    .subject-description {
        font-size: 14px;
        margin-bottom: 25px;
        max-width: 280px;
    }
}

/* Decorative elements */
.subject-card .decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.decorative-circle:nth-child(1) {
    width: 120px;
    height: 120px;
    top: -60px;
    right: -60px;
    animation: float 6s ease-in-out infinite;
}

.decorative-circle:nth-child(2) {
    width: 80px;
    height: 80px;
    bottom: -40px;
    left: -40px;
    animation: float 8s ease-in-out infinite reverse;
}

.decorative-circle:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    left: 10%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Modern button design */
.learn-button {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 60px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: none;
}

@media (max-width: 768px) {
    .learn-button {
        padding: 16px 35px;
        font-size: 17px;
        border-radius: 50px;
    }
}

@media (max-width: 480px) {
    .learn-button {
        padding: 14px 30px;
        font-size: 16px;
        border-radius: 40px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 360px) {
    .learn-button {
        padding: 12px 25px;
        font-size: 15px;
        border-radius: 35px;
        letter-spacing: 0.2px;
    }
}

/* Glass morphism overlay */
.subject-card .glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Geometric patterns */
.subject-card .geometric-pattern {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1;
}

.geometric-pattern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.1) 45%, 
        rgba(255, 255, 255, 0.1) 55%, 
        transparent 60%
    );
    transform: rotate(45deg);
    animation: patternRotate 12s linear infinite;
}

@keyframes patternRotate {
    0% { transform: rotate(45deg); }
    100% { transform: rotate(405deg); }
}

/* Content hierarchy with better spacing */
.subject-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Badge-style accent */
.subject-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .subject-badge {
        padding: 7px 18px;
        font-size: 13px;
        margin-bottom: 20px;
        letter-spacing: 0.8px;
    }
}

@media (max-width: 480px) {
    .subject-badge {
        padding: 6px 16px;
        font-size: 12px;
        margin-bottom: 18px;
        letter-spacing: 0.6px;
    }
}

@media (max-width: 360px) {
    .subject-badge {
        padding: 5px 14px;
        font-size: 11px;
        margin-bottom: 16px;
        letter-spacing: 0.5px;
    }
}

/* Topics Section Styles - Толық жетілдірілген дизайн */
.topics-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    background: #ffffff;
    min-height: 100vh;
    position: relative;
}

/* Жоғарғы сол жақтағы артқа батырмасы - fixed позиция */
.topics-back-button {
    position: fixed;
    top: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.topics-back-button:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    transform: translateX(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.topics-back-button svg {
    transition: transform 0.2s ease;
}

.topics-back-button:hover svg {
    transform: translateX(-2px);
}

/* Header бөлімі - жетілдірілген */
.topics-header {
    margin-bottom: 40px;
    padding: 60px 30px 40px;
    margin-top: 80px; /* Жоғарғы батырма үшін орын */
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.topics-title {
    font-size: 2.8rem;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.topics-subtitle {
    color: #6c757d;
    font-size: 18px;
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* Topics Grid - оптималды орналасу */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
    padding: 0 10px;
}

.topic-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0891b2 0%, #0ea5e9 50%, #3b82f6 100%);
    transition: height 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 5px 15px rgba(8, 145, 178, 0.2);
    border-color: rgba(8, 145, 178, 0.2);
}

.topic-card:hover::before {
    height: 6px;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.topic-number {
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-number {
    transform: scale(1.08) rotate(1deg);
}

.topic-title-wrapper {
    flex: 1;
}

.topic-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.topic-card:hover .topic-title {
    color: #0891b2;
}

.topic-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 400;
}

.topic-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.difficulty {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty.easy, .difficulty.оңай {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.difficulty.medium, .difficulty.орташа {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.difficulty.hard, .difficulty.қиын {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.topic-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 20px;
    transition: all 0.3s ease;
}

.topic-card:hover .topic-icon {
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    color: white;
    transform: rotate(8deg) scale(1.05);
}

.topic-button {
    width: 100%;
    padding: 14px 22px;
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.topic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.topic-button:hover::before {
    left: 100%;
}

.topic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.4);
}

.topic-progress {
    height: 5px;
    background: #f1f3f4;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.topic-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, #0891b2 0%, #0ea5e9 100%);
    transition: width 1s ease-out;
    border-radius: 3px;
}

/* Статистика бөлімі */
.topics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 50px;
    padding: 30px 0;
}

.stats-card {
    background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 100%);
    color: white;
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stats-card:hover::before {
    transform: translateX(100%);
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(8, 145, 178, 0.4);
}

.stats-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stats-label {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Topic Stats enhanced */
.topic-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.topic-stat {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Enhanced hover animations */
@keyframes cardPulse {
    0%, 100% { transform: translateY(-8px) scale(1.01); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.topic-card:hover {
    animation: cardPulse 2s ease-in-out infinite;
}

/* Gradient text animation */
@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.topic-title:hover {
    background: linear-gradient(90deg, #0891b2, #0ea5e9, #3b82f6, #0891b2);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 3s ease infinite;
}

/* Interactive progress bar */
.topic-card:hover .topic-progress::after {
    background: linear-gradient(90deg, #0891b2 0%, #0ea5e9 50%, #3b82f6 100%);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(8, 145, 178, 0.6);
    }
    50% { 
        box-shadow: 0 0 20px rgba(8, 145, 178, 0.8);
    }
}

/* Enhanced stats cards with glassmorphism */
.stats-card {
    background: linear-gradient(135deg, 
        rgba(8, 145, 178, 0.9) 0%, 
        rgba(14, 165, 233, 0.9) 100%
    );
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
    border-radius: 16px;
    pointer-events: none;
}

/* Floating animation for decorative elements */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

.topic-icon {
    animation: floatSlow 6s ease-in-out infinite;
}

/* Topic button with enhanced interaction */
.topic-button {
    letter-spacing: 0.5px;
    text-transform: none;
    position: relative;
    overflow: hidden;
}

.topic-button:active {
    transform: translateY(0px) scale(0.98);
}

/* Loading animation for progress bars */
@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: var(--progress, 0%); }
}

.topic-progress::after {
    animation: loadProgress 2s ease-out;
}

/* Learn Detail View */
.learn-detail-view { 
        max-width: 960px; 
        margin: 0 auto; 
        padding: 12px 4px 60px; 
}
.learn-detail-back {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--primary-color);
    border-radius: 999px; /* көбірек скругление */
    padding: 8px 14px;
    cursor: pointer;
    transition: all .2s ease;
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600; /* шрифті сәл қалыңырақ */
}
.learn-detail-back:hover { border-color: #dbe0e6; transform: translateY(-1px); }
.learn-100dates-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 8px 0 10px; }
.learn-100dates-top .learn-detail-back { justify-self: start; }
.learn-100dates-top .learn-detail-date-top { justify-self: center; }
.learn-100dates-top .learn-100dates-top-spacer { width: 52px; height: 1px; }

.learn-detail-hero { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.learn-detail-hero img { width: 200px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 1px solid #e9ecef; }
.learn-detail-headings { display: flex; flex-direction: column; gap: 6px; }
.learn-detail-title { font-size: 26px; line-height: 1.2; margin: 0; color: var(--primary-color); font-weight: 700; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.learn-detail-meta { display: flex; gap: 10px; align-items: center; }
.learn-detail-meta .meta-date { color: var(--primary-color); font-size: 14px; line-height: 24px; font-weight: 300; }
.learn-detail-content { margin-top: 18px; line-height: 1.75; color: #1f2937; font-size: 16px; }
.learn-detail-section { margin-top: 22px; }
.learn-detail-section h4 { margin: 0 0 10px; color: #1f2937; font-size: 18px; }
.learn-detail-list { margin: 0; padding-left: 18px; }
@media (max-width: 700px) { 
    .learn-detail-hero { grid-template-columns: 1fr; }
    .learn-detail-hero img { width: 100%; }
}

/* 100 даталарға арналған арнайы көрініс */
.learn-100dates-view { max-width: 900px; }
.learn-detail-header.is-centered { text-align: center; margin-bottom: 18px; }
.learn-detail-date-top { color: var(--primary-color); font-weight: 300; font-size: 14px; }
.learn-detail-title.big { font-size: 38px; line-height: 1.15; font-weight: 800; margin: 60px 0 60px; color: var(--primary-color); }
.learn-100dates-view .learn-detail-title.big { text-align: center; }
.learn-100dates-view .learn-title-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 18px 0 4px; /* төменгі margin-ді азайттым */
    width: 100%;
    opacity: 0.6; /* opacity одан да төмендеттім */
}
.learn-detail-intro { display: none; }

.learn-audio-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    margin: 2px 0 40px; /* margin-bottom тағы да арттырдым */
}
.learn-audio-toolbar .lat-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent; /* фон жоқ */
    color: var(--primary-color);
    border-radius: 999px;
    padding: 6px 10px;
}
.learn-audio-toolbar .lat-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--border-color); /* --border-color түсінде шеңбер */
    color: var(--primary-color);
    cursor: not-allowed;
}
.learn-audio-toolbar .lat-play svg { width: 16px; height: 16px; fill: currentColor; }
.learn-audio-toolbar .lat-tip { font-size: 14px; color: var(--primary-color); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.learn-audio-toolbar .lat-sep { width: 1px; height: 18px; background: #d1d5db; display: inline-block; opacity: 0.3; /* opacity одан да төмендеттім */ }
.learn-audio-toolbar .lat-duration { font-size: 13px; color: var(--primary-color); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

.learn-audio-toolbar .lat-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* gap азайттым */
    border: none;
    background: transparent;
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s ease;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.learn-audio-toolbar .lat-copy:hover { transform: translateY(-1px); background: rgba(var(--primary-color-rgb), 0.05); }
.learn-audio-toolbar .lat-copy svg { width: 15px; height: 15px; fill: currentColor; }
.learn-audio-toolbar .lat-copy span { font-size: 14px; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* Timeline минималистік дизайн */
.learn-100dates-list { 
    display: flex; 
    flex-direction: column; 
    gap: 0; 
    margin-top: 24px;
    position: relative;
    padding-left: 0;
}

/* Timeline сызық */
.learn-100dates-list::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--primary-color) 5%, 
        var(--primary-color) 95%, 
        transparent 100%);
    opacity: 0.2;
}

.learn-100dates-list .date-item { 
    display: grid; 
    grid-template-columns: 42px 1fr; 
    gap: 20px; 
    align-items: start; 
    padding: 18px 0; 
    border: none;
    border-radius: 0;
    background: transparent;
    position: relative;
    transition: all 0.3s ease;
}

/* Hover эффект */
.learn-100dates-list .date-item:hover {
    background: rgba(var(--primary-color-rgb), 0.02);
    margin: 0 -16px;
    padding: 18px 16px;
    border-radius: 8px;
}

.learn-100dates-list .date-item:hover .date-content {
    transform: translateX(2px);
}

.learn-100dates-list .date-item:hover .date-order {
    transform: scale(1.15);
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--secondary-color), 0 0 0 6px var(--primary-color);
}

/* Timeline нүктесі - номері бар шеңбер */
.learn-100dates-list .date-order { 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
    position: relative;
    z-index: 2;
    margin: 2px auto 0;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.learn-100dates-list .date-content { 
    display: flex; 
    flex-direction: column; 
    gap: 4px;
    transition: transform 0.3s ease;
    padding-top: 2px;
}

.learn-100dates-list .date-time { 
    color: var(--primary-color); 
    font-weight: 600; 
    font-size: 15px; 
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 2px;
    opacity: 0.95;
    letter-spacing: -0.01em;
}

.learn-100dates-list .date-event { 
    color: var(--primary-color); 
    font-size: 14px; 
    line-height: 1.6; 
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    opacity: 0.75;
    font-weight: 400;
}

/* Intro / Outro блоктары */
.learn-100dates-intro, .learn-100dates-outro {
    margin: 18px 0 34px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--primary-color);
    opacity: 0.9;
}
.learn-100dates-outro { 
    margin: 38px 0 10px; 
    border-top: 1px dashed rgba(var(--primary-color-rgb), 0.15);
    padding-top: 24px;
    opacity: 0.85;
}

/* Fallback класс арқылы subject түсін қолдану (қажет болса JS data атрибут қоса алады) */
.learn-100dates-intro strong[data-subj-color],
.learn-100dates-outro strong[data-subj-color] {
    color: var(--current-subject-color, var(--primary-color));
}

/* Жасырын элементтер - жұмсақ анимациямен */
.learn-100dates-list .date-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.learn-100dates-list .date-item.hidden {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

.learn-100dates-list .date-item:not(.hidden) {
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* "Барлығын көру" батырмасы */
.learn-100dates-show-more {
    display: flex;
    justify-content: center;
    margin: 32px 0 20px;
}

.learn-show-more-btn {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.learn-show-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.learn-show-more-btn:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.learn-show-more-btn:hover::before {
    left: 0;
}

.learn-show-more-btn.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.4s ease;
}

@media (max-width: 520px) {
    .learn-100dates-list::before {
        left: 15px;
    }
    
    .learn-100dates-list .date-item { 
        grid-template-columns: 32px 1fr; 
        gap: 16px;
        padding: 16px 0; 
    }
    
    .learn-100dates-list .date-item:hover {
        margin: 0 -12px;
        padding: 16px 12px;
    }
    
    .learn-100dates-list .date-order { 
        width: 24px; 
        height: 24px;
        margin: 4px auto 0;
        font-size: 10px;
    }
    
    .learn-100dates-list .date-item:hover .date-order {
        transform: scale(1.2);
        box-shadow: 0 0 0 3px var(--secondary-color), 0 0 0 4px var(--primary-color);
    }
    
    .learn-100dates-list .date-time {
        font-size: 14px;
    }
    
    .learn-100dates-list .date-event {
        font-size: 13px;
    }
}

/* Enhanced responsiveness for very small screens */
@media (max-width: 320px) {
    .topic-header {
        gap: 10px;
    }
    
    .topic-number {
        padding: 8px 12px;
        font-size: 1rem;
        min-width: 45px;
    }
    
    .topic-title {
        font-size: 1.2rem;
        line-height: 1.2;
    }
    
    .topic-description {
        font-size: 0.9rem;
    }
    
    .difficulty {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

/* ============================================
   ИНФОРМАТИКА ТЕРМИНДЕРІ - Minimal Glossary Design
   ============================================ */

.learn-glossary-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 16px 60px;
}

/* Тақырыпты ортаға туралау - Adaptive Color */
.learn-glossary-view .learn-detail-title.big {
    text-align: center;
    font-size: 32px;
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: initial;
    margin-bottom: 16px;
}

.learn-glossary-view .learn-title-divider {
    display: none;
}

.learn-glossary-view .learn-100dates-intro {
    text-align: left; /* Тек мәтін сол жақта */
    max-width: 100%;
    margin: 0 0 40px;
    font-size: 15px;
    color: var(--primary-color);
    opacity: 0.7;
    line-height: 1.6;
}

/* Іздеу контейнері */
.glossary-search-container {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.glossary-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 99px; /* Толық сопақша */
    padding: 12px 24px;
    width: 100%;
    max-width: 480px;
    transition: all 0.25s ease;
}

.glossary-search-box:focus-within {
    background: var(--secondary-color);
    border-color: var(--informatics-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.glossary-search-box svg {
    width: 18px;
    height: 18px;
    color: var(--informatics-color);
    flex-shrink: 0;
}

.glossary-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--primary-color);
    outline: none;
    font-weight: 400;
}

.glossary-stats {
    font-size: 13px;
    color: var(--primary-color);
    opacity: 0.5;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Терминдер тізімі - минималистік */
.learn-glossary-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Термин элементі */
.glossary-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.glossary-item:first-child {
    border-top: 1px solid var(--border-color);
}

.glossary-item:hover {
    background: var(--hover-color);
    padding-left: 12px;
    margin-left: -12px;
    padding-right: 12px;
    margin-right: -12px;
}

.glossary-item-content {
    display: block;
    line-height: 1.6;
}

.glossary-item-term {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline;
}

.glossary-item-separator {
    color: var(--border-color);
    margin: 0 8px;
    font-weight: 400;
}

.glossary-item-definition {
    font-size: 16px;
    color: var(--primary-color);
    opacity: 0.7;
    display: inline;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 640px) {
    .learn-glossary-view {
        padding: 12px 12px 50px;
    }
    
    .glossary-item-term, .glossary-item-definition {
        font-size: 15px;
    }
    
    .glossary-search-box {
        padding: 10px 20px;
    }
}

/* ============================================
   ҰБТ-ҒА ҚАЛАЙ ДАЙЫНДАЛУ - Minimal Article Design
   Ақ-қара минимализм, әр секция әртүрлі стиль
   ============================================ */

.learn-article-view {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px 80px;
}

.learn-article-view .learn-detail-title.big {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: initial;
    margin-bottom: 60px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* Hero суретін өшіру */
.article-hero {
    display: none;
}

/* ============================================
   МАҚАЛА БӨЛІМДЕРІ - Base Styles
   ============================================ */
.article-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-section {
    padding: 48px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.article-section:last-child {
    border-bottom: none;
}

.article-section-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-section-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.article-section-text {
    font-size: 16px;
    line-height: 1.85;
    color: var(--primary-color);
    opacity: 0.75;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.article-section-text strong {
    color: var(--primary-color);
    opacity: 1;
    font-weight: 600;
}

.article-section-text em {
    font-style: italic;
    opacity: 0.9;
}

.article-section-text ul,
.article-section-text li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-section-text ul {
    margin-top: 16px;
}

.article-section-text li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.article-section-text li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    opacity: 0.3;
}

/* ============================================
   СТИЛЬ 1: minimal-text-focus
   Таза мәтін, қара-ақ, padding жоқ
   ============================================ */
.article-section.minimal-text-focus {
    padding: 40px 0;
}

.article-section.minimal-text-focus .article-section-heading {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    margin-bottom: 8px;
}

.article-section.minimal-text-focus .article-section-text {
    font-size: 18px;
    line-height: 1.9;
    opacity: 0.85;
}

/* ============================================
   СТИЛЬ 2: minimal-image-right
   Сурет оң жақта, grid layout
   ============================================ */
.article-section.minimal-image-right.has-image {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 40px;
    align-items: center;
}

.article-section.minimal-image-right .article-section-image {
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.article-section.minimal-image-right .article-section-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.article-section.minimal-image-right:hover .article-section-image img {
    filter: grayscale(0%);
}

/* ============================================
   СТИЛЬ 3: minimal-bordered
   Жіңішке қара жиек, сол жақта сызық
   ============================================ */
.article-section.minimal-bordered {
    padding: 40px 0 40px 32px;
    border-left: 2px solid var(--primary-color);
    border-bottom: none;
    margin-left: 0;
}

.article-section.minimal-bordered .article-section-heading {
    font-size: 19px;
}

/* ============================================
   СТИЛЬ 4: minimal-dark-accent
   Қара фон, ақ мәтін
   ============================================ */
.article-section.minimal-dark-accent {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 48px 40px;
    margin: 32px -20px;
    border-bottom: none;
}

.article-section.minimal-dark-accent .article-section-heading {
    color: var(--secondary-color);
}

.article-section.minimal-dark-accent .article-section-text {
    color: var(--secondary-color);
    opacity: 0.85;
}

.article-section.minimal-dark-accent .article-section-text strong {
    color: var(--secondary-color);
    opacity: 1;
}

.article-section.minimal-dark-accent.has-image {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 40px;
    align-items: center;
}

.article-section.minimal-dark-accent .article-section-image {
    border-radius: 4px;
    overflow: hidden;
}

.article-section.minimal-dark-accent .article-section-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   СТИЛЬ 5: minimal-highlight
   Жоғарғы жағында үлкен нөмір
   ============================================ */
.article-section.minimal-highlight {
    position: relative;
    padding-top: 80px;
}

.article-section.minimal-highlight::before {
    content: attr(data-order);
    position: absolute;
    top: 40px;
    left: 0;
    font-size: 72px;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.06;
    line-height: 1;
    letter-spacing: -0.05em;
    font-family: 'Inter', system-ui, sans-serif;
}

.article-section.minimal-highlight .article-section-heading {
    font-size: 20px;
}

/* ============================================
   СТИЛЬ 6: minimal-clean
   Ең таза, артық декорсыз
   ============================================ */
.article-section.minimal-clean {
    padding: 36px 0;
}

.article-section.minimal-clean .article-section-heading {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-section.minimal-clean .article-section-text {
    opacity: 0.7;
}

/* ============================================
   СТИЛЬ 7: minimal-conclusion
   Қорытынды блок, центрге туралған
   ============================================ */
.article-section.minimal-conclusion {
    text-align: center;
    padding: 64px 20px;
    border-bottom: none;
    border-top: 2px solid var(--primary-color);
    margin-top: 32px;
}

.article-section.minimal-conclusion .article-section-heading {
    font-size: 22px;
    margin-bottom: 20px;
}

.article-section.minimal-conclusion .article-section-text {
    font-size: 18px;
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto;
    opacity: 0.8;
}

.article-section.minimal-conclusion .article-section-text strong {
    display: block;
    font-size: 20px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* ============================================
   МАҚАЛА ІШІНДЕГІ СУРЕТ - Base
   ============================================ */
.article-section-image {
    border-radius: 4px;
    overflow: hidden;
}

.article-section-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
    .learn-article-view {
        padding: 12px 16px 60px;
    }
    
    .learn-article-view .learn-detail-title.big {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .article-section {
        padding: 36px 0;
    }
    
    .article-section.minimal-image-right.has-image,
    .article-section.minimal-dark-accent.has-image {
        grid-template-columns: 1fr;
    }
    
    .article-section.minimal-image-right .article-section-image,
    .article-section.minimal-dark-accent .article-section-image {
        order: -1;
        margin-bottom: 24px;
    }
    
    .article-section.minimal-dark-accent {
        margin: 24px -16px;
        padding: 36px 24px;
    }
    
    .article-section.minimal-bordered {
        padding-left: 20px;
    }
    
    .article-section.minimal-highlight::before {
        font-size: 48px;
        top: 32px;
    }
    
    .article-section.minimal-highlight {
        padding-top: 60px;
    }
    
    .article-section-heading {
        font-size: 18px;
    }
    
    .article-section-text {
        font-size: 15px;
    }
    
    .article-section.minimal-conclusion {
        padding: 48px 16px;
    }
    
    .article-section.minimal-conclusion .article-section-text {
        font-size: 16px;
    }
}

/* ============================================
   ТҮСТЕР - Subject Colors
   ============================================ */

/* Информатика түсі */
.informatics-color { --current-subject-color: #0891b2; }

/* Кеңес түсі */
.advice-color { --current-subject-color: #f59e0b; }
