/* POPUP HOME
   Se carga solo en la portada cuando el popup está activo (ver functions.php) */

#wrapPopup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 999999;
	width: 100%;
	height: 100%;
	padding: 20px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.7);
	opacity: 0;
	transition: opacity 0.3s ease;
}

#wrapPopup.active {
	display: flex;
}

#wrapPopup.visible {
	opacity: 1;
}

#wrapPopup #popup {
	position: relative;
	max-width: 900px;
	width: 100%;
	transform: translateY(20px);
	transition: transform 0.3s ease;
}

#wrapPopup.visible #popup {
	transform: translateY(0);
}

#wrapPopup #popup img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 8px;
}

#wrapPopup #popup .popup-close {
	position: absolute;
	top: -16px;
	right: -16px;
	z-index: 2;
	width: 36px;
	height: 36px;
	line-height: 36px;
	text-align: center;
	font-size: 18px;
	color: #3c3e3c;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

#wrapPopup #popup .popup-close:hover {
	color: #e14e41;
}

body.popup-open {
	overflow: hidden;
}

@media screen and (max-width: 700px) {
	#wrapPopup {
		padding: 30px 20px;
	}

	#wrapPopup #popup {
		max-width: 100%;
	}

	#wrapPopup #popup .popup-close {
		top: -14px;
		right: -8px;
		width: 32px;
		height: 32px;
		line-height: 32px;
		font-size: 16px;
	}
}
