/* === NextGen rediseño 2026 === */

/* ---------- Parte 1: colores y letras ---------- */
html:root {
    /* Variables que ya usa la plantilla Flex Home */
    --primary-color: #1C3B8B;
    --primary-color-rgb: rgba(28, 59, 139, 0.88);
    --primary-color-hover: #0F1E4A;
    --primary-font: 'Inter';

    /* Paleta NextGen (colores exactos del logo) */
    --ng-blue: #1C3B8B;
    --ng-night: #0F1E4A;
    --ng-red: #E30713;
    --ng-red-hover: #B5121A;
    --ng-soft: #F5F7FB;
    --ng-text: #1F2937;
    --ng-muted: #6B7280;
    --ng-radius: 12px;
    --ng-shadow: 0 4px 18px rgba(15, 30, 74, 0.08);
    --ng-shadow-hover: 0 14px 30px rgba(15, 30, 74, 0.16);
}

body {
    font-family: 'Inter', 'Nunito Sans', Arial, sans-serif;
    color: var(--ng-text);
}

h1, h2, h3, h4, h5, h6,
.navbar-nav a,
.btn {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
}

h1, h2, h3 { font-weight: 700; }
h4, h5, h6 { font-weight: 600; }

a { color: var(--ng-blue); }
a:hover { color: var(--ng-red); }

/* Barra superior en azul noche */
.bravo_topbar { background: var(--ng-night) !important; }

/* Botones principales en rojo NextGen */
.btn-primary,
.btn-orange,
.topsearch .btn,
.btn-special,
.list-agency .agents-grid .fr-grid-footer-flex-right .prt-view {
    background: var(--ng-red) !important;
    border-color: var(--ng-red) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-orange:hover,
.btn-orange:focus,
.topsearch .btn:hover,
.btn-special:hover,
.list-agency .agents-grid .fr-grid-footer-flex-right .prt-view:hover {
    background: var(--ng-red-hover) !important;
    border-color: var(--ng-red-hover) !important;
    color: #fff !important;
}

/* Títulos de sección con barrita roja */
.projecthome > .row > .col-12 > h2,
.homehouse > .row > .col-12 > h2,
.discover > .row > .col-12 > h2 {
    color: var(--ng-night);
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.projecthome > .row > .col-12 > h2::after,
.homehouse > .row > .col-12 > h2::after,
.discover > .row > .col-12 > h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: var(--ng-red);
}

.projecthome > .row > .col-12 > p,
.homehouse > .row > .col-12 > p,
.discover > .row > .col-12 > p {
    color: var(--ng-muted);
}

/* ---------- Parte 2: encabezado ---------- */
.topmenu,
.topmenu.bg-light,
.topmenu .main-header,
.topmenu .header-sticky {
    background-color: #fff !important;
}

.topmenu {
    box-shadow: 0 2px 12px rgba(15, 30, 74, 0.06);
}

/* Menú fijo al bajar (la plantilla agrega .header-sticky) */
.topmenu .header-sticky {
    box-shadow: 0 6px 20px rgba(15, 30, 74, 0.12);
}

.topmenu .navbar-brand .logo {
    height: 54px;
    width: auto;
}

@media (max-width: 575px) {
    .topmenu .navbar-brand .logo {
        height: 46px;
    }
}

@media (min-width: 992px) {
    .topmenu.bg-light .navbar-nav > li > a {
        position: relative;
        color: var(--ng-text) !important;
        font-weight: 500;
        padding: 8px 12px !important;
        transition: color 0.2s ease;
    }

    .topmenu.bg-light .navbar-nav > li > a::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 0;
        height: 3px;
        border-radius: 2px;
        background: var(--ng-red);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s ease;
    }

    .topmenu.bg-light .navbar-nav > li > a:hover,
    .topmenu.bg-light .navbar-nav > li.current-menu-item > a {
        color: var(--ng-blue) !important;
    }

    .topmenu.bg-light .navbar-nav > li > a:hover::after,
    .topmenu.bg-light .navbar-nav > li.current-menu-item > a::after {
        transform: scaleX(1);
    }

    .topmenu.bg-light .navbar-nav > li.current-menu-item > a {
        font-weight: 600 !important;
    }
}

/* Botón "Agregar propiedad" */
.topmenu .add-property {
    border-radius: 999px !important;
    padding: 10px 20px !important;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(227, 7, 19, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.topmenu .add-property:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(227, 7, 19, 0.3);
}

/* Menú del celular */
.topmenu .navbar-toggler {
    color: var(--ng-blue) !important;
    font-size: 22px;
}

#navbarSupportedContent .main-menu-content .bg-primary {
    background-color: var(--ng-night) !important;
}

.main-header .main-menu-content .menu--mobile > li.current-menu-item {
    border-left-color: var(--ng-red);
}

/* ---------- Parte 3: portada ---------- */
/* Velo azul noche sobre la foto para que resalte el buscador.
   Se hace con sombras internas: quedan entre la foto y el contenido,
   así nunca tapan el título ni el buscador (en celular el buscador no es "absolute"). */
.home_banner {
    box-shadow:
        inset 0 220px 180px -60px rgba(15, 30, 74, 0.55),
        inset 0 -220px 180px -60px rgba(15, 30, 74, 0.55),
        inset 0 0 0 2000px rgba(15, 30, 74, 0.22);
}

.home_banner .topsearch {
    z-index: 9;
    max-width: 900px;
}

/* Título y subtítulo de la portada (los agrega el JS personalizado) */
.ng-hero-title {
    text-align: center;
    margin-bottom: 24px;
    color: #fff;
}

.ng-hero-title h1 {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(26px, 4.2vw, 46px);
    line-height: 1.2;
    margin: 0 0 10px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.ng-hero-title p {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(15px, 1.6vw, 19px);
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Pestañas Venta / Alquilar */
.topsearch .typesearch a {
    border-radius: 10px 10px 0 0;
    padding: 9px 18px !important;
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 500 !important;
    background-color: rgba(255, 255, 255, 0.85) !important;
    color: var(--ng-blue) !important;
}

.topsearch .typesearch a.active {
    background: var(--ng-blue) !important;
    color: #fff !important;
}

/* Caja del buscador redondeada y con sombra */
.topsearch .input-group-lg {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-radius: 0 var(--ng-radius) var(--ng-radius) var(--ng-radius);
    box-shadow: 0 18px 40px rgba(15, 30, 74, 0.28);
    padding: 22px 20px 8px;
}

.topsearch .input-group-text,
.topsearch .form-control {
    background: var(--ng-soft) !important;
}

.topsearch .input-group-prepend .input-group-text {
    border-radius: 10px 0 0 10px !important;
    color: var(--ng-blue);
}

.topsearch .keyword-input .form-control,
.topsearch .location-input .form-control {
    border-radius: 0 10px 10px 0 !important;
}

.topsearch .search-button-wrapper .btn {
    border-radius: 0 10px 10px 0 !important;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(227, 7, 19, 0.3);
}

@media (max-width: 991px) {
    .topsearch .search-button-wrapper .btn {
        border-radius: 10px !important;
    }
}

.advanced-search > a {
    color: var(--ng-blue) !important;
    font-weight: 500;
}

/* ---------- Parte 4: tarjetas de propiedades y proyectos ---------- */
.projecthome .item,
.box_shadow .projecthome .item {
    background: #fff;
    border-radius: var(--ng-radius);
    overflow: hidden;
    box-shadow: var(--ng-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projecthome .item:hover {
    transform: translateY(-4px);
    box-shadow: var(--ng-shadow-hover);
}

/* Zoom leve de la foto */
.projecthome .item img,
.projecthome .item .img img.thumb {
    transition: transform 0.45s ease;
}

.projecthome .item:hover img {
    transform: scale(1.05);
}

.projecthome .item .media-count img,
.projecthome .item:hover .media-count img {
    transform: none;
}

.projecthome .item .description,
.box_shadow .projecthome .item .description {
    background: #fff;
    padding: 16px;
}

.projecthome .item .description a {
    color: var(--ng-text);
}

.projecthome .item .description h5 {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 600;
    color: var(--ng-text);
}

.projecthome .item .description h5:hover {
    color: var(--ng-blue);
    text-decoration: none;
}

.projecthome .item .description .dia_chi {
    color: var(--ng-muted);
}

.projecthome .item .description .dia_chi i {
    color: var(--ng-red);
}

/* Precio de proyectos (texto "Precio: De ...") */
.projecthome .item .description p.bold500:not(.threemt) {
    color: var(--ng-red);
    font-weight: 600;
}

/* Tipo y precio sobre la foto: píldoras en vez de cintas */
.item-price-wrap {
    left: 12px;
    bottom: 12px;
    gap: 6px;
}

.item-price-wrap li,
.item-price-wrap li.h-type {
    border-radius: 999px;
    padding: 4px 12px;
    margin-right: 0;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.item-price-wrap li.h-type {
    background-color: rgba(15, 30, 74, 0.88);
    font-weight: 500;
}

.item-price-wrap li:not(.h-type) {
    background-color: var(--ng-red);
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.item-price-wrap li:not(.h-type)::before,
.item-price-wrap li:not(:last-child)::after {
    display: none !important;
}

/* Insignias de estado (Venta, Alquiler, Vendido, Alquilado...) */
.blii .status {
    top: 12px;
    right: 12px;
}

.status-label {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.status-label.label-success { background-color: #E8F7EE; color: #146C3A; }
.status-label.label-success.ng-status-rent { background-color: #E8EEFB; color: #1C3B8B; }
.status-label.label-danger { background-color: #FDE7E8; color: #B5121A; }
.status-label.label-warning { background-color: #FEF5E1; color: #8A5A00; }
.status-label.label-info { background-color: #E6F1FB; color: #1D5A9A; }

/* Precio en la ficha de la propiedad */
.pricehouse {
    color: var(--ng-red);
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: 24px;
    margin: 6px 0 4px;
}

.pricehouse .status-label {
    font-family: 'Inter', Arial, sans-serif;
    vertical-align: middle;
    margin-left: 8px;
}

/* ---------- Parte 5: agentes y noticias ---------- */
.list-agency .agents-grid {
    border-radius: var(--ng-radius);
    box-shadow: var(--ng-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.list-agency .agents-grid:hover {
    transform: translateY(-4px);
    box-shadow: var(--ng-shadow-hover);
}

/* Foto del agente con borde suave */
.list-agency .agents-grid .fr-grid-thumb a img,
.list-agency .agents-grid .fr-grid-thumb span img {
    height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(28, 59, 139, 0.15), 0 6px 16px rgba(15, 30, 74, 0.12);
}

.list-agency .agents-grid .fr-grid-detail-flex .fr-can-name a {
    color: var(--ng-night);
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 600;
}

.list-agency .agents-grid .agent-email a {
    background: var(--ng-soft);
    color: var(--ng-blue);
}

.list-agency .agents-grid .agent-email a:hover {
    background: var(--ng-red);
    color: #fff;
}

.list-agency .agents-grid .fr-grid-info ul li {
    color: var(--ng-muted);
    font-size: 14px;
}

.list-agency .agents-grid .fr-grid-info ul li strong {
    color: var(--ng-text);
    font-weight: 600;
}

.list-agency .agents-grid .fr-position {
    color: var(--ng-muted);
}

.list-agency .agents-grid .fr-position i {
    color: var(--ng-red);
}

/* Tarjetas de noticias */
.blog-container .container-grid .grid-in,
.blog-container .container-grid .grid-in .grid-shadow {
    border-radius: var(--ng-radius);
    overflow: hidden;
}

.blog-container .container-grid .grid-in .grid-shadow {
    box-shadow: var(--ng-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-container .container-grid .grid-in:hover .grid-shadow {
    transform: translateY(-4px);
    box-shadow: var(--ng-shadow-hover);
}

.blog-container .container-grid .grid-in .hourseitem img {
    transition: transform 0.45s ease;
}

.blog-container .container-grid .grid-in:hover .hourseitem img {
    transform: scale(1.05);
}

.blog-container .container-grid .grid-h,
.box_shadow .blog-container .grid-h {
    background: #fff;
    padding: 16px 18px;
}

.blog-container .container-grid .grid-h a h2 {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.45;
    color: var(--ng-night);
}

.blog-container .container-grid .grid-h a:hover h2 {
    color: var(--ng-red);
}

.blog-container .container-grid .grid-h .blog-title .post-meta,
.post-meta {
    color: var(--ng-muted);
    font-size: 13px;
}

.post-meta a {
    color: var(--ng-blue);
}

.blog-container .container-grid .grid-h .blog-excerpt p {
    color: var(--ng-muted);
}

/* ---------- Parte 6: pie de página ---------- */
footer {
    background-color: var(--ng-night) !important;
    border-top: 4px solid var(--ng-red) !important;
    color: rgba(255, 255, 255, 0.78);
    padding-top: 24px;
}

footer p,
footer .fas,
footer .fa {
    color: rgba(255, 255, 255, 0.78);
}

footer p i {
    color: var(--ng-red) !important;
}

/* El logo actual es oscuro: se muestra sobre una placa blanca para que se vea */
footer p a img {
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    max-height: 52px !important;
    box-sizing: content-box;
}

footer .menufooter h4 {
    color: #fff;
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

footer .menufooter h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: var(--ng-red);
}

footer p a,
footer .menufooter ul li a {
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

footer .menufooter ul li a:hover,
footer p a:hover {
    color: #fff !important;
    padding-left: 4px;
}

footer .menufooter ul li a:hover span {
    text-decoration: underline;
    text-decoration-color: var(--ng-red);
    text-underline-offset: 4px;
}

footer .header-deliver {
    color: rgba(255, 255, 255, 0.4);
}

footer .btn-select-language {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 999px;
}

footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 14px;
}

/* ---------- Parte 7: aparición suave al bajar ---------- */
/* El JS solo agrega .ng-reveal a lo que todavía no está en pantalla,
   así sin JS (o con movimiento reducido) todo se ve normal. */
.ng-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
    .ng-reveal,
    .ng-reveal.ng-visible {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .projecthome .item,
    .projecthome .item img,
    .list-agency .agents-grid,
    .blog-container .container-grid .grid-in .grid-shadow,
    .blog-container .container-grid .grid-in .hourseitem img,
    .topmenu .add-property {
        transition: none !important;
    }

    .projecthome .item:hover,
    .projecthome .item:hover img,
    .list-agency .agents-grid:hover,
    .blog-container .container-grid .grid-in:hover .grid-shadow,
    .blog-container .container-grid .grid-in:hover .hourseitem img {
        transform: none !important;
    }
}

/* ---------- Parte 8: botón flotante de WhatsApp ---------- */
.ng-whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 20px 0 16px;
    border-radius: 999px;
    background: #25D366;
    color: #fff !important;
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35), 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ng-whatsapp:hover,
.ng-whatsapp:focus {
    background: #1EBE5A;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 211, 102, 0.4), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ng-whatsapp svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    fill: currentColor;
}

/* El botón de teléfono flotante se reemplaza por WhatsApp;
   el teléfono sigue visible en el pie de página y en cada ficha. */
.action_footer a[href^="tel:"] {
    display: none !important;
}

/* Botón "subir" sobre WhatsApp, sin taparlo */
.action_footer {
    right: 18px;
    bottom: 86px;
}

.action_footer .cd-top {
    position: static;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--ng-blue) !important;
    box-shadow: 0 6px 16px rgba(15, 30, 74, 0.25);
    margin: 0 6px 0 0;
}

@media (max-width: 575px) {
    .ng-whatsapp {
        right: 14px;
        bottom: 14px;
        width: 56px;
        padding: 0;
        justify-content: center;
    }

    .ng-whatsapp span {
        display: none;
    }

    .action_footer {
        right: 14px;
        bottom: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ng-whatsapp {
        transition: none;
    }

    .ng-whatsapp:hover {
        transform: none;
    }
}

/* ---------- Parte 9: franja del título en páginas internas ---------- */
/* La imagen de fondo configurada es el logo sobre blanco y tapaba el título blanco;
   se reemplaza (solo visualmente) por una franja azul. */
.bgheadproject {
    background: linear-gradient(135deg, var(--ng-night) 0%, var(--ng-blue) 100%) !important;
    color: #fff;
    padding: 36px 0 28px;
    border-bottom: 4px solid var(--ng-red);
}

.bgheadproject h1 {
    font-family: 'Poppins', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(22px, 3vw, 32px);
    text-transform: none;
    line-height: 1.25;
    color: #fff;
    padding-top: 0;
    margin-bottom: 10px;
}

.bgheadproject .breadcrumb > .breadcrumb-item,
.bgheadproject .breadcrumb > .breadcrumb-item a,
.bgheadproject .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.bgheadproject .breadcrumb > .breadcrumb-item a:hover {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--ng-red);
}

/* === fin === */
