/* ======================================
   ANTES Y DESPUÉS - FLIP CARDS
   ====================================== */

/* Hero Section */
.antes-despues-hero {
	position: relative;
	height: 100vh;
	background-image: url('../images/thumb/proyecto-12-clasico.jpg');
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

.antes-despues-hero::before {
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0));
	position: absolute;
	content: "";
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
}

.antes-despues-hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	color: white;
	padding: 0 20px;
}

.antes-despues-hero-content h1 {
	color: var(--white);
	font-family: var(--font-primary);
	text-align: center;
	line-height: 1;
	letter-spacing: 5px;
	font-weight: 400;
	text-transform: uppercase;
	font-size: 28px;
	margin-bottom: 0;
	opacity: 1;
}

.antes-despues-hero-buttons {
	display: flex;
	gap: 25px;
	justify-content: center;
	margin-top: 28px;
	opacity: 1;
}

.antes-despues-hero-button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	font-size: 12px;
	color: #ffffff;
	letter-spacing: 2px;
	font-weight: 400;
	border: 1px solid #ffffff;
	padding: 12px 50px;
	font-family: var(--font-tertiary);
	text-decoration: none;
	transition: all 0.2s ease;
	text-transform: uppercase;
	line-height: 1;
}

.antes-despues-hero-button:hover {
	background-color: #eeede5;
	color: #000000;
	transform: scale(0.9);
}

.antes-despues-hero-button:focus {
	outline: 2px solid #ffffff;
	outline-offset: 4px;
}

/* Intro Section */
.antes-despues-intro {
	padding: 80px 20px;
	background: #fefbf2;
}

.antes-despues-intro .container {
	max-width: 900px;
	margin: 0 auto;
}

.antes-despues-intro p {
	font-family: var(--font-primary);
	font-size: 18px;
	line-height: 1.8;
	color: #7a7a7a;
	text-align: center;
	margin: 0;
}

/* Desktop: aumentar en 1px */
@media (min-width: 769px) {
	.antes-despues-intro p {
		font-size: 19px;
	}
}

/* Gallery Section */
.antes-despues-gallery {
	padding: 60px 20px 100px;
	background: #fefbf2;
}

.cards-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
	max-width: 1400px;
	margin: 0 auto;
	padding: 20px;
}

/* Flip Card Wrapper */
.flip-card-wrapper {
	display: block;
}

/* Flip Card Container */
.flip-card {
	width: 100%;
	aspect-ratio: 4 / 5;
	perspective: 1000px;
	position: relative;
}

.flip-card-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
	transform-style: preserve-3d;
}

/* Flipped state controlled by class */
.flip-card.flipped .flip-card-inner {
	transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.flip-card-front {
	background: #fff;
	border: 1px solid #e5e7eb;
}

.flip-card-back {
	background: #2c2c2c;
	transform: rotateY(180deg);
}

/* Card Images */
.flip-card-front img,
.flip-card-back img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Card Overlays */
.flip-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 40%);
	color: white;
	transition: all 0.3s ease;
	pointer-events: none;
}

.flip-card-overlay h3 {
	position: absolute;
	left: 25px;
	bottom: 20px;
	font-family: var(--font-tertiary);
	font-size: 1rem;
	margin: 0;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: none !important;
	line-height: 100%;
	z-index: 2;
	color: rgba(255, 255, 255, 0.7);
}

.flip-card-overlay p {
	margin: 0;
}

.flip-label {
	position: absolute;
	top: 20px;
	right: 25px;
	font-family: var(--font-tertiary);
	font-weight: 400;
	text-transform: none !important;
	letter-spacing: 1px;
	font-size: 11px;
	color: #fff;
	opacity: 0.9;
	z-index: 2;
	display: none;
}

/* Flip Button */
.flip-button {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) scale(0.9);
	z-index: 10;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	color: #7a7a7a;
	letter-spacing: 2px;
	font-size: 16px;
	border: 1px solid rgba(255, 255, 255, 0.63);
	border-radius: 0;
	font-family: var(--font-primary);
	font-weight: 400;
	padding: 11px 11px 9px;
	text-decoration: none;
	text-transform: none !important;
	transition: all 0.3s ease;
	background-color: #fefbf2;
	line-height: 100%;
	cursor: pointer;
	mix-blend-mode: screen;
}

.flip-button-front {
	/* Button on the front side */
}

.flip-button-back {
	/* Button on the back side - already rotated */
	transform: translateX(-50%) rotateY(180deg) scaleX(-1) scale(0.9);
}

.flip-button:hover {
	background-color: #fefbf2;
	border-color: rgba(255, 255, 255, 0.8) !important;
	transform: translateX(-50%) scale(0.855);
}

.flip-card.flipped .flip-button-back:hover {
	transform: translateX(-50%) rotateY(180deg) scaleX(-1) scale(0.855);
}

.flip-button:active {
	background-color: #fefbf2;
	border-color: rgba(255, 255, 255, 0.8) !important;
}

/* CTA Section */
.antes-despues-cta {
	text-align: center;
	background: #fefbf2;
}

.antes-despues-cta .title h2 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	color: #2c2c2c;
	font-weight: 300;
	letter-spacing: 2px;
}

.antes-despues-cta .disc {
	max-width: 700px;
	margin: 0 auto 2rem;
	font-size: 1.1rem;
	color: #666;
	line-height: 1.8;
}

.cta-button {
	margin-top: 2rem;
}

.cta-button .btn-primary {
	display: inline-block;
	padding: 16px 48px;
	background: #2c2c2c;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 1.1rem;
	letter-spacing: 1px;
	transition: all 0.3s ease;
	text-transform: uppercase;
}

.cta-button .btn-primary:hover {
	background: #444;
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 768px) {
	.antes-despues-hero-content h1 {
		font-size: 2rem;
	}
	
	.antes-despues-intro {
		padding: 60px 20px;
	}
	
	.antes-despues-intro p {
		font-size: 16px;
	}
	
	.cards-grid {
		grid-template-columns: 1fr;
		gap: 40px 30px;
		padding: 10px;
	}
	
	.flip-card-overlay h3 {
		font-size: 1.5rem;
	}
	
	.flip-card-overlay {
		padding: 20px;
	}
	
	.flip-button {
		padding: 10px 20px;
		font-size: 0.85rem;
		white-space: nowrap;
	}
	
	.antes-despues-cta .title h2 {
		font-size: 1.8rem;
	}
	
	.antes-despues-cta .disc {
		font-size: 1rem;
	}
	
	.antes-despues-hero-buttons {
		flex-direction: column;
		gap: 15px;
	}
	
	.antes-despues-hero-button {
		font-size: 11px;
		padding: 10px 40px;
	}
}

@media (max-width: 480px) {
	.antes-despues-intro {
		padding: 40px 15px;
	}
	
	.antes-despues-intro p {
		font-size: 15px;
	}
	
	.antes-despues-gallery {
		padding: 40px 15px 60px;
	}
	
	.flip-button {
		padding: 9px 16px;
		font-size: 0.75rem;
		letter-spacing: 1px;
	}
	
	.antes-despues-hero-content h1 {
		font-size: 1.5rem;
	}
}

/* ======================================
   SCROLL REVEAL SECTION
   ====================================== */

.scroll-reveal-section {
	padding: 100px 20px;
	background-color: var(--light);
}

.scroll-reveal-title {
	text-align: center;
	margin-bottom: 60px;
}

.scroll-reveal-title h2 {
	font-family: var(--font-primary);
	font-size: 2.5rem;
	letter-spacing: 3px;
	color: var(--primary);
	margin-bottom: 20px;
	text-transform: uppercase;
}

.scroll-reveal-title p {
	font-family: var(--font-secondary);
	font-size: 1.1rem;
	color: var(--secondary);
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.8;
}

.scroll-reveal-container {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	height: 120vh;
}

.scroll-reveal-sticky {
	position: sticky;
	top: 10vh;
	height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.scroll-reveal-comparison {
	position: relative;
	width: 100%;
	max-width: 500px;
	aspect-ratio: 4/5;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.scroll-reveal-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.scroll-reveal-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.scroll-reveal-before {
	z-index: 1;
}

.scroll-reveal-after {
	z-index: 2;
	clip-path: inset(100% 0 0 0);
}

.scroll-reveal-label {
	position: absolute;
	background: rgba(255, 255, 255, 0.95);
	padding: 8px 20px;
	font-family: var(--font-tertiary);
	font-size: 0.85rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--primary);
	z-index: 3;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.scroll-reveal-label.label-before {
	bottom: 30px;
	left: 30px;
}

.scroll-reveal-label.label-after {
	top: 30px;
	right: 30px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.scroll-reveal-divider {
	position: absolute;
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	background: white;
	z-index: 3;
	transform: translateX(-50%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* Mobile Styles */
@media (max-width: 768px) {
	.scroll-reveal-section {
		padding: 60px 15px;
	}
	
	.scroll-reveal-title {
		margin-bottom: 40px;
	}
	
	.scroll-reveal-title h2 {
		font-size: 1.8rem;
		letter-spacing: 2px;
	}
	
	.scroll-reveal-title p {
		font-size: 1rem;
	}
	
	.scroll-reveal-container {
		height: 150vh;
	}
	
	.scroll-reveal-sticky {
		top: 5vh;
		height: 70vh;
	}
	
	.scroll-reveal-comparison {
		max-width: 100%;
		aspect-ratio: 4/5;
	}
	
	.scroll-reveal-label {
		padding: 6px 15px;
		font-size: 0.75rem;
		letter-spacing: 1.5px;
	}
	
	.scroll-reveal-label.label-before {
		bottom: 20px;
		left: 20px;
	}
	
	.scroll-reveal-label.label-after {
		top: 20px;
		right: 20px;
	}
}

@media (max-width: 480px) {
	.scroll-reveal-title h2 {
		font-size: 1.5rem;
	}
	
	.scroll-reveal-label {
		padding: 5px 12px;
		font-size: 0.7rem;
	}
	
	.scroll-reveal-label.label-before {
		bottom: 15px;
		left: 15px;
	}
	
	.scroll-reveal-label.label-after {
		top: 15px;
		right: 15px;
	}
}

/* iPad Pro 11" y tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
	.antes-despues-hero {
		height: 70vh;
		min-height: 500px;
	}

	.antes-despues-hero-content h1 {
		font-size: 32px;
		letter-spacing: 5px;
	}

	.antes-despues-hero-button {
		padding: 14px 45px;
		font-size: 13px;
	}

	.antes-despues-intro {
		padding: 90px 40px;
	}

	.antes-despues-intro p {
		font-size: 17px;
		max-width: 750px;
	}

	.scroll-reveal-section {
		padding: 90px 40px;
	}

	.scroll-reveal-title h2 {
		font-size: 2.2rem;
	}

	.scroll-reveal-title p {
		font-size: 1.05rem;
		max-width: 600px;
	}

	.scroll-reveal-comparison {
		max-width: 550px;
	}

	.scroll-reveal-label {
		padding: 8px 18px;
		font-size: 0.9rem;
	}

	.flip-card-wrapper {
		flex: 0 0 calc(50% - 15px);
		max-width: calc(50% - 15px);
	}

	.antes-despues-gallery {
		padding: 90px 40px;
	}

	.cards-grid {
		gap: 30px;
	}

	.antes-despues-cta {
		padding: 90px 40px;
	}

	.antes-despues-cta h2 {
		font-size: 2.2rem;
	}

	.antes-despues-cta p {
		font-size: 1.05rem;
		max-width: 650px;
	}

	.antes-despues-cta-button {
		padding: 14px 45px;
		font-size: 13px;
	}
}

/* ======================================
   PROYECTO DESTACADO - 3 IMÁGENES
   ====================================== */

.proyecto-destacado-section {
	padding: 100px 20px;
	background: #fefbf2;
}

.proyecto-destacado-title {
	text-align: center;
	margin-bottom: 60px;
}

.proyecto-destacado-title h2 {
	font-family: var(--font-primary);
	font-size: 2.5rem;
	color: #2c2c2c;
	font-weight: 400;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-bottom: 15px;
}

.proyecto-destacado-title p {
	font-family: var(--font-tertiary);
	font-size: 1rem;
	color: #7a7a7a;
	letter-spacing: 1px;
	max-width: 600px;
	margin: 0 auto;
}

.proyecto-destacado-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	max-width: 1400px;
	margin: 0 auto;
}

.proyecto-destacado-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4/5;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.proyecto-destacado-image:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.proyecto-destacado-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Responsive */
@media (max-width: 992px) {
	.proyecto-destacado-gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}
	
	.proyecto-destacado-image:last-child {
		grid-column: 1 / -1;
		max-width: 500px;
		margin: 0 auto;
	}
}

@media (max-width: 768px) {
	.proyecto-destacado-section {
		padding: 60px 15px;
	}
	
	.proyecto-destacado-title h2 {
		font-size: 1.8rem;
		letter-spacing: 2px;
	}
	
	.proyecto-destacado-title p {
		font-size: 0.9rem;
	}
	
	.proyecto-destacado-gallery {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.proyecto-destacado-image:last-child {
		grid-column: 1;
		max-width: 100%;
	}
}
