/* T3 PORTFOLIO GALLERY - COMPLETE STYLING */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.t3-gallery {
	width: 100%;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== HEADING ===== */
.gallery-heading {
	text-align: center;
	margin-bottom: 50px;
	animation: fadeInDown 0.8s ease;
	display: none;
}

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

.gallery-heading h2 {
	font-size: 40px;
	font-weight: 800;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 12px;
	letter-spacing: -0.5px;
}

.gallery-heading p {
	font-size: 17px;
	color: #666;
	font-weight: 500;
}

/* ===== FILTER BUTTONS ===== */
.filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-bottom: 50px;
	animation: fadeInUp 0.8s ease 0.2s both;
}

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

.filter-btn {
	padding: 12px 28px;
	border: 2px solid #e0e0e0;
	background: white;
	border-radius: 30px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	color: #333;
	box-shadow: 0 4px 15px rgba(0,0,0,0.08);
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.filter-btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: #FF6B35;
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
	z-index: -1;
}

.filter-btn:hover::before {
	width: 300px;
	height: 300px;
}

.filter-btn:hover {
	color: white;
	border-color: #FF6B35;
	box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
	transform: translateY(-2px);
}

.filter-btn.active {
	background: #FF6B35 !important;
	color: #ffffff !important;
	border-color: #FF6B35 !important;
	box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4) !important;
	position: relative !important;
	z-index: 2 !important;
	text-color: #ffffff !important;
}

.filter-btn.active:before,
.filter-btn.active:after {
	color: #ffffff !important;
}

/* Ensure text is always visible in active state */
.t3-gallery .filter-btn.active {
	color: #ffffff !important;
}

.t3-gallery .filter-btn.active span,
.t3-gallery .filter-btn.active b,
.t3-gallery .filter-btn.active strong {
	color: #ffffff !important;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

/* ===== GALLERY ITEMS ===== */
.gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	cursor: pointer;
	background: white;
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
	transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	animation: scaleIn 0.6s ease both;
}

@keyframes scaleIn {
	from { opacity: 0; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1); }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Shimmer effect */
.gallery-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transition: left 0.6s ease;
	z-index: 1;
}

.gallery-item:hover::before {
	left: 100%;
}

.gallery-item:hover {
	transform: translateY(-12px) scale(1.02);
	box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.gallery-img {
	width: 100%;
	height: 260px;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
	z-index: 0;
}

.gallery-item:hover .gallery-img {
	transform: scale(1.15) rotate(2deg);
}

/* ===== OVERLAY - BASE ===== */
.gallery-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 2;
}

/* ===== OVERLAY - BLUR EFFECT (DEFAULT) ===== */
.gallery-overlay.blur-effect {
	background: transparent;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: none;
	box-shadow: none;
}

/* ===== OVERLAY - GRADIENT EFFECT ===== */
.gallery-overlay.gradient-effect {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* ===== OVERLAY - GLASS EFFECT ===== */
.gallery-overlay.glass-effect {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px) saturate(180%);
	-webkit-backdrop-filter: blur(10px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

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

/* Blur the image on hover ONLY for items that have a link */
.gallery-item[data-has-link="true"]:hover .gallery-img {
	filter: blur(4px);
}

/* Zoom-only overlay (no-link items): transparent backdrop, shows the zoom icon, image does NOT blur */
.gallery-overlay.zoom-only {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border: none;
	box-shadow: none;
}

.gallery-overlay-icon-link {
	text-decoration: none;
	display: inline-flex;
}

.gallery-overlay-icon {
	width: 50px;
	height: 50px;
	background: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	box-shadow: 0 6px 12px rgba(0,0,0,0.15);
	animation: bounceIcon 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	flex-shrink: 0;
	transition: all 0.3s ease;
	cursor: pointer;
}

.gallery-overlay-icon-link:hover .gallery-overlay-icon {
	transform: scale(1.1);
	box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

@keyframes bounceIcon {
	0% { transform: scale(0.3) rotate(-30deg); }
	100% { transform: scale(1) rotate(0deg); }
}

/* ===== GALLERY INFO ===== */
.gallery-info {
	padding: 20px;
	background: white;
	position: relative;
	z-index: 3;
}

.gallery-info p {
	display: none !important;
	font-size: 11px;
	color: #FF6B35;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 1.5px;
	margin-bottom: 8px;
	opacity: 0.8;
	visibility: hidden !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.gallery-info h3 {
	font-size: 16px;
	font-weight: 700;
	color: #222;
	margin: 0;
	transition: all 0.3s ease;
	line-height: 1.4;
}

.gallery-item:hover .gallery-info h3 {
	color: #FF6B35;
	transform: translateX(4px);
}

/* ===== MODAL ===== */
.t3-gallery-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
	from { opacity: 0; }
	to { opacity: 1; }
}

.t3-gallery-modal.show {
	display: flex;
}

.modal-content {
	position: relative;
	background: transparent;
	max-width: 90vw;
	max-height: 85vh;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	width: auto;
	display: flex;
}

/* Modal Animations */
.modal-animation-1 {
	animation: slideInModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-animation-2 {
	animation: zoomInModal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-animation-3 {
	animation: rotateInModal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-animation-4 {
	animation: flipInModal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInModal {
	from { transform: translateY(-60%) scale(0.8); opacity: 0; }
	to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes zoomInModal {
	from { transform: scale(0.3); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes rotateInModal {
	from { transform: rotate(-25deg) scale(0.7); opacity: 0; }
	to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes flipInModal {
	from { transform: rotateY(90deg); opacity: 0; }
	to { transform: rotateY(0deg); opacity: 1; }
}

.modal-img {
	width: auto;
	height: auto;
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	display: block;
	border-radius: 8px;
	box-shadow: 0 25px 60px rgba(0,0,0,0.4);
	transition: opacity 0.25s ease;
}

.modal-info {
	padding: 32px;
	overflow-y: auto;
	max-height: calc(85vh - 450px);
	background: white;
}

.modal-info h2 {
	font-size: 28px;
	font-weight: 800;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin: 0 0 10px 0;
	animation: fadeInUp 0.5s ease;
}

.modal-info .category {
	font-size: 11px;
	color: #FF6B35;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 1.5px;
	margin-bottom: 16px;
	opacity: 0.8;
	animation: fadeInUp 0.5s ease 0.1s both;
}

.modal-info p {
	font-size: 15px;
	color: #555;
	line-height: 1.8;
	margin: 0;
	animation: fadeInUp 0.5s ease 0.2s both;
}

.modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(255,255,255,0.95);
	border: none;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 10;
	color: #333;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.modal-close:hover {
	background: white;
	transform: rotate(90deg) scale(1.1);
	box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ===== MODAL SLIDER NAV ARROWS ===== */
.t3-gallery-modal .modal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 22px;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
	transition: all 0.3s ease;
}

.t3-gallery-modal .modal-nav:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.12);
	box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.t3-gallery-modal .modal-prev { left: 12px; }
.t3-gallery-modal .modal-next { right: 12px; }

.t3-gallery-modal .modal-nav.hidden-nav { display: none; }

@media (max-width: 768px) {
	.t3-gallery-modal .modal-nav { width: 44px; height: 44px; font-size: 18px; }
	.t3-gallery-modal .modal-prev { left: 8px; }
	.t3-gallery-modal .modal-next { right: 8px; }
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1024px) {
	.gallery-heading h2 {
		font-size: 32px;
	}

	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.filter-buttons {
		gap: 8px;
	}

	.filter-btn {
		padding: 10px 20px;
		font-size: 13px;
	}
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
	.gallery-heading h2 {
		font-size: 24px;
	}

	.gallery-heading p {
		font-size: 14px;
	}

	.gallery-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.filter-buttons {
		gap: 6px;
		margin-bottom: 30px;
	}

	.filter-btn {
		padding: 8px 16px;
		font-size: 12px;
	}

	.gallery-img {
		height: 200px;
	}

	.modal-info {
		padding: 20px;
	}

	.modal-info h2 {
		font-size: 22px;
	}

	.modal-info p {
		font-size: 14px;
	}

	.gallery-info h3 {
		font-size: 15px;
	}

	.gallery-overlay-icon {
		width: 50px;
		height: 50px;
		font-size: 24px;
	}
}

/* ===== MOBILE: VERY SMALL ===== */
@media (max-width: 480px) {
	.gallery-heading h2 {
		font-size: 20px;
	}

	.gallery-heading {
		margin-bottom: 30px;
	}

	.filter-buttons {
		margin-bottom: 20px;
	}

	.gallery-grid {
		gap: 12px;
	}

	.gallery-info {
		padding: 15px;
	}

	.gallery-info p {
		font-size: 10px;
	}

	.gallery-info h3 {
		font-size: 14px;
	}

	.modal-content {
		max-height: 90vh;
	}

	.modal-info {
		max-height: calc(90vh - 300px);
		padding: 15px;
	}
}

.hidden {
	display: none !important;
}
