/* ------------------------------ */
/* --- ESTILOS PÁGINA INICIAL --- */
/* ------------------------------ */

/* Importamos los estilos globales principales */
@import url("main_styles.css");

body {
	font-family: var(--font-texto);
	font-size: 1rem;
	color: var(--color-texto);
	line-height: 1.6;
	background-color: #fff;
	margin: 0;
	padding: 0;
}

/* Jerarquía tipográfica */
h1, h2, h3 {
	font-family: var(--font-titulo);
	color: var(--color-primario);
	margin-bottom: 1rem;
}

h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }

p { font-size: 1rem; margin-bottom: 1rem; color: var(--color-texto); }

a {
	color: var(--color-secundario);
	text-decoration: none;
	transition: color 0.3s ease;
}
a:hover { color: var(--color-primario); }

.sombra-suave {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-radius: 12px;
}

/* ------------------------------------------------ */
/* --- CARRUSEL PRINCIPAL --- */
/* ------------------------------------------------ */
.carousel-custom {
	width: 95%;
	max-width: 1600px;
	margin: 40px auto;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	position: relative;
}

.carousel-custom .carousel-inner {
	width: 100%;
}

/* Cada slide: proporción exacta + fallback en px */
.carousel-custom .carousel-item {
	position: relative;
	aspect-ratio: 1317 / 407;
	min-height: 200px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	background-color: transparent;
	width: 100%;
	border-radius: 20px;
}

/* Fallback extra: si el viewport es grande, aumentar mínimo */
@media (min-width: 992px) {
	.carousel-custom .carousel-item {
		min-height: 300px;
	}
}

/* Reglas específicas para fade de Bootstrap */
.carousel-fade .carousel-item {
	opacity: 0;
	transition: opacity .6s ease;
	backface-visibility: hidden;
	transform: translateZ(0);
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item.carousel-item-start,
.carousel-fade .carousel-item.carousel-item-end {
	opacity: 1;
}

.carousel-custom .carousel-item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	pointer-events: none;
	z-index: 1;
}

/* Asegura que controles queden encima */
.carousel-control-prev,
.carousel-control-next {
	z-index: 5;
}

/* ------------------------------------------------ */
/* --- REEMPLAZO DE IMÁGENES PARA PANTALLAS PEQUEÑAS --- */
/* ------------------------------------------------ */

@media (max-width: 576px) {

	/* Slide 1 */
	#carouselExampleFade .carousel-item:nth-child(1) {
		background-image: url('../img/Carrusel Index/EDUPUCcelular.jpg') !important;
	}

	/* Slide 2 */
	#carouselExampleFade .carousel-item:nth-child(2) {
		background-image: url('../img/Carrusel Index/FILUcelular.jpg') !important;
	}

	/* Slide 3 */
	#carouselExampleFade .carousel-item:nth-child(3) {
		background-image: url('../img/Carrusel Index/CPersonas3celular.jpg') !important;
	}
}


/* ------------------------------------------------ */
/* --- MEDIA QUERIES PARA EL CARRUSEL --- */
/* ------------------------------------------------ */

/* Pantallas muy pequeñas (teléfonos mini) */
@media (max-width: 360px) {
	.carousel-custom {
		border-radius: 10px;
		margin: 15px auto;
	}
	.carousel-custom .carousel-item {
		min-height: 140px;
	}
}

/* Teléfonos pequeños */
@media (max-width: 576px) {
	.carousel-custom {
		border-radius: 12px;
		margin: 20px auto;
	}
	.carousel-custom .carousel-item {
		min-height: 160px;
	}
}

/* Teléfonos grandes y tablets chicas */
@media (max-width: 768px) {
	.carousel-custom .carousel-item {
		min-height: 220px;
	}
}

/* Tablets / pantallas medianas */
@media (max-width: 992px) {
	.carousel-custom .carousel-item {
		min-height: 280px;
	}
}

/* Laptops pequeñas */
@media (max-width: 1200px) {
	.carousel-custom .carousel-item {
		min-height: 340px;
	}
}

/* Pantallas grandes (HD) */
@media (min-width: 1201px) and (max-width: 1600px) {
	.carousel-custom .carousel-item {
		min-height: 400px;
	}
}

/* Pantallas muy grandes (2K) */
@media (min-width: 1601px) and (max-width: 2000px) {
	.carousel-custom .carousel-item {
		min-height: 480px;
	}
}

/* Pantallas ultra anchas o 4K */
@media (min-width: 2001px) {
	.carousel-custom .carousel-item {
		min-height: 550px;
	}
}


/* ------------------------------------------------ */
/* --- BOTONES DE EDITORIALES --- */
/* ------------------------------------------------ */
.editorial-btn, .editorial-btnn {
	display: inline-block;
	background-color: #fff;
	border-radius: 15px;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
	padding: 15px;
	transition: transform 0.2s, box-shadow 0.2s;
	text-align: center;
	width: 150px;
}

.editorial-btn img, .editorial-btnn img {
	width: 90px;
	height: 90px;
	object-fit: contain;
	border-radius: 10px;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.editorial-btn:hover, .editorial-btnn:hover {
	transform: translateY(-5px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.editorial-btn:hover img, .editorial-btnn:hover img {
	filter: brightness(1.1);
	transform: scale(1.07);
}

.container .row.g-3 { margin-top: 10px; }

@media (max-width: 768px) {
	.editorial-btn img, .editorial-btnn img { max-width: 100px; }
}

@media (max-width: 576px) {
	.editorial-btn, .editorial-btnn { padding: 10px; }
	.editorial-btn img, .editorial-btnn img { max-width: 80px; }
}

/* ------------------------------------------------ */
/* --- TÍTULO CENTRADO --- */
/* ------------------------------------------------ */
.centrado {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	margin: 40px 0;
}
.izquierda { margin-right: 50px; }

/* ------------------------------------------------ */
/* --- SECCIÓN EDUPUC --- */
/* ------------------------------------------------ */
.edupuc-section-full {
	background-color: var(--color-gris);
	border-radius: 14px;
	padding: 50px 40px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.edupuc-section-full p {
	font-size: 1.1rem;
	color: var(--color-texto);
	text-align: justify;
}
.resaltado {
	color: var(--color-secundario);
	font-weight: 600;
}
.logo-scroll {
	transition: transform 0.8s ease;
}
.logo-scroll.mover { transform: translateY(-10px); }
@media (max-width: 768px) {
	.edupuc-section-full { text-align: center; }
	.logo-scroll { margin-top: 20px; }
}

/* ------------------------------------------------ */
/* --- CARRUSEL DE PORTADAS --- */
/* ------------------------------------------------ */

.carousel-libros {
	width: 95%;
	margin: 40px auto;
	position: relative;
	background: transparent;
	box-shadow: none;
	border: none;
}

.portada-libro,
.libro img.portada-libro {
	width: 220px;
	height: 330px;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portada-libro:hover,
.libro:hover img.portada-libro {
	transform: translateY(-6px) scale(1.03);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Controles */
.carousel-control-prev-icon,
.carousel-control-next-icon {
	background-color: rgba(0, 0, 0, 0.4);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	background-size: 60% 60%;
}

.carousel-control-prev,
.carousel-control-next {
	width: 5%;
}

/* RESPONSIVO */
@media (max-width: 992px) {
	.portada-libro,
	.libro img.portada-libro {
		width: 160px;
		height: 230px;
	}
}

@media (max-width: 768px) {
	.portada-libro,
	.libro img.portada-libro {
		width: 140px;
		height: 200px;
	}
}

@media (max-width: 576px) {

	/* Tamaño para CELULAR */
	.portada-libro,
	.libro img.portada-libro {
		width: 120px;
		height: 180px; /* proporcional 2:3 */
		object-fit: contain;
	}

	/* Cambiar imágenes a versión CELULAR */
	.carousel-item:nth-child(1) .libro:nth-child(1) img { content: url("img/Coediciones/celular/SellosCeramicos\ .png"); }
	.carousel-item:nth-child(1) .libro:nth-child(2) img { content: url("img/Coediciones/celular/ElAlbumdeFigueroa.png"); }
	.carousel-item:nth-child(1) .libro:nth-child(3) img { content: url("img/Coediciones/celular/Coleccion\ .png"); }
	.carousel-item:nth-child(1) .libro:nth-child(4) img { content: url("img/Coediciones/celular/LaFronteraIndigena\ .png"); }
	.carousel-item:nth-child(1) .libro:nth-child(5) img { content: url("img/Coediciones/celular/EducacionenCR.png"); }

	/* GRUPO 2 */
	.carousel-item:nth-child(2) .libro:nth-child(1) img { content: url("img/Coediciones/celular/MapasdeCR.png"); }
	.carousel-item:nth-child(2) .libro:nth-child(2) img { content: url("img/Coediciones/celular/Lirismo.png"); }
	.carousel-item:nth-child(2) .libro:nth-child(3) img { content: url("img/Coediciones/celular/HuelgasDemocratizadoras.png"); }
	.carousel-item:nth-child(2) .libro:nth-child(4) img { content: url("img/Coediciones/celular/CostaRica.png"); }
	.carousel-item:nth-child(2) .libro:nth-child(5) img { content: url("img/Coediciones/celular/Alexander.png"); }

	/* GRUPO 3 */
	.carousel-item:nth-child(3) .libro:nth-child(1) img { content: url("img/Coediciones/celular/Suelos.png"); }
	.carousel-item:nth-child(3) .libro:nth-child(2) img { content: url("img/Coediciones/celular/DirigirTesis.png"); }
	.carousel-item:nth-child(3) .libro:nth-child(3) img { content: url("img/Coediciones/celular/PueblosIndigenas.png"); }
	.carousel-item:nth-child(3) .libro:nth-child(4) img { content: url("img/Coediciones/celular/EducacionIndigena.png"); }
	.carousel-item:nth-child(3) .libro:nth-child(5) img { content: url("img/Coediciones/celular/Multiversos.png"); }

	.carousel-item:nth-child(1) .libro:nth-child(2) h5 { font-size: 9px; }
	.carousel-item:nth-child(3) .libro:nth-child(3) h5 { font-size: 9px; }
	.carousel-item:nth-child(3) .libro:nth-child(4) h5 { font-size: 9px; }
	.carousel-item:nth-child(3) .libro:nth-child(5) h5 { font-size: 9px; }

}

	

/* ------------------------------------------------ */
/* --- OVERLAY DE INFORMACIÓN EN PORTADAS --- */
/* ------------------------------------------------ */
.libro {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-libro {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.6);
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	text-align: center;
	padding: 10px;
	border-radius: 12px;
}
.libro:hover .info-libro { opacity: 1; }

.info-libro h5 {
	font-size: 1.1rem;
	margin-bottom: 5px;
	font-weight: 600;
}
.info-libro p {
	font-size: 0.9rem;
	margin: 0;
	opacity: 0.9;
}

.btn-info {
	margin-top: 10px;
	padding: 6px 12px;
	border: 1px solid #fff;
	background: transparent;
	color: #fff;
	font-size: 0.85rem;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.3s, color 0.3s;
}
.btn-info:hover {
	background: #fff;
	color: #000;
}

/* Responsivo */
@media (max-width: 768px) {
	.info-libro h5 { font-size: 0.9rem; }
	.info-libro p { font-size: 0.75rem; }
	.btn-info { padding: 4px 8px; font-size: 0.7rem; }
}
@media (max-width: 576px) {
	.info-libro h5 { font-size: 0.6rem; }
	.info-libro p { font-size: 0.45rem; }
	.btn-info { font-size: 0.6rem; }
}
@media (max-width: 480px) {
	.info-libro h5 { font-size: 0.7rem; }
	.info-libro p { font-size: 0.65rem; }
}
/* ------------------------------------------------ */
/* --- MODALES DE LIBROS --- */
/* ------------------------------------------------ */

/* Ajuste general del modal */
.modal-content {
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Header uniforme */
.modal-header {
	background-color: #ccc;
	height: 65px;
	position: relative;
	justify-content: center;
	align-items: center;
	border-bottom: none;
}

.modal-header img {
	width: 45px;
	margin-top: 10px;
}

.modal-header .btn-close {
	position: absolute;
	right: 15px;
	top: 15px;
	filter: brightness(0) invert(0.4);
}

/* Imagen del libro */
.modal-body img {
	width: 200px;
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 25px auto;
	display: block;
}

/* Título y subtítulos */
.modal-body h5 {
	text-align: center;
	font-weight: 600;
	margin: 10px 0;
	color: #333;
}

/* Textos y párrafos */
.modal-body p {
	text-align: justify;
	margin: 10px 25px;
	color: #444;
	line-height: 1.5;
	font-size: 0.95rem;
}

/* Sinopsis */
.modal-body h5#modalLibro1Label,
.modal-body h5.modal-title {
	margin-top: 20px;
	font-size: 1.1rem;
	text-transform: uppercase;
	color: #2b2b2b;
}

/* Footer */
.modal-footer {
	border-top: none;
	background-color: #f5f5f5;
	justify-content: center !important;
	flex-direction: column;
	text-align: center;
	padding-top: 20px;
}

.modal-footer p {
	font-weight: 500;
	color: #333;
	margin-bottom: 10px;
}

/* enlace */
.editorial-btnn img {
	transition: transform 0.3s ease, opacity 0.3s ease;
	width: 80px;
}

.editorial-btnn img:hover {
	transform: scale(1.05);
	opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
	.modal-dialog.modal-xl {
		max-width: 95%;
		margin: 10px auto;
	}

	.modal-body img {
		width: 150px;
		margin: 20px auto;
	}

	.modal-body p {
		font-size: 0.9rem;
		margin: 10px 15px;
	}

	.modal-body h5 {
		font-size: 1rem;
	}

	.modal-footer img {
		width: 65px;
	}
}

@media (max-width: 480px) {
	.modal-body img {
		width: 120px;
	}

	.modal-body p {
		font-size: 0.85rem;
	}
}


/* ------------------------------------------------ */
/* --- VIDEO SECCIÓN --- */
/* ------------------------------------------------ */
.video-section {
	background-color: #ffffff;
	text-align: center;
}
.video-title {
	font-size: 1.8rem;
	font-weight: 600;
	color: var(--color-primario);
	margin-bottom: 25px;
}
.video-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}
.responsive-video {
	position: relative;
	width: 100%;
	max-width: 1000px;
	padding-top: 42%;
	overflow: hidden;
	border-radius: 15px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.responsive-video iframe,
.responsive-video video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 15px;
}
@media (max-width: 768px) {
	.video-title { font-size: 1.4rem; }
}

/* ------------------------------------------------ */
/* --- ENLACE DESTACADO --- */
/* ------------------------------------------------ */
.enlace-destacado {
	color: #25B0AE;
	text-decoration: none;
	font-weight: bold;
	position: relative;
}
.enlace-destacado::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: #25B0AE;
	transition: width 0.3s;
}
.enlace-destacado:hover::after { width: 100%; }
.enlace-destacado:hover {
	color: #1C8A88;
	cursor: pointer;
}

/* ------------------------------------------------ */
/* --- FOOTER --- */
/* ------------------------------------------------ */

.footer-custom {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
	background-color: #939598;
	padding: 15px 10px;
	text-align: center;
	margin-top: 50px;
}

.footer-logo {
	height: 100px;
	filter: brightness(0.95);
	transition: transform 0.3s, filter 0.3s;
	display: block;
}

.footer-logo:hover {
	transform: scale(1.08);
	filter: brightness(1.2);
}

.footer-divider {
	width: 80%;
	margin: 20px auto;
	border: none;
	height: 1px;
	background-color: #ddd;
}
.footer-copy {
	font-family: var(--font-texto);
	font-size: 0.95rem;
	color: #333;
	margin: 0;
}
@media (max-width: 768px) {
	.footer-logo { width: 85px; }
	.footer-copy { font-size: 0.9rem; }
}
@media (max-width: 576px) {
	.footer-logo { width: 70px; }
	.footer-custom { padding: 30px 15px 20px; }
}

/* ------------------------------------------------ */
/* --- SCROLL --- */
/* ------------------------------------------------ */
html, body {
	height: auto;
	min-height: 100%;
}
body { display: block; }
	