/**
 * Theme BDM — Main stylesheet.
 *
 * Institutional theme styles based on the reference mockup
 * (maqueta/home.html). Bootstrap 5 and FontAwesome provide the grid,
 * components and icons; this file defines the design tokens and the
 * custom component styles.
 *
 * @package Theme_BDM
 */

/* -------------------------------------------------------------------------
 * 1. Design tokens
 * ------------------------------------------------------------------------- */
:root {
	/* Canonical tokens */
	--color-primary: #0B2E59;
	--color-secondary: #2F7F66;
	--color-text: #4A4F55;
	--color-bg: #FFFFFF;
	--color-base: #D9D9D9;
	--color-base-alt: #C4CBD2;
	--color-white: #FFFFFF;

	/* Interaction and state tokens */
	--color-primary-light: #1a3f6e;
	--color-secondary-dark: #236a55;
	--color-highlight: #5baa91;
	--color-border: #f0f0f0;
	--color-success: #2F7F66;
	--color-error: #C0392B;

	/* Typography */
	--font-heading: 'Montserrat', sans-serif;
	--font-body: 'Open Sans', sans-serif;

	/* Layout */
	--container-width: 1200px;

	/* Mockup aliases, mapped to the canonical tokens */
	--azul-bdm: var(--color-primary);
	--verde-bdm: var(--color-secondary);
	--gris-oscuro: var(--color-text);
	--gris-claro: var(--color-base);
	--blanco: var(--color-bg);
}

/* -------------------------------------------------------------------------
 * 2. Base styles
 * ------------------------------------------------------------------------- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-body);
	color: var(--gris-oscuro);
	background-color: var(--blanco);
	overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
	font-family: var(--font-heading);
	font-weight: 600;
}

h1 {
	font-weight: 700;
}

.subtitulo {
	font-family: var(--font-heading);
	font-weight: 500;
}

.color-azul { color: var(--azul-bdm); }
.color-verde { color: var(--verde-bdm); }
.bg-azul { background-color: var(--azul-bdm); }
.bg-verde { background-color: var(--verde-bdm); }
.bg-gris-claro {
	background-color: var(--color-base-alt);
}

/* Helper for the green accent word (e.g. footer brand). */
.verde { color: var(--verde-bdm); }

/* -------------------------------------------------------------------------
 * 3. Buttons
 * ------------------------------------------------------------------------- */
.btn-primary-custom {
	background-color: var(--azul-bdm);
	border-color: var(--azul-bdm);
	color: white;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.btn-primary-custom:hover {
	background-color: var(--color-primary-light);
	border-color: var(--color-primary-light);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(11, 46, 89, 0.3);
}

.btn-secondary-custom {
	background-color: var(--verde-bdm);
	border-color: var(--verde-bdm);
	color: white;
	font-weight: 600;
	padding: 12px 32px;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
	background-color: var(--color-secondary-dark);
	border-color: var(--color-secondary-dark);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(47, 127, 102, 0.3);
}

/* -------------------------------------------------------------------------
 * 4. Section helpers
 * ------------------------------------------------------------------------- */
.section-padding {
	padding: 80px 0;
}

.section-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--azul-bdm);
	margin-bottom: 1rem;
}

.section-subtitle {
	font-size: 1.1rem;
	color: var(--gris-oscuro);
	max-width: 700px;
	margin: 0 auto 3rem auto;
}

/* -------------------------------------------------------------------------
 * 5. Navbar
 * ------------------------------------------------------------------------- */
.navbar {
	background-color: var(--blanco);
	box-shadow: 0 2px 15px rgba(0,0,0,0.08);
	padding: 15px 0;
	transition: all 0.3s ease;
}

/* Remove Bootstrap's focus ring on the hamburger button and use a clean,
   subtle outline for keyboard focus instead. */
#site-header .navbar-toggler:focus {
	box-shadow: none;
}

#site-header .navbar-toggler:focus-visible {
	box-shadow: none;
	outline: 2px solid var(--azul-bdm);
	outline-offset: 3px;
}

.navbar-brand img,
.navbar .custom-logo-link img {
	height: 50px;
	width: auto;
}

.navbar-brand__text {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--azul-bdm);
	font-size: 1.6rem;
}

.navbar-brand__accent {
	color: var(--verde-bdm);
}

/* The navbar CTA keeps the mockup font size. */
#site-header .btn-secondary-custom {
	font-size: 0.9rem;
}

.navbar-nav .nav-link {
	font-weight: 600;
	color: var(--gris-oscuro);
	padding: 8px 18px;
	transition: color 0.3s ease;
	font-size: 0.95rem;
}

/* Beat Bootstrap's `.navbar-expand-lg .navbar-nav .nav-link` rule, which
   overrides the horizontal padding with --bs-navbar-nav-link-padding-x. */
#site-header .navbar-nav .nav-link {
	padding: 8px 18px;
}

.navbar-nav .nav-link:hover {
	color: var(--azul-bdm);
}

/* Desktop menu: remove the dropdown caret, animated hover underline and
   bottom-up fading dropdowns (opened on hover). */
@media (min-width: 992px) {
	#site-header .dropdown-toggle::after {
		display: none;
	}

	.navbar-nav .nav-link {
		position: relative;
	}

	.navbar-nav .nav-link::before {
		content: '';
		position: absolute;
		left: 18px;
		right: 18px;
		bottom: 0;
		height: 2px;
		background: var(--verde-bdm);
		transform: scaleX(0);
		transform-origin: left center;
		transition: transform 0.3s ease;
	}

	.navbar-nav .nav-link:hover::before {
		transform: scaleX(1);
	}

	.navbar-nav .dropdown-menu {
		display: block;
		padding: 0;
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	}

	.navbar-nav .dropdown:hover > .dropdown-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.navbar-nav .dropdown-item {
		padding: 0.5rem 1rem;
		transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
	}

	.navbar-nav .dropdown-item:hover {
		background-color: rgba(11, 46, 89, 0.06);
		color: var(--azul-bdm);
		padding-left: 1.4rem;
	}
}

/* Social links in the navbar. */
.navbar-social {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.navbar-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--color-border);
	font-size: 1.05rem;
	text-decoration: none;
	transition: all 0.3s ease;
}

/* Instagram: official pink by default, gradient fill on hover. */
.navbar-social__link--instagram i {
	color: #E4405F;
}

.navbar-social__link--instagram:hover {
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
	border-color: transparent;
}

.navbar-social__link--instagram:hover i {
	color: #ffffff;
}

/* LinkedIn: official blue. */
.navbar-social__link--linkedin i {
	color: #0A66C2;
}

.navbar-social__link--linkedin:hover {
	background: #0A66C2;
	border-color: #0A66C2;
}

.navbar-social__link--linkedin:hover i {
	color: #ffffff;
}

/* Mobile sidebar menu (offcanvas). */
.offcanvas.mobile-menu {
	--bs-offcanvas-width: 320px;
	max-width: 85vw;
}

.mobile-menu .offcanvas-header {
	border-bottom: 1px solid var(--color-border);
}

.mobile-menu .offcanvas-title {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--azul-bdm);
	font-size: 1.4rem;
}

/* Full-width body: items span the whole offcanvas width. */
.mobile-menu .offcanvas-body {
	padding: 0;
}

.mobile-menu__nav > li {
	margin: 0;
}

/* Prevent long-press text selection, tap highlight and double-tap zoom
   on the mobile menu (they can "lock" the menu on touch devices). */
.mobile-menu__nav {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

.mobile-menu__nav a {
	-webkit-tap-highlight-color: transparent;
	-webkit-user-drag: none;
	touch-action: manipulation;
	cursor: pointer;
}

.mobile-menu__nav .nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.9rem 1.25rem;
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--gris-oscuro);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu__nav .nav-link:active,
.mobile-menu__nav .dropdown.show > .nav-link {
	background-color: rgba(11, 46, 89, 0.06);
	color: var(--azul-bdm);
}

.mobile-menu__nav .dropdown-toggle::after {
	margin-left: 1rem;
	flex-shrink: 0;
}

/* Mobile offcanvas: submenus render as collapsible nested lists with a
   caret and a slightly darker background. */
.mobile-menu__nav .dropdown-menu {
	position: static !important;
	transform: none !important;
	top: auto !important;
	left: auto !important;
	float: none;
	min-width: 0;
	margin: 0 0.75rem 0.75rem;
	padding: 0.25rem 0;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	background: #f2f4f7;
}

.mobile-menu__nav .dropdown-menu.show {
	animation: mobile-submenu-in 0.25s ease;
}

.mobile-menu__nav .dropdown-item {
	display: block;
	padding: 0.7rem 1.25rem;
	font-size: 0.98rem;
	color: var(--gris-oscuro);
	text-decoration: none;
	white-space: normal;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu__nav .dropdown-item:active {
	background-color: rgba(11, 46, 89, 0.06);
	color: var(--azul-bdm);
}

@keyframes mobile-submenu-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.mobile-menu .custom-logo-link img {
	height: 40px;
	width: auto;
}

.mobile-menu__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	padding-bottom: calc(1rem + env(safe-area-inset-bottom));
	border-top: 1px solid var(--color-border);
}

/* -------------------------------------------------------------------------
 * 22. Informes (PDF reports)
 * ------------------------------------------------------------------------- */
.informe-search {
	max-width: 560px;
	margin: 0 auto 3rem;
}

.informe-search__field {
	position: relative;
}

.informe-search__field i {
	position: absolute;
	left: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gris-oscuro);
	opacity: 0.6;
	pointer-events: none;
}

.informe-search .form-control {
	padding: 0.75rem 1.25rem 0.75rem 3rem;
	border-radius: 50px;
	border: 1px solid var(--color-border);
}

.informe-card {
	background: var(--blanco);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1.5rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
	transition: all 0.3s ease;
	max-width: 350px;
}

.informe-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(11, 46, 89, 0.12);
}

.informe-card__icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: rgba(11, 46, 89, 0.08);
	color: var(--azul-bdm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	margin-bottom: 1rem;
}

.informe-card__thumb {
	display: block;
	margin-bottom: 1rem;
}

.informe-card__thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	object-position: top left;
	border-radius: 8px;
}

.informe-card h3 {
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.informe-card h3 a {
	color: var(--azul-bdm);
	text-decoration: none;
}

.informe-card h3 a:hover {
	color: var(--verde-bdm);
}

.informe-card__meta {
	font-size: 0.85rem;
	color: var(--gris-oscuro);
	opacity: 0.8;
	margin-bottom: 1rem;
}

.informe-card__link {
	margin-top: auto;
	font-weight: 600;
	color: var(--verde-bdm);
	text-decoration: none;
}

.informe-card__link:hover {
	color: var(--azul-bdm);
}

/* Custom PDF viewer (single report). */
.informe-viewer {
	border: 1px solid var(--color-border);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
	background: #f4f6f8;
}

.informe-viewer__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: var(--azul-bdm);
	color: var(--blanco);
}

.informe-viewer__nav,
.informe-viewer__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.informe-viewer__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.25);
	background: transparent;
	color: var(--blanco);
	font-size: 0.85rem;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s ease;
}

.informe-viewer__btn:hover:not(:disabled) {
	background: var(--verde-bdm);
	border-color: var(--verde-bdm);
}

.informe-viewer__btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.informe-viewer__page {
	font-size: 0.9rem;
	font-weight: 600;
	min-width: 56px;
	text-align: center;
}

/* Mobile UX: larger touch targets and wrap on narrow screens. */
@media (max-width: 576px) {
	.informe-viewer__toolbar {
		flex-wrap: wrap;
		gap: 0.5rem 0.75rem;
		padding: 0.6rem 0.75rem;
	}

	.informe-viewer__btn {
		width: 44px;
		height: 44px;
		font-size: 1rem;
	}

	.informe-viewer__page {
		font-size: 0.95rem;
	}
}

.informe-viewer__canvas-wrap {
	position: relative;
	overflow: auto;
	background: #4a4f55;
	width: 100%;
	aspect-ratio: 1 / 1.414; /* A4 placeholder; JS sets the real page ratio */
}

.informe-viewer__canvas-wrap canvas {
	display: block;
	margin: 0 auto;
	box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.informe-viewer__loading,
.informe-viewer__error {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gris-oscuro);
	background: #f4f6f8;
	font-size: 1rem;
}

/* Ensure the hidden attribute always wins over display rules. */
[hidden] {
	display: none !important;
}

/* Legibility hint (shown when the PDF renders below the readable scale). */
.informe-viewer__hint {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
	background: #fff6e5;
	color: #6b5200;
	border-bottom: 1px solid #f0e0b8;
}

.informe-viewer__hint i {
	color: #c7941e;
	font-size: 1rem;
	flex-shrink: 0;
}

.informe-viewer__hint-close {
	margin-left: auto;
	border: none;
	background: transparent;
	color: inherit;
	font-size: 1rem;
	line-height: 1;
	padding: 0.25rem;
	cursor: pointer;
	flex-shrink: 0;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.informe-viewer__hint-close:hover {
	opacity: 1;
}

/* Report body text (single report). */
.informe-content {
	max-width: 800px;
	margin: 0 auto;
}

/* -------------------------------------------------------------------------
 * 6. Hero
 * ------------------------------------------------------------------------- */
.hero {
	background: linear-gradient(135deg, rgba(11, 46, 89, 0.92) 0%, rgba(11, 46, 89, 0.7) 100%),
	            url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"%3E%3Crect fill="%230B2E59" width="1200" height="800"/%3E%3Ccircle cx="200" cy="200" r="150" fill="%232F7F66" opacity="0.15"/%3E%3Ccircle cx="900" cy="500" r="200" fill="%23D9D9D9" opacity="0.08"/%3E%3Cpath d="M0 600 Q300 500 600 650 T1200 550 L1200 800 L0 800 Z" fill="%23FFFFFF" opacity="0.05"/%3E%3C/svg%3E');
	background-size: cover;
	background-position: center;
	min-height: 90vh;
	display: flex;
	align-items: center;
	padding: 100px 0 80px;
	position: relative;
}

.hero h1 {
	font-size: 3.8rem;
	font-weight: 700;
	line-height: 1.1;
	margin-bottom: 1.5rem;
}

/* Base highlight color (*asterisk* marker) for titles without a scoped
   rule (e.g. the Misión/Visión h3 headings). Dark sections override this
   with a lighter tone below. */
.highlight {
	color: var(--verde-bdm);
}

.hero h1 .highlight {
	color: var(--color-highlight);
}

/* Highlighted words inside section titles (*asterisk* marker in ACF
   fields / Customizer) use the secondary green accent, except inside
   the dark differential section where the mockup uses a lighter tone. */
.section-title .highlight {
	color: var(--verde-bdm);
}

.diferencial .section-title .highlight {
	color: var(--color-highlight);
}

.hero p {
	font-size: 1.25rem;
	opacity: 0.9;
	max-width: 600px;
	line-height: 1.6;
	margin-bottom: 0;
}

.hero .badge-container {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 30px;
	max-width: 680px;
}

.hero .badge-item {
	background: rgba(255,255,255,0.1);
	backdrop-filter: blur(10px);
	padding: 10px 16px;
	border-radius: 50px;
	border: 1px solid rgba(255,255,255,0.2);
	font-size: 0.9rem;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 42px;
}

/* -------------------------------------------------------------------------
 * 7. Quienes somos
 * ------------------------------------------------------------------------- */
.quienes-somos .icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem;
	transition: transform 0.3s ease;
}

.quienes-somos .icon-wrapper img {
	width: 70px;
	height: 70px;
	object-fit: contain;
	display: block;
}

.quienes-somos .icon-wrapper i {
	font-size: 2.5rem;
	color: var(--azul-bdm);
}

.quienes-somos .card:hover .icon-wrapper {
	transform: scale(1.05);
}

.quienes-somos .card {
	border: none;
	background: var(--blanco);
	padding: 2rem;
	border-radius: 16px;
	box-shadow: 0 5px 30px rgba(0,0,0,0.05);
	transition: all 0.3s ease;
	height: 100%;
	border-bottom: 4px solid transparent;
}

.quienes-somos .card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 50px rgba(0,0,0,0.1);
	border-bottom-color: var(--verde-bdm);
}



/* -------------------------------------------------------------------------
 * 8. Servicios
 * ------------------------------------------------------------------------- */
.servicios-grid .service-item {
	background: var(--blanco);
	padding: 1.8rem 1.2rem;
	border-radius: 12px;
	text-align: center;
	transition: all 0.3s ease;
	border: 1px solid var(--color-border);
	height: 100%;
}

.servicios-grid .service-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 40px rgba(0,0,0,0.08);
	border-color: var(--verde-bdm);
}

.servicios-grid .service-item i {
	font-size: 2.5rem;
	color: var(--verde-bdm);
	margin-bottom: 1rem;
	display: block;
}

.servicios-grid .service-item h6 {
	font-weight: 600;
	color: var(--azul-bdm);
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * 9. Diferencial
 * ------------------------------------------------------------------------- */
.diferencial {
	background: linear-gradient(135deg, var(--azul-bdm) 0%, var(--color-primary-light) 100%);
	color: white;
}

.diferencial .section-title {
	color: white;
}

.diferencial .section-subtitle {
	color: rgba(255,255,255,0.8);
}

.diferencial-card {
	background: rgba(255,255,255,0.08);
	backdrop-filter: blur(10px);
	padding: 2rem;
	border-radius: 16px;
	border: 1px solid rgba(255,255,255,0.1);
	height: 100%;
	transition: all 0.3s ease;
}

.diferencial-card:hover {
	background: rgba(255,255,255,0.15);
	transform: translateY(-5px);
}

.diferencial-card i {
	font-size: 3rem;
	color: var(--color-highlight);
	margin-bottom: 1.5rem;
}

.diferencial-card h4 {
	font-weight: 600;
	margin-bottom: 1rem;
}

.diferencial-card p {
	opacity: 0.85;
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * 10. Proceso
 * ------------------------------------------------------------------------- */
.proceso-step {
	text-align: center;
	position: relative;
}

.proceso-step .step-number {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: var(--azul-bdm);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	font-weight: 700;
	margin: 0 auto 1.2rem;
	font-family: var(--font-heading);
	position: relative;
	z-index: 2;
}

.proceso-step .step-number::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(11, 46, 89, 0.15);
	animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
	0% { transform: scale(1); opacity: 0.8; }
	70% { transform: scale(1.3); opacity: 0; }
	100% { transform: scale(1.3); opacity: 0; }
}

.proceso-step .step-line {
	position: absolute;
	top: 35px;
	left: 60%;
	width: 80%;
	height: 3px;
	background: var(--gris-claro);
	z-index: 1;
}

.proceso-step:last-child .step-line {
	display: none;
}

.proceso-step h5 {
	font-weight: 600;
	color: var(--azul-bdm);
	margin-bottom: 0.5rem;
}

.proceso-step p {
	font-size: 0.9rem;
	color: var(--gris-oscuro);
	max-width: 200px;
	margin: 0 auto;
}

/* -------------------------------------------------------------------------
 * 11. Testimonios
 * ------------------------------------------------------------------------- */
.testimonial-card {
	background: var(--blanco);
	padding: 2rem;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(11, 46, 89, 0.08);
	border-left: 5px solid var(--verde-bdm);
	height: 100%;
}

.testimonial-card i {
	color: var(--verde-bdm);
	font-size: 2rem;
	opacity: 0.3;
	margin-bottom: 1rem;
}

.testimonial-card p {
	font-style: italic;
	font-size: 1rem;
	margin-bottom: 1rem;
}

.testimonial-card .autor {
	font-weight: 600;
	color: var(--azul-bdm);
	font-style: normal;
}

/* -------------------------------------------------------------------------
 * 12. CTA final
 * ------------------------------------------------------------------------- */
.cta-final {
	background: linear-gradient(135deg, var(--azul-bdm), var(--color-primary-light));
	color: white;
}

.cta-final .lead {
	opacity: 0.85;
	max-width: 600px;
	margin: 0 auto;
}

.cta-final h2 .highlight {
	color: var(--color-highlight);
}

/* -------------------------------------------------------------------------
 * 13. Footer
 * ------------------------------------------------------------------------- */
.footer {
	background-color: var(--azul-bdm);
	color: rgba(255,255,255,0.8);
	padding: 60px 0 30px;
}

.footer h5 {
	color: white;
	font-weight: 600;
	margin-bottom: 1.5rem;
}

.footer a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer a:hover {
	color: white;
}

.footer .footer-brand {
	font-family: var(--font-heading);
	font-weight: 700;
}

.footer .footer-slogan {
	font-size: 0.95rem;
	max-width: 300px;
	margin-bottom: 0;
}

.footer .footer-contact {
	font-size: 0.9rem;
	margin-bottom: 0;
}

.footer .social-link {
	display: inline-block;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	background: rgba(255,255,255,0.1);
	text-align: center;
	line-height: 45px;
	color: white;
	transition: all 0.3s ease;
	margin-right: 10px;
	font-size: 1.2rem;
}

.footer .social-link:hover {
	background: var(--verde-bdm);
	transform: translateY(-3px);
}

.footer .footer-divider {
	border-color: rgba(255,255,255,0.1);
	margin: 30px 0;
}

/* Footer quick links: keep the mockup muted color with a white hover. */
.footer-links a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	color: white;
}

.footer-copyright {
	font-size: 0.9rem;
	opacity: 0.7;
}

/* -------------------------------------------------------------------------
 * 14. Accessibility
 * ------------------------------------------------------------------------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background-color: var(--blanco);
	color: var(--azul-bdm);
	padding: 0.5rem 1rem;
}

.skip-link:focus {
	left: 0;
}

/* -------------------------------------------------------------------------
 * 15. Responsive
 * ------------------------------------------------------------------------- */
@media (max-width: 992px) {
	.hero h1 {
		font-size: 2.8rem;
	}
	.section-title {
		font-size: 2rem;
	}
	.section-padding {
		padding: 60px 0;
	}
	.proceso-step .step-line {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.hero {
		min-height: auto;
		padding: 120px 0 60px;
	}
	.hero h1 {
		font-size: 2.2rem;
	}
	.hero p {
		font-size: 1rem;
	}
	.hero .badge-container {
		grid-template-columns: 1fr;
		max-width: none;
	}
	.section-title {
		font-size: 1.8rem;
	}
	.navbar-brand img,
	.navbar .custom-logo-link img {
		height: 40px;
	}
}

@media (max-width: 576px) {
	.hero h1 {
		font-size: 1.8rem;
	}
	.section-padding {
		padding: 40px 0;
	}
}

/* -------------------------------------------------------------------------
 * 16. Scroll reveal animations
 *
 * The .reveal state class is added by assets/js/main.js to every
 * [data-reveal] element. Content is fully visible without JavaScript.
 * ------------------------------------------------------------------------- */
[data-reveal].reveal {
	opacity: 0;
	transition: opacity 0.7s ease, transform 0.7s ease;
	will-change: opacity, transform;
}

.reveal--up {
	transform: translateY(30px);
}

.reveal--left {
	transform: translateX(-40px);
}

.reveal--right {
	transform: translateX(40px);
}

.reveal--zoom {
	transform: scale(0.92);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Keep card hover transitions snappy (they would otherwise inherit the
   0.7s reveal transition once the reveal state class is present). */
.quienes-somos .card:hover,
.servicios-grid .service-item:hover,
.diferencial-card:hover,
.testimonial-card:hover,
.mision-vision .service-card:hover,
.porque-item:hover,
.ofrece-item:hover {
	transition: all 0.3s ease;
}

/* Respect users who prefer reduced motion: show everything immediately. */
@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* -------------------------------------------------------------------------
 * 17. Internal page hero (e.g. the Servicios page)
 * ------------------------------------------------------------------------- */
.page-hero {
	background: linear-gradient(135deg, var(--azul-bdm) 0%, var(--color-primary-light) 100%);
	color: white;
	padding: 100px 0 80px;
	text-align: center;
}

.page-hero h1 {
	color: white;
	font-size: 2.8rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 1rem;
}

.page-hero .highlight {
	color: var(--color-highlight);
}

.page-hero__subtitle {
	color: rgba(255,255,255,0.85);
	max-width: 700px;
	margin: 0 auto;
	font-size: 1.1rem;
}

/* Rotating hero subtitle (Servicios page): stacks paragraphs and
   crossfades between them via .is-active. */
.hero-rotator {
	display: grid;
	max-width: 900px;
	margin: 0 auto;
}

.hero-rotator__item {
	grid-area: 1 / 1;
	margin: 0;
	color: rgba(255,255,255,0.85);
	font-size: 1.1rem;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-rotator__item.is-active {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 768px) {
	.page-hero {
		padding: 80px 0 60px;
	}
	.page-hero h1 {
		font-size: 2.2rem;
	}
}

/* -------------------------------------------------------------------------
 * 18. Service cards (internal services page)
 * ------------------------------------------------------------------------- */
.service-card {
	background: var(--blanco);
	padding: 2rem;
	border-radius: 12px;
	text-align: center;
	border: 1px solid var(--color-border);
	height: 100%;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
	transition: all 0.3s ease;
}

.service-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 40px rgba(0,0,0,0.08);
	border-color: var(--verde-bdm);
}

.service-card i {
	font-size: 2.5rem;
	color: var(--verde-bdm);
	margin-bottom: 1rem;
	display: block;
}

.service-card h3 {
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--azul-bdm);
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.service-card p {
	color: var(--gris-oscuro);
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * 19. Internal pages (Nosotros / Metodologías / Contacto)
 * ------------------------------------------------------------------------- */
.section-text {
	max-width: 1200px;
	margin: 0 auto 2rem;
	color: var(--gris-oscuro);
	font-size: 1.25rem;
}

/* Team member card (Nosotros page). */
.team-card {
	background: var(--blanco);
	padding: 2rem;
	border-radius: 12px;
	text-align: center;
	border: 1px solid var(--color-border);
	height: 100%;
	transition: all 0.3s ease;
}

.team-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 40px rgba(0,0,0,0.08);
	border-color: var(--verde-bdm);
}

.team-card__avatar {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background-color: rgba(11, 46, 89, 0.08);
	color: var(--azul-bdm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	margin: 0 auto 1rem;
}

.team-card h3 {
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--azul-bdm);
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.team-card p {
	color: var(--gris-oscuro);
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* Value card (Nosotros page). */
.value-card {
	background: var(--blanco);
	padding: 2rem;
	border-radius: 12px;
	text-align: center;
	border: 1px solid var(--color-border);
	height: 100%;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
	transition: all 0.3s ease;
}

.value-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 40px rgba(0,0,0,0.08);
	border-color: var(--verde-bdm);
}

.value-card__icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background-color: rgba(11, 46, 89, 0.08);
	color: var(--azul-bdm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	margin: 0 auto 1rem;
}

.value-card h3 {
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--azul-bdm);
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.value-card p {
	color: var(--gris-oscuro);
	font-size: 0.95rem;
	margin-bottom: 0;
}

/* Highlight inside the dark differentiator section (Nosotros page). */
.diferencial .section-title .highlight {
	color: var(--color-highlight);
}

/* Contact form (Contacto page). */
.contact-form .form-control,
.contact-form .form-select {
	padding: 0.75rem 1rem;
	border-radius: 8px;
}

.contact-form .form-label {
	font-weight: 600;
	color: var(--azul-bdm);
}

/* Contact form alerts, coordinated with the brand palette. */
.alert-success {
	color: var(--color-success);
	background-color: rgba(47, 127, 102, 0.12);
	border-color: rgba(47, 127, 102, 0.35);
}

.alert-danger {
	color: var(--color-error);
	background-color: rgba(192, 57, 43, 0.1);
	border-color: rgba(192, 57, 43, 0.35);
}

/* -------------------------------------------------------------------------
 * Radial services hub (front page)
 *
 * Desktop: a central card (section title + subtitle) with the 12 service
 * nodes arranged in a ring around it, connected by SVG lines. On smaller
 * screens the hub collapses into a simple grid (central card on top).
 * ------------------------------------------------------------------------- */
.services-hub {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	max-width: 1100px;
	margin: 0 auto;
}

.services-hub__lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.services-hub__lines line {
	stroke: rgba(11, 46, 89, 0.22);
}

.services-hub__center {
	width: 500px;
	max-width: 78%;
	text-align: center;
	background: var(--blanco);
	border-radius: 20px;
	box-shadow: 0 12px 45px rgba(11, 46, 89, 0.14);
	padding: 2.25rem 1.75rem;
	z-index: 2;
}

.services-hub__center .section-title {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

.services-hub__center .section-subtitle {
	font-size: 0.95rem;
	margin: 0 auto;
	max-width: 100%;
}

.services-hub__pos {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 1;
}

.services-hub__node {
	width: 150px;
	min-height: 125px;
	background: var(--blanco);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1.25rem 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 0.5rem;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
	transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.services-hub__node i {
	font-size: 1.8rem;
	color: var(--azul-bdm);
	transition: color 0.3s ease;
}

.services-hub__node:hover {
	transform: scale(1.06);
	background-color: var(--azul-bdm);
	border-color: var(--azul-bdm);
}

.services-hub__node:hover i,
.services-hub__node:hover h6 {
	color: var(--blanco);
}

.services-hub__node h6 {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--azul-bdm);
	margin: 0;
	transition: color 0.3s ease;
}

/* Collapse the hub into a simple grid on smaller screens. */
@media (max-width: 991.98px) {
	.services-hub {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
		aspect-ratio: auto;
		max-width: 100%;
	}

	.services-hub__lines {
		display: none;
	}

	.services-hub__center {
		width: auto;
		max-width: 100%;
		grid-column: 1 / -1;
		padding: 2rem 1.5rem;
	}

	.services-hub__pos {
		position: static;
		transform: none;
	}

	.services-hub__node {
		width: auto;
		height: 100%;
	}
}

/* On medium-large screens (lg) the Bootstrap container is ~960px, so six
   170px cards would not fit in a row. Shrink them a little here. */
@media (min-width: 992px) and (max-width: 1199.98px) {
	.services-hub__node {
		width: 150px;
	}
}

/* -------------------------------------------------------------------------
 * 18. Por qué elegir BDM (checklist)
 * ------------------------------------------------------------------------- */
.porque-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: var(--blanco);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	height: 100%;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
}

.porque-item:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.porque-item__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--azul-bdm);
	color: var(--blanco);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
}

.porque-item p {
	margin: 0;
	color: var(--gris-oscuro);
	font-size: 0.98rem;
}

/* -------------------------------------------------------------------------
 * 19. Misión y Visión (Nosotros) — highlighted cards on a white background
 * ------------------------------------------------------------------------- */
.mision-vision .service-card {
	text-align: left;
	padding: 2.5rem;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(11, 46, 89, 0.10);
	border: 1px solid var(--color-border);
	border-top: 5px solid var(--azul-bdm);
}

.mision-vision .vision-card {
	border-top-color: var(--verde-bdm);
}

.mision-vision .service-card h3 {
	font-size: 1.6rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.mision-vision .service-card p {
	font-size: 1.15rem;
	line-height: 1.7;
}

/* -------------------------------------------------------------------------
 * 20. "¿Qué ofrecemos?" cards (Servicios page) — same card format as the
 *     "¿Por qué elegir BDM?" checklist, with green checkmark icons.
 * ------------------------------------------------------------------------- */
.ofrece-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: var(--blanco);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	height: 100%;
	box-shadow: 0 6px 20px rgba(11, 46, 89, 0.08);
}

.ofrece-item:hover {
	box-shadow: 0 10px 28px rgba(11, 46, 89, 0.14);
	transform: translateY(-3px);
}

.ofrece-item i {
	color: var(--verde-bdm);
	font-size: 1.5rem;
	flex-shrink: 0;
}

.ofrece-item p {
	margin: 0;
	color: var(--gris-oscuro);
	font-size: 1rem;
}

/* -------------------------------------------------------------------------
 * 21. Marquee "Soluciones a medida" (front page)
 *
 * A continuous, sponsor-style scrolling row of service cards. The track
 * holds two identical groups so translating -50% loops seamlessly. The
 * clone group is hidden for users who prefer reduced motion.
 * ------------------------------------------------------------------------- */
.marquee {
	overflow: hidden;
	padding: 2rem 0;
}

.marquee__track {
	display: flex;
	width: max-content;
	animation: marquee-scroll 40s linear infinite;
}

.marquee__track:hover {
	animation-play-state: paused;
}

.marquee__group {
	display: flex;
}

.marquee__item {
	flex-shrink: 0;
	width: 230px;
	margin-right: 1.5rem;
	background: var(--blanco);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 1.5rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 0.75rem;
	box-shadow: 0 10px 30px rgba(11, 46, 89, 0.10);
}

.marquee__item i {
	font-size: 1.8rem;
	color: var(--azul-bdm);
}

.marquee__item h6 {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--azul-bdm);
}

@keyframes marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/* Reduced motion: stop the loop and show a static, wrapped grid. */
@media (prefers-reduced-motion: reduce) {
	.marquee {
		overflow: visible;
	}

	.marquee__track {
		animation: none;
		width: auto;
	}

	.marquee__group {
		flex-wrap: wrap;
		justify-content: center;
	}

	.marquee__group--clone {
		display: none;
	}

	.marquee__item {
		margin: 0.5rem;
	}
}

/* Section divider (SVG) between front-page sections. */
.section-divider {
	line-height: 0;
}

.section-divider svg {
	display: block;
	width: 100%;
	height: 40px;
}

/* Contact info (Contacto page) — sober list, no card, no underline. */
.contact-info h3 {
	color: var(--azul-bdm);
	font-size: 1.25rem;
	margin-bottom: 1.25rem;
}

.contact-info a {
	color: var(--gris-oscuro);
	text-decoration: none;
	transition: color 0.3s ease;
}

.contact-info a:hover {
	color: var(--verde-bdm);
}
