/* ===== LEARN PAGE - INTERACTIVE CARD GRID REDESIGN ===== */

/* Full Page Container */
.learn-fullpage {
    width: 100%;
    min-height: 100vh;
    background: var(--surface-base, #0D1117);
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.learn-hero-section {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--surface-base, #0D1117) 0%, var(--surface-elevated, #161B22) 100%);
    overflow: hidden;
}

/* Background Grid Pattern */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(230, 57, 70, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 57, 70, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Hero Content */
.learn-hero-section .hero-content {
    position: relative;
    z-index: 2;
}

.learn-hero-section .hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(123, 44, 191, 0.1);
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 30px;
    color: var(--token-accent, #7B2CBF);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.learn-hero-title {
    margin: 0;
}

.learn-hero-title .title-line {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.1;
}

.learn-hero-title .title-line:first-child {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-primary, #fff);
}

.learn-hero-title .title-line.gradient-text {
    font-size: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(135deg, #E63946, #7B2CBF, #00F5D4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.learn-hero-section .hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary, #8b949e);
    margin-top: 1.5rem;
    max-width: 600px;
}

/* ===== CATEGORY TABS ===== */
.category-section {
    padding: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.category-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    color: var(--text-secondary, #8b949e);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.category-tab:hover {
    background: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.3);
    color: var(--token-primary, #E63946);
    transform: translateY(-2px);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--token-primary, #E63946), var(--token-accent, #7B2CBF));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
}

.tab-icon {
    font-size: 1rem;
}

/* ===== CARDS GRID ===== */
.learn-grid-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.learn-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

/* Learn Card */
.learn-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.learn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--token-primary, #E63946), var(--token-secondary, #00F5D4));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.learn-card:hover {
    transform: translateY(-8px);
    border-color: rgba(230, 57, 70, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

/* Featured Card */
.learn-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.08), rgba(123, 44, 191, 0.05));
    border-color: rgba(230, 57, 70, 0.2);
}

/* Card Header */
.learn-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(123, 44, 191, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.learn-card .card-icon {
    font-size: 1.5rem;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--token-secondary, #00F5D4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 245, 212, 0.1);
    border-radius: 15px;
}

/* Card Title */
.learn-card .card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

/* Card Preview */
.card-preview {
    font-size: 0.95rem;
    color: var(--text-secondary, #8b949e);
    line-height: 1.6;
    margin: 0 0 1rem;
}

/* Card Expanded Content */
.card-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.learn-card.expanded .card-expanded {
    max-height: 500px;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.card-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary, #8b949e);
    font-size: 0.9rem;
}

.card-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--token-primary, #E63946);
    font-weight: bold;
}

.card-list.check-list li::before {
    content: '✓';
    color: var(--token-secondary, #00F5D4);
}

.card-list.shield-list li::before {
    content: '🛡️';
    font-size: 0.8rem;
}

.card-list.heart-list li::before {
    content: '❤️';
    font-size: 0.8rem;
}

/* Card Highlight */
.card-highlight {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(0, 245, 212, 0.05));
    border-left: 3px solid var(--token-secondary, #00F5D4);
    border-radius: 0 12px 12px 0;
    font-size: 0.9rem;
    color: var(--text-primary, #fff);
    font-weight: 500;
}

/* Expand Button */
.expand-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.3);
}

.expand-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--token-primary, #E63946);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.learn-card.expanded .expand-icon {
    transform: rotate(45deg);
}

/* ===== BLOOD TYPES VISUAL ===== */
.blood-types-visual {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem 0;
}

.blood-type-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.blood-type-item:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.06);
}

.blood-type-item .type {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-bottom: 0.25rem;
}

.blood-type-item .label {
    font-size: 0.7rem;
    color: var(--text-secondary, #8b949e);
}

.blood-type-item.universal .type {
    color: var(--token-secondary, #00F5D4);
}

.blood-type-item.common .type {
    color: var(--token-primary, #E63946);
}

.blood-type-item.recipient .type {
    color: var(--token-achievement, #FFD166);
}

/* ===== PROCESS STEPS ===== */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--token-primary, #E63946), var(--token-accent, #7B2CBF));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-text {
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
}

/* ===== TIPS SPLIT ===== */
.tips-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
}

.tips-column h4 {
    font-size: 0.9rem;
    color: var(--token-secondary, #00F5D4);
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.tips-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-column li {
    padding: 0.4rem 0;
    color: var(--text-secondary, #8b949e);
    font-size: 0.85rem;
}

/* ===== MYTHS LIST ===== */
.myths-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
}

.myth-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.myth {
    display: block;
    color: var(--token-primary, #E63946);
    font-size: 0.85rem;
    font-style: italic;
    text-decoration: line-through;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.fact {
    display: block;
    color: var(--token-secondary, #00F5D4);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== CTA SECTION ===== */
.learn-cta-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--token-primary, #E63946), var(--token-accent, #7B2CBF));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.learn-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.cta-container {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.learn-cta-section .cta-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.learn-cta-section .cta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    margin: 0 0 1rem;
}

.learn-cta-section .cta-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin: 0 0 2rem;
}

.learn-cta-section .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.learn-cta-section .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.learn-cta-section .cta-btn.primary {
    background: white;
    color: var(--token-primary, #E63946);
}

.learn-cta-section .cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.learn-cta-section .cta-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.learn-cta-section .cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.cta-quote {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0;
}

/* ===== DARK MODE ===== */
body.dark-mode .learn-fullpage {
    background: var(--surface-base, #0D1117);
}

/* ===== LIGHT MODE ===== */
body:not(.dark-mode) .learn-fullpage {
    background: #f8fafc;
}

body:not(.dark-mode) .learn-hero-section {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body:not(.dark-mode) .hero-bg-grid {
    background-image:
        linear-gradient(rgba(230, 57, 70, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 57, 70, 0.05) 1px, transparent 1px);
}

body:not(.dark-mode) .learn-hero-title .title-line:first-child {
    color: #1e293b;
}

body:not(.dark-mode) .learn-hero-section .hero-subtitle {
    color: #64748b;
}

body:not(.dark-mode) .category-section {
    background: rgba(248, 250, 252, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .category-tab {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

body:not(.dark-mode) .category-tab:hover {
    background: rgba(230, 57, 70, 0.08);
    border-color: rgba(230, 57, 70, 0.2);
}

body:not(.dark-mode) .learn-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .learn-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .learn-card .card-title {
    color: #1e293b;
}

body:not(.dark-mode) .card-preview,
body:not(.dark-mode) .card-list li {
    color: #64748b;
}

body:not(.dark-mode) .expand-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1e293b;
}

body:not(.dark-mode) .expand-btn:hover {
    background: rgba(230, 57, 70, 0.08);
}

body:not(.dark-mode) .blood-type-item,
body:not(.dark-mode) .step,
body:not(.dark-mode) .myth-item {
    background: rgba(0, 0, 0, 0.03);
}

body:not(.dark-mode) .blood-type-item .type,
body:not(.dark-mode) .step-text {
    color: #1e293b;
}

body:not(.dark-mode) .card-highlight {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.08), rgba(0, 245, 212, 0.03));
    color: #1e293b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .learn-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .learn-hero-section {
        min-height: 40vh;
    }

    .learn-card.featured {
        grid-column: span 1;
    }

    .category-tabs {
        gap: 0.5rem;
    }

    .category-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .tab-text {
        display: none;
    }

    .tab-icon {
        font-size: 1.2rem;
    }

    .learn-cards-grid {
        grid-template-columns: 1fr;
    }

    .blood-types-visual {
        grid-template-columns: repeat(2, 1fr);
    }

    .tips-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .learn-hero-title .title-line:first-child {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .learn-hero-title .title-line.gradient-text {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .learn-hero-section .hero-subtitle {
        font-size: clamp(0.85rem, 2vw, 1rem);
    }

    .learn-grid-section {
        padding: 2rem 1rem;
    }

    .learn-card {
        padding: 1.25rem;
    }

    .blood-types-visual {
        grid-template-columns: 1fr;
    }

    .learn-cta-section .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .learn-cta-section .cta-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .learn-hero-title .title-line.gradient-text {
        animation: none;
    }

    .learn-card,
    .category-tab,
    .expand-btn,
    .learn-cta-section .cta-btn {
        transition: none;
    }

    .card-expanded {
        transition: none;
    }
}
