/*
Theme Name: Colombia Blockchain
Theme URI: https://colombiablockchain.co
Author: Colombia Blockchain
Author URI: https://colombiablockchain.co
Description: Tema para colombiablockchain.co. Portada con los eventos Colombia Blockchain Forum, Summit y Week, la sección de líderes y expertos, y el propósito: tecnología blockchain, no cripto ni trading. Todo se edita en Apariencia > Personalizar > Portada Colombia Blockchain, incluidas las redes sociales.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: colombiablockchain
Tags: one-column, custom-logo, custom-menu, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--cb-esmeralda: #0f4a3a;
	--cb-esmeralda-honda: #0a3529;
	--cb-noche: #072a20;
	--cb-brote: #5fd3a3;
	--cb-mineral: #edf1ee;
	--cb-tinta: #13211c;
	--cb-piedra: #56665f;
	--cb-oro: #e2b33f;
	--cb-linea: rgba(19, 33, 28, 0.16);
	--cb-linea-clara: rgba(237, 241, 238, 0.22);
	--cb-font: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--cb-wrap: 1240px;
	--cb-gutter: clamp(16px, 4vw, 48px);
	--cb-node: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--cb-mineral);
	color: var(--cb-tinta);
	font-family: var(--cb-font);
	font-size: 1.0625rem;
	line-height: 1.55;
	letter-spacing: normal;
	font-stretch: 100%;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cb-oro); outline-offset: 3px; }
.cb-wrap { width: 100%; max-width: var(--cb-wrap); margin: 0 auto; padding: 0 var(--cb-gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.cb-skip {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--cb-oro); color: var(--cb-tinta); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.cb-skip:focus { top: 12px; }

/* ---------- Encabezado ---------- */
.cb-header { background: var(--cb-esmeralda); color: var(--cb-mineral); }
.cb-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	min-height: 76px;
}
.cb-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-stretch: 88%; font-size: 1.05rem; }
.cb-brand--logo img { max-height: 44px; width: auto; }
.cb-brand__mark { display: inline-flex; gap: 3px; }
.cb-brand__mark i { width: 9px; height: 9px; background: var(--cb-mineral); display: block; }
.cb-brand__mark i:nth-child(2) { background: var(--cb-brote); }
.cb-brand__mark i:nth-child(3) { background: var(--cb-oro); }

.cb-nav { position: relative; }
.cb-nav__toggle { display: none; }
.cb-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 3vw, 36px); }
.cb-nav__list a {
	text-decoration: none; font-weight: 500; font-size: 0.98rem; padding: 6px 0;
	border-bottom: 2px solid transparent;
}
.cb-nav__list a:hover, .cb-nav__list .current-menu-item > a { border-bottom-color: var(--cb-oro); }

/* ---------- Portada: árbol de eventos ---------- */
.cb-hero {
	background: var(--cb-esmeralda);
	color: var(--cb-mineral);
	padding: clamp(56px, 9vw, 128px) 0 clamp(64px, 9vw, 120px);
	overflow: hidden;
}
.cb-tree {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	--cb-stub: clamp(28px, 4.5vw, 72px);
}
.cb-tree__root {
	margin: 0;
	padding-right: var(--cb-stub);
	font-weight: 800;
	font-stretch: 62%;
	font-size: clamp(3rem, 7vw, 6rem);
	line-height: 0.86;
	letter-spacing: normal;
	position: relative;
}
.cb-tree__root span { display: block; }
/* conector raíz → tronco */
.cb-tree__root::after {
	content: ""; position: absolute; right: 0; top: 50%;
	width: var(--cb-stub); height: 2px; background: var(--cb-linea-clara);
	transform-origin: left center;
}
.cb-tree__branches {
	list-style: none; margin: 0; padding: 0;
	position: relative;
}
.cb-tree__branch {
	position: relative;
	--cb-pad: clamp(8px, 1.2vw, 16px);
	padding: var(--cb-pad) 0 var(--cb-pad) var(--cb-stub);
	font-size: clamp(2.5rem, 6.2vw, 5.5rem);
	line-height: 1;
}
/* tronco vertical por tramos */
.cb-tree__branch::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0;
	width: 2px; background: var(--cb-linea-clara);
	transform-origin: center top;
}
.cb-tree__branch:first-child::before { top: calc(var(--cb-pad) + 0.5em); }
.cb-tree__branch:last-child::before { bottom: auto; height: calc(var(--cb-pad) + 0.5em); }
.cb-tree__branch:only-child::before { display: none; }
/* rama horizontal + bloque (nodo) */
.cb-tree__branch::after {
	content: ""; position: absolute; left: 0; top: calc(var(--cb-pad) + 0.5em);
	width: calc(var(--cb-stub) - 18px); height: 2px;
	background: var(--cb-linea-clara);
	transform-origin: left center;
}
.cb-tree__event {
	position: relative;
	display: inline-block;
	font-weight: 700;
	font-stretch: 125%;
	font-size: 1em;
	line-height: 1;
	letter-spacing: normal;
	color: var(--cb-mineral);
	text-decoration: none;
}
.cb-tree__event::before {
	content: ""; position: absolute; top: 50%;
	left: calc(-18px + 1px); width: var(--cb-node); height: var(--cb-node);
	margin-top: calc(var(--cb-node) / -2 + 1px);
	background: var(--cb-brote);
}
.cb-tree__desc, .cb-tree__since {
	display: block;
	font-stretch: 100%;
	line-height: 1.35;
	max-width: 34ch;
}
.cb-tree__desc {
	margin-top: 10px;
	font-size: clamp(1rem, 1.25vw, 1.15rem);
	font-weight: 500;
	color: var(--cb-brote);
}
.cb-tree__since {
	margin-top: 2px;
	font-size: clamp(0.88rem, 1vw, 0.98rem);
	font-weight: 400;
	color: rgba(237, 241, 238, 0.7);
}
a.cb-tree__event { transition: color 0.2s ease; }
a.cb-tree__event:hover, a.cb-tree__event:focus-visible { color: var(--cb-oro); }
a.cb-tree__event:hover::before, a.cb-tree__event:focus-visible::before { background: var(--cb-oro); }

.cb-hero__about {
	margin-top: clamp(40px, 6vw, 80px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(20px, 4vw, 64px);
	align-items: start;
	border-top: 1px solid var(--cb-linea-clara);
	padding-top: clamp(24px, 3vw, 36px);
}
.cb-hero__statement {
	margin: 0;
	font-weight: 700;
	font-stretch: 92%;
	font-size: clamp(1.45rem, 2.5vw, 2.1rem);
	line-height: 1.12;
	max-width: 22ch;
	padding-left: 18px;
	border-left: 4px solid var(--cb-oro);
}
.cb-hero__intro {
	margin: 0;
	max-width: 52ch;
	font-size: clamp(1.02rem, 1.3vw, 1.15rem);
	color: rgba(237, 241, 238, 0.82);
}

/* Secuencia de carga: el árbol se dibuja una sola vez */
@media (prefers-reduced-motion: no-preference) {
	.cb-tree__root::after { animation: cb-grow-x 0.35s ease-out 0.15s both; }
	.cb-tree__branch::before { animation: cb-grow-y 0.35s ease-out 0.45s both; }
	.cb-tree__branch::after { animation: cb-grow-x 0.3s ease-out both; }
	.cb-tree__branch:nth-child(1)::after { animation-delay: 0.75s; }
	.cb-tree__branch:nth-child(2)::after { animation-delay: 0.9s; }
	.cb-tree__branch:nth-child(3)::after { animation-delay: 1.05s; }
	.cb-tree__event { animation: cb-fade 0.4s ease-out both; }
	.cb-tree__branch:nth-child(1) .cb-tree__event { animation-delay: 0.9s; }
	.cb-tree__branch:nth-child(2) .cb-tree__event { animation-delay: 1.05s; }
	.cb-tree__branch:nth-child(3) .cb-tree__event { animation-delay: 1.2s; }
	.cb-tree__desc, .cb-tree__since { animation: cb-fade 0.4s ease-out 1.35s both; }
}
@keyframes cb-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cb-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes cb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Líderes ---------- */
.cb-leaders { padding: clamp(64px, 9vw, 120px) 0; background: var(--cb-mineral); }
.cb-leaders__title {
	margin: 0;
	font-weight: 700;
	font-stretch: 85%;
	font-size: clamp(1.9rem, 3.8vw, 3.1rem);
	line-height: 1.04;
	max-width: 24ch;
}
.cb-leaders__grid {
	list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
	--cb-col-gap: clamp(28px, 3.6vw, 56px);
	column-gap: var(--cb-col-gap);
	border-top: 3px solid var(--cb-tinta);
}
.cb-leader {
	position: relative;
	padding: 28px 0 8px;
}
/* separador vertical centrado en el espacio entre columnas */
.cb-leader::before {
	content: ""; position: absolute; top: 0; bottom: 0;
	left: calc(var(--cb-col-gap) / -2); width: 1px; background: var(--cb-linea);
}
.cb-leader:first-child::before { display: none; }
.cb-leader__portrait {
	margin: 0 0 20px;
	aspect-ratio: 4 / 5;
	background: var(--cb-esmeralda);
	overflow: hidden;
	position: relative;
}
.cb-leader__portrait img { width: 100%; height: 100%; object-fit: cover; }
.cb-leader__initials {
	position: absolute; inset: auto auto 12px 14px;
	font-weight: 800; font-stretch: 62%;
	font-size: clamp(3.4rem, 6vw, 5.2rem); line-height: 0.9;
	color: var(--cb-mineral);
}
.cb-leader__initials::before {
	content: ""; position: absolute; left: 0; top: -14px;
	width: var(--cb-node); height: var(--cb-node); background: var(--cb-brote);
}
.cb-leader__name {
	margin: 0 0 14px;
	font-weight: 700; font-stretch: 92%;
	font-size: clamp(1.25rem, 1.6vw, 1.45rem); line-height: 1.15;
}
.cb-leader__name a { text-decoration: none; border-bottom: 2px solid var(--cb-oro); }
.cb-leader__facts { margin: 0; }
.cb-leader__facts dt {
	font-size: 0.82rem; font-weight: 500; color: var(--cb-piedra);
	margin: 0 0 3px;
}
.cb-leader__facts dd { margin: 0 0 16px; font-size: 1rem; line-height: 1.42; }

/* ---------- Propósito: tecnología, no cripto ---------- */
.cb-purpose {
	background: var(--cb-esmeralda-honda);
	color: var(--cb-mineral);
	padding: clamp(64px, 9vw, 120px) 0;
}
.cb-purpose__head { max-width: 760px; }
.cb-purpose__not {
	margin: 0 0 20px;
	display: flex; flex-wrap: wrap; gap: 0 clamp(18px, 3vw, 40px);
	font-weight: 800; font-stretch: 62%;
	font-size: clamp(3rem, 8vw, 6.4rem); line-height: 1;
	color: rgba(237, 241, 238, 0.3);
}
.cb-purpose__not span {
	text-decoration: line-through;
	text-decoration-color: var(--cb-oro);
	text-decoration-thickness: 0.09em;
}
.cb-purpose__title {
	margin: 0;
	font-weight: 700; font-stretch: 85%;
	font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.04;
	max-width: 20ch;
}
.cb-purpose__lead {
	margin: 18px 0 0; max-width: 56ch;
	font-size: clamp(1.02rem, 1.3vw, 1.15rem);
	color: rgba(237, 241, 238, 0.84);
}
.cb-purpose__pillars {
	margin: clamp(40px, 5vw, 64px) 0 0;
	display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 28px);
}
.cb-pillar { border-top: 2px solid var(--cb-brote); padding-top: 16px; }
.cb-pillar__name { font-weight: 700; font-stretch: 105%; font-size: 1.2rem; margin: 0 0 8px; }
.cb-pillar__desc { margin: 0; font-size: 0.98rem; line-height: 1.45; color: rgba(237, 241, 238, 0.8); }

/* ---------- Pie ---------- */
.cb-footer { background: var(--cb-noche); color: rgba(237, 241, 238, 0.78); padding: 40px 0 48px; font-size: 0.95rem; }
.cb-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; }
.cb-footer__note { flex-basis: 100%; margin: 0 0 12px; color: var(--cb-mineral); font-weight: 500; max-width: 70ch; }
.cb-footer p { margin: 0; }
.cb-footer a { color: var(--cb-mineral); }

/* ---------- Redes sociales ---------- */
.cb-footer__social { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 20px; }
.cb-footer__social-title { color: var(--cb-mineral); font-weight: 700; }
.cb-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cb-social__link {
	display: inline-block; padding: 7px 14px; text-decoration: none;
	border: 1px solid var(--cb-linea-clara); color: var(--cb-mineral);
	font-weight: 500; font-size: 0.92rem; line-height: 1.2;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.cb-social__link:hover, .cb-social__link:focus-visible { border-color: var(--cb-oro); color: var(--cb-oro); }
.cb-nav__menu { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.cb-social--header .cb-social__link { padding: 5px 10px; font-size: 0.85rem; }

/* ---------- Comunicado (PDF) junto al evento ---------- */
/* Por defecto el comunicado va debajo de Week; si cabe, comunicado.js
   añade .is-side y queda al lado del nombre. */
.cb-tree__branch.has-doc {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "name" "desc" "since" "doc";
	align-items: start;
	justify-content: start;
}
.cb-tree__branch.has-doc.is-side {
	grid-template-columns: min-content 196px;
	grid-template-areas: "name doc" "desc doc" "since doc";
	column-gap: 22px;
}
.cb-tree__branch.has-doc > .cb-tree__event { grid-area: name; justify-self: start; }
.cb-tree__branch.has-doc > .cb-tree__desc { grid-area: desc; }
.cb-tree__branch.has-doc > .cb-tree__since { grid-area: since; }
.cb-tree__branch.has-doc > .cb-doc-chip { grid-area: doc; align-self: start; margin-top: 14px; justify-self: start; }
.cb-tree__branch.has-doc.is-side > .cb-doc-chip { margin-top: 0.1em; max-width: 196px; }
.cb-doc-chip {
	display: inline-flex; align-items: stretch; gap: 0;
	max-width: 280px;
	font-size: 1rem; line-height: 1.3; font-stretch: 100%;
	text-decoration: none; color: var(--cb-mineral);
	border: 1px solid var(--cb-oro);
	background: rgba(7, 42, 32, 0.35);
	transition: background-color 0.2s ease;
}
.cb-doc-chip:hover, .cb-doc-chip:focus-visible { background: rgba(226, 179, 63, 0.14); }
.cb-doc-chip__kind {
	display: flex; align-items: center; padding: 0 10px;
	background: var(--cb-oro); color: var(--cb-tinta);
	font-weight: 800; font-size: 0.78rem;
}
.cb-doc-chip__text { display: flex; flex-direction: column; padding: 10px 14px; }
.cb-doc-chip__label { font-size: 0.82rem; font-weight: 500; color: var(--cb-oro); }
.cb-doc-chip__title { font-size: 0.98rem; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
	.cb-doc-chip { animation: cb-fade 0.4s ease-out 1.4s both; }
}

.cb-doc {
	width: min(1040px, calc(100vw - 32px));
	height: min(92vh, 1200px);
	max-width: none; max-height: none;
	padding: 0; border: 0;
	background: var(--cb-mineral); color: var(--cb-tinta);
	box-shadow: 0 24px 80px rgba(7, 42, 32, 0.45);
}
.cb-doc[open] { display: flex; flex-direction: column; }
.cb-doc::backdrop { background: rgba(7, 42, 32, 0.78); }
html.cb-doc-open { overflow: hidden; }
.cb-doc__bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 12px 24px; padding: 16px 20px;
	background: var(--cb-esmeralda); color: var(--cb-mineral);
}
.cb-doc__label { margin: 0; font-size: 0.82rem; font-weight: 500; color: var(--cb-oro); }
.cb-doc__title { margin: 2px 0 0; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; font-stretch: 92%; line-height: 1.15; }
.cb-doc__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-doc__action, .cb-doc__close {
	display: inline-block; padding: 8px 14px;
	font: 500 0.92rem var(--cb-font); line-height: 1.2;
	color: var(--cb-mineral); text-decoration: none; cursor: pointer;
	background: transparent; border: 1px solid var(--cb-linea-clara);
}
.cb-doc__close { background: var(--cb-mineral); color: var(--cb-tinta); border-color: var(--cb-mineral); font-weight: 700; }
.cb-doc__action:hover, .cb-doc__action:focus-visible { border-color: var(--cb-oro); color: var(--cb-oro); }
.cb-doc__body { flex: 1; min-height: 0; position: relative; background: #d9dfdb; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cb-doc__body.has-object { overflow: hidden; }
.cb-doc__frame { display: block; width: 100%; height: 100%; border: 0; background: #d9dfdb; }
.cb-doc__frame > .cb-doc__fallback-wrap { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cb-doc__pages { display: grid; gap: 16px; padding: 16px; max-width: 900px; margin: 0 auto; }
.cb-doc__pages img { width: 100%; height: auto; background: #fff; box-shadow: 0 1px 3px rgba(7, 42, 32, 0.2); }
.cb-doc__fallback { margin: 0; padding: 4px 20px 20px; font-size: 0.95rem; text-align: center; }
.cb-doc__fallback a { color: var(--cb-esmeralda); font-weight: 700; }

/* ---------- Páginas internas ---------- */
.cb-page { padding: clamp(48px, 7vw, 96px) 0; }
.cb-prose { max-width: 760px; }
.cb-page__title { font-weight: 700; font-stretch: 85%; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: 0 0 24px; }
.cb-entry { margin-bottom: 40px; }
.cb-entry__title { font-stretch: 92%; font-size: 1.5rem; margin: 0 0 8px; }
.cb-entry__image { margin: 0 0 24px; }
.cb-prose a { color: var(--cb-esmeralda); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cb-page-extra { padding: 0 0 clamp(48px, 7vw, 96px); background: var(--cb-mineral); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.cb-leaders__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cb-leader:nth-child(odd)::before { display: none; }
	.cb-leader:nth-child(n+3) { border-top: 1px solid var(--cb-linea); margin-top: 20px; }
	.cb-purpose__pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
	.cb-nav__toggle {
		display: inline-block; background: transparent; color: var(--cb-mineral);
		border: 1px solid var(--cb-linea-clara); padding: 8px 14px;
		font: 500 0.95rem var(--cb-font);
	}
	.cb-nav__menu {
		display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 20;
		background: var(--cb-esmeralda-honda); padding: 16px 20px; min-width: 200px;
	}
	.cb-nav.is-open .cb-nav__menu { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
	.cb-nav__list { flex-direction: column; gap: 10px; }

	.cb-tree { grid-template-columns: 1fr; --cb-stub: 32px; }
	.cb-tree__root { padding-right: 0; padding-bottom: 22px; }
	.cb-tree__root::after { display: none; }
	.cb-tree__branches { margin-left: 5px; }
	.cb-tree__branch:first-child::before { top: -22px; }
	.cb-tree__branch { font-size: clamp(2.2rem, 11vw, 3.4rem); }
	.cb-tree__event { font-stretch: 112%; }
	.cb-hero__about { grid-template-columns: 1fr; }

	.cb-leaders__grid { grid-template-columns: 1fr; }
	.cb-leader, .cb-leader:nth-child(n+3) {
		margin-top: 0; border-top: 1px solid var(--cb-linea);
		display: grid; grid-template-columns: 112px 1fr; gap: 0 18px; align-items: start;
	}
	.cb-leader::before { display: none; }
	.cb-leader:first-child { border-top: 0; }
	.cb-leader__portrait { margin: 0; grid-row: span 2; }
	.cb-leader__initials { font-size: 2.6rem; inset: auto auto 8px 10px; }
	.cb-leader__initials::before { top: -10px; width: 8px; height: 8px; }
	.cb-leader__name { margin-bottom: 10px; }

	.cb-purpose__pillars { grid-template-columns: 1fr; }


	.cb-doc { width: 100vw; height: 100dvh; max-height: 100dvh; }
	.cb-doc__bar { padding: 12px 16px; }
	.cb-doc__pages { gap: 12px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
