:root {
    --primary: #b33b4a;
    --primary-dark: #8f2f3b;
    --secondary: #274b7a;
    --secondary-light: #eaf2ff;
    --text: #243447;
    --muted: #5f6b7a;
    --surface: #ffffff;
    --border: #d9e4ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #f7f8fc;
    color: var(--text);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 18px 40px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(36, 52, 71, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
}

.brand img {
    width: auto;
    height: 72px;
    display: block;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-dark);
}

.headopcion {
    position: relative;
    left: auto;
    margin-top: 0;
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    font-size: 18px;
}

.headopciones {
    color: var(--text);
    font-weight: 600;
    padding-bottom: 4px;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.headopciones:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

.botones {
    position: relative;
    top: auto;
    right: auto;
    justify-self: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

.telefono {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.tasar,
.conboton,
.buscar {
    background: linear-gradient(135deg, var(--secondary) 0%, #345f93 100%);
    color: white;
    padding: 12px 18px;
    /*border-radius: 999px;*/
    border: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(39, 75, 122, 0.22);
    cursor: pointer;
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.botones .tasar,
.botones #cotizacion {
    font-size: clamp(11px, 1.1vw, 15px);
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.4vw, 18px);
}

.tasar:hover,
.conboton:hover,
.buscar:hover {
    box-shadow: 0 12px 24px rgba(39, 75, 122, 0.28);
    filter: brightness(1.05);
}

#cotizacion {
    color: white;
    font-size: 15px;
    padding: 12px 18px;
    white-space: nowrap;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--primary) 0%, #ca4d59 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    /*border-radius: 999px;*/
    box-shadow: 0 8px 18px rgba(179, 59, 74, 0.22);
}

nav {
    position: relative;
    min-height: 640px;
    background: linear-gradient(180deg, rgba(36, 52, 71, 0.14) 0%, rgba(36, 52, 71, 0.04) 100%);
}

.banner {
    display: block;
    width: 100%;
    height: 700px;
    object-fit: cover;
    filter: brightness(0.7);
}

.eslogan {
    position: absolute;
    color: white;
    left: 50%;
    top: 110px;
    transform: translateX(-50%);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 2;
    margin: 0;
}

.opcionesnav {
    position: absolute;
    top: 215px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 8px;
    z-index: 2;
}

.opcionesnav::-webkit-scrollbar {
    display: none;
}

.opciones {
    margin: 0;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    white-space: nowrap;
    flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.opciones:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    filter: brightness(1.02);
}

form {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(92%, 1090px);
    padding: 16px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    z-index: 2;
}

.zona,
.selpropiedad,
.num,
select {
    position: static;
    flex: 1 1 200px;
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: var(--text);
    background-color: var(--surface);
}

.buscar {
    position: static;
    padding: 12px 20px;
    border-radius: 999px;
}

.registro {
    text-align: center;
    font-size: 1.1rem;
    padding: 28px 20px 10px;
    color: var(--muted);
}

.registro a {
    color: var(--secondary);
    font-weight: 700;
}

.contenedores {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 24px;
    padding: 20px 40px 40px;
}

.container {
    margin: 0;
    width: 100%;
    background-color: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(36, 52, 71, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.container:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(36, 52, 71, 0.14);
}

.imagenesDiv {
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.container h3 {
    margin: 18px 0 8px;
    text-align: center;
    font-size: 1.25rem;
}

.container p {
    margin: 0 20px 18px;
    text-align: center;
    color: var(--muted);
}

.conboton {
    display: inline-block;
    margin: 0 0 24px 50%;
    transform: translateX(-50%);
}

.emprendimientos {
    display: flex;
    align-items: stretch;
    background: linear-gradient(90deg, var(--secondary-light) 0%, #f9fbff 100%);
    margin: 20px 40px 40px;
    width: auto;
    height: 420px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(36, 52, 71, 0.08);
}

.emprendimientos > div {
    flex: 1 1 50%;
    padding: 42px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.emprendimientos h1 {
    font-size: clamp(2.4rem, 3vw, 3.8rem);
    margin: 0 0 18px;
    color: var(--text);
    text-align: left;
}

.emprendimientos p {
    font-size: 1.15rem;
    margin: 0 0 28px;
    color: var(--muted);
    max-width: 700px;
    line-height: 1.7;
}

.emprendimientos-button {
    align-self: flex-start;
    margin: 8px 0 0;
    transform: none;
}

.imgEmprendimiento {
    flex: 1 1 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
}

.carousel-wrapper {
                position: relative;
                display: flex;
                align-items: center;
                max-width: 1200px;
                margin: 50px auto 0 auto;
                padding: 0 20px;
                box-sizing: border-box;
            }
            .carousel-viewport {
                overflow: hidden;
                width: 100%;
            }
            .carousel-track {
                display: flex;
                gap: 24px;
                transition: transform 0.5s ease-in-out;
            }
            .carousel-slide {
                flex: 0 0 calc((100% - 48px) / 3);
                box-sizing: border-box;
            }
            /* Look de card propio, para que el espacio entre containers se note
               (antes el fondo de la card y el fondo de la sección eran iguales,
               por eso el padding no se veía) */
            .carousel-slide.container {
                background: #ffffff;
                border-radius: 14px;
                overflow: hidden;
                box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
                display: flex;
                flex-direction: column;
            }
            /* Imagen con altura fija y consistente (el atributo height="350px"
               en el <img> no es válido en HTML, así que lo forzamos por CSS) */
            .carousel-slide .imagenesDiv {
                width: 100%;
                height: 240px;
                object-fit: cover;
                display: block;
                border-radius: 14px 14px 0 0;
            }
            /* Aire entre precio, ubicación, características y botón,
               que era lo que se veía "apretado" */
            .carousel-slide h3 {
                margin: 24px 20px 8px;
                font-size: 26px;
                color: #243447;
            }
            .carousel-slide p {
                margin: 4px 20px;
                color: #555;
            }
            .carousel-slide .conboton {
                display: block;
                width: calc(100% - 40px);
                margin: 20px auto 25px;
                transform: none;
                padding: 14px 0;
            }
            .carousel-btn {
                background-color: #243447;
                color: white;
                border: none;
                font-size: 20px;
                width: 44px;
                height: 44px;
                border-radius: 50%;
                cursor: pointer;
                flex-shrink: 0;
                z-index: 2;
            }
            .carousel-btn:hover {
                background-color: #325798;
            }
            .carousel-btn-prev { margin-right: 10px; }
            .carousel-btn-next { margin-left: 10px; }
            .carousel-dots {
                display: flex;
                justify-content: center;
                gap: 10px;
                margin-top: 20px;
            }
            .carousel-dot {
                width: 12px;
                height: 12px;
                border-radius: 50%;
                background-color: #cccccc;
                cursor: pointer;
                border: none;
                padding: 0;
            }
            .carousel-dot.active {
                background-color: #243447;
            }
            @media (max-width: 900px) {
                .carousel-slide { flex: 0 0 calc((100% - 24px) / 2); }
            }
            @media (max-width: 600px) {
                .carousel-slide { flex: 0 0 100%; }
            }

.profile {
    margin-top: 20px;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    color: white;
    background: linear-gradient(135deg, #2f3d4e 0%, #243447 100%);
    margin: 0;
    margin-top: 40px;
    padding: 36px 40px;
    align-items: flex-start;
    justify-content: space-between;
}

footer > div {
    min-width: 220px;
    flex: 1 1 260px;
}

footer p {
    margin: 0 0 16px;
    font-weight: 600;
}

footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

footer li {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

footer a {
    color: inherit;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #dcdcdc;
}

.property-page {
    background: #f4f6f8;
}

.property-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.property-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 28px;
}

.property-back:hover {
    color: var(--primary);
}

.property-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.property-kicker,
.section-label {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.property-heading h1 {
    color: var(--text);
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.08;
    margin: 0;
}

.property-location {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 12px 0 0;
}

.property-price-block {
    min-width: 190px;
    text-align: right;
}

.property-price {
    color: var(--secondary);
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1;
}

.property-code {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    margin-top: 10px;
}

.property-gallery {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 12px;
    height: 480px;
}

.gallery-main,
.gallery-side {
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.gallery-main {
    border-radius: 22px 0 0 22px;
}

.gallery-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}

.gallery-side img:first-child {
    border-radius: 0 22px 0 0;
}

.gallery-side img:last-child {
    border-radius: 0 0 22px 0;
}

.gallery-main img,
.gallery-side img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    width: 100%;
}

.gallery-main:hover img,
.gallery-side img:hover {
    transform: scale(1.03);
}

.photo-count {
    background: rgba(36, 52, 71, 0.88);
    border-radius: 999px;
    bottom: 18px;
    color: white;
    font-size: 0.86rem;
    font-weight: 700;
    left: 18px;
    padding: 8px 14px;
    position: absolute;
}

.property-layout {
    align-items: start;
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 1fr) 350px;
    margin-top: 38px;
}

.property-content {
    min-width: 0;
}

.property-overview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 42px;
    padding: 24px 18px;
}

.overview-item {
    border-right: 1px solid var(--border);
    display: grid;
    gap: 4px;
    padding: 0 18px;
}

.overview-item:last-child {
    border-right: none;
}

.overview-item strong {
    color: var(--secondary);
    font-size: 1.35rem;
}

.overview-item span {
    color: var(--muted);
    font-size: 0.84rem;
}

.property-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 36px;
    margin-bottom: 36px;
}

.property-section h2 {
    color: var(--text);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin: 0 0 16px;
    max-width: 650px;
}

.property-copy {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 12px;
    max-width: 700px;
}

.feature-grid {
    color: var(--text);
    display: grid;
    gap: 16px 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
}

.feature-grid span {
    color: var(--muted);
}

.feature-grid span::first-letter {
    color: var(--primary);
}

.property-map-section {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr 0.85fr;
}

.map-placeholder {
    align-items: center;
    background-color: #dce8e5;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.6) 75%, transparent 75%);
    background-size: 34px 34px;
    border: 1px solid #c1d6d1;
    border-radius: 16px;
    color: var(--secondary);
    display: flex;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    min-height: 180px;
    text-align: center;
}

.map-placeholder small {
    color: var(--muted);
    font-weight: 600;
}

.map-pin {
    color: var(--primary);
    font-size: 1.7rem;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(36, 52, 71, 0.1);
    padding: 28px;
    position: sticky;
    top: 24px;
}

.agent-heading {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
}

.agent-photo {
    border-radius: 50%;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.agent-heading h2 {
    color: var(--text);
    font-size: 1.15rem;
    margin: 0;
}

.agent-heading p:last-child {
    color: var(--muted);
    font-size: 0.84rem;
    margin: 3px 0 0;
}

.contact-intro {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 20px 0;
}

.property-form {
    display: grid;
    gap: 8px;
    position: static;
    transform: none;
    width: auto;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.property-form label {
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 6px;
}

.property-form input,
.property-form textarea {
    background: #fbfcfd;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    padding: 11px 12px;
    resize: vertical;
    width: 100%;
}

.property-form input:focus,
.property-form textarea:focus {
    border-color: var(--secondary);
    outline: 3px solid rgba(39, 75, 122, 0.12);
}

.property-form .conboton {
    margin: 14px 0 0;
    transform: none;
    width: 100%;
}

.contact-phone {
    border-top: 1px solid var(--border);
    color: var(--secondary);
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    margin-top: 22px;
    padding-top: 18px;
    text-align: center;
}

.property-page footer {
    margin-top: 0;
}

footer hr {
    display: none;
}

@media (max-width: 1024px) {
    .contenedores {
        grid-template-columns: 1fr;
    }

    .emprendimientos {
        flex-direction: column;
        height: auto;
    }

    .imgEmprendimiento {
        width: 100%;
        min-width: 100%;
        height: 260px;
        border-radius: 0 0 24px 24px;
    }
}

@media (max-width: 780px) {
    header {
        grid-template-columns: 1fr;
        row-gap: 12px;
        padding: 20px;
    }

    .brand {
        justify-self: center;
    }

    .headopcion,
    .botones {
        justify-content: center;
        justify-self: center;
        width: 100%;
    }

    .banner {
        height: 500px;
    }

    .eslogan {
        top: 90px;
    }

    .opcionesnav {
        top: 185px;
        width: calc(100% - 32px);
        justify-content: flex-start;
    }

    form {
        top: 260px;
        width: 95%;
    }

    .zona {
        top: 500px;
        left: 50%;
        width: calc(100% - 32px);
        transform: translateX(-50%);
    }

    .selpropiedad {
        top: 560px;
        left: 50%;
        width: calc(100% - 32px);
        transform: translateX(-50%);
    }

    .num {
        top: 620px;
        left: 50%;
        width: calc(100% - 32px);
        transform: translateX(-50%);
    }

    .buscar {
        top: 680px;
        left: 50%;
        transform: translateX(-50%);
    }

    footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .property-layout {
        gap: 32px;
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .property-gallery {
        height: 390px;
    }

    .contact-card {
        padding: 22px;
    }
}

@media (max-width: 680px) {
    .property-main {
        width: min(100% - 28px, 560px);
        padding-top: 24px;
    }

    .property-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .property-price-block {
        text-align: left;
    }

    .property-gallery {
        display: block;
        height: auto;
    }

    .gallery-main {
        border-radius: 16px;
        height: 290px;
    }

    .gallery-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 130px;
        gap: 10px;
        margin-top: 10px;
    }

    .gallery-side img:first-child,
    .gallery-side img:last-child {
        border-radius: 10px;
    }

    .property-layout {
        display: block;
        margin-top: 28px;
    }

    .property-overview {
        gap: 20px 0;
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 10px;
    }

    .overview-item:nth-child(2) {
        border-right: none;
    }

    .overview-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
        padding-bottom: 18px;
    }

    .overview-item {
        padding: 0 12px;
    }

    .feature-grid,
    .property-map-section {
        grid-template-columns: 1fr;
    }

    .contact-card {
        margin-top: 12px;
        position: static;
    }
}