/* ==========================================================
   Seccion Edificios - listado (edificios.php) y ficha (edificio.php)
   ========================================================== */
.edif {
    --edif-azul: #053f60;
    --edif-azul-osc: #0a2f4d;
    --edif-texto: #4a5563;
    --edif-borde: #dfe5ec;
    --edif-fondo: #f6f8fa;
    font-family: 'Roboto', sans-serif;
    color: var(--edif-texto);
}
.edif h1, .edif h2, .edif h3, .edif h4 { font-family: 'Roboto', sans-serif; color: var(--edif-azul); }

/* Item activo del menu */
#header .navbar .navbar-nav .nav-item.active > .nav-link { box-shadow: inset 0 -2px 0 #053f60; }

/* Titulo con lineas a los costados */
.edif-titulo { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 0 0 8px; }
.edif-titulo h1, .edif-titulo h2 { margin: 0; font-size: 30px; font-weight: 700; text-align: center; }
.edif-titulo:before, .edif-titulo:after { content: ""; width: 96px; height: 2px; background: var(--edif-azul); flex-shrink: 0; }
.edif-titulo.izquierda { justify-content: flex-start; }
.edif-titulo.izquierda:before { display: none; }
.edif-titulo.izquierda h2 { font-size: 22px; }
.edif-subtitulo { text-align: center; font-size: 16px; margin-bottom: 30px; }

/* Iconos */
.icono-amenity { width: 34px; height: 34px; color: var(--edif-azul); }
.icono-dato { width: 22px; height: 22px; color: var(--edif-azul); flex-shrink: 0; }
.icono-pin { width: 16px; height: 16px; color: var(--edif-azul); flex-shrink: 0; }
.icono-flecha { width: 18px; height: 18px; }

/* Boton contorno */
.edif-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px 16px; border: 1px solid var(--edif-azul); border-radius: 3px;
    color: var(--edif-azul) !important; font-weight: 700; font-size: 15px; background: #fff;
    transition: all .25s ease;
}
.edif-btn:hover { background: var(--edif-azul); color: #fff !important; text-decoration: none; }

/* Tarjeta de edificio */
.edif-card { background: #fff; box-shadow: 0 2px 14px rgba(5, 63, 96, .08); height: 100%; display: flex; flex-direction: column; }
.edif-card .edif-card-foto { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 4.2; background: #e9eef3; }
.edif-card .edif-card-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.edif-card:hover .edif-card-foto img { transform: scale(1.04); }
.edif-card .edif-card-estado { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--edif-azul); font-size: 12px; font-weight: 700; padding: 4px 10px; text-transform: uppercase; letter-spacing: .5px; }
.edif-card .edif-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.edif-card h3 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.edif-card h3 a { color: var(--edif-azul); font-family: inherit; font-weight: inherit; }
.edif-card .edif-card-zona { display: flex; align-items: center; gap: 6px; font-size: 15px; margin-bottom: 16px; }
.edif-card .edif-card-amenities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 20px; min-height: 58px; }
.edif-card .edif-card-amenities div { text-align: center; font-size: 11.5px; line-height: 1.2; }
.edif-card .edif-card-amenities .icono-amenity { width: 26px; height: 26px; display: block; margin: 0 auto 6px; }
.edif-card .edif-card-unidades { font-size: 13px; margin: -8px 0 16px; }
.edif-card .edif-btn { margin-top: auto; }

/* Carruseles (owl) con flechas redondas */
.edif-carousel.owl-carousel .owl-stage { display: flex; }
.edif-carousel.owl-carousel .owl-item { display: flex; }
.edif-carousel.owl-carousel .owl-item > div { width: 100%; }
.edif-carousel .owl-stage-outer { padding: 6px 0 16px; }
.edif-carousel .owl-nav { margin: 0; }
.edif-carousel .owl-nav button.owl-prev,
.edif-carousel .owl-nav button.owl-next {
    position: absolute; top: 40%; width: 44px; height: 44px; border-radius: 50% !important;
    background: var(--edif-azul) !important; color: #fff !important; font-size: 22px !important; line-height: 44px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.2); margin: 0; z-index: 2;
}
.edif-carousel .owl-nav button.owl-prev { left: -22px; }
.edif-carousel .owl-nav button.owl-next { right: -22px; }
.edif-carousel .owl-nav button.disabled { opacity: .35; cursor: default; }
.edif-carousel .owl-nav button span { line-height: 44px; }

/* Banner */
.edif-banner { position: relative; background-size: cover; background-position: center; padding: 70px 0; margin: 20px 0 0; }
.edif-banner:before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,40,68,.92) 0%, rgba(5,40,68,.6) 55%, rgba(5,40,68,.25) 100%); }
.edif-banner .container { position: relative; }
.edif-banner h2 { color: #fff; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 42px; line-height: 1.12; margin: 0 0 14px; }
.edif-banner p { color: #fff; letter-spacing: 3px; text-transform: uppercase; font-size: 13px; margin: 0; }
.edif-banner .edif-btn-banner { display: inline-flex; align-items: center; gap: 10px; border: 2px solid #fff; color: #fff !important; padding: 12px 22px; border-radius: 4px; font-weight: 700; background: rgba(5,63,96,.7); transition: all .25s; }
.edif-banner .edif-btn-banner:hover { background: #fff; color: var(--edif-azul) !important; text-decoration: none; }

/* Filtro por barrio */
.edif-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 30px; }
.edif-filtros button { border: 1px solid var(--edif-borde); background: #fff; color: var(--edif-azul); padding: 7px 16px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all .2s; }
.edif-filtros button:hover, .edif-filtros button.activo { background: var(--edif-azul); border-color: var(--edif-azul); color: #fff; }
.edif-grilla > [data-barrio] { margin-bottom: 30px; }

/* Cajas Nosotros / Servicios / Contacto */
.edif-cajas .edif-caja { display: block; background: #fff; text-align: center; padding: 34px 26px; height: 100%; box-shadow: 0 2px 14px rgba(5,63,96,.06); color: var(--edif-texto); transition: transform .25s; }
.edif-cajas .edif-caja:hover { transform: translateY(-4px); text-decoration: none; }
.edif-cajas .edif-caja svg { width: 56px; height: 56px; fill: var(--edif-azul); margin-bottom: 14px; }
.edif-cajas .edif-caja h4 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }

/* ---------- Ficha ---------- */
.edif-migas { font-size: 14px; padding: 22px 0 18px; }
.edif-migas a, .edif-migas span { display: inline !important; }
.edif-migas a { color: var(--edif-azul); }
@media (min-width: 992px) { .edif-migas { padding-top: 45px; } }
.edif .row > [class*="col-"] { min-width: 0; }
.edif-migas span { margin: 0 8px; color: #9aa5b1; }

.edif-galeria { position: relative; }
.edif-galeria .edif-foto-principal .item { aspect-ratio: 3 / 2; background: #e9eef3; }
.edif-galeria .edif-foto-principal img { width: 100%; height: 100%; object-fit: cover; }
.edif-galeria .edif-contador { position: absolute; left: 0; bottom: 0; z-index: 3; background: rgba(0,0,0,.55); color: #fff; padding: 6px 16px; font-size: 15px; }
.edif-galeria .owl-nav button.owl-prev, .edif-galeria .owl-nav button.owl-next { top: 50%; transform: translateY(-50%); }
.edif-galeria .owl-nav button.owl-prev { left: 16px; }
.edif-galeria .owl-nav button.owl-next { right: 16px; }
.edif-miniaturas { margin-top: 10px; }
.edif-miniaturas .item { aspect-ratio: 16 / 10; cursor: pointer; border: 2px solid transparent; opacity: .8; transition: all .2s; }
.edif-miniaturas .item img { width: 100%; height: 100%; object-fit: cover; }
.edif-miniaturas .item:hover { opacity: 1; }
.edif-miniaturas .owl-item.actual .item { border-color: #2f7fd1; opacity: 1; }

.edif-cabecera h1 { font-size: 38px; font-weight: 700; margin: 0 0 8px; line-height: 1.1; }
.edif-cabecera .edif-zona { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.edif-cabecera .edif-separador { width: 36px; height: 2px; background: var(--edif-azul); margin: 22px 0; }
.edif-cabecera h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin-bottom: 18px; }
.edif-descripcion { font-size: 14.5px; line-height: 1.75; }
.edif-descripcion.recortada { max-height: 230px; overflow: hidden; position: relative; }
.edif-descripcion.recortada:after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.edif-leer-mas { background: none; border: 0; padding: 0; margin-top: 8px; color: var(--edif-azul); font-weight: 700; cursor: pointer; }

.edif-amenities { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 12px; }
.edif-amenities div { text-align: center; font-size: 13.5px; line-height: 1.25; }
.edif-amenities .icono-amenity { display: block; margin: 0 auto 10px; }
.edif-col-amenities { border-right: 1px solid var(--edif-borde); }

.edif-datos { background: var(--edif-fondo); padding: 22px 24px; }
.edif-datos ul { list-style: none; margin: 0; padding: 0; }
.edif-datos li { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: 14.5px; }
.edif-datos li strong { font-weight: 500; color: var(--edif-texto); }

.edif-unidad { background: #fff; box-shadow: 0 2px 14px rgba(5,63,96,.08); height: 100%; display: flex; flex-direction: column; }
.edif-unidad .edif-unidad-foto { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e9eef3; }
.edif-unidad .edif-unidad-foto img { width: 100%; height: 100%; object-fit: cover; }
.edif-unidad .edif-precio { position: absolute; left: 12px; bottom: 12px; background: #fff; color: #222; font-weight: 700; padding: 5px 12px; border-radius: 3px; font-size: 14px; }
.edif-unidad .edif-unidad-body { padding: 14px 14px 16px; display: flex; flex-direction: column; flex: 1; }
.edif-unidad .edif-unidad-specs { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; margin-bottom: 14px; }
.edif-unidad .edif-unidad-specs span { display: flex; align-items: center; gap: 4px; }
.edif-unidad .edif-unidad-specs i { color: var(--edif-azul); font-size: 18px; }
.edif-unidad .edif-btn { margin-top: auto; }

@media (max-width: 991px) {
    .edif-col-amenities { border-right: 0; }
    .edif-amenities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .edif-cabecera { margin-top: 24px; }
    .edif-banner { text-align: center; }
    .edif-banner .edif-btn-banner { margin-top: 24px; }
    .edif-carousel .owl-nav button.owl-prev { left: 4px; }
    .edif-carousel .owl-nav button.owl-next { right: 4px; }
}
@media (max-width: 575px) {
    .edif-titulo { gap: 12px; }
    .edif-titulo:before, .edif-titulo:after { width: 36px; }
    .edif-titulo h1, .edif-titulo h2 { font-size: 24px; }
    .edif-banner h2 { font-size: 32px; }
    .edif-cabecera h1 { font-size: 30px; }
    .edif-amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
