/* ==========================================================================
   Página de Sedes y Cobertura Nacional - Maquinarias DEEL
   Atmósfera industrial oscura, B2B de alta tecnología y conversión directa.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Variables locales y contenedor raíz
   -------------------------------------------------------------------------- */
.page-branches,
.segment-branches {
	background-color: #070A13;
	color: #FFFFFF;
	font-family: var(--font-primary, 'Montserrat', sans-serif);
	overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   1. HERO B2B DE SEDES (Altura idéntica a Transporte: min-height 75vh)
   -------------------------------------------------------------------------- */
.branches-hero {
	position: relative;
	background-size: cover;
	background-position: center;
	padding: 110px 0 50px;
	min-height: 75vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: #181A1C;
	background-image: radial-gradient(circle at 80% 20%, rgba(219, 82, 17, 0.16) 0%, transparent 55%), radial-gradient(circle at 20% 85%, rgba(47, 50, 52, 0.9) 0%, transparent 65%);
	border-bottom: none;
}

.branches-hero__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	pointer-events: none;
	/* Sin fondo oscuro superpuesto para que el CSS de fondo se vea vibrante e idéntico a Transporte */
}

.branches-hero__container {
	position: relative;
	z-index: 2;
	width: 100%;
}

.branches-hero__top-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2.5rem;
	margin-bottom: 3.5rem;
}

.branches-hero__header {
	max-width: 860px;
	margin-bottom: 0;
	flex: 1;
}

.branches-badge-top {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.9rem;
	background: rgba(219, 82, 17, 0.12);
	border: 1px solid rgba(219, 82, 17, 0.35);
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 1.5px;
	color: #DB5211;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.branches-badge-top .badge-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	background-color: #DB5211;
	border-radius: 50%;
	box-shadow: 0 0 8px #DB5211;
}

.branches-hero__title {
	font-size: clamp(2rem, 3.8vw, 3.3rem);
	font-weight: 900;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: -0.5px;
	margin-bottom: 1.5rem;
}

.branches-hero__title .title-white {
	display: block;
	color: #FFFFFF;
}

.branches-hero__title .title-orange {
	display: block;
	color: #DB5211;
}

.branches-hero__desc {
	font-size: 1.05rem;
	line-height: 1.7;
	color: #94A3B8;
	margin: 0;
	max-width: 780px;
}

/* Botones de Acción del Hero */
.branches-hero__actions {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	max-width: 320px;
	flex-shrink: 0;
	padding-bottom: 0.35rem;
}

.branches-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	padding: 1rem 1.4rem;
	border-radius: 8px;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	text-decoration: none;
	transition: all 0.25s ease;
	cursor: pointer;
}

.branches-hero-btn .hero-btn-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.branches-hero-btn .hero-btn-text {
	flex: 1;
	text-align: left;
}

.branches-hero-btn .hero-btn-arrow {
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.branches-hero-btn:hover .hero-btn-arrow {
	transform: translateY(3px);
}

/* Botón 1: Explorar Mapa (Naranja Principal) */
.branches-hero-btn--map {
	background: #DB5211;
	border: 1.5px solid #DB5211;
	color: #FFFFFF;
	box-shadow: 0 4px 16px rgba(219, 82, 17, 0.35);
}

.branches-hero-btn--map:hover {
	background-color: #EA580C;
	border-color: #EA580C;
	color: #FFFFFF;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(219, 82, 17, 0.5);
}

/* Botón 2: Directorio de Sedes (Oscuro Técnico) */
.branches-hero-btn--dir {
	background: rgba(15, 20, 32, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1.5px solid rgba(255, 255, 255, 0.16);
	color: #FFFFFF;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.branches-hero-btn--dir .hero-btn-icon {
	color: #DB5211;
}

.branches-hero-btn--dir:hover {
	background: rgba(219, 82, 17, 0.12);
	border-color: #DB5211;
	color: #FFFFFF;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* 4 Micro-Tarjetas de Valor del Hero */
.branches-hero__cards-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
}

.branches-vcard {
	background: rgba(21, 24, 29, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 1.2rem 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.branches-vcard:hover {
	border-color: rgba(219, 82, 17, 0.5);
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(219, 82, 17, 0.15);
}

.branches-vcard__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.branches-vcard__icon {
	color: #DB5211;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.branches-vcard__tag {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #DB5211;
}

.branches-vcard__title {
	font-size: 1.05rem;
	font-weight: 800;
	color: #FFFFFF;
	line-height: 1.25;
	margin: 0;
}

.branches-vcard__desc {
	font-size: 0.82rem;
	line-height: 1.45;
	color: #94A3B8;
	margin: 0;
}

/* --------------------------------------------------------------------------
   2. LÍNEAS DIVISORIAS ENTRE SECCIONES
   -------------------------------------------------------------------------- */
.branches-section-divider {
	width: 100%;
	display: block;
	position: relative;
	z-index: 3;
}

/* --------------------------------------------------------------------------
   3. SECCIÓN: MAPA INTERACTIVO
   -------------------------------------------------------------------------- */
.branches-map-section {
	padding: 70px 0;
	position: relative;
	background-color: #121417;
	scroll-margin-top: 80px;
}

.branches-section-header {
	max-width: 820px;
	margin: 0 auto 3rem;
	text-align: center;
}

.branches-badge-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.85rem;
	background: rgba(219, 82, 17, 0.12);
	border: 1px solid rgba(219, 82, 17, 0.35);
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 1.5px;
	color: #DB5211;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.branches-section-title {
	font-size: clamp(1.75rem, 3vw, 2.3rem);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.5px;
	line-height: 1.2;
	color: #FFFFFF;
	margin-bottom: 0.85rem;
}

.branches-section-subtitle {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #94A3B8;
	margin: 0;
}

.branches-map-wrapper {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
	background: #0d0f12;
}

#deel-map {
	width: 100%;
	height: 520px;
	z-index: 1;
}

/* Personalización de Leaflet para atmósfera oscura */
.leaflet-popup-content-wrapper {
	background: #181A1C !important;
	color: #FFFFFF !important;
	border: 1px solid #DB5211 !important;
	border-radius: 8px !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
	background: #181A1C !important;
	border: 1px solid #DB5211 !important;
}

.deel-map-popup {
	font-family: var(--font-primary, 'Montserrat', sans-serif);
	font-size: 0.85rem;
	line-height: 1.5;
	padding: 0.25rem;
}

.deel-map-popup strong {
	color: #FFFFFF;
	font-size: 0.95rem;
	display: block;
	margin-bottom: 0.2rem;
}

.deel-map-popup .text-muted {
	color: #DB5211;
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	display: block;
	margin-bottom: 0.4rem;
}

.deel-map-popup a {
	color: #E2E8F0;
	text-decoration: none;
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.82rem;
	transition: color 0.2s;
}

.deel-map-popup a:hover {
	color: #DB5211;
}

.deel-map-popup .deel-map-address {
	color: #CBD5E1;
	font-size: 0.82rem;
	display: inline-block;
	margin-top: 0.2rem;
	line-height: 1.4;
}

/* Tooltip sutil pequeño al pasar el cursor sobre el círculo naranja */
.leaflet-tooltip.deel-map-subtle-tooltip {
	background: rgba(20, 22, 25, 0.95) !important;
	border: 1px solid #DB5211 !important;
	color: #FFFFFF !important;
	font-family: var(--font-primary, 'Montserrat', sans-serif) !important;
	font-size: 0.76rem !important;
	padding: 5px 10px !important;
	border-radius: 6px !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
	white-space: nowrap !important;
	pointer-events: none !important;
	line-height: 1.3 !important;
	letter-spacing: 0.2px !important;
}

.leaflet-tooltip-top.deel-map-subtle-tooltip::before {
	border-top-color: #DB5211 !important;
}

.leaflet-tooltip-bottom.deel-map-subtle-tooltip::before {
	border-bottom-color: #DB5211 !important;
}

.leaflet-tooltip-left.deel-map-subtle-tooltip::before {
	border-left-color: #DB5211 !important;
}

.leaflet-tooltip-right.deel-map-subtle-tooltip::before {
	border-right-color: #DB5211 !important;
}

.deel-map-subtle-tooltip .deel-tt-name {
	font-weight: 800;
	color: #FFFFFF;
}

.deel-map-subtle-tooltip .deel-tt-type {
	color: #DB5211;
	font-weight: 700;
	margin-left: 5px;
	text-transform: uppercase;
	font-size: 0.7rem;
}

.deel-marker-dot {
	width: 16px;
	height: 16px;
	background: #DB5211;
	border: 3px solid #FFFFFF;
	border-radius: 50%;
	box-shadow: 0 0 12px #DB5211, 0 0 4px #000;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}

.deel-map-marker:hover .deel-marker-dot {
	transform: scale(1.3);
	box-shadow: 0 0 16px #DB5211, 0 0 6px #000;
}

/* --------------------------------------------------------------------------
   4. SECCIÓN: DIRECTORIO DE SEDES (2 por fila, dinámico y responsivo)
   -------------------------------------------------------------------------- */
.branches-dir-section {
	padding: 80px 0;
	position: relative;
	background-color: #181A1C;
	scroll-margin-top: 80px;
}

.branches-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
}

/* Ajuste dinámico cuando solo hay 1 sede (se centra elegantemente sin dejar huecos) */
.branches-grid--single {
	grid-template-columns: 1fr;
	max-width: 760px;
	margin: 0 auto;
}

/* Tarjeta de Sede Oficial B2B */
.branch-card {
	background: rgba(21, 24, 29, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
	position: relative;
}

.branch-card:hover {
	border-color: #DB5211 !important;
	box-shadow: 0 14px 35px rgba(219, 82, 17, 0.45), 0 0 22px rgba(219, 82, 17, 0.3) !important;
	transform: translateY(-4px);
}

.branch-card.highlighted {
	border-color: #DB5211 !important;
	box-shadow: 0 0 25px rgba(219, 82, 17, 0.5) !important;
	transform: translateY(-4px);
}

/* Encabezado superior de la tarjeta */
.branch-card__header {
	padding: 1.35rem 1.4rem 0.9rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.branch-card__top-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.branch-card__eyebrow {
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #DB5211;
}

.branch-card__type-pill {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.06);
	color: #94A3B8;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.branch-card__title {
	font-size: 1.35rem;
	font-weight: 900;
	text-transform: uppercase;
	color: #FFFFFF;
	margin: 0 0 0.3rem 0;
	line-height: 1.25;
}

.branch-card__subtitle {
	font-size: 0.88rem;
	color: #94A3B8;
	margin: 0;
}

/* Foto de la Sede con Píldora Flotante */
.branch-card__media {
	position: relative;
	width: 100%;
	height: 220px;
	background: #111317;
	overflow: hidden;
}

.branch-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.branch-card:hover .branch-card__image {
	transform: scale(1.03);
}

.branch-card__status-pill {
	position: absolute;
	bottom: 12px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.35rem 0.75rem;
	background: rgba(15, 20, 32, 0.9);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #FFFFFF;
	z-index: 2;
}

.branch-card__status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background-color: #10B981;
	box-shadow: 0 0 6px #10B981;
}

/* Cuerpo de la tarjeta */
.branch-card__body {
	padding: 1.4rem;
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	flex: 1;
}

.branch-card__specialty {
	font-size: 0.88rem;
	line-height: 1.5;
	color: #E2E8F0;
	padding: 0.75rem 0.9rem;
	background: rgba(255, 255, 255, 0.03);
	border-left: 3px solid #DB5211;
	border-radius: 0 6px 6px 0;
	margin: 0;
}

.branch-card__specialty strong {
	color: #DB5211;
}

/* Lista de datos de contacto */
.branch-info-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.branch-info-item {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	font-size: 0.85rem;
	color: inherit;
	line-height: 1.45;
}

.branch-info-item span,
.branch-info-item a {
	color: inherit !important;
}

.branch-info-item .info-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 2px;
	color: #DB5211;
}

.branch-info-item .info-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.branch-info-item a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s;
}

.branch-info-item a:hover {
	opacity: 0.8;
}

/* Etiquetas de servicios */
.branch-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

.branch-tag-item {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	padding: 0.3rem 0.65rem;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.04);
	color: #94A3B8;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Footer de acciones */
.branch-card__footer {
	padding: 1.15rem 1.4rem 1.4rem;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	display: flex;
	gap: 0.75rem;
}

.btn-branch-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.1rem;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	text-decoration: none;
	transition: all 0.25s ease;
	cursor: pointer;
}

.btn-branch-action svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	display: inline-block;
}

.btn-branch-whatsapp {
	background-color: #DB5211;
	border: 1.5px solid #DB5211;
	color: #FFFFFF;
	flex: 1.4;
	box-shadow: 0 4px 12px rgba(219, 82, 17, 0.3);
}

.btn-branch-whatsapp:hover {
	filter: brightness(1.15);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(219, 82, 17, 0.45);
}

.btn-branch-location {
	background-color: rgba(255, 255, 255, 0.05);
	border: 1.5px solid rgba(255, 255, 255, 0.15);
	color: #FFFFFF;
	flex: 1;
}

.btn-branch-location:hover {
	filter: brightness(1.25);
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. SECCIÓN: ATENCIÓN O CONTACTO (Banner CTA Industrial sin recuadro interno)
   -------------------------------------------------------------------------- */
.branches-cta-section {
	padding: 90px 0 100px;
	position: relative;
	background-color: #121417;
	text-align: center;
}

.branches-cta-container {
	max-width: 920px;
	margin: 0 auto;
	position: relative;
	z-index: 2;
}

.branches-cta-badge-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
}

.branches-cta-title {
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.5px;
	line-height: 1.2;
	color: #FFFFFF;
	margin: 0 auto 1.25rem;
	max-width: 860px;
}

.branches-cta-desc {
	font-size: 1.05rem;
	line-height: 1.65;
	color: #94A3B8;
	margin: 0 auto 2.5rem;
	max-width: 760px;
}

.branches-cta-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.btn-cta-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 1rem 1.8rem;
	background-color: #DB5211;
	border: 1.5px solid #DB5211;
	border-radius: 8px;
	color: #FFFFFF;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 4px 16px rgba(219, 82, 17, 0.4);
	transition: all 0.25s ease;
}

.btn-cta-whatsapp:hover {
	filter: brightness(1.15);
	color: #FFFFFF;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(219, 82, 17, 0.55);
}

.btn-cta-phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 1rem 1.8rem;
	background-color: rgba(255, 255, 255, 0.08);
	border: 1.5px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #FFFFFF;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	text-decoration: none;
	transition: all 0.25s ease;
}

.btn-cta-phone:hover {
	filter: brightness(1.25);
	color: #FFFFFF;
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE BREAKPOINTS (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.branches-hero__cards-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.branches-cta-section {
		padding: 70px 0 80px;
	}
}

@media (max-width: 991px) {
	.branches-hero {
		padding: 90px 0 40px;
		min-height: auto;
	}

	.branches-hero__top-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 2rem;
		margin-bottom: 2.5rem;
	}

	.branches-hero__actions {
		max-width: 100%;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.branches-hero-btn {
		flex: 1;
		min-width: 240px;
	}

	.branches-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.branches-hero__cards-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.branches-hero__actions {
		flex-direction: column;
	}

	.branches-hero-btn {
		width: 100%;
	}

	#deel-map {
		height: 380px;
	}

	.branch-card__footer {
		flex-direction: column;
	}

	.btn-branch-action {
		width: 100%;
	}

	.branches-cta-actions {
		flex-direction: column;
		width: 100%;
	}

	.btn-cta-whatsapp,
	.btn-cta-phone {
		width: 100%;
	}
}
