/* =====================================================================
   Ejemplos — escaparate público de contenido generado por OposicionesIA
   Reutiliza la base de oposiciones-plataforma.css (.ep-wrap, .ep-hero…)
   y añade aquí los componentes propios (prefijo .ex-).
   ===================================================================== */

/* ---------- Breadcrumb ---------- */
.ex-breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: #64748b; margin-bottom: 1.5rem; }
.ex-breadcrumb a { color: #0891b2; text-decoration: none; font-weight: 600; }
.ex-breadcrumb a:hover { text-decoration: underline; }
.ex-breadcrumb .sep { color: #cbd5e1; }
html.dark .ex-breadcrumb { color: #94a3b8; }
html.dark .ex-breadcrumb a { color: #22d3ee; }
html.dark .ex-breadcrumb .sep { color: #475569; }

/* ---------- Hub: 3 tarjetas grandes ---------- */
.ex-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.ex-hub-card {
    display: flex; flex-direction: column; gap: .75rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
    padding: 1.75rem 1.6rem; text-decoration: none; color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ex-hub-card:not(.is-disabled):hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(8,145,178,.12); border-color: #67e8f9; }
.ex-hub-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: linear-gradient(135deg,#0891b2,#06b6d4); }
.ex-hub-card h2 { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 0; }
.ex-hub-card p { font-size: .92rem; color: #64748b; line-height: 1.55; margin: 0; flex-grow: 1; }
.ex-hub-meta { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 700; color: #0891b2; }
.ex-hub-card.is-disabled { opacity: .72; cursor: default; }
.ex-hub-card.is-disabled .ex-hub-icon { background: linear-gradient(135deg,#94a3b8,#cbd5e1); }
.ex-hub-soon { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: #b45309; background: #fef3c7; padding: .2rem .6rem; border-radius: 999px; align-self: flex-start; }
html.dark .ex-hub-card { background: #1e293b; border-color: #334155; }
html.dark .ex-hub-card h2 { color: #f1f5f9; }
html.dark .ex-hub-card p { color: #94a3b8; }
html.dark .ex-hub-card:not(.is-disabled):hover { border-color: #0e7490; box-shadow: 0 12px 28px rgba(0,0,0,.35); }
html.dark .ex-hub-meta { color: #22d3ee; }
html.dark .ex-hub-soon { color: #fde68a; background: #422006; }

/* ---------- Catálogo: secciones por especialidad ---------- */
.ex-spec { margin-top: 2.25rem; }
.ex-spec-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid #e2e8f0; }
.ex-spec-head h2 { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 0; }
.ex-spec-head .ex-spec-dot { width: 10px; height: 10px; border-radius: 50%; background: #0891b2; }
html.dark .ex-spec-head { border-color: #334155; }
html.dark .ex-spec-head h2 { color: #f1f5f9; }

/* fila por CCAA */
.ex-ccaa-row {
    display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: center;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 1rem 1.25rem; margin-bottom: .75rem;
}
.ex-ccaa-name { font-weight: 700; color: #0f172a; font-size: .98rem; }
.ex-ccaa-items { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 680px) { .ex-ccaa-row { grid-template-columns: 1fr; gap: .65rem; } }
html.dark .ex-ccaa-row { background: #1e293b; border-color: #334155; }
html.dark .ex-ccaa-name { color: #f1f5f9; }

/* botón-item (tema / formato) */
.ex-item {
    display: inline-flex; flex-direction: column; gap: .15rem;
    padding: .55rem .9rem; border-radius: 10px; text-decoration: none;
    background: #f0fdff; border: 1px solid #cffafe; transition: all .13s; min-width: 0;
}
.ex-item:hover { background: #0891b2; border-color: #0891b2; }
.ex-item:hover .ex-item-title, .ex-item:hover .ex-item-sub { color: #fff; }
.ex-item-title { font-weight: 700; font-size: .88rem; color: #0e7490; }
.ex-item-sub { font-size: .74rem; color: #64748b; }
html.dark .ex-item { background: #0e2a33; border-color: #155e75; }
html.dark .ex-item-title { color: #67e8f9; }
html.dark .ex-item-sub { color: #94a3b8; }
html.dark .ex-item:hover { background: #06b6d4; border-color: #06b6d4; }
html.dark .ex-item:hover .ex-item-title, html.dark .ex-item:hover .ex-item-sub { color: #06212b; }

/* ---------- Visor (tema / supuesto) ---------- */
.ex-doc { max-width: 860px; margin: 0 auto; }
.ex-doc-head { margin-bottom: 1.5rem; }
.ex-doc-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #0891b2; }
.ex-doc-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: #0f172a; margin: .5rem 0 .6rem; letter-spacing: -.02em; line-height: 1.2; }
.ex-doc-tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ex-tag { font-size: .78rem; font-weight: 600; color: #475569; background: #f1f5f9; padding: .25rem .7rem; border-radius: 999px; }
.ex-tag-format { color: #0e7490; background: #cffafe; }
html.dark .ex-doc-eyebrow { color: #22d3ee; }
html.dark .ex-doc-head h1 { color: #f1f5f9; }
html.dark .ex-tag { color: #cbd5e1; background: #334155; }
html.dark .ex-tag-format { color: #a5f3fc; background: #155e75; }

/* toggle idioma */
.ex-lang { display: inline-flex; gap: .25rem; background: #f1f5f9; border-radius: 999px; padding: .2rem; }
.ex-lang a { padding: .3rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #64748b; text-decoration: none; transition: all .12s; }
.ex-lang a.active { background: #0891b2; color: #fff; }
html.dark .ex-lang { background: #1e293b; }
html.dark .ex-lang a { color: #94a3b8; }
html.dark .ex-lang a.active { background: #06b6d4; color: #06212b; }

/* aviso "generado por IA" */
.ex-ai-note {
    display: flex; gap: .7rem; align-items: flex-start;
    background: #f0fdff; border: 1px solid #cffafe; border-radius: 12px;
    padding: .85rem 1.1rem; margin: 1.25rem 0 2rem; font-size: .88rem; color: #155e75; line-height: 1.5;
}
.ex-ai-note i { color: #0891b2; margin-top: .15rem; }
html.dark .ex-ai-note { background: #0e2a33; border-color: #155e75; color: #a5f3fc; }
html.dark .ex-ai-note i { color: #22d3ee; }

/* ---------- Prosa renderizada (markdown) ---------- */
.ex-prose { color: #1e293b; font-size: 1rem; line-height: 1.75; }
.ex-prose > *:first-child { margin-top: 0; }
.ex-prose h1, .ex-prose h2, .ex-prose h3, .ex-prose h4 { color: #0f172a; font-weight: 800; line-height: 1.3; margin: 2rem 0 .85rem; letter-spacing: -.01em; }
.ex-prose h1 { font-size: 1.7rem; }
.ex-prose h2 { font-size: 1.4rem; padding-bottom: .35rem; border-bottom: 1px solid #e2e8f0; }
.ex-prose h3 { font-size: 1.18rem; color: #0e7490; }
.ex-prose h4 { font-size: 1.03rem; }
.ex-prose p { margin: 0 0 1.1rem; }
.ex-prose ul, .ex-prose ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.ex-prose li { margin-bottom: .4rem; }
.ex-prose strong { color: #0f172a; font-weight: 700; }
.ex-prose blockquote { border-left: 3px solid #0891b2; background: #f0fdff; margin: 1.25rem 0; padding: .75rem 1.1rem; border-radius: 0 8px 8px 0; color: #475569; }
.ex-prose code { background: #f1f5f9; padding: .12rem .4rem; border-radius: 5px; font-size: .9em; }
.ex-prose pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.2rem; border-radius: 10px; overflow-x: auto; margin: 1.25rem 0; }
.ex-prose pre code { background: none; padding: 0; }
.ex-prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .92rem; }
.ex-prose th, .ex-prose td { border: 1px solid #e2e8f0; padding: .55rem .75rem; text-align: left; vertical-align: top; }
.ex-prose th { background: #f8fafc; font-weight: 700; color: #0f172a; }
.ex-prose hr { border: none; border-top: 1px solid #e2e8f0; margin: 2rem 0; }
.ex-prose a { color: #0891b2; }
html.dark .ex-prose { color: #cbd5e1; }
html.dark .ex-prose h1, html.dark .ex-prose h2, html.dark .ex-prose h4 { color: #f1f5f9; }
html.dark .ex-prose h2 { border-color: #334155; }
html.dark .ex-prose h3 { color: #67e8f9; }
html.dark .ex-prose strong { color: #f1f5f9; }
html.dark .ex-prose blockquote { background: #0e2a33; color: #94a3b8; }
html.dark .ex-prose code { background: #334155; }
html.dark .ex-prose th, html.dark .ex-prose td { border-color: #334155; }
html.dark .ex-prose th { background: #1e293b; color: #f1f5f9; }
html.dark .ex-prose hr { border-color: #334155; }

/* ---------- CTA conversión ---------- */
.ex-cta {
    margin: 2.75rem auto 0; max-width: 860px; text-align: center;
    background: linear-gradient(135deg,#0891b2,#0e7490); border-radius: 18px;
    padding: 2.25rem 1.75rem; color: #fff;
}
.ex-cta h3 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .5rem; }
.ex-cta p { font-size: 1rem; opacity: .92; margin: 0 auto 1.4rem; max-width: 560px; line-height: 1.55; }
.ex-cta-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.ex-btn-primary { background: #fff; color: #0e7490; font-weight: 700; padding: .7rem 1.5rem; border-radius: 10px; text-decoration: none; transition: transform .12s; }
.ex-btn-primary:hover { transform: translateY(-2px); }
.ex-btn-ghost { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; padding: .7rem 1.5rem; border-radius: 10px; text-decoration: none; border: 1px solid rgba(255,255,255,.4); }
.ex-btn-ghost:hover { background: rgba(255,255,255,.24); }

/* ---------- En construcción ---------- */
.ex-soon-wrap { max-width: 620px; margin: 3rem auto; text-align: center; }
.ex-soon-icon { width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 1.5rem; font-size: 2.2rem; color: #b45309; background: #fef3c7; }
.ex-soon-wrap h1 { font-size: 1.8rem; font-weight: 800; color: #0f172a; margin: 0 0 .75rem; }
.ex-soon-wrap p { color: #64748b; font-size: 1.05rem; line-height: 1.6; margin: 0 auto 1.75rem; }
html.dark .ex-soon-icon { color: #fde68a; background: #422006; }
html.dark .ex-soon-wrap h1 { color: #f1f5f9; }
html.dark .ex-soon-wrap p { color: #94a3b8; }

/* ---------- Estado vacío ---------- */
.ex-empty { text-align: center; color: #64748b; padding: 3rem 1rem; }
html.dark .ex-empty { color: #94a3b8; }
