/* Casa del Estudiante: styles for theme blocks, legacy shortcodes and embeds.
   Colours come from the theme tokens of main.css (--ce-*); the fallbacks are the same values. */

.ce-block__title { margin: 0 0 1rem; }
.ce-block__empty { margin: 0; color: var(--ce-grey, #424a50); }
.ce-block__more { display: inline-block; margin-top: 1rem; font-weight: 600; }

/* Event cards (calum/proximas-actividades) */
.ce-events { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.ce-events__item { margin: 0; }
.card-event { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--ce-border, #cfcfcf); border-radius: var(--ce-radius-card, 16px); overflow: hidden; background: var(--ce-white, #fff); }
.card-event__media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.card-event__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; }
.card-event__date { font-weight: 600; color: var(--ce-red-darkest, #a40e0e); }
.card-event__title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.card-event__title a { text-decoration: none; }
.card-event__title a:hover, .card-event__title a:focus-visible { text-decoration: underline; }
.card-event__place { margin: 0; font-size: .95rem; color: var(--ce-grey, #424a50); }

/* Opening hours table (calum/horario) */
.ce-hours { overflow-x: auto; }
.ce-hours table { width: 100%; border-collapse: collapse; }
.ce-hours caption { text-align: left; font-weight: 600; padding: 0 0 .5rem; }
.ce-hours th, .ce-hours td { padding: .5rem .75rem; border-bottom: 1px solid var(--ce-border, #cfcfcf); text-align: left; vertical-align: top; }
.ce-hours thead th { background: var(--ce-bg-light, #f1f1f1); }
.ce-hours tr[aria-current="date"] th, .ce-hours tr[aria-current="date"] td { background: #fff7f7; }
.ce-hours tr[aria-current="date"] > :first-child { box-shadow: inset 4px 0 0 var(--ce-red, #d73333); }
.ce-hours__closed { color: var(--ce-red-darkest, #a40e0e); font-weight: 600; }
.ce-hours__today { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; margin: 0; padding: 1rem; border-left: 4px solid var(--ce-red, #d73333); border-radius: var(--ce-radius-btn, 8px); background: var(--ce-bg-light, #f1f1f1); }
.ce-hours__today strong { font-size: 1.25rem; }
.ce-hours__stale { font-size: .85rem; color: var(--ce-grey, #424a50); }

/* Click-to-load frames (calum/calendario, embeds) */
.ce-frame { position: relative; margin: 1rem 0; }
.ce-frame__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; min-height: 14rem; padding: 1.5rem; border: 1px dashed var(--ce-grey-light, #5b6770); border-radius: var(--ce-radius-card, 16px); background: var(--ce-bg-light, #f1f1f1); text-align: center; }
.ce-frame__placeholder[hidden] { display: none; }
.ce-frame__ratio { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.ce-frame__ratio--video { aspect-ratio: 16 / 9; }
.ce-frame__ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ce-frame__play { display: inline-flex; width: 4rem; height: 4rem; color: var(--ce-red-dark, #bf2d2d); }
.ce-frame__play .icon { width: 100%; height: 100%; }
.ce-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.4rem; border: 2px solid var(--ce-red-dark, #bf2d2d); border-radius: var(--ce-radius-btn, 8px); background: var(--ce-red-dark, #bf2d2d); color: var(--ce-white, #fff); font-weight: 600; text-decoration: none; cursor: pointer; }
.ce-btn:hover, .ce-btn:focus, .ce-btn:focus-visible { background: var(--ce-red-darkest, #a40e0e); border-color: var(--ce-red-darkest, #a40e0e); color: var(--ce-white, #fff); }
.ce-btn:focus-visible { outline: 3px solid var(--ce-blue, #338fc2); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ce-white, #fff); }
.ce-btn--secondary { background: var(--ce-white, #fff); color: var(--ce-black, #111); border-color: var(--ce-black, #111); }
.ce-btn--secondary:hover, .ce-btn--secondary:focus, .ce-btn--secondary:focus-visible { background: var(--ce-black, #111); border-color: var(--ce-black, #111); color: var(--ce-white, #fff); }
.ce-btn--large { font-size: 1.15rem; padding: .85rem 2rem; }
.ce-cta { margin: 1.5rem 0; text-align: center; }

/* Documents list (calum/documentos, [pdf-embedder]) */
.ce-docs { margin: 0; padding: 0; list-style: none; }
.ce-docs__item { display: flex; align-items: flex-start; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--ce-border, #cfcfcf); }
.ce-docs__item .icon { flex: none; width: 1.5rem; height: 1.5rem; margin-top: .15rem; }
.ce-docs__meta { display: block; font-size: .85rem; color: var(--ce-grey, #424a50); }
/* Past months of a monthly list (blocks/documentos/render.php), folded below the current one. */
.ce-docs__earlier { margin-top: .75rem; }
.ce-docs__earlier > summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: .15em; }
@media print { .ce-docs__earlier > summary { display: none; } }
.ce-doc-link { display: inline-flex; align-items: center; gap: .4rem; }

/* Legacy shortcode iframe wrapper */
.ce-iframe { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 1rem 0; }
.ce-iframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ce-iframe--video { aspect-ratio: 16 / 9; }

iframe, embed, object, video { max-width: 100%; }

@media (prefers-reduced-motion: no-preference) {
	.ce-btn { transition: background-color .15s ease; }
}
