/* ==========================================================================
   Agenda ESTB — Próximas citas + Calendario mensual
   Tamaños medidos sobre la maqueta (estb-home…chatgpt.site) a 1440px de ancho.
   ========================================================================== */

.estb-ag {
	--estb-ink: #123A4A;
	--estb-accent: #E75655;
	--estb-muted: #4C6670;
	--estb-line: #D3DCDF;
	--estb-feat-bg: #F9F2F2;
	--estb-off: #F1F4F5;
	--estb-cols: 3;
	--estb-gap: 30px;
	--estb-cell-h: 90px;
	color: var(--estb-ink);
	font-size: 14px;
	line-height: 1.4;
}
.estb-ag *,
.estb-ag *::before,
.estb-ag *::after { box-sizing: border-box; }
.estb-ag p { margin: 0; }
.estb-ag button { font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; text-transform: none; white-space: normal; text-align: left; min-width: 0; }
/* Anula los estilos de botón del tema / Elementor (fondo rosa al hover/focus, radios, sombras). */
.estb-ag button,
.estb-ag button:hover,
.estb-ag button:focus,
.estb-ag button:active {
	background-color: transparent; color: inherit; box-shadow: none; text-decoration: none; outline: none;
}
.estb-ag button:focus-visible { outline: 2px solid var(--estb-ink); outline-offset: 2px; }
.estb-ag [hidden] { display: none !important; }

.estb-ag-muted { color: var(--estb-muted); }
.estb-ag-strong { font-weight: 600; }

/* Pares ES / EN */
.estb-ag-bi { display: inline-flex; flex-direction: column; gap: 2px; text-align: left; }
.estb-ag-bi__es { font-size: 14px; font-weight: 600; }
.estb-ag-bi__en { font-size: 12px; font-weight: 400; color: var(--estb-muted); }

/* ---------- Cabecera: pestañas + chips ---------- */
.estb-ag__top {
	display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
	gap: 16px 24px; margin-bottom: 16px;
}
.estb-ag__tabs { display: flex; gap: 22px; }
.estb-ag .estb-ag__tab {
	background: none; border: 0; padding: 0 0 9px; position: relative;
}
.estb-ag__tab .estb-ag-bi__es { font-size: 18px; font-weight: 600; line-height: normal; }
.estb-ag__tab .estb-ag-bi__en { font-size: 12px; line-height: normal; }
.estb-ag__tab::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
	background: var(--estb-accent);
	transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.estb-ag__tab[aria-selected="true"]::after { transform: scaleX(1); }
.estb-ag__tab:hover .estb-ag-bi__es { opacity: .8; }

.estb-ag__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.estb-ag .estb-ag-chip {
	display: inline-flex; align-items: center; gap: 7px;
	min-height: 44px; padding: 10px 14px; border-radius: 999px;
	font-size: 14px; font-weight: 400; line-height: normal;
	background: transparent; border: 1px solid var(--estb-line);
	transition: background .2s, color .2s, border-color .2s;
}
.estb-ag-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.estb-ag .estb-ag-chip:hover { background: #E9EEED; }
.estb-ag .estb-ag-chip[aria-pressed="true"],
.estb-ag .estb-ag-chip[aria-pressed="true"]:hover,
.estb-ag .estb-ag-chip[aria-pressed="true"]:focus { background: var(--estb-ink); border-color: var(--estb-ink); color: #fff; }
/* Territorios (LAND / SEA / STAGES): al pasar el ratón y al estar activos se rellenan con su color. */
.estb-ag .estb-ag-chip[data-ambito]:not([data-ambito=""]):hover,
.estb-ag .estb-ag-chip[data-ambito]:not([data-ambito=""])[aria-pressed="true"],
.estb-ag .estb-ag-chip[data-ambito]:not([data-ambito=""])[aria-pressed="true"]:hover,
.estb-ag .estb-ag-chip[data-ambito]:not([data-ambito=""])[aria-pressed="true"]:focus {
	background: var(--c); border-color: var(--c); color: var(--ci, #fff);
}
.estb-ag .estb-ag-chip[data-ambito]:not([data-ambito=""]):hover .estb-ag-chip__dot { background: currentColor; }
.estb-ag-chip[aria-pressed="true"] .estb-ag-chip__dot { background: currentColor; }

/* ---------- Barra: desplegable + contador ---------- */
.estb-ag__bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px 20px; margin-bottom: 18px;
}
.estb-ag__select { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.estb-ag__select-wrap { position: relative; display: inline-block; }
.estb-ag__select-wrap::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 6px; height: 6px;
	border-right: 1.5px solid var(--estb-ink); border-bottom: 1.5px solid var(--estb-ink);
	transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.estb-ag__select select {
	appearance: none; -webkit-appearance: none;
	min-width: 285px; max-width: 100%; height: 46px;
	padding: 0 44px 0 18px; border-radius: 999px;
	border: 1px solid var(--estb-line); background: transparent;
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--estb-ink); cursor: pointer;
}
.estb-ag__select select:focus-visible { outline: 2px solid var(--estb-ink); outline-offset: 2px; }
.estb-ag__count { font-size: 13px; }

/* ---------- Etiquetas ---------- */
.estb-ag-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px;
	font-size: 12px; font-weight: 600; line-height: 18px; letter-spacing: .04em;
}
.estb-ag-amb { display: inline-flex; align-items: center; gap: 6px; }
.estb-ag-amb::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.estb-ag-pill {
	display: inline-block; padding: 4px 10px; border-radius: 999px;
	background: var(--estb-accent); color: var(--estb-ink);
	font-weight: 700; line-height: 1.3;
}
.estb-ag-tag { color: var(--estb-ink); }

/* ---------- Desplegable "Sobre esta cita" ---------- */
.estb-ag-acc { margin-top: 10px; }
.estb-ag .estb-ag-acc__btn {
	display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px;
	background: none; border: 0; padding: 5px 0; text-align: left;
}
.estb-ag-acc__btn strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
.estb-ag-acc__btn .estb-ag-muted { font-size: 12px; line-height: 1.4; }
.estb-ag-acc__icon { position: relative; width: 13px; height: 13px; flex: none; }
.estb-ag-acc__icon::before,
.estb-ag-acc__icon::after {
	content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1.5px; background: currentColor;
	transition: transform .2s;
}
.estb-ag-acc__icon::after { transform: rotate(90deg); }
.estb-ag-acc__btn[aria-expanded="true"] .estb-ag-acc__icon::after { transform: rotate(0); }
.estb-ag-acc__panel { padding: 4px 0 6px; font-size: 14px; line-height: 1.55; }
.estb-ag-acc__panel p + p { margin-top: 6px; }
.estb-ag-acc__panel .estb-ag-muted { font-size: 13px; line-height: 1.5; }

/* ---------- Enlace con flecha ---------- */
.estb-ag-link {
	display: flex; align-items: center; justify-content: space-between; gap: 15px;
	min-height: 48px; margin-top: 12px; color: inherit; text-decoration: none;
}
.estb-ag-link .estb-ag-bi__es { font-size: 14px; font-weight: 600; }
.estb-ag-link .estb-ag-bi__en { font-size: 12px; }
.estb-ag-link__arrow {
	flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--c, var(--estb-accent)); color: var(--estb-ink);
	transition: background .2s, color .2s;
}
.estb-ag-link__arrow svg { width: 17px; height: 17px; }
.estb-ag-link:hover .estb-ag-link__arrow,
.estb-ag-link:focus-visible .estb-ag-link__arrow { background: var(--c, var(--estb-accent)); color: #fff; }

/* ---------- Destacada ---------- */
.estb-ag-feat {
	--c: var(--estb-accent);
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 30%); gap: 16px 40px;
	padding: 16px 20px; margin-bottom: 20px;
	background: var(--estb-feat-bg); border-left: 4px solid var(--estb-accent);
}
.estb-ag-feat__title { margin: 12px 0 2px; font-size: 25px; line-height: 30px; font-weight: 700; letter-spacing: -.03em; color: inherit; }
.estb-ag-feat__main > .estb-ag-muted { font-size: 13px; line-height: 1.5; }
.estb-ag-feat__side { display: flex; flex-direction: column; gap: 4px; }
.estb-ag-feat__head { font-size: 19px; font-weight: 700; line-height: 1.4; }
.estb-ag-feat__date { font-size: 14px; font-weight: 600; line-height: 1.5; }
.estb-ag-feat__side > .estb-ag-muted { font-size: 13px; line-height: 1.55; }
.estb-ag-feat__state .estb-ag-bi { gap: 0; }
.estb-ag-feat__state .estb-ag-bi__es { font-size: 14px; font-weight: 400; line-height: 21px; }
.estb-ag-feat__state .estb-ag-bi__en { font-size: 13px; line-height: 19.5px; }
.estb-ag-feat .estb-ag-link { margin-top: 8px; }
.estb-ag-feat .estb-ag-link .estb-ag-bi__en { font-size: 13px; }
.estb-ag-feat .estb-ag-link__arrow { border-color: var(--estb-accent); }
.estb-ag-feat .estb-ag-link:hover .estb-ag-link__arrow { background: var(--estb-accent); }

/* ---------- Tarjetas ---------- */
.estb-ag__grid {
	display: grid; grid-template-columns: repeat(var(--estb-cols), minmax(0, 1fr));
	gap: var(--estb-gap); row-gap: calc(var(--estb-gap) * 1.2);
}
.estb-ag-card {
	display: flex; flex-direction: column;
	padding-top: 15px; border-top: 3px solid var(--c);
}
.estb-ag-card__date {
	margin: 13px 0 9px !important;
	font-size: 31px; line-height: 1.2; font-weight: 600; letter-spacing: -.035em;
}
.estb-ag-card__date small { font-size: 14px; line-height: 1.2; font-weight: 400; letter-spacing: 0; }
.estb-ag-card__date.is-tbc { font-size: 23px; }
.estb-ag-card__title { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; color: inherit; }
.estb-ag-card__info { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; font-size: 13px; }
.estb-ag-card__info .estb-ag-muted { font-size: 13px; line-height: 1.55; }
.estb-ag-card__info .estb-ag-strong { font-size: 13px; font-weight: 600; line-height: 1.5; }
.estb-ag-card .estb-ag-acc { margin-top: auto; padding-top: 10px; }
.estb-ag-card .estb-ag-acc + .estb-ag-link { margin-top: 6px; }
.estb-ag-card:not(:has(.estb-ag-acc)) .estb-ag-link { margin-top: auto; padding-top: 12px; }
.estb-ag-card.is-hidden-page { display: none; }

.estb-ag__empty { padding: 30px 0; text-align: center; color: var(--estb-muted); font-size: 14px; }

.estb-ag__more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.estb-ag .estb-ag__more {
	display: inline-flex; align-items: center; gap: 12px;
	background: none; border: 0; padding: 0; font-size: 16px; font-weight: 400;
}
.estb-ag__more-icon {
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--estb-line); transition: background .2s, color .2s, border-color .2s;
}
.estb-ag__more-icon svg { width: 17px; height: 17px; }
.estb-ag .estb-ag__more:hover .estb-ag__more-icon { background: var(--estb-ink); border-color: var(--estb-ink); color: #fff; }

/* ---------- Calendario ---------- */
.estb-ag-cal__head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
	margin: 2px 0 20px;
}
.estb-ag-cal__title { margin: 0; font-size: 27px; font-weight: 700; line-height: normal; letter-spacing: -.025em; color: inherit; }
.estb-ag-cal__nav { display: flex; align-items: center; gap: 6px; }
.estb-ag .estb-ag-round {
	display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
	background: none; border: 1px solid var(--estb-line); transition: background .2s, color .2s, border-color .2s;
}
.estb-ag-round svg { width: 18px; height: 18px; }
.estb-ag .estb-ag-round:hover,
.estb-ag .estb-ag-round:focus-visible { background: var(--estb-ink); border-color: var(--estb-ink); color: #fff; }
.estb-ag .estb-ag-cal__today { background: none; border: 0; font-size: 14px; line-height: 14px; padding: 6px 10px; }
.estb-ag-cal__today:hover { text-decoration: underline; text-underline-offset: 4px; }

.estb-ag-cal__body {
	display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(250px, 1fr); gap: 34px; align-items: start;
}
.estb-ag-cal__dow {
	display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
	text-align: center; font-size: 12px; font-weight: 400; color: var(--estb-muted);
}
.estb-ag-cal__dow span { padding: 10px 5px; }
.estb-ag-cal__grid {
	display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid var(--estb-line); border-left: 1px solid var(--estb-line);
}
.estb-ag-day {
	position: relative; min-height: var(--estb-cell-h); padding: 0 5px 5px;
	background: #fff;
	border-right: 1px solid var(--estb-line); border-bottom: 1px solid var(--estb-line);
	display: flex; flex-direction: column; min-width: 0;
}
.estb-ag-day.is-off { background: transparent; }
.estb-ag-day__num { display: block; min-height: 36px; padding: 5px 3px; font-weight: 600; font-size: 14px; line-height: normal; }
.estb-ag-day.is-today .estb-ag-day__num span {
	text-decoration: underline; text-decoration-color: var(--estb-accent);
	text-decoration-thickness: 3px; text-underline-offset: 4px;
}
.estb-ag-day__events { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; }

/* Citas en la celda: como en la maqueta, sin fondo y con bolita de color. */
.estb-ag .estb-ag-ev,
.estb-ag .estb-ag-ev:hover,
.estb-ag .estb-ag-ev:focus,
.estb-ag .estb-ag-ev.is-active {
	display: flex; align-items: baseline; gap: 5px; width: 100%; min-width: 0; min-height: 24px;
	border: 0; border-radius: 0; padding: 3px 0; text-align: left;
	background: transparent;
	font-size: 12px; font-weight: 400; line-height: 1.4;
}
.estb-ag .estb-ag-ev::before {
	content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--c);
}
.estb-ag-ev__t { min-width: 0; overflow-wrap: anywhere; }
.estb-ag .estb-ag-ev:hover .estb-ag-ev__t,
.estb-ag .estb-ag-ev.is-active .estb-ag-ev__t { text-decoration: underline; text-underline-offset: 3px; }
/* Citas de EST.B: pastilla coral suave, como en la maqueta. */
.estb-ag .estb-ag-ev.is-estb,
.estb-ag .estb-ag-ev.is-estb:hover,
.estb-ag .estb-ag-ev.is-estb:focus,
.estb-ag .estb-ag-ev.is-estb.is-active {
	background: color-mix(in srgb, var(--estb-accent) 12.5%, transparent);
	border-radius: 7px; padding: 4px; font-weight: 600;
}
.estb-ag .estb-ag-ev.is-estb::before { flex-basis: 7px; width: 7px; height: 7px; background: var(--estb-accent); }
.estb-ag-ev b { font-weight: 900; }
.estb-ag .estb-ag-day__more { background: none; border: 0; padding: 2px 0; text-align: left; font-size: 11px; font-weight: 400; color: var(--estb-muted); }

.estb-ag-cal__side-title {
	margin: 0 0 18px; padding-bottom: 14px; font-size: 18px; font-weight: 600; line-height: 1.4; color: inherit;
	border-bottom: 2px solid var(--estb-accent);
}
.estb-ag-cal__list { display: flex; flex-direction: column; position: relative; }

/* Lista lateral con scroll: no crece más que el calendario (solo con las dos columnas). */
@media (min-width: 1001px) {
	.estb-ag--side-scroll .estb-ag-cal__body { align-items: stretch; }
	.estb-ag--side-scroll .estb-ag-cal__side {
		display: flex; flex-direction: column;
		height: 0; min-height: 100%; /* el alto lo marca el calendario */
	}
	.estb-ag--side-scroll .estb-ag-cal__side-title { flex: none; margin-bottom: 0; }
	.estb-ag--side-scroll .estb-ag-cal__list {
		flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
		padding: 4px 12px 0 0;
		scrollbar-width: thin; scrollbar-color: var(--estb-line) transparent;
		-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
		mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
	}
	.estb-ag--side-scroll .estb-ag-cal__list::-webkit-scrollbar { width: 6px; }
	.estb-ag--side-scroll .estb-ag-cal__list::-webkit-scrollbar-thumb { background: var(--estb-line); border-radius: 3px; }
	.estb-ag--side-scroll .estb-ag-item:last-child { padding-bottom: 28px; }
}
.estb-ag-item { min-width: 0; padding: 14px 0 18px; margin-bottom: 6px; border-bottom: 1px solid var(--estb-line); scroll-margin-top: 120px; transition: background .3s; }
.estb-ag-item:last-child { border-bottom: 0; margin-bottom: 0; }
.estb-ag-item.is-flash { background: color-mix(in srgb, var(--c) 10%, transparent); }
.estb-ag-item__date { margin: 12px 0 !important; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.estb-ag-item__date small { font-size: 14px; font-weight: 400; letter-spacing: 0; }
.estb-ag-item__title { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; color: inherit; overflow-wrap: break-word; }
.estb-ag-item .estb-ag-card__info,
.estb-ag-item .estb-ag-link .estb-ag-bi { min-width: 0; overflow-wrap: break-word; }
.estb-ag-cal__empty { color: var(--estb-muted); padding: 10px 0; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.estb-ag-feat { grid-template-columns: 1fr; }
}

/* Como la maqueta: por debajo de 1000px la lista pasa debajo del calendario, en 2 columnas. */
@media (max-width: 1000px) {
	.estb-ag-cal__body { grid-template-columns: 1fr; gap: 30px; }
	.estb-ag-cal__list {
		display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 25px; align-items: start;
	}
	.estb-ag-cal__list > .estb-ag-cal__empty { grid-column: 1 / -1; }
	.estb-ag-item,
	.estb-ag-item:last-child { margin-bottom: 0; border-bottom: 1px solid var(--estb-line); }
}

@media (max-width: 767px) {
	.estb-ag__tabs { gap: 18px; }
	.estb-ag__tab .estb-ag-bi__es { font-size: 17px; }
	.estb-ag__select { flex-wrap: wrap; width: 100%; }
	.estb-ag__select-wrap, .estb-ag__select select { width: 100%; min-width: 0; }
	.estb-ag-feat { padding: 18px 16px; }
	.estb-ag-feat__title { font-size: 23px; line-height: 1.2; }
	.estb-ag-feat__head { font-size: 17px; }
	.estb-ag-card__date { font-size: 30px; }
}

/* Móvil (cortes de la maqueta, 700px): días con bolitas y lista a una columna. */
@media (max-width: 700px) {
	.estb-ag { --estb-cell-h: 64px; }
	.estb-ag-cal__head { gap: 10px; }
	.estb-ag-cal__title { font-size: 23px; }
	.estb-ag-cal__dow span { padding: 8px 0; }
	.estb-ag-cal__body { gap: 25px; }
	.estb-ag-day { padding: 0 2px 3px; }
	.estb-ag-day__num { text-align: center; padding: 5px 0; }
	.estb-ag-day__events { flex-flow: row wrap; justify-content: center; gap: 2px; }
	.estb-ag .estb-ag-ev,
	.estb-ag .estb-ag-ev:hover,
	.estb-ag .estb-ag-ev:focus,
	.estb-ag .estb-ag-ev.is-active {
		width: auto; gap: 0; min-width: 24px; min-height: 24px; padding: 0;
		align-items: center; justify-content: center;
	}
	.estb-ag .estb-ag-ev.is-estb,
	.estb-ag .estb-ag-ev.is-estb:hover,
	.estb-ag .estb-ag-ev.is-estb:focus,
	.estb-ag .estb-ag-ev.is-estb.is-active { padding: 2px; border-radius: 999px; }
	.estb-ag-ev__t { display: none !important; }
	.estb-ag .estb-ag-day__more { font-size: 10px; text-align: center; width: 100%; }
	.estb-ag-day.has-events { cursor: pointer; }
	.estb-ag-cal__list { display: flex; flex-direction: column; align-items: stretch; }
}

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

/* En la destacada, las etiquetas van en mayúsculas (como en la maqueta). */
.estb-ag-feat .estb-ag-meta .estb-ag-tag { text-transform: uppercase; }
