/* =========================================================================
   COPAB — Sistema de diseño del sitio público
   Paleta tomada de los mockups: azul marino, verde COPAB y azul de acento.
   Las páginas agregan estilos propios en wwwroot/css/pages/*.css (sección Styles).
   ========================================================================= */

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../lib/inter/files/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../lib/inter/files/inter-latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --c-navy-950: #040D21;
    --c-navy-900: #071635;
    --c-navy-800: #0A1C40;
    --c-navy-700: #102856;
    --c-navy-600: #193A75;
    --c-navy-100: #E7ECF6;
    --c-green: #7AB929;
    --c-green-600: #68A11F;
    /* Verde para textos pequeños e íconos sobre fondos claros: 5.1:1 sobre blanco (WCAG AA). */
    --c-green-700: #4C7A16;
    --c-green-300: #A6D45F;
    --c-green-100: #EEF7E1;
    --c-blue: #1E63E9;
    --c-blue-700: #1549B5;
    --c-ink: #0F1B33;
    --c-text: #2B3448;
    --c-muted: #5B6475;
    --c-line: #E3E8F0;
    --c-soft: #EEF2F8;
    --c-white: #fff;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(8, 24, 58, .06), 0 1px 3px rgba(8, 24, 58, .08);
    --shadow: 0 6px 18px rgba(8, 24, 58, .08), 0 2px 6px rgba(8, 24, 58, .06);
    --shadow-lg: 0 18px 44px rgba(8, 24, 58, .16);
    --header-h: 76px;
    --font: 'Inter Variable', 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    --bs-body-font-family: var(--font);
    --bs-body-color: var(--c-text);
    --bs-link-color: var(--c-blue);
    --bs-link-color-rgb: 30, 99, 233;
    --bs-link-hover-color: var(--c-blue-700);
    --bs-border-color: var(--c-line);
    --bs-border-radius: var(--radius-sm);
    /* Anillo de foco de Bootstrap para las variantes propias de botón (btn-navy, outline, ghost...). */
    --bs-btn-focus-shadow-rgb: 122, 185, 41;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { font-family: var(--font); color: var(--c-text); background: var(--c-white); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, h5, h6 { color: var(--c-ink); font-weight: 800; letter-spacing: -.01em; }
a { text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--c-green-300); color: var(--c-navy-900); }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--c-green); color: var(--c-navy-800); font-weight: 600; padding: .5rem 1rem; border-radius: 0 0 var(--radius-sm) 0; }
.skip-link:focus { left: 0; }
.text-accent { color: var(--c-green) !important; }
.text-navy { color: var(--c-navy-800) !important; }
.text-muted-2 { color: var(--c-muted) !important; }
.bg-navy { background: var(--c-navy-800) !important; }
.bg-soft { background: var(--c-soft) !important; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Botones ---------- */
.btn { font-weight: 600; letter-spacing: .005em; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
/* Foco de teclado siempre visible, también en fondos oscuros (3:1 o más sobre blanco y sobre azul marino). */
.btn:focus-visible { outline: 2px solid var(--c-green-700); outline-offset: 2px; }
/* Texto azul marino sobre el verde de marca: 7:1 (el blanco solo daba 2.4:1). */
.btn-accent { --bs-btn-color: var(--c-navy-800); --bs-btn-bg: var(--c-green); --bs-btn-border-color: var(--c-green); --bs-btn-hover-color: var(--c-navy-800); --bs-btn-hover-bg: var(--c-green-600); --bs-btn-hover-border-color: var(--c-green-600); --bs-btn-active-bg: var(--c-green-300); --bs-btn-active-border-color: var(--c-green-300); --bs-btn-active-color: var(--c-navy-800); --bs-btn-disabled-color: var(--c-navy-800); --bs-btn-disabled-bg: var(--c-green); --bs-btn-disabled-border-color: var(--c-green); --bs-btn-focus-shadow-rgb: 122, 185, 41; }
.btn-navy { --bs-btn-color: #fff; --bs-btn-bg: var(--c-navy-800); --bs-btn-border-color: var(--c-navy-800); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--c-navy-700); --bs-btn-hover-border-color: var(--c-navy-700); --bs-btn-active-bg: var(--c-navy-900); --bs-btn-active-color: #fff; }
.btn-outline-navy { --bs-btn-color: var(--c-navy-800); --bs-btn-border-color: var(--c-navy-800); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--c-navy-800); --bs-btn-hover-border-color: var(--c-navy-800); --bs-btn-active-bg: var(--c-navy-900); --bs-btn-active-color: #fff; }
.btn-outline-accent { --bs-btn-color: var(--c-green-300); --bs-btn-border-color: var(--c-green); --bs-btn-hover-color: var(--c-navy-800); --bs-btn-hover-bg: var(--c-green); --bs-btn-hover-border-color: var(--c-green); --bs-btn-active-bg: var(--c-green-600); --bs-btn-active-color: var(--c-navy-800); border-width: 2px; }
.btn-ghost-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.75); --bs-btn-hover-color: var(--c-navy-800); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-active-bg: #fff; --bs-btn-active-color: var(--c-navy-800); border-width: 1.5px; background: rgba(5, 15, 36, .25); backdrop-filter: blur(4px); }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; }
.btn i { font-size: 1.05em; }
.link-arrow { font-weight: 600; color: var(--c-blue); display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow i { transition: transform .2s; }
.link-arrow:hover i { transform: translateX(3px); }

/* ---------- Formularios ---------- */
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #D5DCE7; padding: .62rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--c-green); box-shadow: 0 0 0 .2rem rgba(122, 185, 41, .2); }
.form-label { font-weight: 600; font-size: .875rem; color: var(--c-ink); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--c-green); border-color: var(--c-green); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(122, 185, 41, .2); border-color: var(--c-green); }
.field-validation-error, .text-danger { font-size: .85rem; }
.input-validation-error { border-color: #dc3545 !important; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--c-navy-800); box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(5, 15, 36, .18); }
.site-header .navbar { min-height: var(--header-h); padding: 0; }
.site-header .container-xxl { gap: 1rem; }
.navbar-brand { padding: 0; margin: 0; color: #fff !important; display: flex; align-items: center; }
.site-logo { height: 44px; width: auto; color: #fff; display: block; }
.logo-img { object-fit: contain; }
.main-nav { gap: .15rem; align-items: center; }
.main-nav .nav-link { color: rgba(255,255,255,.88); font-weight: 500; font-size: .93rem; padding: .5rem .55rem !important; position: relative; white-space: nowrap; }
.main-nav .nav-link:hover, .main-nav .nav-link:focus { color: #fff; }
.main-nav .nav-link.active { color: var(--c-green-300); }
.main-nav .nav-link.active::after { content: ''; position: absolute; left: .55rem; right: .55rem; bottom: -.35rem; height: 2px; border-radius: 2px; background: var(--c-green); }
.nav-split { display: flex; align-items: center; position: relative; }
.nav-caret { background: none; border: 0; color: rgba(255,255,255,.7); padding: .4rem .2rem; margin-left: -.35rem; font-size: .7rem; line-height: 1; border-radius: 6px; }
.nav-caret:hover, .nav-caret:focus-visible { color: #fff; }
.nav-dropdown { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; min-width: 260px; margin-top: .6rem !important; }
.nav-dropdown .dropdown-item { border-radius: var(--radius-sm); padding: .55rem .75rem; display: flex; gap: .65rem; align-items: center; font-size: .9rem; font-weight: 500; color: var(--c-ink); }
.nav-dropdown .dropdown-item i { color: var(--c-green-600); font-size: 1.05rem; width: 1.2rem; text-align: center; }
.nav-dropdown .dropdown-item:hover, .nav-dropdown .dropdown-item.active { background: var(--c-green-100); color: var(--c-navy-800); }
.header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: transparent; border: 0; font-size: 1.25rem; position: relative; transition: background .2s; }
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
.cart-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: var(--c-green); color: var(--c-navy-800); font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--c-navy-800); }
.cart-badge.bump { animation: bump .45s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.header-cta { padding: .62rem 1.15rem; margin-left: .5rem; font-size: .92rem; white-space: nowrap; }
.account-menu { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; min-width: 220px; }
.account-menu .dropdown-item { border-radius: var(--radius-sm); padding: .5rem .75rem; display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.account-menu .dropdown-item i { color: var(--c-muted); }
.search-panel { background: var(--c-navy-900); border-top: 1px solid rgba(255,255,255,.08); }
.search-form { display: flex; align-items: center; gap: .75rem; padding: 1rem 0; color: rgba(255,255,255,.6); }
.search-form .form-control { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; border-radius: 999px; padding-left: 1.1rem; }
.search-form .form-control::placeholder { color: rgba(255,255,255,.55); }

@media (min-width: 1200px) {
    .site-offcanvas .offcanvas-body { justify-content: center; }
    /* Con el ratón el submenú se abre al pasar (Escape lo descarta, site.js); con el teclado se abre con el botón de
       flecha (Bootstrap agrega .show y Escape lo cierra). El foco por sí solo no lo abre. */
    .main-nav .has-mega:not(.is-dismissed):hover > .nav-split > .nav-dropdown { display: block; }
    .main-nav .has-mega > .nav-split > .nav-dropdown { position: absolute; top: 100%; left: -.5rem; }
    .main-nav .has-mega > .nav-split::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: .8rem; }
}

/* Encabezado compacto entre 1200 y 1365 px: el menú completo, las acciones y «Cotizar proyecto» caben en una fila. */
@media (min-width: 1200px) and (max-width: 1365.98px) {
    .site-header .container-xxl { gap: .75rem; }
    .navbar-brand .site-logo { height: 38px; }
    .main-nav { gap: .1rem; }
    .main-nav .nav-link { font-size: .875rem; padding: .5rem .35rem !important; }
    .main-nav .nav-link.active::after { left: .35rem; right: .35rem; }
    .main-nav .nav-caret { margin-left: -.2rem; }
    .header-actions { gap: .25rem; }
    .header-actions .icon-btn { width: 40px; height: 40px; }
    .header-cta { padding: .55rem .85rem; margin-left: .25rem; font-size: .875rem; }
}

@media (max-width: 1199.98px) {
    .site-offcanvas { background: var(--c-navy-800); color: #fff; }
    .site-offcanvas .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.1); }
    .main-nav { align-items: stretch; gap: 0; }
    .main-nav .nav-link { padding: .8rem .25rem !important; font-size: 1rem; }
    .main-nav .nav-link.active::after { display: none; }
    .nav-split { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
    .main-nav > .nav-item:not(.has-mega) { border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav-caret { padding: .8rem; font-size: .85rem; }
    .nav-dropdown { position: static !important; transform: none !important; width: 100%; box-shadow: none; background: rgba(255,255,255,.05); margin: 0 0 .75rem !important; }
    .nav-dropdown .dropdown-item { color: rgba(255,255,255,.88); }
    .nav-dropdown .dropdown-item:hover, .nav-dropdown .dropdown-item.active { background: rgba(255,255,255,.08); color: #fff; }
    .site-logo { height: 38px; }
}

@media (max-width: 575.98px) {
    :root { --header-h: 66px; }
    .site-logo { height: 34px; }
    .icon-btn { width: 38px; height: 38px; font-size: 1.15rem; }
}

/* ---------- Secciones y encabezados ---------- */
.section { padding: 4rem 0; }
.section-sm { padding: 2.75rem 0; }
.section-dark { background: var(--c-navy-800); color: rgba(255,255,255,.85); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); font-weight: 800; color: var(--c-navy-800); margin: 0; letter-spacing: -.01em; }
.section-title.is-upper, .section-header.is-upper .section-title { text-transform: uppercase; letter-spacing: .01em; }
.section-subtitle { color: var(--c-muted); margin: .35rem 0 0; }
.section-link { font-weight: 600; font-size: .9rem; color: var(--c-blue); display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.section-link i { transition: transform .2s; }
.section-link:hover i { transform: translateX(3px); }
.section-header.is-dark .section-title { color: #fff; }
.section-header.is-dark .section-link { color: #fff; }
.section-header.is-dark .section-subtitle { color: rgba(255,255,255,.7); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--c-green-700); }
.section-dark .eyebrow, .page-banner .eyebrow, .bg-navy .eyebrow, .card-navy .eyebrow, .cta-band-inner .eyebrow, .site-footer .eyebrow { color: var(--c-green-300); }

/* ---------- Banner de páginas internas ---------- */
.page-banner { position: relative; background: var(--c-navy-800); color: #fff; padding: 3.25rem 0 3rem; overflow: hidden; isolation: isolate; }
.page-banner.has-image::before { content: ''; position: absolute; inset: 0; background-image: var(--banner-image); background-size: cover; background-position: center; z-index: -2; }
.page-banner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,24,58,.96) 0%, rgba(8,24,58,.82) 45%, rgba(8,24,58,.45) 100%); }
.page-banner .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.5); --bs-breadcrumb-item-active-color: rgba(255,255,255,.75); font-size: .85rem; margin-bottom: .75rem; }
.page-banner .breadcrumb a { color: rgba(255,255,255,.85); }
.page-banner .breadcrumb a:hover { color: #fff; }
.page-banner-title { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 800; margin: 0; max-width: 820px; }
.page-banner-text { color: rgba(255,255,255,.85); font-size: 1.08rem; margin: .75rem 0 0; max-width: 720px; }

/* ---------- Tarjetas genéricas ---------- */
.card-soft { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-navy { background: var(--c-navy-800); color: rgba(255,255,255,.85); border-radius: var(--radius-lg); }
.card-navy h3, .card-navy h4 { color: #fff; }
.img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 140px; background: var(--c-soft); color: #A8B2C3; font-size: 2rem; }

/* ---------- Tarjeta de producto ---------- */
.product-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; height: 100%; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card-media { position: relative; aspect-ratio: 4 / 3; background: #fff; display: flex; align-items: center; justify-content: center; padding: .75rem .75rem 0; }
.product-card-media > a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.product-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.product-card-title { font-size: .98rem; font-weight: 700; margin: 0 0 .2rem; line-height: 1.3; }
.product-card-title a { color: var(--c-ink); }
.product-card-title a:hover { color: var(--c-blue); }
.product-card-sub { font-size: .8rem; color: var(--c-muted); margin: 0 0 .6rem; }
.product-specs { list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .78rem; color: var(--c-muted); line-height: 1.5; }
.swatches { display: flex; gap: .35rem; margin: 0 0 .6rem; flex-wrap: wrap; }
.swatch { width: 16px; height: 16px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); display: inline-block; }
.product-card { container-type: inline-size; }
.product-card-footer { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.product-card-footer:has(> .btn), .product-card-footer:has(> .stock-out) { flex-wrap: wrap; }
.product-card-footer > .btn { flex: 1 1 100%; }
.stock-out { font-size: .78rem; font-weight: 700; color: #B42318; background: #FDECEC; border-radius: 999px; padding: .3rem .65rem; white-space: nowrap; }
.price-block { display: flex; flex-direction: column; line-height: 1.15; }
.price-from { font-size: .72rem; color: var(--c-muted); }
.price { font-size: 1.12rem; font-weight: 800; color: var(--c-ink); white-space: nowrap; }
.price small { font-size: .72rem; font-weight: 600; color: var(--c-muted); }
.price-old { font-size: .78rem; color: var(--c-muted); text-decoration: line-through; }
.price-quote { font-size: .8rem; font-weight: 600; color: var(--c-navy-600); }
.cart-round-btn { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; border: 0; background: var(--c-green); color: var(--c-navy-800); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: background .2s, transform .15s; }
.cart-round-btn:hover { background: var(--c-green-600); color: var(--c-navy-800); transform: scale(1.06); }
.cart-round-btn:disabled { opacity: .6; }
.cart-round-btn:focus-visible { outline: 2px solid var(--c-green-700); outline-offset: 2px; }
/* Tarjetas angostas (grillas de 5 columnas o carriles): precio y botón en la misma línea.
   Va después de las reglas base de .price y .cart-round-btn para que, a igual especificidad, gane. */
@container (max-width: 185px) {
    .product-card-body { padding: .75rem .8rem .85rem; }
    .price { font-size: .96rem; }
    .price small { font-size: .64rem; }
    .cart-round-btn { width: 34px; height: 34px; flex: 0 0 34px; font-size: .95rem; }
    /* Precio muy largo: el botón baja a la línea siguiente (alineado a la derecha) en vez de quedar recortado. */
    .product-card-footer { flex-wrap: wrap; }
    .product-card-footer > form, .product-card-footer > .cart-round-btn { margin-left: auto; }
}
.product-card-links { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--c-line); margin-top: .8rem; padding-top: .6rem; font-size: .78rem; }
.product-card-links a { color: var(--c-muted); display: inline-flex; gap: .3rem; align-items: center; }
.product-card-links a:hover { color: var(--c-blue); }
.fav-btn { position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--c-line); background: rgba(255,255,255,.92); color: var(--c-muted); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; z-index: 2; transition: color .2s, transform .15s; }
.fav-btn:hover { color: #E0435B; transform: scale(1.08); }
.fav-btn .bi-heart-fill { display: none; }
.fav-btn.is-active { color: #E0435B; }
.fav-btn.is-active .bi-heart { display: none; }
.fav-btn.is-active .bi-heart-fill { display: inline; }
.product-card.is-compact .product-card-media { aspect-ratio: 16 / 10; }

/* Carril horizontal de tarjetas (carrusel) */
.rail { position: relative; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 1rem) / 5); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .25rem .1rem 1rem; scrollbar-width: thin; }
.rail-track > * { scroll-snap-align: start; }
.rail-btn { position: absolute; top: 42%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-line); background: #fff; color: var(--c-navy-800); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; z-index: 3; }
.rail-btn:hover { background: var(--c-navy-800); color: #fff; }
/* Por debajo de 1400 px el contenedor solo deja 12 px de margen: las flechas quedan dentro para no recortarse. */
.rail-btn.prev { left: -8px; }
.rail-btn.next { right: -8px; }
@media (min-width: 1400px) {
    .rail-btn.prev { left: -20px; }
    .rail-btn.next { right: -20px; }
}
.section-dark .rail-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.section-dark .rail-btn:hover { background: #fff; color: var(--c-navy-800); }
/* Extremo del carril (site.js): la flecha sigue enfocable pero se ve inactiva. */
.rail-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.rail-btn[aria-disabled="true"]:hover { background: #fff; color: var(--c-navy-800); }
.section-dark .rail-btn[aria-disabled="true"]:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 1199.98px) { .rail-track { grid-auto-columns: calc((100% - 3 * 1rem) / 4); } }
@media (max-width: 991.98px) { .rail-track { grid-auto-columns: calc((100% - 2 * 1rem) / 3); } .rail-btn { display: none; } }
@media (max-width: 767.98px) { .rail-track { grid-auto-columns: 46%; } }
@media (max-width: 479.98px) { .rail-track { grid-auto-columns: 72%; } }

/* ---------- Tarjeta de proyecto ---------- */
.project-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.project-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-soft); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.project-card:hover .project-card-media img { transform: scale(1.05); }
.project-tag { position: absolute; top: .65rem; left: .65rem; background: var(--c-green); color: var(--c-navy-800); font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }
.project-card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.project-card-title { font-size: .98rem; font-weight: 700; margin: 0 0 .3rem; }
.project-card-title a { color: var(--c-ink); }
.project-card-title a:hover { color: var(--c-blue); }
.project-card-text { font-size: .84rem; color: var(--c-muted); margin: 0 0 .65rem; }
.project-meta { margin-top: auto; display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--c-muted); }
.project-meta i { color: var(--c-green-600); }
.project-year { font-weight: 600; }
.project-card.is-overlay { border: 0; }
.project-card.is-overlay .project-card-media { aspect-ratio: 4 / 3; height: 100%; }
.project-card.is-overlay .project-card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,24,58,0) 25%, rgba(8,24,58,.92) 100%); }
.project-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1rem; color: #fff; display: flex; flex-direction: column; gap: .15rem; }
.project-overlay strong { font-size: 1rem; }
.project-overlay small { color: rgba(255,255,255,.75); font-size: .78rem; }
.project-overlay-text { font-size: .8rem; color: rgba(255,255,255,.85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-overlay-link { font-size: .8rem; font-weight: 600; color: var(--c-green-300); margin-top: .25rem; }

/* ---------- Lista de insignias ---------- */
.feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; }
.feature-list li { display: flex; align-items: flex-start; gap: .65rem; }
.feature-icon { flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--c-green); color: var(--c-green); font-size: 1.1rem; }
.feature-text { display: flex; flex-direction: column; line-height: 1.3; }
.feature-text strong { font-size: .85rem; color: var(--c-ink); font-weight: 700; }
.feature-text small { font-size: .78rem; color: var(--c-muted); }
.feature-list.is-dark .feature-text strong { color: #fff; }
.feature-list.is-dark .feature-text small { color: rgba(255,255,255,.72); }
.feature-list-stack { flex-direction: column; gap: 1rem; }
.feature-list-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.feature-list-cards li { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1rem; }

/* ---------- Calculadora de grama ---------- */
.calc-card { border-radius: var(--radius-lg); padding: 1.4rem; }
.calc-dark { background: var(--c-navy-800); color: rgba(255,255,255,.85); box-shadow: var(--shadow-lg); }
.calc-light { background: #fff; border: 1px solid var(--c-line); box-shadow: var(--shadow); }
.calc-head { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1rem; }
.calc-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; color: var(--c-green); border: 1.5px solid var(--c-green); }
.calc-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.calc-subtitle { font-size: .84rem; margin: .2rem 0 0; opacity: .8; }
.calc-dark .calc-title { color: #fff; }
.calc-dark .form-label { color: rgba(255,255,255,.8); font-weight: 500; }
.calc-dark .form-control, .calc-dark .form-select { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.calc-dark .form-select option { color: var(--c-ink); }
.calc-dark .form-control:focus, .calc-dark .form-select:focus { background: rgba(255,255,255,.1); color: #fff; }
.calc-area { display: flex; justify-content: space-between; align-items: center; padding: .9rem 0; border-bottom: 1px solid rgba(127,140,160,.25); margin-bottom: .9rem; }
.calc-area strong { font-size: 1.05rem; }
.calc-dark .calc-area strong { color: #fff; }
.calc-estimate h4 { font-size: .9rem; font-weight: 700; margin: 0 0 .5rem; }
.calc-dark .calc-estimate h4 { color: #fff; }
.calc-estimate dl { margin: 0; font-size: .86rem; }
.calc-estimate dl > div { display: flex; justify-content: space-between; padding: .25rem 0; }
.calc-estimate dt { font-weight: 400; opacity: .8; }
.calc-estimate dd { margin: 0; font-weight: 700; }
.calc-coverage { font-size: .78rem; text-align: right; opacity: .75; margin: .25rem 0 0; }
.calc-total { border: 1px solid rgba(122,185,41,.55); border-radius: var(--radius); padding: .9rem 1rem; margin: 1rem 0; display: flex; flex-direction: column; }
.calc-total span { font-size: .82rem; color: var(--c-green-300); font-weight: 600; }
.calc-light .calc-total span { color: var(--c-green-700); }
.calc-total strong { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.calc-dark .calc-total strong { color: #fff; }
.calc-total small { font-size: .74rem; opacity: .75; }
.calc-error { font-size: .85rem; color: #FFB4B4; margin: 0 0 .75rem; }
.calc-light .calc-error { color: #c0392b; }
.calc-footer { font-size: .85rem; margin: 1rem 0 0; display: flex; gap: .5rem; align-items: center; justify-content: center; opacity: .9; }

/* ---------- Asesoría y CTA ---------- */
.advisor-card { border: 1.5px solid var(--c-green); border-radius: var(--radius-lg); padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; background: rgba(122,185,41,.06); }
.advisor-card h3 { font-size: 1.1rem; margin: 0 0 .35rem; }
.advisor-card p { margin: 0; font-size: .9rem; color: var(--c-muted); }
.advisor-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--c-green-100); color: var(--c-green-700); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.cta-band { padding: 2rem 0 3rem; }
.cta-band-inner { background: var(--c-navy-800); border-radius: var(--radius-lg); padding: 1.75rem 2rem; display: flex; gap: 1.5rem; align-items: center; color: rgba(255,255,255,.85); box-shadow: var(--shadow-lg); }
.cta-band-icon { font-size: 2.6rem; color: var(--c-green); flex: 0 0 auto; }
.cta-band-text { flex: 1; }
.cta-band-text h2 { color: #fff; font-size: 1.35rem; margin: 0 0 .25rem; }
.cta-band-text p { margin: 0; }
@media (max-width: 767.98px) { .cta-band-inner { flex-direction: column; text-align: center; } }

/* ---------- Acordeón de soluciones ---------- */
.solution-accordion .accordion-item { border: 1px solid var(--c-line); border-radius: var(--radius) !important; margin-bottom: .75rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.solution-accordion .accordion-button { gap: 1rem; padding: 1rem 1.25rem; font-weight: 700; color: var(--c-ink); background: #fff; box-shadow: none !important; }
.solution-accordion .accordion-button:not(.collapsed) { background: var(--c-soft); color: var(--c-navy-800); }
.solution-accordion .accordion-button:focus-visible { outline: 3px solid rgba(122,185,41,.6); outline-offset: -3px; }
.solution-accordion .accordion-button .acc-icon { font-size: 1.5rem; color: var(--c-navy-700); width: 2rem; text-align: center; }
.solution-accordion .accordion-button small { display: block; font-weight: 400; color: var(--c-muted); font-size: .8rem; margin-top: .1rem; }
.solution-accordion .accordion-body { padding: 1rem 1.25rem 1.25rem 4.25rem; font-size: .92rem; }

/* ---------- Contenido enriquecido ---------- */
.rich-text { font-size: 1rem; line-height: 1.7; color: var(--c-text); }
.rich-text h2, .rich-text h3, .rich-text h4 { margin: 1.5rem 0 .6rem; color: var(--c-navy-800); }
.rich-text h3 { font-size: 1.2rem; }
.rich-text ul, .rich-text ol { padding-left: 1.25rem; }
.rich-text li { margin-bottom: .3rem; }
.rich-text img { border-radius: var(--radius); height: auto; }
.rich-text blockquote { border-left: 4px solid var(--c-green); padding: .5rem 1rem; color: var(--c-muted); background: var(--c-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rich-text .ql-align-center { text-align: center; }
.rich-text .ql-align-right { text-align: right; }
.rich-text .ql-align-justify { text-align: justify; }
.rich-text > :last-child { margin-bottom: 0; }

/* ---------- Paginación ---------- */
.pagination-copab { --bs-pagination-color: var(--c-navy-800); --bs-pagination-active-bg: var(--c-navy-800); --bs-pagination-active-border-color: var(--c-navy-800); --bs-pagination-hover-color: var(--c-navy-800); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(122,185,41,.25); gap: .35rem; }
.pagination-copab .page-link { border-radius: var(--radius-sm) !important; min-width: 40px; text-align: center; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--c-navy-800); color: rgba(255,255,255,.75); padding: 3.5rem 0 1.5rem; font-size: .9rem; }
.footer-logo { height: 46px; color: #fff; }
.footer-about { color: rgba(255,255,255,.72); margin: 0 0 1rem; font-size: .88rem; line-height: 1.55; }
.footer-title { color: #fff; font-size: .95rem; font-weight: 700; margin: .4rem 0 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-links a { color: rgba(255,255,255,.75); }
.footer-links a:hover { color: var(--c-green-300); }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.footer-contact li { display: flex; gap: .65rem; align-items: flex-start; }
.footer-contact i { color: #fff; font-size: 1rem; margin-top: .1rem; }
.footer-contact a { color: rgba(255,255,255,.8); }
.footer-contact a:hover { color: var(--c-green-300); }
.social-links { display: flex; gap: .5rem; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.social-links a:hover { background: var(--c-green); border-color: var(--c-green); }
.newsletter-form { display: flex; position: relative; margin-top: .25rem; }
.newsletter-form .form-control { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.newsletter-form .form-control::placeholder { color: rgba(255,255,255,.55); }
.newsletter-form .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 0 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: rgba(255,255,255,.55); }
.footer-bottom a { color: rgba(255,255,255,.65); }
.footer-bottom a:hover { color: #fff; }

/* ---------- WhatsApp flotante y avisos ---------- */
.wa-float { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.75rem; box-shadow: 0 10px 24px rgba(37, 211, 102, .4); transition: transform .2s; }
.wa-float:hover { color: #fff; transform: scale(1.08); }
.toast-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; width: min(380px, calc(100vw - 2rem)); }
.app-toast { width: 100%; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .85rem 1rem; font-size: .9rem; background: #fff; border-left: 4px solid var(--c-blue); }
.app-toast i { font-size: 1.15rem; margin-top: .05rem; }
.app-toast-success { border-left-color: var(--c-green); }
.app-toast-success i { color: var(--c-green-600); }
.app-toast-warning { border-left-color: #F0A500; }
.app-toast-warning i { color: #C98A00; }
.app-toast-danger { border-left-color: #DC3545; }
.app-toast-danger i { color: #DC3545; }
.app-toast-info i { color: var(--c-blue); }
.app-toast a { font-weight: 600; }

/* ---------- Páginas de error ---------- */
.error-page { padding: 6rem 0; background: var(--c-soft); min-height: 55vh; }
.error-code { display: block; font-size: 5rem; font-weight: 900; color: var(--c-green); line-height: 1; margin-bottom: .5rem; }
.error-page h1 { font-size: 2rem; margin-bottom: .75rem; }
.error-search { display: flex; gap: .5rem; max-width: 520px; margin: 1.5rem auto; }

/* ---------- Utilidades de layout ---------- */
.sticky-aside { position: sticky; top: calc(var(--header-h) + 16px); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--c-muted); }
.empty-state i { font-size: 2.5rem; color: #B7C1D1; display: block; margin-bottom: .75rem; }
.stack-gap > * + * { margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Teselas de mapa en gris (Maps:Muted) */
.map-tiles-muted { filter: grayscale(1) contrast(.92) brightness(1.06); }

/* Resumen de validación vacío oculto (validación en el cliente) */
.validation-summary-valid { display: none; }

/* Un elemento con [hidden] siempre se oculta, aunque tenga utilidades de display de Bootstrap (d-flex, d-block...). */
[hidden].d-flex, [hidden].d-inline-flex, [hidden].d-block, [hidden].d-inline-block, [hidden].d-grid, [hidden].d-inline { display: none !important; }
