/**
 * Diocesi Facebook Albums - Frontend Styling
 * Seamless integration with the Diocesi di San Severo theme.
 */

/* Wrapper and Admin Notice */
.dfa-wrapper {
	width: 100%;
}

.avviso-admin-dfa {
	background: #fff8e5;
	border: 1px solid #ffdf99;
	border-left: 4px solid #b70f0a;
	padding: 1.25rem;
	border-radius: 0.5rem;
	margin: 1.5rem 0;
	color: #78350f;
}

.avviso-admin-dfa p {
	margin: 0 0 0.75rem 0;
	font-size: 0.95rem;
	line-height: 1.55;
}

.avviso-admin-dfa p:last-child {
	margin-bottom: 0;
}

/* Single Album View Container */
.dfa-single-album-view {
	width: 100%;
	animation: dfaFadeIn 0.3s ease-out;
}

@keyframes dfaFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Back Button */
.dfa-top-bar,
.dfa-bottom-bar {
	margin-bottom: 1.5rem;
}

.dfa-bottom-bar {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.dfa-btn-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.15rem;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 9999px;
	color: #b70f0a !important;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dfa-btn-back i {
	font-size: 1.1rem;
	transition: transform 0.2s ease;
}

.dfa-btn-back:hover {
	background: #b70f0a;
	color: #ffffff !important;
	border-color: #b70f0a;
	transform: translateX(-3px);
	box-shadow: 0 6px 16px rgba(183, 15, 10, 0.25);
}

.dfa-btn-back:hover i {
	transform: translateX(-3px);
}

/* Single Album Header Details */
.dfa-single-header {
	margin-bottom: 2rem;
}

.dfa-album-meta-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin: 0.75rem 0 1rem;
}

.dfa-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #64748b;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 0.35rem 0.75rem;
	border-radius: 9999px;
}

.dfa-meta-item i {
	color: #b70f0a;
	font-size: 0.95rem;
}

.dfa-meta-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #1877f2 !important;
	background: #eff6ff;
	border: 1px solid #dbeafe;
	padding: 0.35rem 0.75rem;
	border-radius: 9999px;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.dfa-meta-link:hover {
	background: #1877f2;
	color: #ffffff !important;
	border-color: #1877f2;
}

.dfa-album-desc {
	margin-top: 0.85rem;
	font-size: 0.96rem;
	line-height: 1.65;
	color: #475569;
}

/* Photo Gallery Grid */
.dfa-photo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

@media (min-width: 640px) {
	.dfa-photo-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

@media (min-width: 1024px) {
	.dfa-photo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

.dfa-photo-item {
	position: relative;
	border-radius: 0.75rem;
	overflow: hidden;
	background: #f1f5f9;
	aspect-ratio: 4 / 3;
	border: 1px solid #e2e8f0;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dfa-photo-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px -4px rgba(15, 23, 42, 0.15);
}

.dfa-photo-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	position: relative;
}

.dfa-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dfa-photo-item:hover .dfa-photo-img {
	transform: scale(1.06);
}

.dfa-photo-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(183, 15, 10, 0.6) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.dfa-photo-overlay i {
	color: #ffffff;
	font-size: 1.75rem;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.85);
	transition: transform 0.25s ease;
}

.dfa-photo-item:hover .dfa-photo-overlay {
	opacity: 1;
}

.dfa-photo-item:hover .dfa-photo-overlay i {
	transform: scale(1);
}

/* Fancybox Custom Styling Tweaks */
.fancybox-bg {
	background: rgba(15, 23, 42, 0.94) !important;
}

.fancybox-caption {
	background: linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 70%, transparent 100%) !important;
	font-family: inherit;
	font-size: 0.95rem !important;
	padding: 1.25rem !important;
	line-height: 1.5;
}

.fancybox-button {
	background: rgba(15, 23, 42, 0.6) !important;
	border-radius: 4px;
	margin: 4px;
}

.fancybox-button:hover {
	background: #b70f0a !important;
}
