/* Los estilos del rediseño se limitan al inicio para proteger catálogo y detalle. */
.page-home {
    --home-gold: #eab149;
    --home-ink: #111;
    --home-gutter: clamp(20px, 4vw, 80px);
    margin: 0;
    background: #fff;
    color: var(--home-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page-home [hidden] {
    display: none !important;
}

.page-home .home-hero-slide > .home-media-skeleton {
    /* Mantiene el contraste del título y buscador mientras llega la portada. */
    background: #333a30;
}
.page-home .home-testimonial-photo > .home-media-skeleton {
    background: #222;
}

.page-home a {
    color: inherit;
}
.page-home button { 
    font: inherit;
}
.page-home a:focus-visible,
.page-home button:focus-visible,
.page-home [tabindex]:focus-visible {
    outline: 3px solid #b27312;
    outline-offset: 4px;
}

.page-home .home-section-container {
    width: 100%;
    max-width: 2080px;
    margin: 0 auto;
    padding-right: var(--home-gutter);
    padding-left: var(--home-gutter);
}

.page-home .home-section-space {
    padding: clamp(48px, 5vw, 100px) 0;
}
.page-home .home-section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(24px, 3vw, 52px);
}

.page-home .home-section-title {
    margin: 0;
    font-size: clamp(24px, 2.25vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.035em;
}

.page-home .home-section-title a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.page-home .home-section-title a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}
.page-home .home-display-title {
    font-size: clamp(34px, 2.5vw, 60px);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -.035em;
}

.page-home .home-display-title strong {
    font-weight: 700;
}
.page-home .home-hero {
    position: relative;
    /* La altura del video se adapta a la misma cabecera que utiliza Propiedades. */
    height: clamp(500px, calc(100svh - var(--landing-header-height)), 1000px);
    min-height: 500px;
    background: #333a30;
}

.page-home .home-hero-slider,
.page-home .home-hero-slider .slick-list,
.page-home .home-hero-slider .slick-track,
.page-home .home-hero-slide {
    height: 100%;
}
.page-home .home-hero-slider {
    overflow: hidden;
}
.page-home .home-hero-slider:not(.slick-initialized) .home-hero-slide:not(:first-child) {
    display: none;
}
.page-home .home-hero-slide {
    position: relative;
}
.page-home .home-hero-poster,
.page-home .home-hero-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.page-home .home-hero-video {
    position: absolute;
    inset: 0;
    opacity: 0;
}
.page-home .home-hero-video.is-playing {
    opacity: 1;
    animation: home-video-reveal .5s ease both;
}

/* La transición también funciona cuando una diapositiva sólo dispone de poster. */
.page-home .home-hero-slider .slick-current {
    animation: home-video-reveal .65s ease both;
}
.page-home .home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgb(0 0 0 / 50%), rgb(0 0 0 / 38%) 600px, rgb(0 0 0 / 5%) 1100px, transparent), linear-gradient(0deg, rgb(0 0 0 / 15%), transparent 20%);
}

.page-home .home-hero-search {
    position: absolute;
    z-index: 3;
    top: 48%;
    right: 0;
    left: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.page-home .home-hero-copy {
    position: absolute;
    bottom: calc(100% + 32px);
    left: var(--home-gutter);
    width: min(42rem, calc(100% - 2 * var(--home-gutter)));
    color: #fff;
    pointer-events: auto;
}

.page-home .home-hero-title {
    margin: 0 0 18px;
    font-size: clamp(1.375rem, 2.8vw, 2.25rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.page-home .home-hero-subtitle {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 400;
    line-height: 1.5;
}

.page-home .search-controls-container {
    width: min(100%, 430px);
    margin: 0;
    pointer-events: auto;
    animation: home-search-reveal .55s ease both;
}
.page-home .search-bar-wrapper {
    position: relative;
    width: 100%;
}
.page-home .search-bar {
    align-items: center;
    min-height: 58px;
    padding: 6px 10px 6px 18px;
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 36px rgb(0 0 0 / 12%);
}
.page-home .search-bar:focus-within {
    border-color: #b27312;
    box-shadow: 0 0 0 3px rgb(234 177 73 / 30%), 0 12px 36px rgb(0 0 0 / 12%);
}
.page-home .search-bar .form-control {
    height: auto;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #151515;
    font-size: clamp(16px, 1.25vw, 20px);
    box-shadow: none;
}
.page-home .search-bar .form-control::placeholder {
    color: #777;
    opacity: 1;
}
.page-home .search-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    color: #666;
}
.page-home .search-icon:hover {
    background: #fff5e2;
    color: #111;
}
.page-home .search-icon svg {
    width: 29px;
    height: 29px;
}
.page-home .city-dropdown {
    display: none;
    position: absolute;
    z-index: 10;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    max-height: min(310px, 40vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--home-gold);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 35px rgb(0 0 0 / 18%);
}
.page-home .city-dropdown.show {
    display: block;
}
.page-home .city-dropdown-content {
    padding: 4px;
}
.page-home .city-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 16px 18px;
    border: 0;
    border-bottom: 1px solid #eee;
    border-radius: 9px;
    appearance: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.page-home .city-option:last-child {
    border-bottom: 0;
}
.page-home .city-option:hover,
.page-home .city-option.selected {
    background: #fff2da;
}
.page-home .city-name {
    color: #222;
    font-size: 17px;
    font-weight: 600;
}
.page-home .city-state {
    color: #666;
    font-size: 14px;
}
.page-home .no-cities-message {
    padding: 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

/* El acceso al buscador se reserva para móvil y se alinea sobre WhatsApp. */
.page-home .home-search-shortcut {
    display: none;
}

@media (max-width: 575.98px) {
    .page-home .home-search-shortcut {
        position: fixed;
        right: calc(12px + env(safe-area-inset-right));
        bottom: calc(78px + env(safe-area-inset-bottom));
        z-index: 1079;
        display: grid;
        place-items: center;
        width: 55px;
        height: 55px;
        padding: 10px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: white;
        color: var(--home-ink);
        box-shadow: 0 8px 22px rgb(0 0 0 / 24%);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px) scale(.94);
        transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
        pointer-events: none;
    }

    .page-home .home-search-shortcut.is-visible {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
        pointer-events: auto;
    }

    .page-home .home-search-shortcut svg {
        display: block;
        width: 100%;
        height: 100%;
    }

    .page-home .home-search-shortcut:hover,
    .page-home .home-search-shortcut:focus {
        background: white;
        color: var(--home-ink);
    }

    body.whatsapp-widget-open .home-search-shortcut {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}
.page-home .home-featured-footer {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
.page-home .home-featured-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 14px;
    background: var(--home-gold);
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}
.page-home .home-featured-more-button:hover {
    background: #d99d34;
    color: white;
}
.page-home .home-featured-track {
    --featured-gap: clamp(18px, 1.8vw, 36px);
    --featured-columns: 4;
    min-height: 120px;
    margin: 0 calc(-.5 * var(--featured-gap));
}
.page-home .home-featured-track:not(.slick-initialized) {
    display: flex;
    overflow-x: auto;
    padding: 4px 0 12px;
}
.page-home .home-featured-track:not(.slick-initialized) > .home-property-grid-item {
    flex: 0 0 calc(100% / var(--featured-columns));
}
/* Las tarjetas SSR muestran una portada antes de iniciar las galerías o sin JavaScript. */
.page-home .home-featured-section .catalog-property-gallery:not(.slick-initialized) > .catalog-property-gallery-slide:not(:first-child) {
    display: none;
}
/* Los selectores directos no alteran los tracks Slick de las fotos interiores. */
.page-home .home-featured-track > .slick-list {
    padding: 4px 0 12px;
}
.page-home .home-featured-track > .slick-list > .slick-track {
    display: flex;
    margin-left: 0;
}
.page-home .home-featured-track .home-property-grid-item {
    height: auto;
    max-width: none;
    margin: 0;
    padding: 0 calc(.5 * var(--featured-gap));
}
.page-home .home-featured-track .slick-hidden {
    display: none;
}
.page-home .home-property-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 3px 4px rgb(0 0 0 / 18%);
    cursor: pointer;
}
.page-home .home-property-card:hover {
    border-color: #b27312;
    box-shadow: 0 5px 10px rgb(0 0 0 / 15%);
}
.page-home .home-property-card:focus-visible {
    outline-offset: -3px;
}

.page-home .home-property-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
}
.page-home .home-property-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-home .home-property-no-image {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #666;
    font-size: 14px;
}
.page-home .home-property-type {
    display: none;
}
.page-home .home-property-featured {
    display: none;
}
.page-home .home-property-body {
    padding: clamp(16px, 1.3vw, 24px);
}
.page-home .home-property-price-row {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.page-home .home-property-price {
    color: #080808;
    font-size: clamp(22px, 1.65vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.04em;
}
.page-home .home-property-features {
    flex-shrink: 0;
    gap: 8px;
    font-size: clamp(12px, .95vw, 18px);
}
.page-home .home-property-feature {
    flex-direction: row-reverse;
    gap: 5px;
}
.page-home .home-property-feature img {
    width: clamp(18px, 1.3vw, 25px);
    height: clamp(18px, 1.3vw, 25px);
    object-fit: contain;
}
.page-home .home-property-location {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    margin-bottom: 10px;
    color: #555;
    font-size: clamp(14px, 1.1vw, 20px);
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.page-home .home-property-agency {
    margin: 0;
    color: #666;
    font-size: 12px;
}
.page-home .featured-carousel-empty {
    padding: 32px 0;
    color: #666;
}

.page-home .catalog-property-gallery,
.page-home .catalog-property-gallery .slick-list,
.page-home .catalog-property-gallery .slick-track,
.page-home .catalog-property-gallery .slick-slide,
.page-home .catalog-property-gallery .slick-slide > div,
.page-home .catalog-property-gallery-slide {
    height: 100%;
}
.page-home .catalog-property-gallery {
    width: 100%;
    cursor: grab;
    touch-action: pan-y;
}
.page-home .catalog-property-gallery:active {
    cursor: grabbing;
}
.page-home .catalog-property-gallery:not(.slick-initialized) .catalog-property-gallery-slide:not(:first-child) {
    display: none;
}
.page-home .catalog-property-gallery-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 85%);
    color: #111;
    font-size: 25px;
    line-height: 1;
    transform: translateY(-50%);
}
.page-home .catalog-property-gallery-prev {
    left: 9px;
}
.page-home .catalog-property-gallery-next {
    right: 9px;
}
.page-home .catalog-property-gallery-arrow.slick-disabled {
    visibility: hidden;
}
.page-home .catalog-property-gallery-counter {
    position: absolute;
    z-index: 4;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 14px;
    background: rgb(0 0 0 / 65%);
    color: #fff;
    font-size: 11px;
}
.page-home .home-testimonials-section {
    background: #000;
    color: #fff;
}
.page-home .home-testimonials-track {
    --testimonial-gap: clamp(18px, 2vw, 32px);
    /* Medidas originales de las imágenes del código de referencia: 456 × 708 px. */
    --testimonial-aspect-ratio: 456 / 708;
    --testimonial-flip-duration: 600ms;
    --testimonial-lines: 8;
    margin: 0 calc(-.5 * var(--testimonial-gap));
}
.page-home .home-testimonials-track:not(.slick-initialized) {
    display: flex;
    overflow-x: auto;
    padding: 4px 0 16px;
}
.page-home .home-testimonials-track:not(.slick-initialized) > li {
    flex: 0 0 25%;
}
.page-home .home-testimonials-track > .slick-list {
    padding: 4px 0 16px;
}
.page-home .home-testimonials-track > .slick-list > .slick-track {
    display: flex;
    margin-left: 0;
}
.page-home .home-testimonial-item {
    height: auto;
    padding: 0 calc(.5 * var(--testimonial-gap));
}
.page-home .home-testimonial-card {
    position: relative;
    perspective: 1000px;
}
/* Las dos caras ocupan una sola celda desde el HTML inicial, antes de Slick. */
.page-home .home-testimonial-inner {
    display: grid;
}
/* La proporción es la misma en todos los anchos y no depende de la longitud de la reseña. */
.page-home .is-interactive .home-testimonial-card {
    aspect-ratio: var(--testimonial-aspect-ratio);
}
.page-home .is-interactive .home-testimonial-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}
.page-home .is-interactive .home-testimonial-photo,
.page-home .is-interactive .home-testimonial-quote {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.page-home .is-interactive .home-testimonial-quote {
    transform: rotateY(180deg);
}
.page-home .is-interactive .is-flipped .home-testimonial-inner {
    transform: rotateY(180deg);
}
.page-home .home-testimonial-inner.is-turning-to-review {
    animation: home-testimonial-to-review var(--testimonial-flip-duration) ease-in-out both;
}
.page-home .home-testimonial-inner.is-turning-to-photo {
    animation: home-testimonial-to-photo var(--testimonial-flip-duration) ease-in-out both;
}
@media (min-width: 768px) and (hover: hover) {
    .page-home .home-testimonials-track {
        /* Único valor que controla la respuesta del hover en escritorio. */
        --testimonial-flip-duration: 450ms;
    }
}
@keyframes home-testimonial-to-review {
    from { transform: var(--testimonial-flip-start, rotateY(0deg)); }
    to { transform: rotateY(180deg); }
}
@keyframes home-testimonial-to-photo {
    from { transform: var(--testimonial-flip-start, rotateY(180deg)); }
    to { transform: rotateY(0deg); }
}
.page-home .home-testimonial-photo,
.page-home .home-testimonial-quote {
    grid-area: 1 / 1;
    min-width: 0;
    min-height: 0;
    aspect-ratio: var(--testimonial-aspect-ratio);
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 1.4rem;
}
.page-home .home-testimonial-photo {
    position: relative;
    background: #222;
}
.page-home .home-testimonial-photo img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-home .home-testimonial-placeholder {
    display: grid;
    height: 100%;
    place-items: center;
    color: var(--home-gold);
    font-size: clamp(72px, 12vw, 180px);
    line-height: 1;
}
.page-home .home-testimonial-quote {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(22px, 2vw, 36px);
    /* El reverso conserva el dorado y el texto blanco del diseño de testimonios. */
    background: #f4b12f;
    color: #fff;
}
.page-home .home-testimonial-quote blockquote {
    /* Reserva el espacio de la reseña sin empujar las estrellas fuera de la tarjeta. */
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}
.page-home .home-testimonial-quote p {
    margin: 0;
    /* Los puntos suspensivos son visuales: el texto original permanece intacto en el HTML. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--testimonial-lines);
    overflow: hidden;
    font-size: clamp(22px, 2vw, 36px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.page-home .home-testimonial-stars {
    flex-shrink: 0;
    margin-top: 24px;
    font-size: clamp(28px, 2.5vw, 42px);
    line-height: 1;
    letter-spacing: .1em;
    white-space: nowrap;
}
.page-home .home-testimonials-section :focus-visible {
    outline: 3px solid var(--home-gold);
    outline-offset: 3px;
}
.page-home .home-seller-row {
    margin: 0 -22px;
}
.page-home .home-seller-row > [class*='col-'] {
    padding-right: 22px;
    padding-left: 22px;
}
.page-home .home-seller-slider {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1 / 1.0;
    border-radius: 17px;
}
.page-home .home-seller-slider:not(.slick-initialized) .home-seller-slide:not(:first-child) {
    display: none;
}
.page-home .home-seller-slider .slick-list,
.page-home .home-seller-slider .slick-track,
.page-home .home-seller-slider .slick-slide,
.page-home .home-seller-slider .slick-slide > div,
.page-home .home-seller-slide {
    height: 100%;
}
.page-home .home-seller-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-home .home-seller-row .home-seller-copy {
    padding-left: clamp(35px, 5vw, 100px);
}
.page-home .home-seller-benefits {
    margin: clamp(28px, 3.5vw, 72px) 0;
}
.page-home .home-seller-benefits li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(18px, 2vw, 35px);
    font-size: clamp(18px, 1.5vw, 38px);
    line-height: 1;
}
.page-home .home-seller-benefits li::before {
    content: '✓';
    display: inline-grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 2px;
    background: #111;
    color: #fff;
    font-size: 19px;
    line-height: 1;
}
.page-home .home-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    max-width: 100%;
    padding: 11px 20px;
    border-radius: 14px;
    background: var(--home-gold);
    color: white;
    font-size: clamp(18px, 1.4vw, 36px);
    font-weight: 900;
    text-align: left;
}
.page-home .home-contact-button:hover {
    background: #d99d34;
}
.page-home .home-contact-button span,
.page-home .home-featured-more-button span {
    font-size: 1.55em;
    font-weight: 400;
    line-height: .8;
}

.page-home .home-brands-section {
    overflow: hidden;
    padding-top: 0;
    padding-bottom: clamp(75px, 8vw, 160px);
}
.page-home .home-brands-section .home-section-container {
    padding-top: clamp(45px, 4vw, 80px);
}
.page-home .home-brands-section .home-display-title {
    position: relative;
    margin-bottom: clamp(55px, 6vw, 110px);
}
.page-home .home-brands-section .home-display-title::before {
    content: '';
    position: absolute;
    top: calc(-1 * clamp(45px, 4vw, 80px));
    right: 0;
    left: 0;
    height: 1px;
    background: #ddd;
}
.page-home .home-brands-track {
    margin: -26px -20px -42px;
}
.page-home .home-brands-track:not(.slick-initialized) {
    display: flex;
    overflow: hidden;
}
.page-home .home-brands-track:not(.slick-initialized) .home-brand-slide {
    flex: 0 0 33.333%;
}
.page-home .home-brands-track .slick-track {
    display: flex;
}
.page-home .home-brands-track .slick-slide {
    height: auto;
}
.page-home .home-brands-track .slick-slide > div {
    height: 100%;
}
.page-home .home-brand-slide {
    height: 100%;
    padding: 26px 3px 42px;
}
.page-home .home-brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    height: 100%;
    min-height: clamp(285px, 25vw, 460px);
    padding: 30px;
    border: 1px solid #111;
    border-radius: 18px;
    background: #fff;
}
.page-home .home-brand-construction,
.page-home .home-brand-fitness {
    transform: rotate(4deg) translateY(20px);
    background-color: #016ffa;
}
.page-home .home-brand-paint,
.page-home .home-brand-development {
    transform: rotate(-4deg);
}
.page-home .home-brand-logo {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 135px;
    margin: 0;
    text-align: center;
}
.page-home .home-brand-logo img {
    display: block;
    width: 100%;
    max-width: 330px;
    height: clamp(125px, 12vw, 220px);
    object-fit: contain;
}
/* El archivo actual de la constructora conserva margen transparente interno. */
.page-home .home-brand-construction .home-brand-logo img {
    transform: scale(2);
}
.page-home .home-brand-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 11px 22px;
    border-radius: 11px;
    background: #bf182b;
    color: #fff;
    font-size: clamp(16px, 1.5vw, 26px);
    font-weight: 600;
    white-space: nowrap;
}
.page-home .home-brand-button:hover {
    color: #fff;
    text-underline-offset: 4px;
}
.page-home .home-brand-button span {
    font-size: 1.55em;
    line-height: 1;
}
.page-home .home-brand-construction {
    border-color: #0a202a;
    background: #0a202a;
    color: #fff;
}
.page-home .home-brand-construction .home-brand-button {
    background: #b33320;
}
.page-home .home-brand-development {
    background: #fec813;
}
.page-home .home-brand-development .home-brand-button {
    background: #111;
}
.page-home .home-brand-fitness .home-brand-button {
    background:white;
    color: black;
}

/* Utilidad general: basta agregar section-animate al elemento que debe aparecer. */
.section-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity .4s ease, transform .4s ease;
    will-change: opacity, transform;
}
.section-animate.is-visible {
    animation: section-animate-reveal .4s ease both;
}
.section-animate.is-animation-complete {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

@keyframes section-animate-reveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clase reutilizable: el script activa el balanceo una sola vez al entrar al viewport. */
.swing-animation.is-swinging {
    animation: swing-animation-motion 5s ease-in-out forwards;
    transform-origin: top center;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, .3)) brightness(1.02);
    will-change: transform, filter;
}

/* `rotate` se suma al transform existente para conservar la inclinación original. */
@keyframes swing-animation-motion {
    0%, 100% { rotate: 0deg; }
    20% { rotate: 6deg; }
    40% { rotate: -5deg; }
    60% { rotate: 3deg; }
    80% { rotate: -2deg; }
}

@keyframes home-search-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes home-video-reveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Los anchos previos a Slick coinciden con sus puntos de cambio. */
@media (max-width: 1439.98px) {
    .page-home .home-featured-track { --featured-columns: 3; }
}
@media (max-width: 1199.98px) {
    .page-home .home-testimonials-track:not(.slick-initialized) > li { flex-basis: calc(100% / 3); }
}
@media (max-width: 991.98px) {
    .page-home .home-featured-track { --featured-columns: 2; }
    .page-home .home-testimonials-track:not(.slick-initialized) > li { flex-basis: 50%; }
    .page-home .home-hero {
        height: 650px;
        min-height: 0;
    }
    .page-home .home-seller-row {
        margin: 0 -15px;
    }
    .page-home .home-seller-row > [class*='col-'] {
        padding-right: 15px;
        padding-left: 15px;
    }
    .page-home .home-seller-slider {
        max-height: 560px;
        aspect-ratio: 4 / 4;
    }
    .page-home .home-seller-row .home-seller-copy {
        padding-top: 34px;
        padding-left: 15px;
    }
    .page-home .home-seller-benefits li {
        font-size: 20px;
    }
    .page-home .home-brand-card {
        padding: 22px 15px;
        gap: 18px;
    }
    .page-home .home-brand-logo {
        min-height: 105px;
    }
    .page-home .home-brand-logo img {
        height: 110px;
    }
    .page-home .home-brand-button {
        gap: 10px;
        padding: 10px 14px;
        font-size: 15px;
    }
      .page-home .home-seller-benefits {
        display: flex;
        align-items: stretch;
        flex-direction: column-reverse;
        align-content: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    .page-home .home-contact-button {
        max-width: 90%;
    }
}

@media (max-width: 767.98px) {
    .page-home .home-featured-more-button {
        width: 100%;
    }
    .page-home .home-hero {
        height: 560px;
    }
    .page-home .home-hero-search {
        top: 46%;
    }
    .page-home .home-section-heading-row {
        gap: 14px;
    }
    /* Dos tarjetas en móvil, con espacio para leer y sin modificar otros carruseles. */
    .page-home .home-testimonials-track {
        --testimonial-gap: 10px;
        --testimonial-lines: 7;
    }
    .page-home .home-testimonials-track:not(.slick-initialized) > li {
        flex-basis: 50%;
    }
    .page-home .home-testimonials-track:not(.slick-initialized) > li:only-child {
        flex-basis: 100%;
    }
    .page-home .home-testimonial-photo,
    .page-home .home-testimonial-quote {
        border-radius: 1.1rem;
    }
    .page-home .home-testimonial-quote {
        padding: clamp(12px, 3vw, 20px);
    }
    .page-home .home-testimonial-quote p {
        font-size: clamp(14px, 3.8vw, 22px);
        line-height: 1.4;
        letter-spacing: normal;
    }
    .page-home .home-testimonial-stars {
        margin-top: 18px;
        font-size: clamp(18px, 4.5vw, 28px);
        letter-spacing: .04em;
    }
    .page-home .home-brands-track:not(.slick-initialized) .home-brand-slide {
        flex-basis: 50%;
    }
    .page-home .home-brand-slide {
        padding-right: 18px;
        padding-left: 18px;
    }
    .page-home .home-brand-card {
        min-height: 290px;
        max-width: 440px;
        margin: 0 auto;
    }
    .page-home .home-brand-paint,
    .page-home .home-brand-development {
        transform: rotate(-2deg);
    }
    .page-home .home-brand-construction,
    .page-home .home-brand-fitness {
        transform: rotate(2deg);
    }
    .page-home .home-brand-logo img {
        height: 150px;
    }
    .page-home .home-brand-button {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .page-home .home-featured-track { --featured-columns: 1; }
    .page-home .home-hero {
        height: min(650px, calc(100svh - var(--landing-header-height)));
        min-height: 440px;
    }
    .page-home .home-hero-search {
        top: 48%;
    }
    .page-home .home-hero-copy {
        bottom: calc(100% + 20px);
    }
    .page-home .home-hero-title {
        margin-bottom: 12px;
        text-wrap: balance;
    }
    .page-home .home-hero-title br {
        display: none;
    }
    .page-home .search-bar {
        min-height: 54px;
        padding: 4px 10px 4px 16px;
    }
    .page-home .search-bar .form-control {
        font-size: 16px;
    }
    .page-home .home-section-title {
        font-size: 24px;
    }
    .page-home .home-brands-track:not(.slick-initialized) .home-brand-slide {
        flex-basis: 100%;
    }
    .page-home .home-testimonials-section .home-section-title {
        max-width: 260px;
    }
    .page-home .home-property-price {
        font-size: 24px;
    }
    .page-home .home-property-features {
        gap: 8px;
        font-size: 12px;
    }
    .page-home .home-property-feature img {
        width: 20px;
        height: 20px;
    }
    .page-home .home-contact-button {
        width: 65%;
        font-size: 16px;
        gap: 4px;
        justify-content: center;
    }
}

/* Se respeta la preferencia del sistema; el script también evita autoplay en ese caso. */
@media (max-width: 359px) {
    /* El ejemplo completo cabe sin reducir el texto de escritura de 16 px en móvil. */
    .page-home .search-bar .form-control::placeholder {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-animate,
    .section-animate.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
        will-change: auto;
    }
    .swing-animation.is-swinging {
        animation: none;
        filter: none;
        will-change: auto;
    }
    .page-home .home-hero-slider .slick-current {
        animation: none;
    }
    .page-home .search-controls-container,
    .page-home .home-hero-video.is-playing {
        animation: none;
    }
    .page-home .home-search-shortcut {
        transition: none;
    }
    .page-home .home-testimonial-inner.is-turning-to-review,
    .page-home .home-testimonial-inner.is-turning-to-photo {
        animation: none;
    }
}
