/**
 * Bersoft CASALANAS Hero Styles
 * Componente: bersoft-hero | Version: 1.0.6
 */

:root {
	--bersoft-hero-font: var(--bs-font-heading, var(--bersoft-font-family, var(--bersoft-font, 'Plus Jakarta Sans', -apple-system, sans-serif)));
	--bersoft-hero-brown: var(--bs-color-primary, var(--bersoft-theme-brown, #5C4533));
	--bersoft-hero-deep: color-mix(in srgb, var(--bersoft-hero-brown) 72%, #140C07 28%);
	--bersoft-hero-btn-bg: #FAF5EF;
	--bersoft-hero-btn-text: #2D1E16;
	--bersoft-hero-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

.bersoft-hero {
	position: relative;
	width: 100%;
	min-height: var(--bersoft-hero-min-height, clamp(540px, 62vh, 660px));
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background-color: var(--bersoft-hero-deep, #261A13);
	font-family: var(--bersoft-hero-font);
	box-sizing: border-box;
	overflow: hidden;
}
.bersoft-hero * { box-sizing: border-box; }

/* Telón de apertura: 2 hojas desde el centro */
.bersoft-hero-curtain { position: absolute; inset: 0; z-index: 20; pointer-events: none; display: flex; }
.bersoft-curtain-panel { flex: 1; height: 100%; background-color: var(--bersoft-hero-deep, #241812); will-change: transform; }
.bersoft-curtain-left { transform-origin: left center; animation: bersoftCurtainLeft 0.85s var(--bersoft-hero-spring) 0.06s forwards; }
.bersoft-curtain-right { transform-origin: right center; animation: bersoftCurtainRight 0.85s var(--bersoft-hero-spring) 0.06s forwards; }
@keyframes bersoftCurtainLeft { 0% { transform: scaleX(1); } 99% { transform: scaleX(0); visibility: visible; } 100% { transform: scaleX(0); visibility: hidden; } }
@keyframes bersoftCurtainRight { 0% { transform: scaleX(1); } 99% { transform: scaleX(0); visibility: visible; } 100% { transform: scaleX(0); visibility: hidden; } }

/* Fondo fotográfico de borde a borde */
.bersoft-hero-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
.bersoft-hero-picture, .bersoft-hero-img { width: 100%; height: 100%; display: block; }
.bersoft-hero-img {
	object-fit: cover;
	object-position: var(--bersoft-hero-pos-x, 0%) var(--bersoft-hero-pos-y, 35%);
	transition: transform 1.2s var(--bersoft-hero-spring);
}
.bersoft-hero:hover .bersoft-hero-img { transform: scale(1.015); }

/* Oscurecimiento suave para legibilidad del texto en el espacio libre */
.bersoft-hero-scrim {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(to right, transparent 0%, transparent 35%, rgba(26, 17, 12, 0.35) 55%, rgba(20, 12, 7, 0.72) 80%, rgba(18, 11, 6, 0.85) 100%);
}

/* Contenedor y contenido editorial */
.bersoft-hero-container { position: relative; z-index: 5; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.bersoft-hero-content {
	width: 50%;
	max-width: 580px;
	margin-left: auto;
	padding: 48px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.bersoft-hero-header { margin-bottom: 24px; }
.bersoft-hero-kicker-wrap { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.bersoft-kicker-line { display: inline-block; width: 24px; height: 1px; background: rgba(237, 230, 221, 0.45); }
.bersoft-hero-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #EDE6DD; }
.bersoft-hero-title {
	font-family: var(--bersoft-hero-font);
	font-size: clamp(2rem, 3.2vw, 3.35rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.025em;
	color: #FFFFFF;
	margin: 0;
	text-wrap: balance;
}

.bersoft-hero-action { display: flex; justify-content: center; }
.bersoft-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--bersoft-hero-btn-bg, #FAF5EF) !important;
	color: var(--bersoft-hero-btn-text, #2D1E16) !important;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none !important;
	border-radius: 9999px;
	padding: 12px 24px;
	min-height: 44px;
	max-height: 46px;
	width: fit-content;
	box-shadow: none !important;
	transition: background 0.18s ease, transform 0.18s var(--bersoft-hero-spring), color 0.18s ease;
	cursor: pointer;
	white-space: nowrap;
}
.bersoft-hero-btn:hover { background: #FFFFFF !important; transform: translateY(-2px); }
.bersoft-hero-btn:active { transform: scale(0.97); }
.bersoft-hero-btn:focus-visible { outline: 2px solid #FFFFFF !important; outline-offset: 3px; }
.bersoft-btn-arrow { stroke: var(--bersoft-hero-btn-text, #2D1E16) !important; transition: transform 0.18s var(--bersoft-hero-spring); }
.bersoft-hero-btn:hover .bersoft-btn-arrow { transform: translateX(4px); }

.bersoft-hero-notice {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px dashed #F59E0B;
	background: rgba(245, 158, 11, 0.15);
	color: #FEF3C7;
	font-size: 0.85rem;
}

/* Vista móvil: fondo continuo natural, sin bandas planas ni sombras artificiales */
@media (max-width: 991px) {
	.bersoft-hero { min-height: var(--bersoft-hero-mob-min-height, 540px); height: auto; display: flex; flex-direction: column; }
	.bersoft-hero-backdrop { inset: 0; }
	.bersoft-hero-img { object-position: var(--bersoft-hero-mob-pos-x, 50%) var(--bersoft-hero-mob-pos-y, 20%); }
	.bersoft-hero-scrim {
		background: linear-gradient(to bottom, rgba(26, 17, 12, 0.82) 0%, rgba(26, 17, 12, 0.65) 18%, rgba(26, 17, 12, 0.28) 32%, transparent 45%, transparent 76%, rgba(18, 11, 6, 0.55) 100%);
	}
	.bersoft-hero-container { height: 100%; min-height: inherit; display: flex; flex-direction: column; padding: 0 16px; }
	.bersoft-hero-content {
		width: 100%;
		max-width: 440px;
		margin: 0 auto;
		height: 100%;
		min-height: inherit;
		padding: 28px 0 20px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
		text-align: center;
	}
	.bersoft-hero-header { margin-bottom: 0; width: 100%; }
	.bersoft-hero-kicker-wrap { margin-bottom: 10px; }
	.bersoft-hero-title { font-size: clamp(1.7rem, 6.4vw, 2.15rem); line-height: 1.15; }
	.bersoft-hero-action { margin-top: auto; width: 100%; }
	.bersoft-hero-btn { min-height: 44px; padding: 12px 28px; }
}

@media (max-width: 360px) {
	.bersoft-hero { min-height: var(--bersoft-hero-mob-min-height, 490px); }
	.bersoft-hero-img { object-position: var(--bersoft-hero-mob-pos-x, 50%) var(--bersoft-hero-mob-pos-y, 16%); }
	.bersoft-hero-content { padding: 22px 0 16px; }
	.bersoft-hero-kicker-wrap { margin-bottom: 8px; }
	.bersoft-hero-kicker { font-size: 0.72rem; }
	.bersoft-hero-title { font-size: 1.45rem; line-height: 1.15; }
	.bersoft-hero-btn { font-size: 0.88rem; padding: 10px 22px; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
	.bersoft-hero-curtain { display: none !important; }
	.bersoft-curtain-panel, .bersoft-hero-img, .bersoft-hero-btn, .bersoft-btn-arrow { transition: none !important; animation: none !important; }
}
.elementor-editor-active .bersoft-hero-curtain { display: none !important; }
