/*
 * Galería de fotos (álbumes de Flickr): rejilla de álbumes, rejilla de fotos
 * y lightbox. Tema oscuro consistente con el resto del sitio.
 */

.display-none {
	display: none !important;
}

.gallery {
	width: 90%;
	max-width: 1400px;
	margin: 0 auto 60px;
	color: white;
}
.gallery-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin: 30px 0 25px;
}
.gallery-head h1 {
	margin: 0;
	font-size: 34px;
	text-transform: uppercase;
}
.gallery-sub {
	margin: 4px 0 0;
	color: #93a1ad;
	font-size: 14px;
}
.gallery-back {
	display: inline-block;
	color: var(--blue-color, #0FB7CE);
	font-size: 14px;
	margin-bottom: 8px;
	text-decoration: none;
}
.gallery-back:hover {
	text-decoration: underline;
}
.gallery-empty {
	color: #93a1ad;
	text-align: center;
	padding: 60px 0;
}

/* Rejilla de álbumes */
.album-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}
.album-card {
	display: block;
	background: rgba(255, 255, 255, .06);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: white;
	transition: transform .15s, background .15s;
}
.album-card:hover {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, .12);
}
.album-cover {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}
.album-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s;
}
.album-card:hover .album-cover img {
	transform: scale(1.05);
}
.album-count {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(0, 0, 0, .65);
	color: white;
	font-size: 12px;
	padding: 3px 9px;
	border-radius: 12px;
}
.album-info {
	padding: 12px 14px;
}
.album-title {
	margin: 0;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
}
.album-date {
	margin: 4px 0 0;
	color: #93a1ad;
	font-size: 12px;
}

/* Rejilla de fotos de un álbum */
.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}
.photo-item {
	border: 0;
	padding: 0;
	background: rgba(255, 255, 255, .05);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 3 / 2;
}
.photo-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .2s;
}
.photo-item:hover img {
	transform: scale(1.04);
}

/* Paginación */
.gallery-pager {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin: 25px 0 0;
	color: #93a1ad;
	font-size: 14px;
}
.gallery-pager a {
	color: var(--blue-color, #0FB7CE);
	font-size: 20px;
	text-decoration: none;
}

/* Lightbox */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(0, 0, 0, .92);
	display: flex;
	justify-content: center;
	align-items: center;
}
.lightbox img {
	max-width: calc(100vw - 140px);
	max-height: calc(100vh - 90px);
	border-radius: 4px;
}
.lightbox p {
	position: absolute;
	bottom: 15px;
	left: 0;
	right: 0;
	text-align: center;
	color: #bbb;
	font-size: 13px;
	margin: 0;
}
.lightbox button {
	position: absolute;
	background: rgba(255, 255, 255, .1);
	border: 0;
	color: white;
	font-size: 26px;
	line-height: 1;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	cursor: pointer;
}
.lightbox button:hover {
	background: rgba(255, 255, 255, .25);
}
#lb-close {
	top: 15px;
	right: 15px;
}
#lb-prev {
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
}
#lb-next {
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
}
@media (max-width: 700px) {
	.lightbox img {
		max-width: 100vw;
	}
	#lb-prev, #lb-next {
		bottom: 50px;
		top: auto;
		transform: none;
	}
}
