/* Estilos para Alerce Inmobiliaria (sitio público, venta de parcelas) */

/* Paleta premium Alerce: bosque, arena, verde oscuro, dorado, blanco limpio */
:root {
    --primary-color: #4E6F38;
    --primary-hover: #3d5830;
    --primary-rgb: 78, 111, 56;
    --secondary-color: #C4A46A;
    --secondary-hover: #b09255;
    --secondary-rgb: 196, 164, 106;
    --accent-highlight: #2E4A28;
    --accent-highlight-light: #4E6F38;
    --accent-highlight-rgb: 46, 74, 40;
    --color-sand: #EFE8D8;
    --color-sand-dark: #e0d6c4;
    --sky-blue: #EFE8D8;
    --sky-pale: #FAFAF7;
    --cloud-white: #FAFAF7;
    --dark-color: #2E4A28;
    --light-gray: #5a6b52;
    --bg-light: #EFE8D8;
    --bg-white: #FAFAF7;
    --top-bar-bg: var(--accent-highlight);
    /* Alineación con utilidades Bootstrap 5 */
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: var(--primary-rgb);
    --bs-info: var(--accent-highlight);
    --bs-info-rgb: var(--accent-highlight-rgb);
    /* Tipografía sitio (misma familia que el hero) */
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-font-family: var(--font-sans);
    --bs-font-sans-serif: var(--font-sans);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5em;
    font-weight: normal;
    color: var(--dark-color);
    background: var(--cloud-white);
    background-attachment: scroll;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2em;
    color: var(--dark-color);
    margin: 0 0 20px;
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

.font-serif {
    font-family: var(--font-serif);
}

/* Bootstrap: heredar fuentes del sitio */
.navbar, .btn, .form-control, .form-select, .breadcrumb, .alert, .card, .modal {
    font-family: var(--font-sans);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }
h5 { font-size: 18px; }
h6 { font-size: 14px; }

a {
    color: var(--primary-color);
    text-decoration: none;
    outline: none !important;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--accent-highlight);
    text-decoration: none;
}

.theme-color {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header - Banner 1: no fijo, se desliza con la página */
.main-header {
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* Banner landing (solo en index): transparente sobre el hero, logo y texto blanco (como original header-style-v2) */
.main-header--hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 1000;
}
body.page-index main {
    padding-top: 0;
}
.main-header--hero .navbar {
    background: rgba(20, 28, 18, 0.22) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    --bs-navbar-color: rgba(255, 255, 255, 0.95);
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
}
.main-header--hero .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
}
.main-header--hero .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    opacity: 1;
}
/* Logo rincón superior izquierdo (banner hero), sin animación, tamaño 80x80 */
#header-landing .header-logo-hero-small {
    filter: none;
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}
.main-header--hero .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-header--hero .navbar-toggler {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Móvil: banner blanco fijo desde el primer ingreso (como sitio de referencia) */
@media (max-width: 768px) {
    body.page-index .main-header--hero {
        position: relative;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
    body.page-index .main-header--hero .navbar {
        background: #fff !important;
    }
    body.page-index .main-header--hero .navbar-nav .nav-link {
        color: var(--dark-color) !important;
    }
    body.page-index .main-header--hero .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
    }
    body.page-index .main-header--hero .header-logo-img {
        filter: none;
    }
    body.page-index .main-header--hero .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    body.page-index .main-header--hero .navbar-toggler {
        border-color: rgba(0, 0, 0, 0.3) !important;
    }
}

/* Banner en páginas internas (mismo header, estilo blanco) */
.main-header--scrolled {
    background: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.main-header--scrolled .nav-link {
    color: var(--dark-color) !important;
}

/* Botón CONTÁCTANOS: estilo original (font 13px, altura ~44px, con icono) */
.btn-contactanos {
    background: var(--primary-color);
    color: #fff !important;
    font-weight: 500;
    font-size: 13px;
    padding: 0 24px;
    height: 44px;
    line-height: 42px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-contactanos:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}
.btn-contactanos i {
    font-size: 15px;
    transition: transform 0.2s ease;
}
.btn-contactanos:hover i {
    transform: translateX(4px);
}

/* Banner 2: fijo, aparece al hacer scroll; fondo blanco, texto oscuro */
.main-header--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.main-header--fixed .nav-link--dark {
    color: var(--dark-color) !important;
    font-weight: 500;
}
.main-header--fixed .nav-link--dark:hover {
    color: var(--primary-color) !important;
}
.main-header--fixed .header-logo-img {
    filter: none;
}
.main-header--fixed.main-header--hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

.navbar-brand img,
.header-logo-img {
    max-height: 60px;
    height: auto;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 10px 15px !important;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section - Gradiente como el original con imagen de fondo */
.hero-section {
    background: linear-gradient(135deg, rgba(45, 157, 82, 0.88) 0%, rgba(78, 179, 211, 0.82) 100%),
                url('../images/hero-bg.jpg') center center / cover no-repeat;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 157, 82, 0.82) 0%, rgba(78, 179, 211, 0.78) 100%);
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,200 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: #ffffff;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease;
}

.hero-section .lead {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease;
}

/* Propiedades Destacadas */
.featured-properties {
    padding: 80px 0;
    background: var(--cloud-white);
}

.featured-properties h2 {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.featured-properties h2 .theme-color {
    color: var(--accent-highlight) !important;
}

.featured-properties h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-highlight), var(--accent-highlight-light));
    border-radius: 2px;
}

/* Property Cards */
.property-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-white);
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease;
    animation-fill-mode: both;
    position: relative;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }

.property-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.property-card .card-img-top {
    position: relative;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 280px;
    object-fit: cover;
    width: 100%;
    display: block;
}

.property-card:hover .card-img-top {
    transform: scale(1.15);
}

.property-card .card-img-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(var(--primary-rgb), 0.22) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.property-card:hover .card-img-top::after {
    opacity: 1;
}

.property-card .card-body {
    padding: 18px 20px;
}

.property-card .badge {
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background-color: var(--primary-color) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, var(--accent-highlight) 0%, var(--accent-highlight-light) 100%) !important;
}

.property-card .card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-highlight);
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 50px;
}

.property-card .text-muted {
    color: var(--light-gray) !important;
    font-size: 14px;
    margin-bottom: 15px;
}

.property-details {
    font-size: 14px;
    color: var(--light-gray);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.property-details i {
    margin-right: 5px;
    color: var(--primary-color);
    font-size: 16px;
}

/* Precio de propiedad: azul R19 G79 B120 */
.precio-propiedad {
    color: var(--accent-highlight) !important;
    font-weight: 700;
    margin-bottom: 20px;
}
.property-card .precio-propiedad {
    font-size: 24px;
}
.card-body .precio-propiedad,
.property-details-card .precio-propiedad {
    font-size: 1.75rem;
}

.property-card .text-primary {
    color: var(--primary-color) !important;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.property-card .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.property-card .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.35);
}

/* Bloque Bienvenidos */
.welcome-section {
    padding: 4rem 0;
    background: var(--color-sand);
}

.welcome-section__title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.2;
    color: var(--accent-highlight);
    text-align: center;
    margin-bottom: 1rem;
}

.welcome-section__p {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    color: var(--light-gray);
    line-height: 1.75;
    margin: 0;
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Sección Nosotros */
.about-section {
    padding: 5rem 0;
    background: var(--cloud-white);
}

.about-section__title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.2;
    color: var(--accent-highlight);
    font-weight: 600;
    margin: 0 0 1.5rem;
    text-align: center;
}

.about-section__p {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.0625rem;
    color: var(--light-gray);
    line-height: 1.75;
    margin-bottom: 1.25rem;
    text-align: center;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.about-section__p:last-of-type {
    margin-bottom: 0;
}

.about-section__name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-highlight);
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.about-section .profile-image-wrapper {
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.about-section .profile-image {
    border-radius: 0;
}

/* Servicios — tarjetas premium, misma jerarquía tipográfica que el hero */
.services-section {
    padding: 5rem 0 5.5rem;
    background: linear-gradient(180deg, var(--cloud-white) 0%, var(--color-sand) 50%, var(--color-sand) 100%);
}

.services-section .section-heading-premium {
    margin-bottom: 0.75rem;
}

.services-section .section-subheading-premium {
    margin-bottom: 3rem;
}

.services-grid {
    --bs-gutter-x: 1.75rem;
    --bs-gutter-y: 1.75rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    height: 100%;
    border: 1px solid rgba(46, 74, 40, 0.08);
    box-shadow: 0 8px 28px rgba(46, 74, 40, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(46, 74, 40, 0.12);
    border-color: rgba(78, 111, 56, 0.2);
}

.service-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--accent-highlight) 100%);
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.service-card__icon--gold {
    background: linear-gradient(145deg, var(--secondary-color) 0%, #a88b4e 100%);
    color: var(--accent-highlight);
}

.service-card__title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--accent-highlight);
    margin: 0 0 0.85rem;
    text-align: left;
}

.service-card__text {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--light-gray);
    line-height: 1.75;
    text-align: left;
    margin: 0;
    flex: 1;
}

.service-card__accent {
    display: block;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    margin-top: 1.25rem;
}

/* Compatibilidad si quedan clases antiguas */
.services-section__main-title {
    font-family: var(--font-serif);
}

.services-block__title {
    font-family: var(--font-serif);
}

.services-block__p {
    font-family: var(--font-sans);
}

/* Sección Contáctanos */
.contact-section {
    background: linear-gradient(160deg, var(--accent-highlight) 0%, #243d20 100%);
    color: #ffffff;
}
.contact-section__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}
.contact-section .btn-contactanos {
    background: var(--primary-color);
    color: #fff !important;
}

/* Botón "Contactar por WhatsApp" en sección contacto: verde corporativo WhatsApp */
.contact-section .btn-whatsapp-cta {
    background: #25D366 !important;
    color: #fff !important;
    border: none;
}
.contact-section .btn-whatsapp-cta:hover {
    background: #20BA5A !important;
    color: #fff !important;
}

/* Footer */
.main-footer {
    background: linear-gradient(180deg, var(--accent-highlight) 0%, #1f3320 100%) !important;
    color: #ffffff;
    padding: 60px 0 30px;
}

.main-footer h5,
.main-footer .widget-title {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: var(--font-sans);
}

.main-footer .footer-brand-title {
    font-family: var(--font-serif);
}

.main-footer h5:first-child,
.main-footer .footer-brand-title {
    color: #ffffff;
}

.main-footer .footer-horario-title {
    color: #ffffff !important;
}

.main-footer a {
    color: #cccccc;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--primary-color) !important;
}

.main-footer .list-unstyled li {
    margin-bottom: 10px;
}

.main-footer .footer-brand-logo {
    max-height: 72px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.main-footer .footer-credits-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-section .lead {
        font-size: 16px;
    }
    
    .featured-properties,
    .about-section,
    .services-section {
        padding: 50px 0;
    }
    
    .featured-properties h2,
    .services-section h2 {
        font-size: 28px;
    }
}

/* Efectos adicionales */
.property-card {
    position: relative;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-highlight), var(--accent-highlight-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.property-card:hover::before {
    transform: scaleX(1);
}

/* Botones */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.35);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* ============================================================================
   RESPONSIVE DESIGN - Inteligencia de Negocios
   ============================================================================ */

/* Ajustes para móviles */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1 { font-size: 32px; }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }
    h4 { font-size: 20px; }
    
    .property-card {
        margin-bottom: 20px;
    }
    
    .card-img-top {
        height: 200px !important;
    }
    
    .hero-slider {
        height: 48vh;
        min-height: 333px;
    }
    
    .hero-content {
        padding-top: 36vh;
        padding-right: 0;
        padding-bottom: 16px;
        padding-left: 0;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-slider {
        height: 384px;
    }
    
    .property-card {
        margin-bottom: 25px;
    }
}

/* Mejoras de accesibilidad y usabilidad */
.btn-action:focus,
.whatsapp-float-btn:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}

/* Animaciones suaves para interacciones */
.property-card,
.btn-action,
.whatsapp-float {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras de contraste para legibilidad */
.text-muted {
    color: #6c757d !important;
}

.badge {
    font-weight: 600;
    padding: 6px 12px;
}

/* Loading animation para imágenes */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img.loading {
    opacity: 0;
}

/* Animación de entrada escalonada para tarjetas */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card {
    animation: slideInUp 0.6s ease backwards;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }
.property-card:nth-child(4) { animation-delay: 0.4s; }
.property-card:nth-child(5) { animation-delay: 0.5s; }
.property-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   Landing premium (referencia mockup)
   ========================================================================== */
.page-index .hero-slider {
    height: min(88vh, 720px);
    min-height: 480px;
}

.hero-content--premium {
    background: linear-gradient(to top, rgba(46, 74, 40, 0.82) 0%, rgba(46, 74, 40, 0.35) 45%, transparent 100%);
    padding: 2rem 0 5.5rem;
}

.hero-title--premium {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
    max-width: 14ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-tagline--premium {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 2vw, 1.125rem);
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.btn-hero-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: #fff !important;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.2s;
}

.btn-hero-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-hero-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff !important;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
}

.hero-subtagline {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.6vw, 0.95rem);
    max-width: 36rem;
    margin: 0.5rem auto 0;
    letter-spacing: 0.01em;
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
    margin-top: 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0.01em;
    opacity: 0.95;
}

.hero-trust-row span i {
    color: var(--secondary-color);
}

.hero-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-search-wrap {
    position: relative;
    z-index: 10;
    margin-top: -3.5rem;
    margin-bottom: 3rem;
}

/* Buscador premium minimalista: aire, bordes suaves, sombras sutiles */
.hero-search-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    box-shadow:
        0 1px 2px rgba(46, 74, 40, 0.04),
        0 8px 24px rgba(46, 74, 40, 0.08),
        0 24px 60px rgba(46, 74, 40, 0.06);
    padding: 0.85rem 1rem;
    border: 1px solid rgba(46, 74, 40, 0.06);
}

.hero-search-card .form-label {
    font-size: 0.7rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(78, 86, 70, 0.65) !important;
    margin-bottom: 0.35rem !important;
}

.hero-search-card .form-select,
.hero-search-card .form-control {
    border-radius: 12px;
    border: 1px solid rgba(46, 74, 40, 0.1);
    background: transparent;
    font-size: 0.92rem;
    font-family: var(--font-sans);
    color: var(--accent-highlight);
    height: 44px;
    padding: 0 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search-card .form-select:hover,
.hero-search-card .form-control:hover {
    border-color: rgba(46, 74, 40, 0.2);
    background: rgba(239, 232, 216, 0.18);
}

.hero-search-card .form-select:focus,
.hero-search-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 111, 56, 0.12);
    background: #fff;
}

.btn-search-parcelas {
    background: var(--accent-highlight);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    height: 44px;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 16px rgba(46, 74, 40, 0.18);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-search-parcelas:hover {
    background: #243d20;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(46, 74, 40, 0.25);
}

@media (max-width: 768px) {
    .hero-search-wrap {
        margin-top: -2rem;
        padding: 0 0.5rem;
    }
    .hero-search-card { padding: 1rem; border-radius: 14px; }
}

.section-heading-premium {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--accent-highlight);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subheading-premium {
    font-family: var(--font-sans);
    text-align: center;
    color: var(--light-gray);
    max-width: 32rem;
    margin: 0 auto 2.5rem;
}

.trust-band {
    background: var(--accent-highlight);
    color: #fff;
    padding: 3.5rem 0;
}

.trust-band__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    text-align: center;
    margin-bottom: 0.5rem;
    color: #fff;
}

.trust-band__lead {
    font-family: var(--font-sans);
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    max-width: 40rem;
    margin: 0 auto 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.trust-band__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.trust-band__item {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.4;
}

.trust-band__item i {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.65rem;
    color: var(--secondary-color);
}

.lead-capture-section {
    background: var(--color-sand);
    padding: 4rem 0;
}

.lead-capture-box {
    background: var(--accent-highlight);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
}

.lead-capture-box h3 {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 1.5rem;
}

.lead-capture-box .btn-gold {
    background: var(--secondary-color);
    border: none;
    color: var(--accent-highlight);
    font-weight: 700;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
}

.lead-capture-box .btn-gold:hover {
    background: var(--secondary-hover);
    color: var(--accent-highlight);
}

.testimonial-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid rgba(46, 74, 40, 0.08);
    box-shadow: 0 4px 20px rgba(46, 74, 40, 0.06);
}

.testimonial-card p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: #4a5548;
    font-style: italic;
}

.navbar-cta-visit {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem !important;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
    height: auto;
    line-height: 1.3;
}

.navbar-cta-visit:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #fff !important;
}

.main-header--hero .navbar-cta-visit {
    margin-left: 0.5rem;
}

/* Tarjeta de proyecto premium: imagen protagonista */
.project-card-premium {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(46, 74, 40, 0.1);
    border: 1px solid rgba(46, 74, 40, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(46, 74, 40, 0.14);
}

.project-card-premium__media {
    display: block;
    position: relative;
    overflow: hidden;
    /* Mismo aspect-ratio que el visor de la vista de detalle (.detail-gallery__media),
       para que la imagen de portada se vea EXACTAMENTE igual en la tarjeta y al
       hacer clic. Antes era 4/3 + object-fit:cover, lo que recortaba las
       láminas/fichas comerciales (donde se pierde texto/datos) y forzaba
       inconsistencia entre tarjeta y detalle. */
    aspect-ratio: 16 / 9;
    background: var(--color-sand-dark);
}

.project-card-premium__media img,
.project-card-premium__media .project-card-premium__placeholder {
    width: 100%;
    height: 100%;
    /* `contain` evita recortar la imagen: las fichas comerciales se ven
       completas (con leve letterbox sobre el sand-dark cuando no llenan el
       frame). Las fotos nativas en 16:9 llenan exactamente sin barras. */
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s ease;
}

.project-card-premium:hover .project-card-premium__media img {
    transform: scale(1.06);
}

.project-card-premium__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    z-index: 2;
}

.project-card-premium__body {
    padding: 1.25rem 1.35rem 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header de la tarjeta: título + slogan con altura fija para alinear el resto
   de los elementos entre tarjetas (1 línea de título vs 2 no debe descuadrar). */
.project-card-premium__heading {
    margin-bottom: 0.35rem;
}

.project-card-premium__title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-highlight);
    line-height: 1.3;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* 2 líneas siempre, aunque solo haya 1 (1.2rem * 1.3 * 2 = 3.12rem) */
    min-height: calc(1.2rem * 1.3 * 2);
}

/* Slogan comercial: aparece bajo el título; 2 líneas máx, altura reservada
   aunque el aviso no tenga slogan, para mantener la alineación entre tarjetas. */
.project-card-premium__slogan {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    color: #B5532E; /* Ladrillo terracota */
    font-style: italic;
    line-height: 1.4;
    margin: 0 0 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Reserva 2 líneas siempre (0.88rem * 1.4 * 2 = 2.464rem) */
    min-height: calc(0.88rem * 1.4 * 2);
}

.project-card-premium__slogan:empty::before {
    content: "\00a0"; /* placeholder invisible para conservar altura */
}

.project-card-premium__location {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--light-gray);
    margin-bottom: 0.75rem;
}

.project-card-premium__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-bottom: 0.75rem;
}

.project-card-premium__chips i {
    color: var(--primary-color);
    margin-right: 0.2rem;
}

.project-card-premium__price {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-highlight);
    margin-bottom: 1rem;
    margin-top: auto;
}

.project-card-premium__actions {
    display: flex;
    gap: 0.5rem;
}

.project-card-premium__actions .btn {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.project-card-premium__actions .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.project-card-premium__actions .btn-outline-premium {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.project-card-premium__actions .btn-outline-premium:hover {
    background: var(--primary-color);
    color: #fff;
}

.propiedades-page-header {
    background: var(--color-sand);
    padding: 2.5rem 0 1rem;
    margin-bottom: 0;
}

.propiedades-page-header h1 {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
}

.propiedades-filters-card {
    border-radius: 16px;
    border: 1px solid rgba(46, 74, 40, 0.08);
    box-shadow: 0 4px 24px rgba(46, 74, 40, 0.06);
}

@media (max-width: 768px) {
    .hero-search-wrap {
        margin-top: -2rem;
    }
    .hero-content--premium {
        padding-bottom: 4.5rem;
    }
    .hero-trust-row {
        gap: 0.75rem 1rem;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   Landing comercial Alerce: nosotros, estilo de vida, mapa, testimonios,
   lead magnet y footer premium
   ========================================================================== */

/* Nosotros (versión comercial corta) */
.about-section--premium {
    background: var(--bg-white);
    padding: 4rem 0 3rem;
}
.about-section--premium .section-heading-premium {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}
.about-section__lead {
    font-size: 1.05rem;
    color: var(--light-gray);
    max-width: 38rem;
    margin: 0.75rem auto 0;
    line-height: 1.6;
}

/* Botón outline premium usado en CTAs secundarios */
.btn-outline-premium {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}
.btn-outline-premium:hover {
    background: var(--primary-color);
    color: #fff !important;
}

/* ==========================================================================
   Sección "Elige tu estilo de vida"
   ========================================================================== */
.lifestyle-section {
    background: var(--color-sand);
    padding: 4.5rem 0;
}

.lifestyle-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
}

.lifestyle-card {
    position: relative;
    display: block;
    background: var(--color-sand-dark);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    flex: 0 0 100%;
    max-width: 100%;
    box-shadow: 0 6px 28px rgba(46, 74, 40, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(46, 74, 40, 0.05);
}

.lifestyle-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(46, 74, 40, 0.14);
    color: inherit;
}

/* Variante imagen pura: el título/texto van integrados dentro del PNG */
.lifestyle-card--image {
    aspect-ratio: 1484 / 1060;
}

.lifestyle-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.lifestyle-card--image:hover .lifestyle-card__img {
    transform: scale(1.04);
}

/* Compatibilidad si quedaran cards antiguas con body/overlay */
.lifestyle-card__media {
    position: relative;
    height: 220px;
    background-color: var(--color-sand-dark);
    background-size: cover;
    background-position: center;
}

.lifestyle-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(46, 74, 40, 0.05) 0%, rgba(46, 74, 40, 0.45) 100%);
}

.lifestyle-card__body {
    padding: 1.25rem 1.4rem 1.5rem;
}

.lifestyle-card__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-highlight);
    margin: 0 0 0.4rem;
}

.lifestyle-card__text {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--light-gray);
    margin: 0;
    line-height: 1.5;
}

@media (min-width: 576px) {
    .lifestyle-card {
        flex: 0 0 calc(50% - 0.875rem);
        max-width: calc(50% - 0.875rem);
    }
}

@media (min-width: 992px) {
    .lifestyle-card {
        flex: 0 0 calc(33.333% - 1.167rem);
        max-width: calc(33.333% - 1.167rem);
    }
    .lifestyle-card__media { height: 200px; }
}

@media (min-width: 1400px) {
    .lifestyle-card {
        flex: 0 0 calc(20% - 1.4rem);
        max-width: calc(20% - 1.4rem);
    }
}

/* ==========================================================================
   Tarjeta de proyecto: superficie + atributos comerciales
   ========================================================================== */
.project-card-premium__surface {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--accent-highlight);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.project-card-premium__surface i {
    color: var(--primary-color);
    margin-right: 0.35rem;
}

.project-card-premium__attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 0.85rem;
}

.project-card-premium__attr {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent-highlight);
    background: rgba(196, 164, 106, 0.18);
    border: 1px solid rgba(196, 164, 106, 0.45);
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
}

.project-card-premium__placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-highlight));
}

/* ==========================================================================
   Sección "Por qué comprar con Alerce" (services_section)
   ========================================================================== */
.why-alerce-section {
    background: var(--bg-white);
    padding: 4.5rem 0;
}

.why-alerce-section .service-card--why {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(46, 74, 40, 0.07);
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 4px 18px rgba(46, 74, 40, 0.05);
    text-align: left;
}

.why-alerce-section .service-card--why:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(46, 74, 40, 0.1);
    border-color: rgba(196, 164, 106, 0.45);
}

.why-alerce-section .service-card__icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(78, 111, 56, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.1rem;
}

.why-alerce-section .service-card__icon--gold {
    background: rgba(196, 164, 106, 0.18);
    color: var(--secondary-color);
}

.why-alerce-section .service-card__title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--accent-highlight);
    margin-bottom: 0.5rem;
}

.why-alerce-section .service-card__text {
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: var(--light-gray);
    line-height: 1.55;
    margin: 0;
}

/* ==========================================================================
   Sección Mapa ubicaciones
   ========================================================================== */
.map-locations-section {
    background: var(--bg-white);
    padding: 4.5rem 0;
}

.map-locations-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(46, 74, 40, 0.12);
    border: 1px solid rgba(46, 74, 40, 0.08);
}

.map-locations-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: linear-gradient(135deg, #efe8d8 0%, #d9d2bf 100%);
}

.map-locations-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-locations-card__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--accent-highlight);
    font-family: var(--font-sans);
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-sand) 0%, var(--color-sand-dark) 100%);
}

.map-locations-card__fallback i {
    font-size: 4rem;
    color: var(--primary-color);
}

.map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
    animation: mapPinDrop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--pin-delay, 0s);
}

.map-pin__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(196, 164, 106, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: mapPinPulse 2.4s ease-in-out infinite;
    animation-delay: var(--pin-delay, 0s);
    z-index: 2;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.map-pin__ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    animation: mapPinRipple 2.4s ease-out infinite;
    animation-delay: var(--pin-delay, 0s);
    pointer-events: none;
    z-index: 1;
}

.map-pin:hover .map-pin__dot {
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 0 0 6px rgba(196, 164, 106, 0.45), 0 6px 16px rgba(0, 0, 0, 0.35);
}

@keyframes mapPinDrop {
    0%   { opacity: 0; transform: translate(-50%, -180%) scale(0.4); }
    60%  { opacity: 1; transform: translate(-50%, -45%)  scale(1.05); }
    100% { opacity: 1; transform: translate(-50%, -50%)  scale(1); }
}

@keyframes mapPinPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(196, 164, 106, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3); }
    50%      { box-shadow: 0 0 0 8px rgba(196, 164, 106, 0.15), 0 4px 12px rgba(0, 0, 0, 0.35); }
}

@keyframes mapPinRipple {
    0%   { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
    80%  { opacity: 0;    transform: translate(-50%, -50%) scale(4.5); }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(4.5); }
}

.map-pin__label {
    position: absolute;
    top: calc(50% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 74, 40, 0.92);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-pin:hover .map-pin__label {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .map-pin,
    .map-pin__dot,
    .map-pin__ripple { animation: none !important; }
}

.map-locations-card__legend {
    list-style: none;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: var(--color-sand);
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--accent-highlight);
}
.map-locations-card__legend i {
    color: var(--primary-color);
    margin-right: 0.4rem;
}

@media (max-width: 576px) {
    .map-pin__label  { font-size: 0.62rem; padding: 2px 7px; }
    .map-pin__dot    { width: 12px; height: 12px; }
    .map-pin__ripple { width: 12px; height: 12px; }
}

/* ==========================================================================
   Testimonios rediseñados
   ========================================================================== */
.testimonials-section {
    background: var(--color-sand);
    padding: 4.5rem 0;
}

.testimonials-section .testimonial-card {
    position: relative;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 16px;
    background: var(--bg-white);
    border: 1px solid rgba(46, 74, 40, 0.08);
    box-shadow: 0 6px 20px rgba(46, 74, 40, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.testimonial-card__quote {
    color: var(--secondary-color);
    font-size: 1.5rem;
    opacity: 0.7;
}

.testimonials-section .testimonial-card p {
    color: var(--dark-color);
    font-style: normal;
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0;
}

.testimonial-card__author {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(46, 74, 40, 0.1);
    font-family: var(--font-sans);
}
.testimonial-card__author strong {
    color: var(--accent-highlight);
    font-size: 0.95rem;
}
.testimonial-card__author span {
    color: var(--light-gray);
    font-size: 0.82rem;
}

/* ==========================================================================
   Lead magnet pre-footer
   ========================================================================== */
.lead-magnet-section {
    background: var(--bg-white);
    padding: 4.5rem 0;
}

.lead-magnet-card {
    background: linear-gradient(135deg, var(--accent-highlight) 0%, var(--primary-color) 100%);
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 16px 40px rgba(46, 74, 40, 0.25);
}

.lead-magnet-card__intro {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.lead-magnet-card__eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--secondary-color);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
}
.lead-magnet-card__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.lead-magnet-card__lead {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-sans);
    margin-bottom: 1.2rem;
}
.lead-magnet-card__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
}
.lead-magnet-card__bullets i {
    color: var(--secondary-color);
    margin-right: 0.45rem;
}

.lead-magnet-card__form {
    background: var(--bg-white);
    color: var(--dark-color);
    padding: 2.25rem;
}
.lead-magnet-card__form .form-label {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--accent-highlight);
    font-size: 0.85rem;
}
.lead-magnet-card__form .form-control,
.lead-magnet-card__form .form-select {
    border-color: var(--color-sand-dark);
    border-radius: 10px;
    font-family: var(--font-sans);
}
.lead-magnet-card__form .form-control:focus,
.lead-magnet-card__form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(78, 111, 56, 0.18);
}

.btn-lead-cta {
    background: var(--secondary-color);
    border: none;
    color: var(--accent-highlight);
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.2s;
}
.btn-lead-cta:hover {
    background: var(--secondary-hover);
    color: var(--accent-highlight);
    transform: translateY(-1px);
}

.lead-magnet-card__note {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--light-gray);
    margin: 0.85rem 0 0;
    text-align: center;
}

@media (max-width: 992px) {
    .lead-magnet-card__intro { padding: 2rem 1.75rem; }
    .lead-magnet-card__form { padding: 1.75rem; }
}

/* ==========================================================================
   Footer premium — verde oscuro profundo + acento dorado
   ========================================================================== */
.main-footer--premium {
    position: relative;
    background:
        radial-gradient(ellipse at top right, rgba(196, 164, 106, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #243d20 0%, #15291a 100%);
    color: #fff;
    padding: 5rem 0 2rem;
    margin-top: 0;
    overflow: hidden;
}

/* Regla dorada superior premium */
.main-footer--premium .footer-gold-rule {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--secondary-color, #c4a46a) 25%,
        var(--secondary-color, #c4a46a) 75%,
        transparent 100%);
    opacity: 0.85;
}

.main-footer--premium .footer-col { padding: 0 0.5rem; }

/* ---------- Columna izquierda: marca ---------- */
.main-footer--premium .footer-brand-logo {
    max-width: 120px;
    height: auto;
    opacity: 0.95;
}
.main-footer--premium .footer-brand-name {
    font-family: var(--font-serif);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0.25rem 0 0.85rem;
    letter-spacing: 0.005em;
}
.main-footer--premium .footer-brand-text {
    font-family: var(--font-sans);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 0;
    max-width: 32ch;
}
.main-footer--premium .footer-brand-text--soft {
    display: inline-block;
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
}

/* ---------- Títulos de sección ---------- */
.main-footer--premium .footer-widget-title {
    font-family: var(--font-serif);
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 1.35rem;
    position: relative;
    padding-bottom: 0.65rem;
}
.main-footer--premium .footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 1px;
    background: var(--secondary-color);
    opacity: 0.55;
}
.main-footer--premium .footer-col--cta .footer-widget-title {
    text-transform: none;
    letter-spacing: 0.005em;
    font-size: 1.15rem;
    color: #fff;
}
.main-footer--premium .footer-col--cta .footer-widget-title::after {
    background: var(--secondary-color);
    opacity: 0.85;
    width: 40px;
}

/* ---------- Listas (contacto + menú) ---------- */
.main-footer--premium .footer-contact-list li {
    margin-bottom: 0.7rem;
    font-family: var(--font-sans);
    font-size: 0.93rem;
}
.main-footer--premium .footer-contact-list a,
.main-footer--premium .footer-contact-list span {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.main-footer--premium .footer-contact-list a:hover {
    color: var(--secondary-color);
    transform: translateX(2px);
}
.main-footer--premium .footer-contact-list i {
    color: var(--secondary-color);
    width: 1.1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------- CTA premium ---------- */
.main-footer--premium .footer-cta-text {
    font-family: var(--font-sans);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 1.4rem;
    max-width: 30ch;
}
.main-footer--premium .footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--secondary-color, #c4a46a);
    color: #1a2e1a !important;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.main-footer--premium .footer-cta-btn:hover {
    background: #d4b67c;
    color: #1a2e1a !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}
.main-footer--premium .footer-cta-btn i {
    transition: transform 0.25s ease;
    font-size: 0.85rem;
}
.main-footer--premium .footer-cta-btn:hover i {
    transform: translateX(4px);
}

/* ---------- Menú secundario inline (debajo del CTA) ---------- */
.main-footer--premium .footer-menu-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.main-footer--premium .footer-menu-inline li {
    margin: 0;
    font-family: var(--font-sans);
}
.main-footer--premium .footer-menu-inline a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.83rem;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}
.main-footer--premium .footer-menu-inline a:hover {
    color: var(--secondary-color);
}

/* ---------- Redes sociales ---------- */
.main-footer--premium .footer-social {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.4rem;
}
.main-footer--premium .footer-social__link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.main-footer--premium .footer-social__link:hover {
    background: var(--secondary-color);
    color: #1a2e1a;
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

/* ---------- Divider y bottom bar ---------- */
.main-footer--premium .footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3.5rem 0 1.5rem;
}
.main-footer--premium .footer-bottom-bar {
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}
/* Crédito "Desarrollado por" — sello editorial limpio */
.main-footer--premium .footer-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 0.85;
}
.main-footer--premium .footer-credits:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.main-footer--premium .footer-credits__label {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.main-footer--premium .footer-credits__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(196, 164, 106, 0.25) inset;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
.main-footer--premium .footer-credits:hover .footer-credits__badge {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(196, 164, 106, 0.55) inset;
}
.main-footer--premium .footer-credits-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 767px) {
    .main-footer--premium .footer-credits {
        justify-content: center;
        width: 100%;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .main-footer--premium { padding: 4rem 0 2rem; }
    .main-footer--premium .footer-col { margin-bottom: 1.5rem; }
    .main-footer--premium .footer-divider { margin: 2.5rem 0 1.5rem; }
}
@media (max-width: 576px) {
    .main-footer--premium { padding: 3rem 0 1.5rem; }
    .main-footer--premium .footer-brand-name { font-size: 1.2rem; }
    .main-footer--premium .footer-cta-btn { width: 100%; justify-content: center; }
    .main-footer--premium .footer-menu-inline { gap: 0.4rem 1rem; }
}

/* Buscador hero: padding mejorado en móvil */
@media (max-width: 576px) {
    .hero-search-card {
        padding: 1rem;
    }
    .hero-search-card .form-label {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Listado de parcelas (/propiedades) — esquema premium
   ========================================================================== */

/* Hero del listado: foto de fondo, overlay verde y chips de confianza */
.listing-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    padding: 4rem 0 5rem;
}
.listing-hero__bg {
    position: absolute;
    inset: 0;
    background-color: var(--accent-highlight);
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.listing-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 74, 40, 0.78) 0%, rgba(78, 111, 56, 0.65) 60%, rgba(46, 74, 40, 0.55) 100%);
    z-index: 1;
}
.listing-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
}
.listing-hero__eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: var(--secondary-color);
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.listing-hero__title {
    font-family: var(--font-serif);
    color: #fff;
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 0.85rem;
}
.listing-hero__lead {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 1.5rem;
}
.listing-hero__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.4rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.92);
}
.listing-hero__chips span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.listing-hero__chips i {
    color: var(--secondary-color);
}

/* Buscador flotante sobre el hero (mismo card que el home pero más ancho) */
.listing-search-wrap {
    position: relative;
    z-index: 10;
    margin-top: -3rem;
    margin-bottom: 1.5rem;
}
.listing-search-card {
    padding: 1.5rem 1.75rem 1.25rem;
}
.listing-advanced-toggle {
    text-align: right;
    margin-top: 0.85rem;
}
.btn-advanced-toggle {
    background: none;
    border: 0;
    color: var(--primary-color);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
}
.btn-advanced-toggle:hover {
    color: var(--accent-highlight);
}
.btn-advanced-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

/* Pills de filtros activos */
.listing-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0 0.25rem;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-white);
    border: 1px solid var(--color-sand-dark);
    color: var(--accent-highlight);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-pill:hover {
    background: var(--color-sand);
    color: var(--accent-highlight);
    border-color: var(--secondary-color);
}
.filter-pill i {
    color: var(--light-gray);
    font-size: 0.7rem;
}
.filter-pill--clear {
    background: var(--accent-highlight);
    color: #fff;
    border-color: var(--accent-highlight);
}
.filter-pill--clear:hover {
    background: var(--primary-hover);
    color: #fff;
    border-color: var(--primary-hover);
}
.filter-pill--clear i {
    color: var(--secondary-color);
}

/* Topbar de resultados (contador + CTA WA) */
.listing-results {
    background: var(--cloud-white);
    padding: 1.5rem 0 4rem;
}
.listing-results__topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(46, 74, 40, 0.1);
}
.listing-results__count {
    color: var(--accent-highlight);
    font-size: 0.95rem;
}
.listing-results__count strong {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-right: 0.15rem;
}

/* Estado vacío premium */
.listing-empty {
    background: var(--bg-white);
    border: 1px dashed rgba(46, 74, 40, 0.2);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--accent-highlight);
    font-family: var(--font-sans);
}
.listing-empty i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}
.listing-empty h3 {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.listing-empty p {
    color: var(--light-gray);
    margin-bottom: 0;
}

/* Ocultar header viejo (.propiedades-page-header) si llegara a aparecer */
.propiedades-page-header,
.propiedades-filters-card {
    display: none !important;
}

/* En la pagina /propiedades el navbar no es transparente */
body:not(.page-index) .main-header {
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(46, 74, 40, 0.06);
}

@media (max-width: 768px) {
    .listing-hero {
        min-height: 280px;
        padding: 3rem 0 4rem;
    }
    .listing-search-wrap {
        margin-top: -2rem;
    }
    .listing-search-card {
        padding: 1rem;
    }
    .listing-hero__chips {
        font-size: 0.78rem;
        gap: 0.4rem 0.9rem;
    }
}

/* ==========================================================================
   Ficha de detalle (/propiedades/<slug>) — esquema premium
   ========================================================================== */

/* Hero del proyecto: foto grande + overlay verde + breadcrumb + chips */
.detail-hero {
    position: relative;
    min-height: 460px;
    color: #fff;
    overflow: hidden;
    padding: 2.25rem 0 5rem;
}
.detail-hero__bg {
    position: absolute;
    inset: 0;
    background-color: var(--accent-highlight);
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.detail-hero__bg--placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-highlight) 100%);
}
.detail-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(46, 74, 40, 0.55) 0%, rgba(46, 74, 40, 0.85) 100%);
    z-index: 1;
}
.detail-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 460px;
}
.detail-hero__breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}
.detail-hero__breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-decoration: none;
}
.detail-hero__breadcrumb .breadcrumb-item a:hover {
    color: var(--secondary-color);
}
.detail-hero__breadcrumb .breadcrumb-item.active {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}
.detail-hero__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.55);
}

.detail-hero__content {
    margin-top: auto;
    padding-top: 3rem;
    max-width: 760px;
}
.detail-hero__eyebrow {
    display: inline-block;
    background: rgba(196, 164, 106, 0.25);
    border: 1px solid rgba(196, 164, 106, 0.55);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.detail-hero__title {
    font-family: var(--font-serif);
    color: #fff;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    line-height: 1.15;
    margin: 0 0 0.6rem;
}
.detail-hero__slogan {
    font-family: var(--font-sans);
    color: #E59672; /* Ladrillo terracota luminoso para contraste sobre overlay oscuro */
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 1rem;
    max-width: 52ch;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.detail-hero__location {
    font-family: var(--font-sans);
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    margin-bottom: 1.25rem;
}
.detail-hero__location i {
    color: var(--secondary-color);
    margin-right: 0.35rem;
}
.detail-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.detail-hero__chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* Quickbar flotante con precio/superficie/tipo + CTAs */
.detail-quickbar-wrap {
    position: relative;
    z-index: 5;
    margin-top: -3rem;
    margin-bottom: 0.75rem;
}
.detail-quickbar {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(46, 74, 40, 0.16);
    border: 1px solid rgba(46, 74, 40, 0.08);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.detail-quickbar__data {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2.25rem;
}
.detail-quickbar__item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.detail-quickbar__label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--light-gray);
}
.detail-quickbar__value {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--accent-highlight);
    font-size: 1.05rem;
}
.detail-quickbar__value--price {
    font-family: var(--font-serif);
    color: var(--primary-color);
    font-size: 1.5rem;
}
.detail-quickbar__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.btn-quick-wa,
.btn-quick-agenda {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-quick-wa {
    background: #25D366;
    color: #fff;
}
.btn-quick-wa:hover {
    background: #20BA5A;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.32);
}
.btn-quick-agenda {
    background: var(--primary-color);
    color: #fff;
}
.btn-quick-agenda:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

/* Cuerpo de detalle: galería + secciones + sidebar */
.detail-body {
    background: var(--cloud-white);
    padding: 2.5rem 0 4rem;
}

.detail-gallery {
    background: var(--accent-highlight);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(46, 74, 40, 0.12);
    border: 1px solid rgba(46, 74, 40, 0.08);
}
/* Placeholder corporativo: gradiente verde + dorado sutil con shimmer.
   Reemplaza el fondo #0d0d0d que dejaba "mitad negro" cuando una imagen
   pesada aún no terminaba de descargarse. */
.detail-gallery .carousel-inner {
    background:
        linear-gradient(135deg, rgba(78,111,56,0.12) 0%, rgba(196,164,106,0.10) 50%, rgba(78,111,56,0.12) 100%),
        #efe8d8;
    background-size: 400% 400%;
    animation: detailGalleryShimmer 3.5s ease-in-out infinite;
}
@keyframes detailGalleryShimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.detail-gallery .carousel-inner::after {
    /* Spinner discreto mientras carga la primera imagen visible. Se oculta
       en cuanto cualquier .carousel-img--loaded está presente en el inner. */
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 38px; height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(78,111,56,0.25);
    border-top-color: #4E6F38;
    border-radius: 50%;
    animation: detailGallerySpin 0.8s linear infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.detail-gallery .carousel-inner:has(.carousel-img--loaded)::after { opacity: 0; }
@keyframes detailGallerySpin {
    to { transform: rotate(360deg); }
}
.detail-gallery .carousel-item {
    background: transparent;  /* el inner ya tiene el placeholder */
}
/* Fade-in suave para que la imagen aparezca completa, evitando el
   parpadeo "mitad imagen, mitad fondo" durante la descarga. */
.detail-gallery .carousel-img {
    opacity: 0;
    transition: opacity 0.35s ease-out;
}
.detail-gallery .carousel-img.carousel-img--loaded,
.detail-gallery .carousel-img.carousel-img-error {
    opacity: 1;
}
/* Visor unificado: relación 16:9 + contain para NUNCA recortar el contenido.
   Es clave para que las láminas/fichas comerciales se vean completas (con
   título, márgenes y todo el texto legible). Las fotos aéreas ya nativas
   en 16:9 llenan el frame sin letterbox; las que tienen otra relación de
   aspecto muestran un letterbox elegante con el placeholder verde-arena. */
.detail-gallery__media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 620px;
    height: auto;
    background: transparent;
    object-fit: contain;
    object-position: center;
}
.detail-gallery .carousel-control-prev,
.detail-gallery .carousel-control-next {
    width: 8%;
    opacity: 0.85;
}
.detail-gallery .carousel-control-prev-icon,
.detail-gallery .carousel-control-next-icon {
    background-color: rgba(46, 74, 40, 0.55);
    border-radius: 50%;
    padding: 22px;
    background-size: 50% 50%;
}
.detail-gallery--empty {
    background: var(--color-sand);
    color: var(--accent-highlight);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 320px;
    border-radius: 18px;
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 2rem;
}
.detail-gallery--empty i {
    font-size: 3.5rem;
    color: var(--primary-color);
}

/* ==========================================================================
   Galería: badges sobre el media (foto / video / ficha técnica)
   ========================================================================== */
.media-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
.media-badge i { font-size: 0.85rem; }
.media-badge--ficha {
    background: rgba(196, 164, 106, 0.92);
    color: #1f2e1a;
    border-color: rgba(255, 255, 255, 0.25);
}
.media-badge--video {
    background: rgba(204, 0, 0, 0.88);
    border-color: rgba(255, 255, 255, 0.2);
}
.media-badge--video i { color: #fff; }

/* ==========================================================================
   Modal premium "Descargar ficha PDF" (captura de lead)
   ========================================================================== */
.lead-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(46, 74, 40, 0.35);
}
.lead-modal__header {
    position: relative;
    /* Gradiente más profundo: verde oscuro a verde aún más oscuro, sin
       overlay claro arriba que rompía el contraste del título en la
       franja superior derecha. */
    background:
        radial-gradient(ellipse at bottom right, rgba(196, 164, 106, 0.16) 0%, transparent 55%),
        linear-gradient(135deg, #233920 0%, #15240f 100%);
    color: #ffffff;
    padding: 1.85rem 2rem 1.5rem;
    border-bottom: 3px solid var(--secondary-color, #c4a46a);
    box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.15);
}
.lead-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    color: #d9b87a;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
/* Especificidad alta para vencer la regla global `h3 { color: var(--dark-color) }`
   sin depender únicamente de !important (que puede confundir en debugging). */
.modal-content.lead-modal .lead-modal__header h3.lead-modal__title,
.lead-modal__header h3.lead-modal__title,
.lead-modal__title {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 0.55rem;
    line-height: 1.22;
    letter-spacing: -0.005em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.modal-content.lead-modal .lead-modal__header p.lead-modal__lead,
.lead-modal__header p.lead-modal__lead,
.lead-modal__lead {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: #ffffff !important;
    margin: 0;
    line-height: 1.5;
    max-width: 56ch;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    opacity: 0.95;
}
.lead-modal__header .lead-modal__lead strong,
.lead-modal__lead strong { color: #efe1c4 !important; font-weight: 700; }
.lead-modal__header .lead-modal__eyebrow,
.lead-modal__eyebrow { color: #e6c98b !important; }
.lead-modal__close {
    position: absolute;
    top: 1.1rem;
    right: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.lead-modal__close:hover { opacity: 1; }

.lead-modal__body {
    padding: 1.75rem 2rem 1.5rem;
    background: var(--bg-white, #fafaf7);
}

.lead-modal .form-label {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--accent-highlight, #2e4a28);
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}
.lead-modal .form-control,
.lead-modal .form-select {
    border-radius: 10px;
    border: 1px solid rgba(46, 74, 40, 0.18);
    padding: 0.7rem 0.9rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lead-modal .form-control:focus,
.lead-modal .form-select:focus {
    border-color: var(--secondary-color, #c4a46a);
    box-shadow: 0 0 0 3px rgba(196, 164, 106, 0.18);
}
.lead-modal .form-control.is-invalid,
.lead-modal .form-control:invalid:not(:placeholder-shown) {
    border-color: #b5532e;
}

/* Honeypot: oculto al usuario, visible al bot */
.lead-modal__hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lead-modal__bullets {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.3rem;
}
.lead-modal__bullets li {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--accent-highlight, #2e4a28);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.lead-modal__bullets i {
    color: var(--secondary-color, #c4a46a);
    font-size: 0.85rem;
}

.lead-modal__actions { margin-top: 0.6rem; }

/* Badge "PDF GRATIS" arriba del botón para reforzar el descargable. */
.lead-modal__download-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #efe1c4 0%, #d9b87a 100%);
    color: #1f3318;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(196, 164, 106, 0.35);
}
.lead-modal__download-badge i { font-size: 0.85rem; color: #b34a2c; }
.lead-modal__actions-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lead-modal .btn-lead-cta {
    background: linear-gradient(180deg, #2e4a28 0%, #1f3318 100%);
    color: #fff;
    border: 0;
    border-radius: 14px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    padding: 1rem 1.5rem 0.9rem;
    box-shadow: 0 12px 28px rgba(46, 74, 40, 0.28);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}
.lead-modal .btn-lead-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.lead-modal .btn-lead-cta:hover::before { transform: translateX(100%); }
.lead-modal .btn-lead-cta:hover {
    background: linear-gradient(180deg, #355530 0%, #233920 100%);
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(46, 74, 40, 0.36);
}
.lead-modal .btn-lead-cta:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}
/* Estructura interna del botón: línea principal + sub-línea explicativa */
.lead-modal .btn-lead-cta .btn-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.15;
}
.lead-modal .btn-lead-cta .btn-label-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.005em;
}
.lead-modal .btn-lead-cta .btn-label-main .pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 32px;
    background: #ffffff;
    color: #b34a2c;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    letter-spacing: 0;
}
.lead-modal .btn-lead-cta .btn-label-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
}

.lead-modal__note {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted, #6a7166);
    text-align: center;
    margin: 0.75rem 0 0;
    line-height: 1.4;
}

.lead-modal__feedback {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.45;
}
.lead-modal__feedback--success {
    background: rgba(78, 111, 56, 0.1);
    color: #2e4a28;
    border: 1px solid rgba(78, 111, 56, 0.25);
}
.lead-modal__feedback--error {
    background: rgba(181, 83, 46, 0.08);
    color: #8a3e22;
    border: 1px solid rgba(181, 83, 46, 0.25);
}

/* Bloque de éxito tras enviar el lead de descarga de ficha.
   El visitante decide si quiere o no escribir al asesor por WhatsApp,
   no se abre automáticamente para evitar patrones detectables por Meta. */
.lead-modal__exito {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    text-align: left;
}
.lead-modal__exito-titulo {
    margin: 0;
    font-weight: 700;
    color: #2e4a28;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.lead-modal__exito-titulo i { color: #4e6f38; }
.lead-modal__exito-texto {
    margin: 0;
    color: #2e4a28;
    font-size: 0.9rem;
    line-height: 1.45;
}
.lead-modal__exito-opcional {
    margin: 0.4rem 0 0 0;
    font-size: 0.82rem;
    color: #5d6259;
    font-style: italic;
}
.lead-modal__exito-cta {
    align-self: flex-start;
    margin-top: 0.2rem;
    padding: 0.55rem 1rem;
    background: #25d366;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background 0.2s ease, transform 0.15s ease;
}
.lead-modal__exito-cta:hover {
    background: #1ebe57;
    transform: translateY(-1px);
    color: #ffffff !important;
}
.lead-modal__exito-cta i { font-size: 1.05rem; }

/* Checks de confirmación (descarga + email) */
.lead-modal__exito-checks {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0.1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.lead-modal__exito-checks li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: #2e4a28;
    line-height: 1.4;
}
.lead-modal__exito-checks li i {
    color: #4e6f38;
    margin-top: 2px;
    font-size: 0.92rem;
    width: 16px;
    text-align: center;
}
.lead-modal__exito-checks li strong {
    color: #2e4a28;
    background: rgba(78, 111, 56, 0.08);
    padding: 0 6px;
    border-radius: 5px;
    font-weight: 600;
}

/* Caja con el botón opcional de WhatsApp (CTA secundario, no intrusivo) */
.lead-modal__exito-opcional-box {
    margin-top: 0.6rem;
    padding: 0.85rem 1rem;
    background: rgba(78, 111, 56, 0.04);
    border: 1px dashed rgba(78, 111, 56, 0.28);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.lead-modal__exito-opcional-box .lead-modal__exito-opcional {
    margin: 0;
    font-style: normal;
    font-size: 0.88rem;
    color: #2e4a28;
    font-weight: 600;
}
.lead-modal__exito-aviso {
    margin: 0;
    font-size: 0.78rem;
    color: #5d6259;
    font-style: italic;
    line-height: 1.35;
}


@media (max-width: 576px) {
    .lead-modal__header { padding: 1.4rem 1.3rem 1.15rem; }
    .lead-modal__body { padding: 1.3rem 1.3rem 1.2rem; }
    .lead-modal__title { font-size: 1.25rem; }
    .lead-modal .btn-lead-cta .btn-label-main { font-size: 0.98rem; }
    .lead-modal .btn-lead-cta .btn-label-sub { font-size: 0.72rem; }
}

/* ==========================================================================
   YouTube embed: slide adicional del carrusel (lazy + premium)
   ========================================================================== */
.yt-carousel-item { background: #0a0a0a; }

.yt-embed {
    position: relative;
    width: 100%;
    height: 520px;
    background: #0a0a0a;
    overflow: hidden;
    cursor: pointer;
    display: block;
}
.yt-embed--lightbox { height: auto; aspect-ratio: 16 / 9; max-height: 80vh; }

.yt-embed__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.78) saturate(1.05);
}
.yt-embed:hover .yt-embed__thumb {
    transform: scale(1.04);
    filter: brightness(0.68) saturate(1.1);
}

/* Overlay degradado: mejora legibilidad del botón play y agrega profundidad */
.yt-embed__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.yt-embed:hover .yt-embed__overlay { opacity: 0.85; }

/* Botón play centrado: estilo "luxury cinema" con anillo dorado */
.yt-embed__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: max-content;
    height: max-content;
    background: transparent;
    border: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    color: #fff;
    cursor: pointer;
    transition: transform 0.25s ease;
    z-index: 2;
}
.yt-embed__play:hover { transform: scale(1.04); }
.yt-embed__play:focus-visible { outline: 2px solid var(--secondary-color, #c4a46a); outline-offset: 6px; border-radius: 999px; }

.yt-embed__play-bg {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 1px rgba(196, 164, 106, 0.6) inset,
        0 0 0 8px rgba(255, 255, 255, 0.08),
        0 14px 38px rgba(0, 0, 0, 0.45);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.yt-embed__play-bg i {
    color: #cc0000;
    font-size: 2.1rem;
    transform: translateX(2px);
}
.yt-embed__play:hover .yt-embed__play-bg {
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(196, 164, 106, 0.9) inset,
        0 0 0 12px rgba(255, 255, 255, 0.12),
        0 18px 44px rgba(0, 0, 0, 0.5);
}
.yt-embed__play-label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Iframe inyectado tras click: reemplaza al thumbnail */
.yt-embed--loaded .yt-embed__thumb,
.yt-embed--loaded .yt-embed__overlay,
.yt-embed--loaded .yt-embed__play { display: none; }
.yt-embed__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .yt-embed { height: 320px; }
    .yt-embed__play-bg { width: 68px; height: 68px; }
    .yt-embed__play-bg i { font-size: 1.7rem; }
    .yt-embed__play-label { font-size: 0.75rem; letter-spacing: 0.1em; }
}

.detail-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.75rem 1.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(46, 74, 40, 0.07);
    box-shadow: 0 4px 18px rgba(46, 74, 40, 0.04);
}
.detail-section__title {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
    font-size: 1.5rem;
    margin: 0 0 1rem;
}
.detail-section__lead {
    color: var(--light-gray);
    font-family: var(--font-sans);
    margin-bottom: 1rem;
}
.detail-section__body {
    font-family: var(--font-sans);
    color: var(--dark-color);
    line-height: 1.65;
}
.detail-section__body p {
    margin-bottom: 0.85rem;
}

/* Características (grid de chips con check) */
.detail-features-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem 1.25rem;
}
.detail-features-grid li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    color: var(--dark-color);
    font-size: 0.95rem;
}
.detail-features-grid li i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Colapsable "Ver detalles técnicos" */
.detail-section--collapse {
    padding: 1rem 1.85rem;
}
.detail-collapse-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    color: var(--accent-highlight);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    cursor: pointer;
}
.detail-collapse-toggle:hover { color: var(--primary-color); }
.detail-collapse-toggle .collapse-icon {
    transition: transform 0.2s ease;
    color: var(--primary-color);
}
.detail-collapse-toggle[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.detail-table-wrap {
    border-top: 1px solid rgba(46, 74, 40, 0.1);
    padding-top: 0.5rem;
}
.detail-table { font-family: var(--font-sans); }
.detail-table tr { border-bottom: 1px solid rgba(46, 74, 40, 0.05); }
.detail-table tr:last-child { border-bottom: 0; }
.detail-table th {
    color: var(--light-gray);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.6rem 0;
    width: 55%;
}
.detail-table td {
    color: var(--accent-highlight);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 0;
}

/* Mapa */
.detail-section--map { padding-bottom: 0; }
.detail-map-embed {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 -1.85rem -1.85rem;
    width: calc(100% + 3.7rem);
    background: #e9ecef;
    min-height: 300px;
}
.detail-map-embed iframe {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
}

/* Sidebar premium */
.detail-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.detail-sidebar__card {
    background: var(--bg-white);
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(46, 74, 40, 0.08);
    box-shadow: 0 12px 32px rgba(46, 74, 40, 0.1);
    position: relative;
}
.detail-sidebar__badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}
.detail-sidebar__price {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
    font-size: 1.85rem;
    margin: 0 0 0.4rem;
    line-height: 1.1;
}
.detail-sidebar__surface {
    font-family: var(--font-sans);
    color: var(--light-gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.detail-sidebar__surface i {
    color: var(--primary-color);
    margin-right: 0.35rem;
}
.detail-sidebar__attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.detail-sidebar__attrs span {
    background: rgba(196, 164, 106, 0.18);
    border: 1px solid rgba(196, 164, 106, 0.5);
    color: var(--accent-highlight);
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.detail-sidebar__actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.btn-side-wa,
.btn-side-secondary,
.btn-side-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-side-wa {
    background: #25D366;
    color: #fff !important;
    border-color: #25D366;
}
.btn-side-wa:hover {
    background: #20BA5A;
    border-color: #20BA5A;
    color: #fff !important;
    transform: translateY(-1px);
}
.btn-side-secondary {
    background: var(--accent-highlight);
    color: #fff !important;
    border-color: var(--accent-highlight);
}
.btn-side-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff !important;
}
.btn-side-link {
    background: transparent;
    color: var(--primary-color) !important;
    border-color: rgba(78, 111, 56, 0.4);
    font-weight: 600;
}
.btn-side-link:hover {
    background: var(--color-sand);
    color: var(--accent-highlight) !important;
    border-color: var(--primary-color);
}

.detail-sidebar__exec {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(46, 74, 40, 0.1);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.detail-sidebar__exec-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(78, 111, 56, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.detail-sidebar__exec-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--light-gray);
}
.detail-sidebar__exec-name {
    font-family: var(--font-sans);
    color: var(--accent-highlight);
    font-size: 0.95rem;
}

/* Mini card de confianza en sidebar */
.detail-sidebar__trust {
    background: var(--color-sand);
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.25rem;
}
.detail-sidebar__trust h4 {
    font-family: var(--font-serif);
    color: var(--accent-highlight);
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
}
.detail-sidebar__trust ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--accent-highlight);
}
.detail-sidebar__trust ul i {
    color: var(--primary-color);
    margin-right: 0.45rem;
}

/* Sección relacionados */
.detail-related {
    background: var(--bg-white);
    padding: 4rem 0;
    border-top: 1px solid rgba(46, 74, 40, 0.08);
}

/* Asegurar que la página detalle no use la cabecera transparente del home */
body:not(.page-index) .main-header--hero {
    position: relative;
    background: var(--bg-white) !important;
    box-shadow: 0 2px 8px rgba(46, 74, 40, 0.06) !important;
}

@media (max-width: 991.98px) {
    .detail-sidebar {
        position: static;
        top: auto;
    }
}

@media (max-width: 768px) {
    .detail-hero {
        min-height: 380px;
        padding: 1.75rem 0 4rem;
    }
    .detail-hero__inner { min-height: 380px; }
    .detail-quickbar { padding: 1rem; gap: 0.85rem; }
    .detail-quickbar__data { gap: 0.85rem 1.5rem; }
    .detail-quickbar__value--price { font-size: 1.2rem; }
    /* Mantener aspect-ratio 16:9 en mobile también, sólo limitar altura máxima */
    .detail-gallery__media { max-height: 360px; }
    .detail-section { padding: 1.25rem; }
    .detail-section--map { padding-bottom: 0; }
    .detail-map-embed {
        margin: 0 -1.25rem -1.25rem;
        width: calc(100% + 2.5rem);
        min-height: 280px;
    }
    .detail-map-embed iframe { height: 320px; }
    .btn-quick-wa, .btn-quick-agenda { flex: 1; justify-content: center; }
}
