/* ========================================
   Vista de Selección de Tema — Stylesheet
   (Nivel + Habilidad → Tópicos)
   ======================================== */

/* ── NAV OVERRIDES ── */
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    padding: 8px 14px;
    border-radius: 50px;
    transition: all 0.25s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-back {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bc-cyan);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1.5px solid var(--bc-cyan);
    transition: all 0.3s;
}
.nav-back:hover {
    background: var(--bc-cyan);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 189, 0.3);
}

/* ── HERO ── */
.topic-hero {
    min-height: 62vh;
    background: var(--bc-blue);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topic-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 60% 40%, rgba(0, 123, 189, 0.35), transparent),
        radial-gradient(ellipse 60% 90% at 10% 80%, rgba(0, 55, 128, 0.5), transparent),
        radial-gradient(ellipse 40% 40% at 90% 20%, rgba(0, 145, 219, 0.2), transparent);
    pointer-events: none;
    z-index: 1;
}
.topic-hero-accent {
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    z-index: 1;
    animation: pulseAccent 8s ease-in-out infinite;
}
.topic-hero-accent.a1 { background: #10b981; top: -180px; right: -100px; }
.topic-hero-accent.a2 { background: #3b82f6; top: -180px; right: -100px; }
.topic-hero-accent.b1 { background: #f59e0b; top: -180px; right: -100px; }
.topic-hero-accent.b2 { background: #ef4444; top: -180px; right: -100px; }
.topic-hero-accent.c  { background: #8b5cf6; top: -180px; right: -100px; }
@keyframes pulseAccent {
    0%,100% { transform: scale(1); opacity: 0.45; }
    50%     { transform: scale(1.15); opacity: 0.6; }
}

.topic-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: floatParticle linear infinite;
}
@keyframes floatParticle {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(0.5); opacity: 0; }
}

.topic-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: 130px 40px 70px;
    max-width: 900px;
    width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 26px;
}
.breadcrumbs a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .crumb-sep {
    color: rgba(255,255,255,0.35);
    font-size: 0.9rem;
}
.breadcrumbs .crumb-current {
    color: #fff;
    font-weight: 700;
}

/* Title block */
.topic-hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 14px;
}
.topic-hero-title .skill-word {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.65) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.topic-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.72);
    max-width: 620px;
    margin: 0 auto 30px;
    line-height: 1.65;
}

/* Hero chips (level + skill meta) */
.topic-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}
.meta-chip .chip-icon { font-size: 1.05rem; }
.meta-chip.level-chip { padding-left: 8px; }
.meta-chip .level-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: #fff;
}
.meta-chip .level-pill.a1 { background: linear-gradient(135deg, #10b981, #059669); }
.meta-chip .level-pill.a2 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.meta-chip .level-pill.b1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.meta-chip .level-pill.b2 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.meta-chip .level-pill.c  { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* ── TOPICS SECTION ── */
.topics-section {
    padding: 90px 24px 110px;
    background: #f7f9fc;
    position: relative;
}
.topics-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 48px;
}
.topics-heading {
    flex: 1;
    min-width: 280px;
}
.topics-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bc-cyan);
    margin-bottom: 10px;
}
.topics-title {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 800;
    color: var(--bc-blue);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 10px;
}
.topics-desc {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.65;
    max-width: 620px;
}

/* Stats pill */
.topics-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.stat-pill {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 14px 20px;
    border-radius: 16px;
    min-width: 110px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 53, 128, 0.04);
}
.stat-pill .stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bc-blue);
    line-height: 1;
}
.stat-pill .stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

/* Topic card */
.topic-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 26px 24px 22px;
    border: 1px solid #e5e9f0;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}
.topic-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bc-cyan), var(--bc-cyan-light));
    opacity: 0;
    transition: opacity 0.35s;
}
.topic-card.available:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 53, 128, 0.14);
    border-color: transparent;
}
.topic-card.available:hover::before { opacity: 1; }

.topic-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 123, 189, 0.12), rgba(0, 53, 128, 0.08));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    transition: transform 0.35s;
}
.topic-card.available:hover .topic-icon-wrap { transform: scale(1.08) rotate(-4deg); }

.topic-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bc-blue);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    line-height: 1.2;
}
.topic-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 18px;
    flex: 1;
}

.topic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px dashed #e5e9f0;
}
.topic-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 50px;
}
.topic-status.available {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}
.topic-status.available::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.topic-status.soon {
    color: #78716c;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
}
.topic-status.soon::before {
    content: "⏳";
    filter: saturate(0);
}
.topic-arrow {
    font-size: 1.3rem;
    color: var(--bc-cyan);
    font-weight: 600;
    transition: transform 0.3s;
}
.topic-card.available:hover .topic-arrow {
    transform: translateX(4px);
}
.topic-card.soon {
    opacity: 0.78;
    cursor: not-allowed;
}
.topic-card.soon .topic-arrow {
    color: #cbd5e1;
}

/* Make entire card clickable */
.topic-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.topic-card-link.disabled {
    pointer-events: none;
}

/* Empty state */
.topics-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
}
.topics-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}
.topics-empty h3 {
    color: var(--bc-blue);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.topics-empty p {
    color: #64748b;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Quick nav to other skills */
.skills-nav {
    margin-top: 64px;
    padding: 32px;
    background: linear-gradient(135deg, #fff 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
}
.skills-nav h4 {
    color: var(--bc-blue);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.skills-nav-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.skills-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    color: var(--bc-blue);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.25s;
}
.skills-nav-chip:hover {
    border-color: var(--bc-cyan);
    color: var(--bc-cyan);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 189, 0.12);
}
.skills-nav-chip.current {
    background: var(--bc-blue);
    color: #fff;
    border-color: var(--bc-blue);
    pointer-events: none;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.topic-card.reveal {
    transition-delay: calc(var(--i, 0) * 60ms);
}

/* Responsive */
@media (max-width: 680px) {
    .topic-hero-content { padding: 110px 22px 56px; }
    .topics-section { padding: 64px 18px 80px; }
    .topics-header { flex-direction: column; align-items: flex-start; }
    .topic-hero-meta { flex-direction: column; }
    .nav-link { display: none; }
}
