/* ============================================================
   RFR Gallery – Public styles
   Matches the design of the original gallery section
   ============================================================ */

/* Wrapper */
.rfr-gallery-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* ---- Category tabs ---------------------------------------- */
.rfr-gallery-tabs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0 40px;
	margin: 0 0 40px;
	padding: 0;
	border: none;
	list-style: none;
}

.rfr-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 8px 0 10px;
	/* Tipografía igual que H4 del tema */
	font-family: var(--thim_font_title-font-family, inherit);
	font-size: var(--thim_font_h4-font-size, 18px);
	line-height: var(--thim_font_h4-line-height, 1.3);
	font-weight: var(--thim_font_title-variant, 700);
	text-transform: var(--thim_font_h4-text-transform, uppercase);
	color: #1c519b;
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s;
	outline: none;
}

.rfr-tab:hover {
	color: #438ae8;
}

.rfr-tab--active {
	color: #1c519b;
	border-bottom-color: #1c519b;
}

/* ---- Grid ------------------------------------------------- */
.rfr-gallery-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 6px;
	min-height: 200px;
}

@media (max-width: 1024px) {
	.rfr-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.rfr-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.rfr-gallery-tabs {
		gap: 0 20px;
	}
	.rfr-tab {
		font-size: 12px;
	}
}

/* ---- Grid item -------------------------------------------- */
.rfr-gallery-item {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	cursor: pointer;
	border-radius: 2px;
}

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

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

/* ---- Pagination ------------------------------------------- */
.rfr-gallery-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 24px;
	min-height: 40px;
}

.rfr-pag-btn {
	background: none;
	border: 1px solid #2a3b6e;
	color: #2a3b6e;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.rfr-pag-btn:hover:not(:disabled) {
	background: #2a3b6e;
	color: #fff;
}

.rfr-pag-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.rfr-pag-info {
	font-size: 13px;
	color: #555;
	min-width: 80px;
	text-align: center;
}

/* hide pagination row when not needed */
.rfr-gallery-pagination.rfr-hidden {
	display: none;
}

/* ---- Lightbox --------------------------------------------- */
.rfr-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 100000;
	cursor: pointer;
	transition: opacity 0.25s;
}

.rfr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.rfr-lightbox:not([hidden]) {
	pointer-events: all;
}

.rfr-lightbox-inner {
	max-width: 90vw;
	max-height: 90vh;
	text-align: center;
}

.rfr-lightbox-img {
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 3px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
	display: block;
	margin: 0 auto;
}

.rfr-lightbox-caption {
	color: #fff;
	font-size: 14px;
	margin: 10px 0 0;
	opacity: 0.85;
}

.rfr-lightbox-close,
.rfr-lightbox-prev,
.rfr-lightbox-next {
	position: fixed;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	font-size: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	z-index: 100002;
	line-height: 1;
	padding: 0;
}

.rfr-lightbox-close:hover,
.rfr-lightbox-prev:hover,
.rfr-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.35);
}

.rfr-lightbox-close {
	top: 16px;
	right: 16px;
}

.rfr-lightbox-prev {
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
}

.rfr-lightbox-next {
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
}

.rfr-lightbox-prev:disabled,
.rfr-lightbox-next:disabled {
	opacity: 0.3;
	cursor: default;
}

/* Animation */
.rfr-lightbox-overlay,
.rfr-lightbox[hidden],
.rfr-lightbox-overlay[hidden] {
	display: none;
}
