/* =========================================================================
 *  Rodriguez Ferrero — Polish para Bootstrap 5.3 (Fase 2.5-D+)
 *  Mejora visual del sitio post-migración BS3→BS5
 * ========================================================================= */

:root {
    --rf-primary: #c41e3a;
    --rf-primary-dark: #9a162c;
    --rf-primary-light: #e5384f;
    --rf-dark: #2c2c2c;
    --rf-gray: #6b7280;
    --rf-light: #f8f9fa;
    --rf-shadow-sm: 0 2px 8px rgba(0,0,0,.08);
    --rf-shadow-md: 0 6px 24px rgba(0,0,0,.12);
    --rf-shadow-lg: 0 12px 40px rgba(0,0,0,.18);
    --rf-radius: .75rem;
}

/* =========================================================================
 *  GLOBAL — corrige body bajo navbar fixed-top
 * ========================================================================= */
body {
    padding-top: 76px;
    color: var(--rf-dark);
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================================================
 *  NAVBAR
 * ========================================================================= */
.navbar.navbar-expand-lg.fixed-top {
    box-shadow: var(--rf-shadow-sm);
    background-color: #fff !important;
    padding: .5rem 0;
}
.navbar-brand img {
    max-height: 60px;
    width: auto;
    height: auto;
}
.navbar-nav .nav-link {
    color: var(--rf-dark);
    font-weight: 500;
    padding: .5rem 1rem !important;
    transition: color .15s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--rf-primary);
}

/* =========================================================================
 *  HERO — header-slide con buscador + Ken Burns (refactor sin huecos)
 * ========================================================================= */
#header.header-slide {
    position: relative;
    min-height: 580px;
    overflow: hidden;            /* CRÍTICO: clipa el Ken Burns */
    isolation: isolate;          /* nuevo stacking context, evita escapes */
    display: flex;
    align-items: center;
    /* Fallback color oscuro coherente con el overlay — si la imagen no carga
       o se desplaza un microsegundo, se ve oscuro, no gris feo */
    background-color: #1f1f1f;
}

/* Capa 1 — Imagen de fondo con Ken Burns (sin <img>, todo CSS) */
#header.header-slide .hero-bg {
    position: absolute;
    inset: -2%;                  /* expande 2% en cada lado para que el scale jamás muestre bordes */
    z-index: 0;
    background: url('../img/7b.jpg') center center / cover no-repeat;
    background-color: #1f1f1f;   /* fallback si la imagen falla */
    transform-origin: center center;
    animation: rfKenBurns 24s ease-in-out infinite alternate;
    will-change: transform;
}

/* Capa 2 — Overlay degradado para contraste del texto */
#header.header-slide .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(95deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.45) 50%, rgba(0,0,0,.15) 100%),
        radial-gradient(ellipse at bottom right, rgba(196,30,58,.18) 0%, transparent 60%);
    pointer-events: none;
}

/* Capa 3 — Contenido encima */
#header.header-slide .hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 3rem 1rem;
    width: 100%;
}

/* Línea decorativa roja al pie del hero */
#header.header-slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rf-primary) 0%, var(--rf-primary-light) 50%, var(--rf-primary) 100%);
    background-size: 200% 100%;
    animation: rfBarShift 4s ease-in-out infinite;
    z-index: 3;
}

/* Ken Burns conservador — scale leve, sin translate fuerte para evitar huecos */
@keyframes rfKenBurns {
    0%   { transform: scale(1)   translate(0, 0); }
    50%  { transform: scale(1.08) translate(-.5%, -.3%); }
    100% { transform: scale(1.12) translate(.3%, .2%); }
}

/* Animaciones de entrada del contenido */
#header.header-slide .col-lg-7 > div h1 {
    animation: rfFadeUp .9s ease-out .15s both;
}
#header.header-slide .col-lg-7 > div p {
    animation: rfFadeUp .9s ease-out .35s both;
}
#header.header-slide .quick-search {
    animation: rfFadeUp 1s ease-out .55s both;
}

/* =========================================================================
 *  QUICK SEARCH (hero) — refactor completo BS5 + estética moderna
 * ========================================================================= */
.quick-search {
    background: #fff;
    padding: 1.75rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.1);
    max-width: 420px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.4);
    position: relative;
    overflow: hidden;
}
.quick-search::before {
    /* Acento decorativo arriba */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rf-primary) 0%, var(--rf-primary-light) 50%, var(--rf-primary) 100%);
}

.quick-search .qs-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.quick-search .qs-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(196,30,58,.1);
    color: var(--rf-primary);
    padding: .4rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.quick-search .qs-field {
    margin-bottom: 1rem;
}
.quick-search .qs-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--rf-dark);
    font-weight: 600;
    font-size: .82rem;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.quick-search .qs-label i {
    color: var(--rf-primary);
    font-size: .95rem;
    width: 16px;
    text-align: center;
}

/* Selects unificados — incluye los inyectados por AJAX en #cnt-cbo-tipos */
.quick-search .qs-select,
.quick-search #cnt-cbo-tipos select,
.quick-search #cnt-cbo-tipos .form-control,
.quick-search .qs-select-wrap select {
    width: 100% !important;
    border: 1.5px solid #e0e3e8 !important;
    border-radius: 10px !important;
    padding: .7rem .85rem !important;
    font-size: .95rem !important;
    color: var(--rf-dark) !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23c41e3a' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 14px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    height: auto !important;
}
.quick-search select:focus,
.quick-search .form-control:focus {
    border-color: var(--rf-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 .2rem rgba(196,30,58,.15) !important;
}

/* Botón submit grande con icono */
.quick-search .qs-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .9rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .95rem;
    cursor: pointer;
    margin-top: .5rem;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 4px 14px rgba(196,30,58,.35);
}
.quick-search .qs-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(196,30,58,.5);
    filter: brightness(1.05);
}
.quick-search .qs-submit:active {
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .quick-search {
        max-width: 100%;
        margin: 1.5rem auto 0;
        padding: 1.5rem 1.25rem;
    }
}
@media (max-width: 575.98px) {
    .quick-search { padding: 1.25rem 1rem; }
    .quick-search .qs-field { margin-bottom: .75rem; }
    .quick-search .qs-label { font-size: .78rem; }
    .quick-search .qs-submit { padding: .8rem 1rem; font-size: .9rem; }
}

/* =========================================================================
 *  HEADING TITLES — secciones
 * ========================================================================= */
.heading-title {
    text-align: center;
    margin: 3rem 0 2.5rem;
    position: relative;
}
.heading-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--rf-dark);
    text-transform: uppercase;
    margin-bottom: .5rem;
}
.heading-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--rf-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}
.heading-title-sm h2 {
    font-size: 1.4rem;
}

/* =========================================================================
 *  SERVICE — Ventas, Inversiones, Tasaciones
 * ========================================================================= */
#service {
    padding: 3rem 0;
    background: var(--rf-light);
}
#service .service-container {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: var(--rf-radius);
    height: 100%;
    box-shadow: var(--rf-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
#service .service-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-md);
}
#service .service-icon a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--rf-primary);
    color: #fff;
    border-radius: 50%;
    margin-bottom: 1rem;
    font-size: 2rem;
    cursor: default;
    transition: transform .3s ease;
}
#service .service-container:hover .service-icon a {
    transform: scale(1.08);
}
#service .service-icon a i {
    color: #fff;
}
#service .service-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rf-dark);
    text-transform: uppercase;
    margin: .5rem 0 1rem;
    letter-spacing: .05em;
}
#service .service-content p {
    color: var(--rf-gray);
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: justify;
}

/* =========================================================================
 *  CONTENT — DESTACADOS, PROPERTY CARDS
 * ========================================================================= */
#content {
    padding: 1rem 0 4rem;
}
.property-container {
    background: #fff;
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.property-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-md);
}
.property-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f1f1f1;
}
.property-image img,
.property-container .property-image > a img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform .35s ease;
    display: block;
}
.property-container:hover .property-image img {
    transform: scale(1.05);
}
/* Override agresivo del style.css legacy con .property-price top:0 + .property-features background rojo */
.property-container .property-image .property-price {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 1rem !important;
    left: 1rem !important;
    width: auto !important;
    max-width: 70% !important;
    background: var(--rf-primary) !important;
    color: #fff !important;
    padding: .4rem 1rem !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: .95rem !important;
    box-shadow: var(--rf-shadow-sm) !important;
    z-index: 3 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
}
.property-container .property-image .property-price span {
    color: #fff !important;
    font-size: inherit !important;
}
/* Anular el background rojo legacy del .property-features vacío */
.property-container .property-features {
    background: transparent !important;
    border-top: 1px solid #eee;
    padding: .5rem 1rem;
    font-size: .85rem;
    color: var(--rf-gray);
    min-height: 0 !important;
}
.property-container .property-features:empty {
    display: none !important;
}
.property-content {
    padding: 1.25rem 1rem 1rem;
    flex: 1;
    height: auto !important;
    display: flex;
    flex-direction: column;
}
.property-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3;
}
.property-content h3 a {
    color: var(--rf-dark);
    text-decoration: none;
    transition: color .15s ease;
}
.property-content h3 a:hover {
    color: var(--rf-primary);
}
.property-content h3 small {
    color: var(--rf-gray);
    font-size: .8rem;
    font-weight: 400;
    display: block;
    margin-top: .25rem;
}
.property-content p {
    color: var(--rf-gray);
    font-size: .85rem;
    margin-bottom: 0;
}
/* (.property-features ya manejado arriba con override agresivo) */

/* Portfolio cards (api.buscador.php) — destacados con overlay */
.portfolio-item {
    margin-bottom: 1.5rem;
}
.recent-work-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.recent-work-wrap:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-md);
}
.recent-work-wrap img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0 !important;
}
.recent-work-wrap .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
    color: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    transition: opacity .25s ease;
}
.recent-work-inner h4 {
    font-size: 1rem;
    margin-bottom: .5rem;
    color: #fff;
}
.recent-work-inner h5 {
    color: #fff;
    font-weight: 700;
}
.recent-work-inner .btn {
    background: var(--rf-primary);
    border: none;
    padding: .4rem 1rem;
    font-size: .85rem;
    border-radius: 999px;
    margin-top: .5rem;
}

/* =========================================================================
 *  NEWS — Ubicación + contacto
 * ========================================================================= */
#news {
    background: var(--rf-light);
    padding: 3rem 0;
}
#news iframe {
    width: 100%;
    height: 350px;
    border: 0;
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow-sm);
}
.contact-info-block {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 1.5rem;
    box-shadow: var(--rf-shadow-sm);
    margin-top: 1rem;
}
.contact-info-block p {
    margin: .5rem 0;
    color: var(--rf-dark);
    display: flex;
    align-items: center;
    gap: .75rem;
}
.contact-info-block p i {
    color: var(--rf-primary);
    width: 20px;
    text-align: center;
}
.contact-info-block a {
    color: var(--rf-dark);
    text-decoration: none;
}
.contact-info-block a:hover {
    color: var(--rf-primary);
}

/* =========================================================================
 *  CONTACT FORM
 * ========================================================================= */
.contact-form-wrapper {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 2rem;
    box-shadow: var(--rf-shadow-sm);
}
.contact-form-wrapper .form-control {
    border-radius: .5rem;
    padding: .75rem;
    border-color: #d1d5db;
}
.contact-form-wrapper .form-control:focus {
    border-color: var(--rf-primary);
    box-shadow: 0 0 0 .25rem rgba(196,30,58,.15);
}
.contact-form-wrapper textarea.form-control {
    min-height: 120px;
}
.contact-form-wrapper .btn-submit {
    background: var(--rf-primary);
    color: #fff;
    border: none;
    padding: .75rem 2rem;
    border-radius: .5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    transition: background .15s ease;
}
.contact-form-wrapper .btn-submit:hover {
    background: var(--rf-primary-dark);
}

/* =========================================================================
 *  FOOTER
 * ========================================================================= */
#footer {
    background: var(--rf-dark);
    color: #d1d5db;
    padding: 2.5rem 0 1.5rem;
}
#footer .copyright {
    text-align: center;
}
#footer img {
    max-height: 70px;
    width: auto;
    height: auto;
    margin-bottom: 1rem;
}
#footer p {
    margin: 1rem 0 .5rem;
    font-size: .9rem;
}
#footer .social-links {
    margin-top: 1rem;
    padding: 0;
}
#footer .social-links li {
    display: inline-block;
    margin: 0 .25rem;
}
#footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.1);
    color: #fff;
    border-radius: 50%;
    transition: background .15s ease, transform .15s ease;
    text-decoration: none;
}
#footer .social-links a:hover {
    background: var(--rf-primary);
    transform: translateY(-2px);
}
#footer .scroltop {
    background: var(--rf-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    margin: 1rem auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================================
 *  WhatsApp FAB — Floating Action Button moderno
 * ========================================================================= */
/* Anular .div-flotante legacy si quedó por compat */
.div-flotante, .div-flotante-mobile { display: none !important; }

.wa-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #fff;
    font-size: 1.9rem;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(37,211,102,.45), 0 2px 6px rgba(0,0,0,.15);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
    animation: rfWaBob 3s ease-in-out infinite;
}
.wa-fab i { color: #fff; }
.wa-fab::before {
    /* Anillo pulse */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    z-index: -1;
    animation: rfWaPulse 2.4s ease-out infinite;
}
.wa-fab::after {
    /* Brillo radial sutil al hover */
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}
.wa-fab:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 36px rgba(37,211,102,.65), 0 4px 12px rgba(0,0,0,.2);
    animation-play-state: paused;
    color: #fff;
}
.wa-fab:hover::after { opacity: 1; }

.wa-tooltip {
    position: absolute;
    right: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--rf-dark);
    color: #fff;
    padding: .55rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.wa-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: var(--rf-dark);
}
.wa-fab:hover .wa-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@keyframes rfWaPulse {
    0%   { transform: scale(1);   opacity: .7; }
    100% { transform: scale(1.55); opacity: 0; }
}
@keyframes rfWaBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@media (max-width: 575.98px) {
    .wa-fab {
        bottom: 18px;
        right: 18px;
        width: 56px;
        height: 56px;
        font-size: 1.7rem;
    }
    .wa-tooltip { display: none; }
}

/* =========================================================================
 *  RESPONSIVE — MOBILE FIXES
 * ========================================================================= */
@media (max-width: 991.98px) {
    body { padding-top: 80px; }
    .navbar-brand img { max-height: 50px; }
    #header.header-slide { min-height: auto; padding: 2rem 0; }
    #header.header-slide .container { padding: 2rem 1rem; }
    .quick-search { padding: 1.5rem 1rem; }
    .heading-title { margin: 2rem 0 1.5rem; }
    .heading-title h2 { font-size: 1.4rem; }
    #service { padding: 2rem 0; }
    #service .service-container { margin-bottom: 1rem; }
    #news { padding: 2rem 0; }
    #news iframe { height: 250px; }
}
@media (max-width: 575.98px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .heading-title h2 { font-size: 1.25rem; }
    .property-image { aspect-ratio: 16/10; }
    .recent-work-wrap img { height: 200px; }
}

/* =========================================================================
 *  ANIMATIONS — fade-in al scrollear, skeleton loaders, hover
 * ========================================================================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease-out, transform .6s ease-out;
    will-change: opacity, transform;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay para hijos */
.fade-in-section.is-visible > *:nth-child(1) { animation: rfFadeUp .6s ease-out both; animation-delay: 0s; }
.fade-in-section.is-visible > *:nth-child(2) { animation: rfFadeUp .6s ease-out both; animation-delay: .08s; }
.fade-in-section.is-visible > *:nth-child(3) { animation: rfFadeUp .6s ease-out both; animation-delay: .16s; }
.fade-in-section.is-visible > *:nth-child(4) { animation: rfFadeUp .6s ease-out both; animation-delay: .24s; }
.fade-in-section.is-visible > *:nth-child(5) { animation: rfFadeUp .6s ease-out both; animation-delay: .32s; }
.fade-in-section.is-visible > *:nth-child(6) { animation: rfFadeUp .6s ease-out both; animation-delay: .40s; }

@keyframes rfFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Skeleton loaders (mientras carga AJAX) */
.skeleton-card {
    background: #fff;
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow-sm);
    height: 380px;
    margin-bottom: 1.5rem;
}
.skeleton-img {
    height: 220px;
    background: linear-gradient(90deg, #eef0f4 0%, #f8f9fb 50%, #eef0f4 100%);
    background-size: 200% 100%;
    animation: rfSkeleton 1.5s ease-in-out infinite;
}
.skeleton-bar {
    height: 14px;
    background: linear-gradient(90deg, #eef0f4 0%, #f8f9fb 50%, #eef0f4 100%);
    background-size: 200% 100%;
    animation: rfSkeleton 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin: 1rem;
}
.skeleton-bar.w-50 { width: 50%; }
.skeleton-bar.w-75 { width: 75%; }

@keyframes rfSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================================
 *  PAGE HEROES (Propiedades, Nosotros, Emprendimientos)
 * ========================================================================= */
.page-hero {
    position: relative;
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: #fff;
    text-align: center;
    margin-bottom: 3rem;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 40px;
    height: 40px;
    background: var(--rf-primary-dark);
    z-index: 1;
}
.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
    letter-spacing: .02em;
}
.page-hero p.lead {
    font-size: 1.1rem;
    opacity: .95;
    max-width: 600px;
    margin: 0 auto;
}
@media (max-width: 575.98px) {
    .page-hero { padding: 2.5rem 0 2rem; }
    .page-hero h1 { font-size: 1.75rem; }
    .page-hero p.lead { font-size: 1rem; padding: 0 1rem; }
}

/* =========================================================================
 *  SEARCH FILTERS CARD (Propiedades.php)
 * ========================================================================= */
.search-filters {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 2rem;
    box-shadow: var(--rf-shadow-md);
    margin-top: -4rem;
    position: relative;
    z-index: 10;
    margin-bottom: 3rem;
}
.search-filters .form-label {
    font-weight: 600;
    font-size: .85rem;
    color: var(--rf-dark);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .35rem;
}
.search-filters select.form-control,
.search-filters select {
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    padding: .6rem .8rem;
    width: 100%;
    background: #fff;
}
.search-filters select:focus {
    border-color: var(--rf-primary);
    outline: none;
    box-shadow: 0 0 0 .2rem rgba(196,30,58,.15);
}
.search-filters .btn-search {
    background: var(--rf-primary);
    color: #fff;
    border: none;
    padding: .75rem 2.5rem;
    border-radius: .5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    width: 100%;
    transition: background .2s ease, transform .2s ease;
}
.search-filters .btn-search:hover {
    background: var(--rf-primary-dark);
    transform: translateY(-1px);
}
@media (max-width: 575.98px) {
    .search-filters { padding: 1.25rem; margin-top: -2rem; }
}

/* =========================================================================
 *  ABOUT (Nosotros.php)
 * ========================================================================= */
.about-text {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 2.5rem;
    box-shadow: var(--rf-shadow-sm);
    margin-bottom: 3rem;
    line-height: 1.8;
    color: var(--rf-dark);
}
.about-text h3 {
    color: var(--rf-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Carousel BS5 styled */
.about-carousel {
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow-md);
    margin: 2rem 0;
}
.about-carousel .carousel-item img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}
.about-carousel .carousel-control-prev,
.about-carousel .carousel-control-next {
    width: 5%;
    opacity: .8;
}
.about-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--rf-primary);
}
@media (max-width: 575.98px) {
    .about-text { padding: 1.5rem; }
    .about-carousel .carousel-item img { height: 250px; }
}

/* Equipo cards */
.team-card {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--rf-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}
.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rf-shadow-md);
}
.team-card .team-icon {
    width: 70px;
    height: 70px;
    background: var(--rf-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}
.team-card h4 {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: .25rem;
    color: var(--rf-dark);
}
.team-card .team-role {
    color: var(--rf-primary);
    font-size: .9rem;
    margin: 0 0 .25rem;
    font-weight: 600;
}
.team-card .team-mat {
    color: var(--rf-gray);
    font-size: .8rem;
    font-style: italic;
    margin: 0 0 .75rem;
}
.team-card .team-phone {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--rf-dark);
    text-decoration: none;
    font-weight: 600;
    padding: .4rem .9rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    margin-top: .5rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.team-card .team-phone:hover {
    background: var(--rf-primary);
    color: #fff;
    border-color: var(--rf-primary);
}
.team-card .team-phone i {
    color: var(--rf-primary);
    transition: color .15s ease;
}
.team-card .team-phone:hover i { color: #fff; }

/* =========================================================================
 *  EMPRENDIMIENTOS / URUGUAY (emprendimientos.php)
 * ========================================================================= */
.benefit-list {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 2rem;
    box-shadow: var(--rf-shadow-sm);
    margin-bottom: 2.5rem;
}
.benefit-list li {
    list-style: none;
    padding: .75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--rf-dark);
    font-size: 1.05rem;
}
.benefit-list li:last-child { border-bottom: none; }
.benefit-list li::before {
    content: '\f00c';
    font-family: 'FontAwesome';
    color: var(--rf-primary);
    font-size: 1rem;
    flex-shrink: 0;
}
.benefit-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exoneration-card {
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: #fff;
    border-radius: var(--rf-radius);
    padding: 2.5rem;
    box-shadow: var(--rf-shadow-md);
    margin-bottom: 2.5rem;
}
.exoneration-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.exoneration-card p {
    line-height: 1.7;
    margin-bottom: 1rem;
}
.exoneration-card .plazo {
    text-align: center;
    background: rgba(255,255,255,.15);
    padding: 1rem;
    border-radius: .5rem;
    margin-top: 1.5rem;
    font-weight: 700;
    font-size: 1.15rem;
}

.rentability-table {
    background: #fff;
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow-sm);
    margin-bottom: 3rem;
}
.rentability-table .row {
    margin: 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.rentability-table .row:last-child { border-bottom: none; }
.rentability-table .row.header {
    background: var(--rf-dark);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: .9rem;
}
.rentability-table .value {
    font-weight: 800;
    color: var(--rf-primary);
    font-size: 1.4rem;
}

/* =========================================================================
 *  FORM DE CONTACTO PROPIO (.rf-contact-form) — reemplaza iframe GVAMAX
 * ========================================================================= */
.rf-contact-form {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 1.5rem;
}
.rf-contact-form .form-label {
    font-weight: 600;
    color: var(--rf-dark);
    font-size: .9rem;
    margin-bottom: .3rem;
}
.rf-contact-form .form-label .required {
    color: var(--rf-primary);
    margin-left: 2px;
}
.rf-contact-form .form-control {
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    padding: .65rem .85rem;
    font-size: .95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rf-contact-form .form-control:focus {
    border-color: var(--rf-primary);
    outline: none;
    box-shadow: 0 0 0 .2rem rgba(196,30,58,.15);
}
.rf-contact-form .form-control:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #dc3545;
}
.rf-contact-form textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* Honeypot — oculto a humanos pero accesible a bots */
.rf-contact-form .rf-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

/* Botón de submit */
.rf-contact-form .rf-contact-submit {
    background: var(--rf-primary);
    color: #fff;
    border: none;
    border-radius: .5rem;
    padding: .85rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    width: 100%;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.rf-contact-form .rf-contact-submit:hover:not(:disabled) {
    background: var(--rf-primary-dark);
    transform: translateY(-1px);
}
.rf-contact-form .rf-contact-submit:disabled {
    background: var(--rf-gray);
    cursor: wait;
    opacity: .85;
}
.rf-contact-form .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.rf-contact-form .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rfSpin .8s linear infinite;
}
@keyframes rfSpin {
    to { transform: rotate(360deg); }
}

/* Feedback de respuesta */
.rf-contact-form .rf-contact-feedback {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .9rem;
    text-align: center;
    animation: rfFadeUp .4s ease-out;
}
.rf-contact-form .rf-contact-feedback.is-success {
    background: rgba(40,167,69,.12);
    color: #1e7e34;
    border: 1px solid rgba(40,167,69,.3);
}
.rf-contact-form .rf-contact-feedback.is-error {
    background: rgba(220,53,69,.1);
    color: #b71d2b;
    border: 1px solid rgba(220,53,69,.3);
}

@media (max-width: 575.98px) {
    .rf-contact-form { padding: 1rem; }
}

/* =========================================================================
 *  DETALLE de propiedad (Detalle.php / detalle_empre.php)
 * ========================================================================= */
.detalle-hero {
    padding: 3rem 0 2.5rem;
    text-align: left;
}
.detalle-hero .badge-op {
    display: inline-block;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: .35rem 1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1rem;
}
.detalle-hero h1 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: .5rem;
}
.detalle-hero .lead {
    text-align: left;
    margin: 0;
    font-size: 1rem;
    opacity: .9;
}

.detalle-content {
    margin-top: -1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

/* CAROUSEL DE FOTOS */
.detalle-carousel {
    border-radius: var(--rf-radius);
    overflow: hidden;
    box-shadow: var(--rf-shadow-md);
    background: #f1f1f1;
    margin-bottom: 1.5rem;
}
.detalle-carousel .carousel-inner {
    background: #1a1a1a;
}
.detalle-carousel .item,
.detalle-carousel .carousel-item.active,
.detalle-carousel .carousel-item {
    /* anular .item legacy + permitir BS5 .carousel-item */
}
.detalle-carousel .item.active,
.detalle-carousel .item:first-child {
    display: block;
}
.detalle-carousel .carousel-inner > .item,
.detalle-carousel .carousel-inner > .carousel-item {
    text-align: center;
}
.detalle-carousel .carousel-inner img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}
.detalle-carousel .carousel-control-prev,
.detalle-carousel .carousel-control-next {
    width: 60px;
    opacity: .75;
}
.detalle-carousel .carousel-control-prev:hover,
.detalle-carousel .carousel-control-next:hover { opacity: 1; }
.detalle-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--rf-primary);
}
.detalle-carousel .carousel-caption { display: none !important; }

/* Si el carousel viejo emite .item (no .carousel-item), forzar comportamiento BS5 */
.detalle-carousel .carousel-inner > .item {
    position: relative;
    float: none;
    width: 100%;
}
.detalle-carousel .carousel-inner > .item:not(.active) {
    display: none;
}

/* SECCIONES DE INFO */
.detalle-section {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 1.75rem;
    box-shadow: var(--rf-shadow-sm);
    margin-bottom: 1.5rem;
}
.detalle-section h3 {
    color: var(--rf-dark);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 3px solid var(--rf-primary);
    display: inline-block;
}

/* GRID DE CARACTERÍSTICAS */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.features-grid .feature-item {
    background: var(--rf-light);
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.features-grid .feature-item > i {
    width: 44px;
    height: 44px;
    background: var(--rf-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.features-grid .feature-item span.label {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    color: var(--rf-gray);
    letter-spacing: .03em;
    margin-bottom: 2px;
}
.features-grid .feature-item strong {
    font-size: 1rem;
    color: var(--rf-dark);
}

/* DESCRIPCIÓN */
.descripcion-body {
    line-height: 1.7;
    color: var(--rf-dark);
    font-size: 1rem;
}
.descripcion-body br { content: ''; display: block; margin-bottom: .5rem; }

/* MAPA */
.map-wrapper {
    position: relative;
    border-radius: .5rem;
    overflow: hidden;
}
.map-wrapper iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}
.map-link {
    display: inline-block;
    margin-top: .75rem;
    color: var(--rf-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: .9rem;
}
.map-link:hover { text-decoration: underline; }

/* CARD DE PRECIO */
.precio-card {
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: #fff;
    border-radius: var(--rf-radius);
    padding: 2rem 1.75rem;
    box-shadow: var(--rf-shadow-md);
    margin-bottom: 1.5rem;
    position: sticky;
    top: 100px;
}
.precio-card .precio-label {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .85;
    margin-bottom: .5rem;
}
.precio-card .precio-valor {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    word-break: break-word;
}
.precio-card .share-row { display: flex; flex-direction: column; gap: .75rem; }
.precio-card .share-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    border-radius: .5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
.precio-card .share-btn.whatsapp {
    background: #25D366;
    color: #fff;
}
.precio-card .share-btn.email {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
}
.precio-card .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
    color: #fff;
}

/* CARD DE CONTACTO */
.contact-card {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 1.5rem 1.5rem .5rem;
    box-shadow: var(--rf-shadow-sm);
    margin-bottom: 1.5rem;
}
.contact-card h4 {
    color: var(--rf-dark);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.contact-card h4 i { color: var(--rf-primary); }
.contact-card p { color: var(--rf-gray); font-size: .9rem; margin-bottom: 1rem; }
.contact-card #container-contacto iframe {
    width: 100%;
    height: 480px;
    border: 0;
    border-radius: .5rem;
    display: block;
}

@media (max-width: 991.98px) {
    .precio-card { position: static; }
    .detalle-carousel .carousel-inner img { height: 340px; }
    .detalle-hero h1 { font-size: 1.5rem; }
    .detalle-hero { padding: 2rem 0 1.5rem; }
}
@media (max-width: 575.98px) {
    .detalle-carousel .carousel-inner img { height: 240px; }
    .detalle-section { padding: 1.25rem; }
    .features-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .features-grid .feature-item { padding: .75rem; }
    .features-grid .feature-item > i { width: 36px; height: 36px; font-size: 1rem; }
    .precio-card .precio-valor { font-size: 1.5rem; }
    .contact-card #container-contacto iframe { height: 450px; }
}

/* =========================================================================
 *  COMING SOON / EN CONSTRUCCIÓN (Consorcios.php)
 * ========================================================================= */
.coming-soon-card {
    background: #fff;
    border-radius: var(--rf-radius);
    padding: 3.5rem 2rem;
    text-align: center;
    box-shadow: var(--rf-shadow-md);
    max-width: 760px;
    margin: 0 auto 3rem;
    position: relative;
    overflow: hidden;
}
.coming-soon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rf-primary) 0%, var(--rf-primary-light) 50%, var(--rf-primary) 100%);
    background-size: 200% 100%;
    animation: rfBarShift 3s ease-in-out infinite;
}
.coming-soon-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: #fff;
    font-size: 3.5rem;
    position: relative;
    box-shadow: 0 8px 24px rgba(196,30,58,.35);
    animation: rfPulse 2.5s ease-in-out infinite;
}
.coming-soon-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid var(--rf-primary);
    opacity: 0;
    animation: rfRipple 2.5s ease-out infinite;
}
.coming-soon-card h1 {
    color: var(--rf-dark);
    font-weight: 800;
    font-size: 2.25rem;
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.coming-soon-card .badge-soon {
    display: inline-block;
    background: rgba(196,30,58,.1);
    color: var(--rf-primary);
    padding: .35rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1.5rem;
}
.coming-soon-card .lead-text {
    color: var(--rf-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}
.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0 2.5rem;
    text-align: left;
}
.coming-soon-feature {
    background: var(--rf-light);
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .95rem;
    color: var(--rf-dark);
}
.coming-soon-feature i {
    color: var(--rf-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.coming-soon-card .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}
.coming-soon-card .btn-cta {
    padding: .75rem 1.75rem;
    border-radius: .5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.coming-soon-card .btn-cta.primary {
    background: var(--rf-primary);
    color: #fff;
    border: 2px solid var(--rf-primary);
}
.coming-soon-card .btn-cta.primary:hover {
    background: var(--rf-primary-dark);
    border-color: var(--rf-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--rf-shadow-md);
}
.coming-soon-card .btn-cta.outline {
    background: transparent;
    color: var(--rf-primary);
    border: 2px solid var(--rf-primary);
}
.coming-soon-card .btn-cta.outline:hover {
    background: var(--rf-primary);
    color: #fff;
    transform: translateY(-2px);
}

@keyframes rfPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(196,30,58,.35); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(196,30,58,.5); }
}
@keyframes rfRipple {
    0% { opacity: .8; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
}
@keyframes rfBarShift {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

@media (max-width: 575.98px) {
    .coming-soon-card { padding: 2.5rem 1.25rem; }
    .coming-soon-icon { width: 90px; height: 90px; font-size: 2.5rem; }
    .coming-soon-card h1 { font-size: 1.6rem; }
    .coming-soon-card .lead-text { font-size: 1rem; }
}

/* =========================================================================
 *  UTILS — Anular estilos legacy que se ven feos
 * ========================================================================= */
.col-md-12[align="center"],
.col-md-7[align="center"],
[align="center"] { text-align: center; }
[align="left"] { text-align: left; }
[align="right"] { text-align: right; }
[align="justify"] { text-align: justify; }

/* Removemos bordes y aire de tablas legacy */
#news table { border: none !important; }
#news table td { border: none; padding: .25rem 0; }
