body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: #333;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn {
    font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
}

/* ---- Header (topbar + navbar) ---- */
.site-header .top-bar {
    background-color: #14213d;
    color: rgba(255, 255, 255, 0.75);
}

.site-header .top-bar a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.site-header .top-bar a:hover {
    color: #fff;
}

.site-header .main-bar {
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.site-header.header-shrink .main-bar {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.site-header .main-bar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-header .logo-header {
    height: 52px;
    width: auto;
}

.site-header .navbar-nav .nav-link {
    color: #333;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    position: relative;
}

.site-header .navbar-nav .nav-link.active,
.site-header .navbar-nav .nav-link:hover {
    color: var(--color-primario, #114c93);
}

.site-header .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 2px;
    background-color: var(--color-secundario, #f4a300);
}

.site-header .btn-icon-square {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primario, #114c93);
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.site-header .btn-icon-square--square {
    width: 42px;
    min-width: 42px;
    padding-left: 0;
    padding-right: 0;
}

.site-header .btn-icon-square:hover {
    background-color: #14213d;
    color: #fff;
}

@media (min-width: 992px) and (max-width: 1200px) {
    .site-header .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 0.5rem;
    }
    .site-header .navbar-nav .nav-link {
        padding: 0.5rem 0.6rem;
    }
}

/* ---- Footer ---- */
.footer-portafolio img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ---- Anuncios (banner/popup administrable) ---- */
.anuncio-banner {
    background-color: #14213d;
    color: #fff;
}

.anuncio-banner a {
    color: #fff;
}

.anuncio-banner--inferior {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}

@keyframes anuncioFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes anuncioSlideDown {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes anuncioSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes anuncioZoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.anuncio-anim-fade { animation: anuncioFadeIn 0.5s ease both; }
.anuncio-banner--superior.anuncio-anim-slide { animation: anuncioSlideDown 0.5s ease both; }
.anuncio-banner--inferior.anuncio-anim-slide { animation: anuncioSlideUp 0.5s ease both; }
.anuncio-anim-zoom { animation: anuncioZoomIn 0.4s ease both; }

.anuncio-modal-slide .modal-dialog { animation: anuncioSlideDown 0.5s ease both; }
.anuncio-modal-zoom .modal-dialog { animation: anuncioZoomIn 0.4s ease both; }
.anuncio-modal-fade .modal-dialog { animation: anuncioFadeIn 0.5s ease both; }

/* ---- Hero ---- */
.hero-banner {
    background-size: cover;
    background-position: center;
    color: #fff;
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 20, 40, 0.82) 0%, rgba(10, 20, 40, 0.55) 60%, rgba(10, 20, 40, 0.35) 100%);
}

.hero-banner .container {
    position: relative;
    z-index: 1;
}

.hero-banner h1 {
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.2;
    text-align: left;
}

.hero-banner p {
    text-align: left;
    max-width: 640px;
}

/* ---- Franja de valores (justo debajo del hero) ---- */
.franja-valores {
    margin-top: -1px;
}

.valor-item {
    padding: 2rem 1.5rem;
    color: #fff;
    text-align: center;
}

.valor-item i {
    font-size: 2.25rem;
    margin-bottom: .75rem;
}

.valor-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.valor-item p {
    font-size: .85rem;
    opacity: .9;
    margin-bottom: 0;
}

/* Tonos alternados de la marca para las 4 columnas, igual al patrón del sitio original.
   Los tonos de respaldo (hex) se aplican primero; si el navegador soporta color-mix(),
   la siguiente regla los sustituye por una variación real del color de marca configurado. */
.valor-item:nth-child(4n+1) { background-color: #114c93; }
.valor-item:nth-child(4n+2) { background-color: #0d3b73; }
.valor-item:nth-child(4n+3) { background-color: #2d6cc0; }
.valor-item:nth-child(4n+4) { background-color: #0a2c56; }
.valor-item:nth-child(4n+1) { background-color: var(--color-primario, #114c93); }
.valor-item:nth-child(4n+2) { background-color: color-mix(in srgb, var(--color-primario, #114c93) 80%, #000 10%); }
.valor-item:nth-child(4n+3) { background-color: color-mix(in srgb, var(--color-primario, #114c93) 70%, #fff 10%); }
.valor-item:nth-child(4n+4) { background-color: color-mix(in srgb, var(--color-primario, #114c93) 90%, #000 20%); }

/* ---- Estadísticas / contadores ---- */
.stat-box {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-box i {
    font-size: 2rem;
    color: var(--color-secundario, #dc3545);
    margin-bottom: .5rem;
}

.stat-box .valor {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primario, #0d3b66);
}

.stat-box .etiqueta {
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .03em;
    color: #6c757d;
}

/* ---- Tarjetas de servicios / proyectos / noticias ---- */
.card-servicio, .card-proyecto, .card-noticia {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease-in-out;
    height: 100%;
    overflow: hidden;
}

.card-servicio:hover, .card-proyecto:hover, .card-noticia:hover {
    transform: translateY(-4px);
}

.card-servicio img, .card-proyecto img, .card-noticia img {
    height: 200px;
    object-fit: cover;
}

.card-servicio .card-title, .card-proyecto .card-title {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primario, #114c93);
}

.badge-estado-en_ejecucion { background-color: #0d6efd; }
.badge-estado-concluido { background-color: #198754; }
.badge-estado-paralizado { background-color: #dc3545; }
.badge-estado-convocatoria { background-color: #f4a300; color: #212529; }

.seccion-titulo {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primario, #114c93);
}

.seccion-subtitulo {
    color: #6c757d;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Quiénes somos (sección dividida) ---- */
.marca-agua-icono {
    background: var(--color-primario, #114c93);
    color: #fff;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-size: 5rem;
}

/* ---- Galería ---- */
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* ---- Logos de clientes (carrusel) ---- */
.clientes-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.clientes-viewport::-webkit-scrollbar { display: none; }

.clientes-track {
    display: flex;
    gap: 1rem;
}

.cliente-slide {
    flex: 0 0 auto;
    width: 150px;
    height: 100px;
    scroll-snap-align: start;
    border: 1px solid #e2e6eb;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 768px) {
    .clientes-viewport { scroll-snap-type: x mandatory; }
    .cliente-slide { width: 190px; height: 120px; }
}

.btn-carrusel-nav {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 4px;
    background: var(--color-primario, #114c93);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.btn-carrusel-nav:hover { background: #14213d; }

.client-logo {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.2s;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ---- Tienda ---- */
.tienda-sidebar {
    position: sticky;
    top: 90px;
}

.categoria-link {
    display: block;
    padding: 0.55rem 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eef1f4;
    font-size: 0.92rem;
}
.categoria-link:hover { color: var(--color-primario, #114c93); }
.categoria-link i { color: var(--color-secundario, #f4a300); font-size: 0.7rem; margin-right: 4px; }
.categoria-link.active { color: var(--color-primario, #114c93); font-weight: 700; }

.buscador-tienda .input-group { border-radius: 6px; overflow: hidden; }
.buscador-tienda input { box-shadow: none; }
.buscador-resultados {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 1040;
    max-height: 320px;
    overflow-y: auto;
}
.buscador-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f5;
}
.buscador-item:hover { background: #f4f7fb; }
.buscador-item img, .buscador-item .sin-imagen {
    width: 34px; height: 34px; object-fit: contain; flex-shrink: 0;
    border: 1px solid #eef1f4; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; color: #c7d0da;
}
.buscador-item .nombre { font-size: 0.88rem; font-weight: 600; }
.buscador-item .categoria { font-size: 0.75rem; color: #9aa5b1; }
.buscador-sin-resultados { padding: 0.75rem 0.9rem; color: #9aa5b1; font-size: 0.88rem; }

.tienda-contador {
    font-size: 0.95rem;
    color: #555;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eef1f4;
}

.categoria-bloque.oculta-por-filtro { display: none; }

.producto-card.resaltado {
    animation: resaltarProducto 1.6s ease;
}
@keyframes resaltarProducto {
    0% { box-shadow: 0 0 0 3px var(--color-secundario, #f4a300); }
    100% { box-shadow: none; }
}

.productos-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.productos-viewport::-webkit-scrollbar { display: none; }

.productos-track {
    display: flex;
    gap: 1rem;
}

.categoria-bloque.expandido .productos-viewport { overflow-x: visible; }
.categoria-bloque.expandido .productos-track { flex-wrap: wrap; }
.categoria-bloque.expandido .btn-prod-prev,
.categoria-bloque.expandido .btn-prod-next { display: none; }

.producto-card {
    flex: 0 0 auto;
    width: 220px;
    border: 1px solid #e2e6eb;
    border-radius: 8px;
    padding: 0.9rem;
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.categoria-bloque.expandido .producto-card { width: 220px; }

.producto-sku {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.68rem;
    color: #9aa5b1;
}

.producto-img {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.producto-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.producto-img i { font-size: 2.4rem; color: #c7d0da; }

.producto-nombre {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    min-height: 2.4em;
}

.producto-precio {
    font-weight: 700;
    color: var(--color-primario, #114c93);
    margin-top: 0.35rem;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #dde2e8;
    border-radius: 4px;
    overflow: hidden;
}
.btn-qty {
    width: 28px;
    height: 32px;
    border: none;
    background: #f4f7fb;
    font-size: 1rem;
    line-height: 1;
}
.qty-input {
    width: 34px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 0.85rem;
}

.btn-add-cart {
    width: 38px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--color-primario, #114c93);
    background: #fff;
    color: var(--color-primario, #114c93);
    border-radius: 4px;
}
.btn-add-cart:hover:not(.disabled) { background: var(--color-primario, #114c93); color: #fff; }
.btn-add-cart.disabled { opacity: 0.4; pointer-events: none; }

.btn-ver-mas {
    background: var(--color-secundario, #f4a300);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
}

.btn-cart-flotante {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primario, #114c93);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 1030;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-secundario, #f4a300);
    color: #14213d;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.carrito-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eef1f4;
}
.carrito-item img, .carrito-item .sin-imagen {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #eef1f4;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7d0da;
}
