/* =========================================================
   TIPOGRAFÍA – scoped al contenido público
   ========================================================= */
.content h2 { font-size: 1.3em; }
.content h3 { font-size: 1em; }

/* WhatsApp button */
.btn.btn-whatsapp { color: white !important; transition: background-color 0.2s, border-color 0.2s, transform 0.15s; }
.btn.btn-whatsapp:hover { background-color: #1da851 !important; border-color: #1da851 !important; transform: scale(1.04); }

/* Títulos de artículos como enlace sin cambiar color */
.text-inherit { color: inherit; }
.text-inherit:hover { color: #DE3C4B; }

/* Botones "Ver todos" / "Leer más" (btn-primary btn-icon) */
.btn.btn-primary.btn-icon {
    color: #fff !important;
    transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.btn.btn-primary.btn-icon i {
    background: #fff !important;
    color: #c40024 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.btn.btn-primary.btn-icon:hover {
    background-color: #8a0019 !important;
    border-color: #8a0019 !important;
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(196, 0, 36, 0.3);
    color: #fff !important;
}
.btn.btn-primary.btn-icon:hover i {
    background: #000 !important;
    color: #fff !important;
}

/* =========================================================
   CARDS – igualar alturas y truncar texto con "..."
   ========================================================= */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   HEADER – fixed + hide/show on scroll
   ========================================================= */
.header {
    background: #d2d3d5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 5px 0;
    transition: transform .38s cubic-bezier(.4,0,.2,1),
                box-shadow .25s ease;
    transform: translateY(0);
}

/* Ocultar al bajar */
.header.is-hidden {
    transform: translateY(-110%);
}

/* Sombra al reaparecer sticky */
.header.is-sticky {
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Fila interior del header */
.hdr-row {
    height: 72px;
    transition: height .3s ease;
}
.header.is-sticky .hdr-row {
    height: 56px;
}

/* Logo */
.header .logo {
    transition: height .3s ease;
}
.header.is-sticky .logo {
    height: 36px !important;
}

/* Compensar header fijo en el contenido */
main {
    padding-top: 82px;
}

/* =========================================================
   NAV LINKS – subrayado animado
   ========================================================= */
.hdr-link {
    position: relative;
    display: inline-block;
    color: #727376;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 4px 8px;
    transition: color .25s ease, transform .25s ease;
    transform-origin: center;
}

/* Línea animada */
.hdr-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #C42847;
    transform: translateX(-50%);
    transition: width .25s ease;
}

.hdr-link:hover {
    color: #DE3C4B;
    transform: scale(0.94);
}
.hdr-link:hover::after { width: 100%; }

/* =========================================================
   BOTONES DE ACCIÓN – alturas iguales
   ========================================================= */
.hdr-actions-wrap a.nav-cta,
.hdr-actions-wrap .btn-whatsapp {
    height: 40px;
}

/* =========================================================
   CTA "Publicar mi Inmueble" – fill izq→der
   ========================================================= */
a.nav-cta {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 999px;
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    overflow: hidden;
    isolation: isolate;
    background-image:
        linear-gradient(#727376, #b7b7b7),
        linear-gradient(0deg, #727376, #b7b7b7, #727376, #b7b7b7, #727376);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 600% 100%;
    background-position: 0 0, 0% 50%;
}

a.nav-cta::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: #DE3C4B;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .32s cubic-bezier(.2,.8,.2,1);
    z-index: 0;
    pointer-events: none;
}

a.nav-cta:hover::before { transform: scaleX(1); }
a.nav-cta i, a.nav-cta span { position: relative; z-index: 2; }
a.nav-cta::after { display: none; }

/* WhatsApp btn – igual altura que CTA */
.btn-whatsapp {
    display: inline-flex !important;
    align-items: center;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* En el header mantenemos altura fija */
.hdr-actions-wrap .btn-whatsapp {
    padding: 0 16px;
    height: 40px;
}

/* =========================================================
   HOVER – Cards de propiedades
   ========================================================= */
.projects a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.projects .card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    will-change: transform;
}

.projects a:hover .card {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.13);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: url(../images/footer.png) center center no-repeat #a9abae;
}

/* =========================================================
   BUSCADOR – pill
   ========================================================= */
.search-pill {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 999px;
    overflow: hidden;
}

.search-pill__seg {
    display: flex;
    align-items: center;
}

.search-pill__seg--select {
    min-width: 200px;
    border-right: 1px solid rgba(0,0,0,.2);
    justify-content: center;
}

.search-pill__seg--input { flex: 1; min-width: 0; }

.search-pill__seg--btn {
    width: 84px;
    border-left: 1px solid rgba(0,0,0,.2);
    justify-content: center;
}

/* Quitar bordes Bootstrap dentro del pill */
.search-pill .form-select,
.search-pill .form-control {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: 64px;
    padding: 0 32px;
    background: transparent !important;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #444;
}

/* Flechita propia para el select, pegada a la palabra y todo centrado en el segmento.
   Ancho FIJO: un <select> nativo con width:auto se dimensiona según la opción
   más larga de la lista (no la seleccionada), por eso se ve con un hueco enorme. */
.search-pill .form-select {
    width: 150px;
    flex: 0 0 150px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 22px 0 16px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c40024' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px 8px !important;
    appearance: none;
    -webkit-appearance: none;
}

.search-pill .form-control::placeholder {
    color: #b7b7b7;
    font-weight: 500;
}

.search-pill__btn {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-pill__btn i {
    font-size: 28px;
    color: #e11d2e;
}

@media (max-width: 576px) {
    /* Cajas separadas, apiladas, full-width (estilo referencia) en vez de un pill único */
    .search-pill {
        flex-direction: column;
        background: transparent;
        border: 0;
        border-radius: 0;
        overflow: visible;
        gap: 10px;
    }
    .search-pill__seg {
        background: #fff;
        border: 1px solid rgba(0,0,0,.15);
        border-radius: 12px;
        width: 100%;
    }
    .search-pill__seg--select {
        border-right: 0;
        justify-content: flex-start;
    }
    .search-pill__seg--input {
        border-right: 0;
    }
    .search-pill__seg--btn {
        border-left: 0;
        height: 52px;
        background: #c40024;
        border-color: #c40024;
    }
    .search-pill .form-select,
    .search-pill .form-control {
        height: 52px;
        padding: 0 16px;
        font-size: 0.9rem;
        text-transform: none;
        letter-spacing: normal;
    }
    .search-pill .form-select {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        text-align: left;
        padding-right: 32px !important;
        background-position: right 16px center !important;
    }
    .search-pill__btn i {
        color: #fff;
        font-size: 22px;
    }
}

/* =========================================================
   BUSCADOR – contenedor pill homepage
   ========================================================= */
.search {
    background: transparent;
    padding: 15px 0;
    max-width: 920px;
    width: 100%;
    margin: -48px auto 0;
    border-radius: 50px;
    position: relative;
    z-index: 990;
}

@media (max-width: 576px) {
    .search {
        max-width: 100%;
        padding: 0 16px;
        margin-top: 16px;
    }
}

/* =========================================================
   HERO SLIDER – misma proporción en todos los tamaños
   (la imagen escala 100% de ancho y la altura sigue su
   relación natural, sin recortes distintos por breakpoint)
   ========================================================= */
.hero-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Flechas: visibles en desktop (d-none d-lg-flex en el HTML controla mobile/desktop) */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: #fff;
}

/* Dots FUERA de la imagen (elemento normal, no superpuesto) */
.hero-swiper-dots.swiper-pagination {
    position: static;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 14px 0 0;
}
.hero-swiper-dots .swiper-pagination-bullet {
    background: #c40024;
    opacity: 0.35;
    width: 9px;
    height: 9px;
    margin: 0 !important;
}
.hero-swiper-dots .swiper-pagination-bullet-active {
    opacity: 1;
}

/* =========================================================
   SECCIÓN CONTENIDO
   ========================================================= */
.content {
    margin-top: 0;
    padding-top: 100px;
}
