/* ============================================================================
   TB Before After Gallery - Frontend Styles
   ============================================================================ */

:root {
	--tb-primary-color: #C9A96E;
	--tb-dark-color: #2c2c2c;
	--tb-light-gray: #f5f5f5;
	--tb-medium-gray: #e8e8e8;
	--tb-border-color: #ddd;
	--tb-text-color: #333;
	--tb-white: #fff;
}

/* ============================================================================
   Email Gate Styles
   ============================================================================ */

.tb-ba-gate-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	padding: 40px 20px;
	background: linear-gradient(135deg, var(--tb-light-gray) 0%, var(--tb-white) 100%);
}

.tb-ba-gate-container {
	width: 100%;
	max-width: 450px;
	background: var(--tb-white);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 50px 40px;
	border-top: 4px solid var(--tb-primary-color);
}

.tb-ba-gate-content {
	text-align: center;
}

.tb-ba-gate-title {
	font-size: 28px;
	font-weight: 600;
	color: var(--tb-dark-color);
	margin-bottom: 15px;
	letter-spacing: -0.5px;
}

.tb-ba-gate-message {
	font-size: 15px;
	color: var(--tb-text-color);
	margin-bottom: 30px;
	line-height: 1.6;
}

.tb-ba-email-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.tb-ba-form-field {
	display: flex;
	flex-direction: column;
}

.tb-ba-input {
	padding: 12px 15px;
	font-size: 15px;
	border: 1px solid var(--tb-border-color);
	border-radius: 4px;
	background: var(--tb-white);
	color: var(--tb-text-color);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	font-family: inherit;
}

.tb-ba-input:focus {
	outline: none;
	border-color: var(--tb-primary-color);
	box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.tb-ba-input::placeholder {
	color: #999;
}

.tb-ba-checkbox-field {
	margin: 10px 0;
	padding: 15px;
	background: var(--tb-light-gray);
	border-radius: 4px;
}

.tb-ba-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: var(--tb-text-color);
	line-height: 1.5;
}

.tb-ba-checkbox {
	margin-top: 2px;
	cursor: pointer;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: var(--tb-primary-color);
}

.tb-ba-consent-text {
	flex: 1;
}

.tb-ba-submit-btn {
	padding: 14px 30px;
	font-size: 15px;
	font-weight: 600;
	color: var(--tb-white);
	background: var(--tb-primary-color);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.2s ease;
	letter-spacing: 0.5px;
	margin-top: 10px;
}

.tb-ba-submit-btn:hover {
	background: #b89860;
	transform: translateY(-1px);
}

.tb-ba-submit-btn:active {
	transform: translateY(0);
}

/* ============================================================================
   Gallery Grid Styles
   ============================================================================ */

.tb-ba-gallery-wrapper {
	padding: 40px 20px;
	background: var(--tb-white);
}

.tb-ba-gallery-filters {
	margin-bottom: 40px;
	text-align: center;
}

.tb-ba-filter-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--tb-dark-color);
	margin-bottom: 20px;
}

.tb-ba-filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.tb-ba-filter-btn {
	padding: 10px 20px;
	font-size: 14px;
	color: var(--tb-text-color);
	background: var(--tb-light-gray);
	border: 2px solid transparent;
	border-radius: 25px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
}

.tb-ba-filter-btn:hover {
	border-color: var(--tb-primary-color);
	color: var(--tb-primary-color);
}

.tb-ba-filter-btn.active {
	background: var(--tb-primary-color);
	color: var(--tb-white);
	border-color: var(--tb-primary-color);
}

.tb-ba-gallery-grid {
	display: grid;
	gap: 30px;
	max-width: 1400px;
	margin: 0 auto;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.tb-ba-gallery-grid[data-columns="1"] {
	grid-template-columns: 1fr;
	max-width: 500px;
}

.tb-ba-gallery-grid[data-columns="2"] {
	grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.tb-ba-gallery-grid[data-columns="3"] {
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.tb-ba-case-card {
	background: var(--tb-white);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

.tb-ba-case-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tb-ba-card-image {
	position: relative;
	width: 100%;
	padding-bottom: 125%;
	background: var(--tb-light-gray);
	overflow: hidden;
}

.tb-ba-card-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tb-ba-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tb-ba-case-card:hover .tb-ba-card-overlay {
	opacity: 1;
}

.tb-ba-view-btn {
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tb-white);
	background: var(--tb-primary-color);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	letter-spacing: 0.5px;
}

.tb-ba-view-btn:hover {
	background: #b89860;
}

.tb-ba-card-content {
	padding: 20px;
}

.tb-ba-procedure-badge {
	display: inline-block;
	padding: 6px 12px;
	background: var(--tb-light-gray);
	color: var(--tb-dark-color);
	font-size: 12px;
	font-weight: 600;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}

.tb-ba-card-client {
	font-size: 18px;
	font-weight: 600;
	color: var(--tb-dark-color);
	margin: 10px 0;
}

.tb-ba-card-date {
	font-size: 13px;
	color: #999;
	margin: 0;
}

.tb-ba-no-cases {
	text-align: center;
	padding: 60px 20px;
	color: #999;
	font-size: 16px;
}

/* ============================================================================
   Modal / Lightbox Styles
   ============================================================================ */

.tb-ba-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 20px;
	animation: tb-ba-fade-in 0.3s ease;
	overflow-y: auto;
}

@keyframes tb-ba-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.tb-ba-modal-content {
	background: var(--tb-white);
	border-radius: 8px;
	max-width: 1000px;
	width: 100%;
	padding: 40px;
	position: relative;
	animation: tb-ba-slide-up 0.3s ease;
	max-height: 90vh;
	overflow-y: auto;
}

@keyframes tb-ba-slide-up {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.tb-ba-modal-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	border: none;
	background: var(--tb-light-gray);
	color: var(--tb-dark-color);
	font-size: 28px;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	padding: 0;
}

.tb-ba-modal-close:hover {
	background: var(--tb-medium-gray);
	transform: rotate(90deg);
}

.tb-ba-comparison-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

.tb-ba-comparison-container {
	position: relative;
	width: 100%;
	max-width: 450px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--tb-light-gray);
}

.tb-ba-comparison-before,
.tb-ba-comparison-after {
	display: block;
	width: 100%;
	height: auto;
}

.tb-ba-comparison-before {
	position: absolute;
	top: 0;
	left: 0;
}

.tb-ba-comparison-handle {
	position: absolute;
	top: 0;
	left: 50%;
	width: 50px;
	height: 100%;
	background: transparent;
	cursor: col-resize;
	transform: translateX(-50%);
	z-index: 10;
	user-select: none;
}

.tb-ba-handle-line {
	position: absolute;
	top: 0;
	left: 50%;
	width: 4px;
	height: 100%;
	background: var(--tb-primary-color);
	transform: translateX(-50%);
	box-shadow: 0 0 15px rgba(201, 169, 110, 0.5);
}

.tb-ba-label-before,
.tb-ba-label-after {
	position: absolute;
	top: 15px;
	padding: 8px 12px;
	background: rgba(44, 44, 44, 0.8);
	color: var(--tb-white);
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 1px;
	pointer-events: none;
	z-index: 5;
}

.tb-ba-label-before {
	left: 15px;
}

.tb-ba-label-after {
	right: 15px;
}

.tb-ba-modal-info {
	padding: 20px 0;
}

.tb-ba-modal-title {
	font-size: 24px;
	font-weight: 600;
	color: var(--tb-dark-color);
	margin: 0 0 20px 0;
}

.tb-ba-modal-details {
	margin-bottom: 15px;
}

.tb-ba-modal-details-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--tb-border-color);
	font-size: 14px;
}

.tb-ba-modal-details-label {
	font-weight: 600;
	color: var(--tb-dark-color);
}

.tb-ba-modal-details-value {
	color: var(--tb-text-color);
}

.tb-ba-modal-description {
	color: var(--tb-text-color);
	line-height: 1.6;
	font-size: 15px;
	margin: 15px 0 0 0;
	padding-top: 15px;
	border-top: 1px solid var(--tb-border-color);
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
	.tb-ba-gate-container {
		padding: 40px 30px;
	}

	.tb-ba-gallery-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.tb-ba-modal-content {
		padding: 30px 20px;
	}

	.tb-ba-comparison-wrapper {
		grid-template-columns: 1fr;
		gap: 25px;
	}

	.tb-ba-modal-close {
		top: 15px;
		right: 15px;
		width: 36px;
		height: 36px;
		font-size: 24px;
	}

	.tb-ba-filter-buttons {
		gap: 8px;
	}

	.tb-ba-filter-btn {
		padding: 8px 15px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.tb-ba-gate-wrapper {
		min-height: 300px;
		padding: 20px 10px;
	}

	.tb-ba-gate-container {
		padding: 30px 20px;
		border-radius: 6px;
	}

	.tb-ba-gate-title {
		font-size: 24px;
	}

	.tb-ba-gallery-wrapper {
		padding: 20px 10px;
	}

	.tb-ba-filter-title {
		font-size: 16px;
	}

	.tb-ba-modal {
		padding: 10px;
	}

	.tb-ba-modal-content {
		padding: 20px;
		border-radius: 6px;
	}

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

	.tb-ba-comparison-container {
		max-width: 100%;
	}

	.tb-ba-label-before,
	.tb-ba-label-after {
		font-size: 11px;
		padding: 6px 10px;
	}
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
	.tb-ba-gallery-filters {
		display: none;
	}

	.tb-ba-modal {
		position: static;
		background: transparent;
	}

	.tb-ba-modal-close {
		display: none;
	}
}
