/* ═══════════════════════════════════════
   HEADER.CSS — Soria Casas Layout
   ═══════════════════════════════════════ */

/* ═══ CSS VARIABLES (shared by header + footer) ═══ */
:root {
	--azul: #4a8fcc;
	--azul-hover: #3a7fb8;
	--azul-light: rgba(74, 143, 204, 0.08);
	--beige: #fbf5e9;
	--beige-dark: #f0e8d5;
	--blanco: #ffffff;
	--gris-texto: #54585e;
	--negro: #333333;
	--borde: #e5e5e5;
	--sombra: 0 2px 16px rgba(0, 0, 0, 0.08);
	--radio: 12px;
	--radio-sm: 8px;
	--max-width: 1200px;
	--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ UTILITIES (used by header + footer templates) ═══ */
.scl-container {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.scl-skip-link {
	position: absolute;
	top: -100%;
	left: 16px;
	background: var(--azul);
	color: #fff;
	padding: 8px 16px;
	border-radius: var(--radio-sm);
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	z-index: 10000;
	transition: top 0.2s;
	text-decoration: none;
}

.scl-skip-link:focus {
	top: 8px;
}

/* ═══ HEADER WRAPPER ═══ */
.scl-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	width: 100%;
	transition: box-shadow var(--transition);
}

.scl-header--sticky {
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* ═══ MAIN BAR ═══ */
.scl-mainbar {
	background: #ffffff;
	border-bottom: 1px solid #e5e5e5;
	height: 70px;
	transition: background var(--transition);
}

.scl-header--sticky .scl-mainbar {
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom-color: transparent;
}

.scl-mainbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

/* ═══ LOGO ═══ */
.scl-logo {
	flex-shrink: 0;
}

.scl-logo img {
	max-height: 50px;
	width: auto;
}

/* ═══ NAV DESKTOP (centrado) ═══ */
.scl-nav {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.scl-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
}

.scl-nav__link {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #54585e;
	padding: 8px 12px;
	border-radius: var(--radio-sm);
	transition: color var(--transition), background var(--transition);
	white-space: nowrap;
}

.scl-nav__link:hover {
	color: var(--azul);
	background: var(--azul-light);
}

.scl-nav__link--active {
	color: var(--azul);
	font-weight: 600;
}

/* ═══ RIGHT SECTION ═══ */
.scl-mainbar__right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

/* ═══ CTA BUTTON ═══ */
.scl-cta {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--azul);
	color: #ffffff;
	padding: 10px 20px;
	border-radius: var(--radio-sm);
	font-size: 13px;
	font-weight: 600;
	transition: background var(--transition);
}

.scl-cta:hover {
	background: var(--azul-hover);
	color: #ffffff;
}

/* ═══ LANGUAGE SELECTOR ═══ */
.scl-lang {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
}

.scl-lang__option {
	padding: 4px 6px;
	color: #999;
	cursor: pointer;
	transition: color var(--transition);
	border-radius: 4px;
}

.scl-lang__option:hover {
	color: var(--negro);
}

.scl-lang__option--active {
	color: var(--negro);
	font-weight: 700;
	cursor: default;
}

.scl-lang__sep {
	color: #ccc;
	font-weight: 300;
}

/* ═══ HAMBURGER ═══ */
.scl-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: var(--radio-sm);
	transition: background var(--transition);
	position: relative;
	z-index: 9999;
}

.scl-hamburger:hover {
	background: rgba(0, 0, 0, 0.05);
}

.scl-hamburger__line {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--negro);
	border-radius: 2px;
	transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger open state */
.scl-hamburger--open .scl-hamburger__line:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.scl-hamburger--open .scl-hamburger__line:nth-child(2) {
	opacity: 0;
}

.scl-hamburger--open .scl-hamburger__line:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══ MOBILE MENU ═══ */
.scl-mobile-menu {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100dvh;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 9998;
	padding: 80px 24px 40px;
	overflow-y: auto;
	flex-direction: column;
	justify-content: space-between;
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity var(--transition), transform var(--transition);
}

.scl-mobile-menu--open {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

.scl-mobile-menu__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.scl-mobile-menu__link {
	display: block;
	font-family: 'DM Sans', sans-serif;
	font-size: 18px;
	font-weight: 500;
	color: var(--gris-texto);
	padding: 14px 16px;
	border-radius: var(--radio-sm);
	transition: color var(--transition), background var(--transition);
}

.scl-mobile-menu__link:hover {
	color: var(--azul);
	background: var(--azul-light);
}

.scl-mobile-menu__link--active {
	color: var(--azul);
	font-weight: 600;
}

/* Mobile menu footer */
.scl-mobile-menu__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--borde);
}

.scl-mobile-menu__phone {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 18px;
	font-weight: 600;
	color: var(--azul);
}

.scl-mobile-menu__socials {
	display: flex;
	gap: 16px;
}

.scl-mobile-menu__socials a {
	color: var(--gris-texto);
	transition: color var(--transition);
}

.scl-mobile-menu__socials a:hover {
	color: var(--azul);
}

.scl-mobile-menu__lang {
	display: flex;
	gap: 8px;
}

.scl-mobile-menu__lang-btn {
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	color: var(--gris-texto);
	border: 1px solid var(--borde);
	border-radius: var(--radio-sm);
	transition: all var(--transition);
}

.scl-mobile-menu__lang-btn:hover {
	border-color: var(--azul);
	color: var(--azul);
}

.scl-mobile-menu__lang-btn--active {
	background: var(--azul);
	color: #fff;
	border-color: var(--azul);
	font-weight: 600;
}

/* ═══ RESPONSIVE ═══ */

/* Tablet (<=900px) */
@media (max-width: 900px) {
	.scl-nav {
		display: none;
	}

	.scl-hamburger {
		display: flex;
	}

	.scl-cta__text {
		display: none;
	}

	.scl-cta {
		padding: 8px;
		border-radius: 50%;
		width: 40px;
		height: 40px;
		justify-content: center;
	}

	.scl-lang {
		display: none;
	}

	.scl-mainbar {
		height: 60px;
	}

	.scl-logo img {
		max-height: 40px;
	}
}

/* Mobile (<=600px) */
@media (max-width: 600px) {
	.scl-mainbar__inner {
		padding: 0 16px;
	}

	.scl-logo img {
		max-height: 36px;
	}
}
