/* =============================================================
   Post Slider por Categoría — Estilos
   ============================================================= */

/* Colores del diseño */
:root {
	--psc-teal:          #337695;
	--psc-teal-dark:     rgba(51, 118, 149, 0.88);
	--psc-arrow-bg:      rgba(200, 220, 220, 0.65);
	--psc-card-height:   460px;
	--psc-cards-visible: 3;
	--psc-gap:           0px;
}

/* ---------------------------------------------------------------
   Contenedor principal
   --------------------------------------------------------------- */
.psc-wrapper {
	position:   relative;
	width:      100%;
	overflow:   hidden;
	display:    flex;
	align-items: center;
	background: #fff;
	user-select: none;
}

/* ---------------------------------------------------------------
   Pista (track)
   --------------------------------------------------------------- */
.psc-track-container {
	width:    100%;
	overflow: hidden;
}

.psc-track {
	display:    flex;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

/* ---------------------------------------------------------------
   Card individual
   --------------------------------------------------------------- */
.psc-card {
	position:            relative;
	flex:                0 0 calc(100% / var(--psc-cards-visible));
	height:              var(--psc-card-height);
	background-size:     cover;
	background-position: center center;
	background-repeat:   no-repeat;
	background-color:    #ccc;  /* fallback sin imagen */
	overflow:            hidden;
	cursor:              pointer;
}

/* Enlace transparente sobre toda la card */
.psc-card__link {
	position: absolute;
	inset:    0;
	z-index:  1;
}

/* ---------------------------------------------------------------
   Recuadro de fecha — esquina superior derecha
   --------------------------------------------------------------- */
.psc-date {
	position: absolute;
    top: 0;
    right: 15px;
    background: var(--psc-teal);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 10px 11px;
    z-index: 2;
    min-width: 60px;
    line-height: 1.1;
}

.psc-date__day {
	font-size:   25px;
	font-weight: 700;
	display:     block;
	line-height: 1;
}

.psc-date__month {
	font-size:   14px;
	font-weight: 500;
	text-transform: capitalize;
	display:     block;
	margin-top: 4px;
    margin-bottom: 4px;
}

.psc-date__year {
	font-size:   14px;
	font-weight: 500;
	display:     block;
}

/* ---------------------------------------------------------------
   Footer de la card: gradiente + título
   --------------------------------------------------------------- */
.psc-card__footer {
	position:   absolute;
	bottom:     0;
	left:       0;
	right:      0;
	padding:    50px 20px 22px;
	background: linear-gradient(
		to top,
		var(--psc-teal-dark) 0%,
		rgba(51, 118, 149, 0.55) 60%,
		transparent 100%
	);
	z-index:    2;
}

.psc-card__title {
	color:       #fff;
	font-size:   20px;
	font-weight: 600;
	margin:      0;
	padding:     0;
	text-align:  center;
	line-height: 1.35;
	text-shadow: 0 1px 3px rgba(0,0,0,0.35);
	padding-top: 40px;
}

/* ---------------------------------------------------------------
   Flechas de navegación
   --------------------------------------------------------------- */
.psc-arrow {
	position:        absolute;
	top:             50%;
	transform:       translateY(-50%);
	z-index:         10;
	border:          none;
	color:           #fff;
	font-size:       1.3rem;
	width:           46px;
	height:          46px;
	display:         flex;
	align-items:     center;
	justify-content: center;
	cursor:          pointer;
	transition:      background 0.2s;
	line-height:     1;
	padding:         0;
	background: #337695!important;
    border-radius: 5px!important;
    opacity: 0.75!important;
}

img.wp-smiley, img.emoji {
    height: 45px !important;
    width: 45px !important;
    opacity: 0.75!important;
}

.psc-arrow:hover {
	background: rgba(51, 118, 149, 0.75);
}

.psc-arrow--prev{
	left: 60px;
}

.psc-arrow--next{
	right: 60px;
}

/* ---------------------------------------------------------------
   Mensaje sin posts
   --------------------------------------------------------------- */
.psc-no-posts {
	padding:    20px;
	text-align: center;
	color:      #666;
}

pre{
    background-color: #ffffff!important;
    border: 1px solid #ffffff!important;
}

/* =============================================================
   Doc Rotador por Categoría — Estilos
   Shortcode: [doc_rotador_categoria cat_id="69" visible="2" total="6"]
   ============================================================= */

.drc-wrapper {
	width:      100%;
	background: #ffffff;
	padding:    22px;
	box-sizing: border-box;
	border-radius: 5px;
}

.drc-grid {
	display:               grid;
	grid-template-columns: repeat(var(--drc-visible, 2), 1fr);
	gap:                   18px;
	transition:            opacity 0.35s ease;
}

/* ---------------------------------------------------------------
   Tarjeta individual
   --------------------------------------------------------------- */
.drc-card {
	display: none; /* oculta por defecto; JS la activa */
}

.drc-card--active {
	display: block;
	min-height: 200px;
}

.drc-card__inner {
	background:    #ffffff;
	border-radius: 12px;
	border:        1px solid #e2e8ef;
	box-shadow:    0 2px 10px rgba(0, 0, 0, 0.07);
	padding:       28px 24px;
	display:       flex;
	align-items:   center;
	gap:           20px;
	height:        100%;
	box-sizing:    border-box;
}

.drc-card__info {
	flex:      1;
	min-width: 0;
}

.drc-card__title {
	color:          #1a4a70;
	font-size:      14px;
	font-weight:    700;
	text-transform: uppercase;
	line-height:    1.45;
	margin:         0 0 18px;
	padding:        0;
	letter-spacing: 0.02em;
}

.drc-card__date-wrap {
	display:        flex;
	flex-direction: column;
	gap:            3px;
}

.drc-card__created {
	font-size:  12px;
	color:      #b0bec5;
	font-style: italic;
}

.drc-card__date {
	font-size:   13px;
	color:       #8a9bb0;
	line-height: 1.6;
}

/* ---------------------------------------------------------------
   Botones de acción
   --------------------------------------------------------------- */
.drc-card__actions {
	display:        flex;
	flex-direction: row;
	gap:            12px;
	flex-shrink:    0;
	align-items:    center;
}


/* Los PNG ya incluyen el círculo + borde + icono: solo necesitamos el enlace limpio */
.drc-btn {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	background:      transparent;
	border:          none;
	padding:         0;
	text-decoration: none;
	flex-shrink:     0;
	transition:      opacity 0.2s ease, transform 0.2s ease;
}

.drc-btn:hover {
	opacity:   0.82;
	transform: scale(1.1);
}

.drc-btn img {
	width:      52px;
	height:     52px;
	display:    block;
	object-fit: contain;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 900px) {
	:root {
		--psc-cards-visible: 2;
		--psc-card-height:   340px;
	}
}

@media (max-width: 560px) {
	:root {
		--psc-cards-visible: 1;
		--psc-card-height:   300px;
	}
}

/* ------- Doc Rotador responsive ------- */
@media (max-width: 768px) {
	.drc-wrapper {
		padding: 14px;
	}

	/* Forzar 1 columna en tablet/móvil */
	.drc-grid {
		grid-template-columns: 1fr !important;
	}

	.drc-card__inner {
		padding: 20px 16px;
	}
}

@media (max-width: 480px) {
	.drc-card__actions {
		gap: 8px;
	}

	.drc-btn img {
		width:  40px;
		height: 40px;
	}
}

/* =============================================================
   Listado Documentos — Estilos
   Shortcode: [listado_documentos cat_id="69" per_page="5"]
   ============================================================= */

.ldoc-wrapper {
	width:                 100%;
	background:            #f3f2f2;
	padding:               20px;
	box-sizing:            border-box;
	display:               grid;
	grid-template-columns: repeat(var(--ldoc-cols, 1), 1fr);
	gap:                   16px;
	/* La paginación y los ítems comparten la misma grilla */
}

/* La paginación siempre ocupa todas las columnas */
.ldoc-pagination {
	grid-column: 1 / -1;
}

/* ---------------------------------------------------------------
   Fila / ítem
   --------------------------------------------------------------- */
.ldoc-item {
	background:    #ffffff;
	border-radius: 12px;
	box-shadow:    0 2px 10px rgba(0, 0, 0, 0.08);
	display:       flex;
	align-items:   stretch;
	padding:       24px;
	gap:           28px;
}

/* ---------------------------------------------------------------
   Columna izquierda — video, título, fecha
   --------------------------------------------------------------- */
.ldoc-left {
	flex:           1;
	min-width:      0;
	display:        flex;
	flex-direction: column;
	gap:            12px;
}

/* Miniatura del video */
.ldoc-video-thumb {
	position:      relative;
	width:         80%;
	cursor:        pointer;
	border-radius: 6px;
	overflow:      hidden;
	background:    #c8c8c8;
	aspect-ratio:  16 / 9;
	margin: 0 auto;
}

.ldoc-video-thumb img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	filter:     grayscale(25%);
	transition: filter 0.3s ease;
}

.ldoc-video-thumb:hover img {
	filter: grayscale(0%);
}

/* Botón play */
.ldoc-play-btn {
	position:        absolute;
	top:             50%;
	left:            50%;
	transform:       translate(-50%, -50%);
	width:           54px;
	height:          54px;
	background:      rgba(255, 255, 255, 0.88);
	border-radius:   50%;
	display:         flex;
	align-items:     center;
	justify-content: center;
	color:           #333;
	pointer-events:  none;
	transition:      background 0.2s ease, transform 0.2s ease;
}

.ldoc-video-thumb:hover .ldoc-play-btn {
	background:  #ffffff;
	transform:   translate(-50%, -50%) scale(1.1);
}

.ldoc-play-btn svg {
	width:       20px;
	height:      20px;
	margin-left: 3px;
}

/* Título */
.ldoc-title {
	color:          #1a4a70;
	font-size:      15px;
	font-weight:    700;
	text-transform: uppercase;
	line-height:    1.4;
	margin:         0;
	padding:        0;
}

/* Fila de fecha */
.ldoc-date-row {
	display:         flex;
	justify-content: space-between;
	align-items:     center;
	margin-top:      auto;
}

.ldoc-month,
.ldoc-year {
	font-size: 13px;
	color:     #9aa8b8;
}

/* ---------------------------------------------------------------
   Columna derecha — categoría, PDF, botones
   --------------------------------------------------------------- */
.ldoc-right {
	width:           200px;
	flex-shrink:     0;
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	gap:             14px;
	padding-left:    24px;
	border-left:     1px solid #eef0f3;
}

/* Etiqueta de categoría */
.ldoc-cat-label {
	font-size:      14px;
	font-weight:    700;
	color:          #1a4a70;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-align:     center;
	width:          100%;
}

/* Icono PDF */
.ldoc-pdf-icon {
	width: 72px;
}

.ldoc-pdf-icon img {
	width:      100%;
	height:     auto;
	display:    block;
	object-fit: contain;
}

/* Botones de acción */
.ldoc-actions {
	display:     flex;
	flex-direction: row;
	gap:         10px;
	align-items: center;
	margin-top:  auto;
}

/* Los PNG ya incluyen el círculo + borde + icono: solo necesitamos el enlace limpio */
.ldoc-btn {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	background:      transparent;
	border:          none;
	padding:         0;
	text-decoration: none;
	flex-shrink:     0;
	transition:      opacity 0.2s ease, transform 0.2s ease;
}

.ldoc-btn:hover {
	opacity:   0.82;
	transform: scale(1.1);
}

.ldoc-btn img {
	width:      52px;
	height:     52px;
	display:    block;
	object-fit: contain;
}

/* ---------------------------------------------------------------
   Paginación
   --------------------------------------------------------------- */
.ldoc-pagination {
	display:         flex;
	justify-content: center;
	margin-top:      8px;
	/* grid-column: 1 / -1 ya está definido arriba en .ldoc-wrapper */
}

.ldoc-pagination .page-numbers {
	display:         flex;
	align-items:     center;
	justify-content: center;
	min-width:       36px;
	height:          36px;
	padding:         0 10px;
	border-radius:   6px;
	border:          1px solid #d0d8e4;
	background:      #ffffff;
	color:           #1a4a70;
	font-size:       14px;
	font-weight:     500;
	text-decoration: none;
	margin:          0 3px;
	transition:      background 0.2s ease, color 0.2s ease;
}

.ldoc-pagination a.page-numbers:hover {
	background:   #1a4a70;
	color:        #ffffff;
	border-color: #1a4a70;
}

.ldoc-pagination .page-numbers.current {
	background:   #1a4a70;
	color:        #ffffff;
	border-color: #1a4a70;
}

/* ---------------------------------------------------------------
   Modal de video
   --------------------------------------------------------------- */
.ldoc-modal {
	display:         none;
	position:        fixed;
	inset:           0;
	z-index:         99999;
	align-items:     center;
	justify-content: center;
}

.ldoc-modal.ldoc-modal--open {
	display: flex;
}

.ldoc-modal__overlay {
	position:   absolute;
	inset:      0;
	background: rgba(0, 0, 0, 0.78);
}

.ldoc-modal__box {
	position:      relative;
	z-index:       1;
	width:         90%;
	max-width:     900px;
	background:    #000;
	border-radius: 10px;
	overflow:      hidden;
}

.ldoc-modal__close {
	position:        absolute;
	top:             10px;
	right:           14px;
	z-index:         2;
	background:      rgba(0, 0, 0, 0.55);
	border:          none;
	color:           #ffffff;
	font-size:       28px;
	line-height:     1;
	width:           36px;
	height:          36px;
	border-radius:   50%;
	cursor:          pointer;
	display:         flex;
	align-items:     center;
	justify-content: center;
	transition:      background 0.2s ease;
}

.ldoc-modal__close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.ldoc-modal__video {
	position:       relative;
	padding-bottom: 56.25%;
	height:         0;
}

.ldoc-modal__video iframe {
	position: absolute;
	inset:    0;
	width:    100%;
	height:   100%;
	border:   0;
}


.ldoc-pagination ul {
	list-style: none;
	margin:     0;
	padding:    0;
}

.ldoc-pagination ul li {
	list-style: none;
}

/* ---------------------------------------------------------------
   Responsive — Listado Documentos
   --------------------------------------------------------------- */
@media (max-width: 768px) {
	/* Forzar 1 columna en tablet/móvil sin importar el parámetro */
	.ldoc-wrapper {
		grid-template-columns: 1fr !important;
	}

	.ldoc-item {
		flex-direction: column;
		padding:        16px;
		gap:            16px;
	}

	.ldoc-right {
		width:          100%;
		flex-direction: row;
		flex-wrap:      wrap;
		align-items:    center;
		padding-left:   0;
		border-left:    none;
		border-top:     1px solid #eef0f3;
		padding-top:    16px;
		gap:            12px;
	}

	.ldoc-cat-label {
		width: auto;
	}

	.ldoc-actions {
		margin-top: 0;
	}
}

@media (max-width: 480px) {
	.ldoc-wrapper {
		padding: 12px;
		gap:     12px;
	}

	.ldoc-btn img {
		width:  40px;
		height: 40px;
	}

	.ldoc-pdf-icon {
		width: 56px;
	}
}

/* =============================================================
   Listado Actividades — Estilos
   Shortcode: [listado_actividades cat_id="106" per_page="5" columnas="1"]
   ============================================================= */

.lact-wrapper {
	width:                 100%;
	/*background:            #1a3545;*/
	box-sizing:            border-box;
	display:               grid;
	grid-template-columns: repeat(var(--lact-cols, 1), 1fr);
}

/* La paginación ocupa todas las columnas */
.lact-pagination {
	grid-column: 1 / -1;
}

/* ---------------------------------------------------------------
   Ítem
   --------------------------------------------------------------- */
.lact-item {
	display:       flex;
	align-items:   stretch;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	min-height:    220px;
	margin-bottom: 30px;
}

.lact-item:last-of-type {
	border-bottom: none;
}

/* Imagen */
.lact-image {
	width:       38%;
	height:      220px; /* fija: evita que el alto dependa del texto (que envuelve más en laptops <1400px) */
	flex-shrink: 0;
	align-self:  flex-start; /* no estirar con .lact-content, así el recorte de cover es siempre consistente */
	overflow:    hidden;
	margin-top:  37px;
}

.lact-image a {
	display: block;
	width:   100%;
	height:  100%;
}

.lact-image img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform 0.35s ease;
}

.lact-image:hover img {
	transform: scale(1.04);
}

/* Contenido */
.lact-content {
	flex:           1;
	padding:        28px 32px;
	display:        flex;
	flex-direction: column;
	gap:            10px;
}

/* Título */
.lact-title {
	margin:  0;
	padding: 0;
}

.lact-title a {
	color:          #ffffff;
	font-size:      19px;
	font-weight:    700;
	text-transform: uppercase;
	text-decoration: none;
	line-height:    1.3;
	transition:     color 0.2s ease;
}

.lact-title a:hover {
	color: #7ecfdd;
}

/* Fecha de modificación */
.lact-date {
	font-size: 12px;
	color:     #7a9eb0;
}

/* Extracto */
.lact-excerpt {
	color:       #b8ccd6;
	font-size:   14px;
	line-height: 1.65;
	margin:      0;
	flex:        1;
}

/* Enlace Ver Más */
.lact-more {
	align-self:      flex-end;
	color:           #00547a;
	font-size:       14px;
	font-weight:     600;
	text-decoration: none;
	transition:      color 0.2s ease;
}

.lact-more:hover {
	color: #7ecfdd;
}

/* ---------------------------------------------------------------
   Paginación
   --------------------------------------------------------------- */
.lact-pagination {
	display:         flex;
	justify-content: center;
	padding:         20px 0;
	/*background:      #1a3545;*/
}

.lact-pagination ul {
	display:     flex;
	list-style:  none;
	margin:      0;
	padding:     0;
	gap:         6px;
	flex-wrap:   wrap;
	justify-content: center;
}

.lact-pagination ul li {
	list-style: none;
}

.lact-pagination .page-numbers {
	display:         flex;
	align-items:     center;
	justify-content: center;
	min-width:       36px;
	height:          36px;
	padding:         0 10px;
	border-radius:   6px;
	border:          1px solid rgba(255, 255, 255, 0.25);
	background:      transparent;
	color:           #00547a;
	font-size:       14px;
	font-weight:     500;
	text-decoration: none;
	transition:      background 0.2s ease, border-color 0.2s ease;
}

.lact-pagination a.page-numbers:hover {
	background:   rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.5);
}

.lact-pagination .page-numbers.current {
	background:   rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------
   Responsive — Listado Actividades
   --------------------------------------------------------------- */
@media (max-width: 768px) {
	.lact-wrapper {
		grid-template-columns: 1fr !important;
	}

	.lact-item {
		flex-direction: column;
	}

	.lact-image {
		width:  100%;
		height: 200px;
	}

	.lact-content {
		padding: 20px 18px;
	}

	.lact-title a {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.lact-image {
		height: 160px;
	}

	.lact-content {
		padding: 16px 14px;
		gap:     8px;
	}

	.lact-title a {
		font-size: 14px;
	}

	.lact-excerpt {
		font-size: 13px;
	}
}

/* ==========================================================
   SHORTCODE 6: pdf_embebido  — prefijo: pdfv-
   Visor de PDF embebido al 100% sin bordes negros.
   Aislado completamente: ningún selector comparte nombre
   con psc-, drc-, ldoc- ni lact-.
   ========================================================== */

.pdfv-wrapper {
	position:   relative;
	width:      100%;
	height:     var(--pdfv-height, 800px);
	overflow:   hidden;
	background: #f0f0f0;   /* fondo gris claro visible durante la carga */
	border:     1px solid #d0d0d0;
	border-radius: 4px;
}

/* El iframe ocupa TODO el wrapper sin dejar ningún borde negro */
.pdfv-frame {
	position:   absolute;
	top:        0;
	left:       0;
	width:      100%;
	height:     100%;
	border:     none;       /* elimina el borde predeterminado del iframe */
	outline:    none;
	display:    block;
	background: transparent;
}

/* Mensaje de fallback: solo se muestra si el iframe no carga */
.pdfv-fallback {
	display:  none;
	position: absolute;
	bottom:   12px;
	left:     0;
	right:    0;
	text-align: center;
	font-size:  14px;
	color:      #555;
}

.pdfv-fallback a {
	color:           #0073aa;
	text-decoration: underline;
}

/* Mensaje de error cuando no se pasa URL */
.pdfv-error {
	padding:     12px 16px;
	background:  #fff3cd;
	border:      1px solid #ffc107;
	border-radius: 4px;
	color:       #856404;
	font-size:   14px;
	margin:      0;
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 768px) {
	.pdfv-wrapper {
		/* En móvil reducir altura para no desbordar la pantalla */
		height: min(var(--pdfv-height, 800px), 70vh);
		border-radius: 2px;
	}
}
