/* Hierros Home Widgets - Frontend Styles */

/* Filter Button */
#project-tag-filter .e-filter-toggle {
	border-radius: 100%;
}
/* Gallery Container */
.hhw-gallery-container {
	position: relative;
	width: 100%;
}

/* Grid Layout */
.hhw-gallery-grid {
	display: grid;
	gap: 15px;
	width: 100%;
}

/* Masonry Layout */
.hhw-gallery-masonry {
	column-count: 3;
	column-gap: 15px;
	width: 100%;
}

.hhw-gallery-masonry .hhw-gallery-item {
	break-inside: avoid;
	margin-bottom: 15px;
}

/* Gallery Item */
.hhw-gallery-item {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 5px;
}

.hhw-gallery-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hhw-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.hhw-gallery-item:hover img {
	transform: scale(1.05);
}

/* Hover Overlay */
.hhw-gallery-item-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.hhw-gallery-item:hover .hhw-gallery-item-overlay {
	opacity: 1;
}

.hhw-gallery-item-overlay svg {
	font-size: 24px;
	color: #ffffff;
	transition: transform 0.3s ease;
}

/* Slider Layout */
.hhw-gallery-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.hhw-gallery-slider.vertical {
	height: 400px;
}

.hhw-gallery-slider .swiper-slide {
	height: auto;
}

.hhw-gallery-slider .swiper-button-next,
.hhw-gallery-slider .swiper-button-prev {
	color: #ffffff;
	background: rgba(0, 0, 0, 0.5);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.hhw-gallery-slider .swiper-button-next:hover,
.hhw-gallery-slider .swiper-button-prev:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

.hhw-gallery-slider .swiper-button-next:after,
.hhw-gallery-slider .swiper-button-prev:after {
	font-size: 18px;
}

.hhw-gallery-slider .swiper-pagination-bullet {
	background: #ffffff;
	opacity: 0.7;
	transition: all 0.3s ease;
}

.hhw-gallery-slider .swiper-pagination-bullet-active {
	opacity: 1;
	transform: scale(1.2);
}

/* Modal Styles */
.hhw-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	overflow-y: auto;
}

.hhw-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.hhw-modal-container {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.hhw-modal-content {
	position: relative;
	max-width: 90vw;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hhw-modal-image {
	max-width: 100%;
	max-height: 70vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 5px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hhw-modal-info {
	margin-top: 20px;
	text-align: center;
	color: #ffffff;
}

.hhw-modal-title {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 10px 0;
}

.hhw-modal-caption {
	font-size: 16px;
	opacity: 0.8;
	margin: 0;
}

/* Modal Controls */
.hhw-modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 50px;
	height: 50px;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 1000;
}

.hhw-modal-close:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

.hhw-modal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 60px;
	height: 60px;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	color: #ffffff;
	font-size: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 1000;
}

.hhw-modal-nav:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: translateY(-50%) scale(1.1);
}

.hhw-modal-nav.disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.hhw-modal-nav.disabled:hover {
	background: rgba(0, 0, 0, 0.5);
	transform: translateY(-50%) scale(1);
}

.hhw-modal-prev {
	left: 20px;
}

.hhw-modal-next {
	right: 20px;
}

/* Modal Thumbnails */
.hhw-modal-thumbs {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	max-width: 90vw;
	overflow-x: auto;
	padding: 10px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 25px;
}

.hhw-modal-thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 5px;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.6;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.hhw-modal-thumb:hover {
	opacity: 0.8;
	transform: scale(1.1);
}

.hhw-modal-thumb.active {
	opacity: 1;
	border-color: #ffffff;
	transform: scale(1.1);
}

.hhw-modal-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Body lock when modal is open */
body.hhw-modal-open {
	overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.hhw-gallery-masonry {
		column-count: 2;
	}

	.hhw-modal-nav {
		width: 50px;
		height: 50px;
		font-size: 24px;
	}

	.hhw-modal-thumb {
		width: 50px;
		height: 50px;
	}
}

@media (max-width: 768px) {
	.hhw-gallery-masonry {
		column-count: 1;
	}

	.hhw-modal-container {
		padding: 10px;
	}

	.hhw-modal-content {
		max-width: 95vw;
		max-height: 85vh;
	}

	.hhw-modal-image {
		max-height: 60vh;
	}

	.hhw-modal-close {
		width: 40px;
		height: 40px;
		font-size: 20px;
		top: 10px;
		right: 10px;
	}

	.hhw-modal-nav {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.hhw-modal-prev {
		left: 10px;
	}

	.hhw-modal-next {
		right: 10px;
	}

	.hhw-modal-thumbs {
		bottom: 10px;
		max-width: 95vw;
	}

	.hhw-modal-thumb {
		width: 40px;
		height: 40px;
	}

	.hhw-modal-title {
		font-size: 20px;
	}

	.hhw-modal-caption {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.hhw-modal-thumbs {
		gap: 5px;
	}

	.hhw-modal-thumb {
		width: 35px;
		height: 35px;
	}
}

/* Animation Effects */
@keyframes hhw-fadeIn {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes hhw-slideInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hhw-modal-overlay.active .hhw-modal-content {
	animation: hhw-fadeIn 0.3s ease-out;
}

.hhw-modal-overlay.active .hhw-modal-thumbs {
	animation: hhw-slideInUp 0.4s ease-out 0.1s both;
}

/* Loading states */
.hhw-gallery-item.loading {
	pointer-events: none;
}

.hhw-gallery-item.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top: 3px solid #ffffff;
	border-radius: 50%;
	animation: hhw-spin 1s linear infinite;
}

@keyframes hhw-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Custom scrollbar for thumbnails */
.hhw-modal-thumbs::-webkit-scrollbar {
	height: 6px;
}

.hhw-modal-thumbs::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
}

.hhw-modal-thumbs::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
}

.hhw-modal-thumbs::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.5);
}

/* ================================================
   ARTESANO INFO WIDGET STYLES
   ================================================ */

/* Container */
.hhw-artesano-info {
	width: 100%;
}

/* Title */
.hhw-artesano-title {
	margin: 0 0 15px 0;
	font-weight: 600;
	line-height: 1.2;
}

/* Content */
.hhw-artesano-content {
	margin: 0 0 20px 0;
	line-height: 1.6;
}

.hhw-artesano-content p {
	margin: 0 0 15px 0;
}

.hhw-artesano-content p:last-child {
	margin-bottom: 0;
}

/* Contact Items */
.hhw-contact-item {
	display: flex;
	align-items: center;
	margin: 0 0 10px 0;
	line-height: 1.4;
	transition: all 0.3s ease;
}

.hhw-contact-item:last-child {
	margin-bottom: 0;
}

.hhw-contact-icon {
	margin-right: 8px;
	flex-shrink: 0;
	width: 16px;
	text-align: center;
	font-size: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.3s ease;
}

/* Support for SVG icons from Elementor */
.hhw-contact-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	transition: fill 0.3s ease;
}

/* Support for FontAwesome and other icon fonts */
.hhw-contact-icon i {
	font-size: inherit;
	transition: color 0.3s ease;
}

.hhw-contact-item a {
	text-decoration: none;
	transition: all 0.3s ease;
}

.hhw-contact-item a:hover {
	text-decoration: underline;
}

/* Specific contact types */
.hhw-contact-email .hhw-contact-icon {
	color: #ea4335;
}

.hhw-contact-web .hhw-contact-icon {
	color: #4285f4;
}

.hhw-contact-instagram .hhw-contact-icon {
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hhw-contact-phone .hhw-contact-icon {
	color: #34a853;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.hhw-artesano-title {
		margin-bottom: 12px;
		font-size: 1.2em;
	}

	.hhw-artesano-content {
		margin-bottom: 15px;
	}

	.hhw-contact-item {
		margin-bottom: 8px;
	}
}

@media (max-width: 480px) {
	.hhw-contact-item {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.hhw-contact-icon {
		margin-top: 2px;
	}
}
