/* ---------------------<GENERAL>--------------------- */
* {
    box-sizing: border-box;
}

html {
    color: white;
    background-color: #ffffff;
}

body {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    margin: 0;
}

main {
    flex: auto;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #30343d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    height: 5rem;
}

.nav-style {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;

    & .navBar-title {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.navBar {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    font-weight: bold;
    font-size: 1em;
    align-items: center;
    justify-content: flex-end;
}

.navBar-item {
    cursor: pointer;
    font-size: 1.5em;
    color: #ffffff;
}

.navBar-item:hover {
    text-decoration: underline;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 15px;
    margin-right: 0.25rem;
}

.active {
    text-decoration: underline;
}

@media screen and (max-width: 1250px) {
    .hamburger {
        display: flex;
        align-items: center;
        padding: 0;
    }

    .navBar {
        position: absolute;
        top: 5rem;
        right: 1rem;
        left: auto;
        background-color: #30343d;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
        flex-direction: column;
        padding: 10px;
        gap: 10px;
        width: 200px;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .navBar.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navBar-item {
        width: 100%;
        margin: 0;
        padding: 12px;
        font-size: 1.1em;
        text-align: center;
        border: none;
        transition: background 0.2s;
    }

    .navBar-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
        text-decoration: none;
    }

    .active {
        background-color: #646cff;
        color: white;
        border-radius: 6px;
        padding: 12px;
    }

    .hamburger-icon.active {
        transform: rotate(45deg);
    }

}

@media (max-width: 990px) {
    .row {
        flex-direction: column;
    }
}

.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 0.1rem solid #ffffff;
    border-top-color: #000000;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.th-propiedad {
    background-color: #424e5b !important;
    color: #ffffff !important;
    border-right: 1px solid #ffffff !important;
}

.fila-propiedad td {
    border-right: 1px solid #424e5b !important;
}

.td-direccion {
    display: flex;
    align-items: center;
    height: 4rem;
}

/* ---------------------</GENERAL>-------------------- */
/* -----------------------<HOME>---------------------- */

.service-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.service-panel {
    justify-content: center;
    min-height: 22rem;
    padding: 10px 20px;
    margin: 1rem 0 1rem 0;
    flex-wrap: nowrap !important;
    gap: 2rem;
}

.service-container:last-child .service-panel {
    gap: 1rem !important;
}

.service-panel .vender {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(50, 50, 50, 0.7)), url(../img/vender-casa.jpg);
}

.service-panel .comprar {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(50, 50, 50, 0.7)), url(../img/comprar-casa.jpg);
}

.service-panel .alquilar {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.6), rgba(50, 50, 50, 0.7)), url(../img/alquilar-casa.jpg);
}

/* Reglas comunes agrupadas */
.service-panel .propiedades div,
.service-panel .reformar div,
.service-panel .colaborar div {
    color: #424e5b;
    padding: 0;
}

.service-panel .propiedades .row img,
.service-panel .reformar .row img,
.service-panel .colaborar .row img {
    width: 20rem;
    height: 18rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 2rem auto;
}

.service-panel div {
    color: #ffffff;
    max-width: 460px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border-radius: 2rem;
    padding: 2rem;
    background-size: cover !important;
    background-position: 0 !important;
    background-repeat: no-repeat !important;
}

.service-panel .col-lg-4 p:nth-of-type(2) {
    margin-bottom: 0;
}

.service-panel .col-lg-4 p:nth-of-type(1) {
    font-size: 1.5em
}

.btn-network {
    background: #fff;
    border: 2px solid #424e5b;
    box-shadow: none !important;
    padding: .5rem 2rem !important;
    margin-top: 1.5rem;
    color: #424e5b !important;
    text-transform: none !important;
}

.btn-md {
    position: relative;
    box-sizing: border-box;
    border-radius: 30px !important;
    background: white !important;
    min-width: 9rem;
    max-width: 12rem;
}

.service-panel .btn-md:hover {
    border-color: #424e5b;
    border-style: solid;
    border-width: 1px;
    box-shadow: inset 0 0 0 2px #424e5b;
    font-weight: 700;
}

.sp-text .btn-md:hover {
    border-color: #424e5b;
    border-style: solid;
    border-width: 1px;
    box-shadow: inset 0 0 0 2px #424e5b;
    font-weight: 700;
}

.btn-md2 {
    position: relative;
    box-sizing: border-box;
    border-color: #424e5b !important;
    border-radius: 30px !important;
    background: white !important;
    min-width: 9rem;
    max-width: 12rem !important;
    margin-top: 2rem !important;
}

.service-panel .btn-md2:hover {
    border-style: solid;
    border-width: 1px;
    font-weight: 700;
    color: white !important;
    background-color: #424e5b !important;
}

.fila-propiedad td .btn-md2:hover {
    border-style: solid;
    border-width: 1px;
    font-weight: 700;
    color: white !important;
    background-color: #424e5b !important;
}

.btn:not(:disabled):not(.disabled) {
    cursor: pointer;
}

.section-propiedades {
    height: 515px;
    background-size: cover !important;
    background-position: 0 !important;
    background-repeat: no-repeat !important;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(50, 50, 50, 0.8)), url(../img/property-section-image.jpg);
    text-align: right;
    align-items: center;
    font-size: 1.3rem;
    line-height: 1.5rem;
}

.sp-container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.sp-col {
    flex: 0 0 50%;
    max-width: 50%;
}

.sp-text {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.sp-body {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.sp-button {
    padding: .5rem 2rem !important;
    margin-top: 1rem;
    border: transparent !important;
    line-height: 1.5rem;
    font-size: .8rem !important;
    background: #fff;
}

.sp-link {
    color: #365c76;
    text-decoration: none;
    background-color: transparent;
}

.section-propiedades h2 {
    font-size: 2.3rem;
    font-weight: 700;
    color: #fff;
}

.section-propiedades div {
    color: #fff;
    font-size: 1.3rem;
    line-height: 1.5rem;
}

@media (min-width: 990px) and (max-width: 1200px) {
    .service-panel .propiedades .row img,
    .service-panel .reformar .row img,
    .service-panel .colaborar .row img {
        height: 15rem;
    }
}

@media (max-width: 990px) {
    .service-panel {
        align-items: center;
    }

    .sp-container .row {
        flex-direction: row;
    }
}

/* -----------------------</HOME>--------------------- */
/* --------------------<SERVICIOS>-------------------- */

.container.servicio {
    color: #424e5b;
    margin: 5rem auto;
    font-size: 1rem;
    padding: 0 18rem;
}

.container.servicio h1 {
    margin-bottom: 2rem;
    font-size: 1.7rem;
    font-weight: 700;
}

.container.servicio .btn-md2:hover{
    border-style: solid;
    border-width: 1px;
    font-weight: 700;
    color: white !important;
    background-color: #424e5b !important;
}

@media (max-width: 992px) {
    .container.servicio {
        color: #424e5b;
        margin: 5rem auto;
        font-size: 1rem;
        padding: 0 5rem;
    }
}

.contactar-colabo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    color: #424e5b;
    cursor: pointer;
}

/* -------------------</SERVICIOS>-------------------- */
/* -------------------<PROPIEDADES>------------------- */

.btn-propiedades {
    color: #424e5b !important;
    border-color: #424e5b !important;
}

.btn-propiedades:hover {
    color: #ffffff !important;
    background-color: #424e5b !important;
}

.btn-propiedad {
    color: #ffffff !important;
    border-color: #424e5b !important;
    background-color: #424e5b !important;
}

.btn-propiedad:hover {
    background-color: #65707e !important;
}

.card-propiedad {
    transition: transform 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: none;
    overflow: hidden;
}

.card-propiedad:hover {
    transform: translateY(-5px);
}

.card-body {
    flex-grow: 1;
}

.icon-masked {
    width: 20px;
    height: 20px;
    background-color: #424e5b;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

.card-propiedad:hover .icon-masked {
    background-color: #3e77ae;
}

.property-features {
    min-height: 45px;
    border-top: 1px solid #f0f0f0 !important;
}

.feature-item span {
    color: #424e5b;
    font-size: 0.85rem;
}

.img-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* -------------------</PROPIEDADES>------------------ */
/* ---------------------<CONTACTO>-------------------- */
.btn-send-form {
    background-color: #424e5b !important;
    border-color:  #424e5b !important;
}

.btn-send-form:hover {
    background-color: #5d6675 !important;
}

.add-propiedad-btn {
    display: flex;
    border-color: #424e5b !important;
    background-color: #ffffff !important;
    color: #424e5b !important;
}
.add-propiedad-btn:hover {
    background-color: #424e5b !important;
    color: #ffffff !important;
}
.form-label.valid { color: #198754 !important; position: relative; }
.form-label.valid::after { content: " ✓"; font-size: 0.8em; }
.form-label.error { color: #dc3545 !important; position: relative; }
.form-label.error::after { content: " ✗"; font-size: 0.8em; }
.form-label span { color: #dc3545; font-weight: bold; font-size: 0.9em; }

.preview-main {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px dashed #ccc;
}
.upload-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.upload-placeholder:hover {
    background-color: #e9ecef;
    border-color: #424e5b;
}
.gallery-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.gallery-item {
    position: relative;
    width: 80px;
    height: 80px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.btn-remove-img {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

/* ---------------------</CONTACTO>------------------- */
/* --------------------<PROPIEDADES>------------------ */

.card-propiedad {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}
.card-propiedad:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}
.img-container {
    height: 200px;
    overflow: hidden;
    background-color: #f8f9fa;
}
.img-container img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-propiedad:hover .img-container img {
    transform: scale(1.1);
}
.precio-tag {
    font-size: 1.4rem;
    color: #424e5b;
    font-weight: 800;
}

/* -------------------</PROPIEDADES>------------------ */
/* ----------------------<MODALES>-------------------- */

.modal {
    display: block !important;
    width: 90% !important;
    max-width: 500px !important;
    border: 1px solid #424e5b;
    border-radius: 1rem !important;

    height: auto !important;
    max-height: 90vh !important;
    overflow-y: auto;
    background-color: white;

    box-shadow: 0 10px 15px -3px rgba(66, 78, 91, 0.3),
                0 4px 6px -2px rgba(66, 78, 91, 0.1);
    & .modal-header {
        height: 4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.9rem 0.9rem 0 0;
        background-color: #424e5b;

        & h2 {
            color: white;
            text-align: center;
            margin: 0;
            font-size: 1.5rem;
        }
    }

    & .modal-body {
        padding: 2rem 2rem 0 2rem;

        & .error-content {
            margin: 1rem 0;
            padding: 1rem;
            background-color: #fdf2f2;
            color: #9b1c1c;
            border: 1px solid #f8b4b4;
            border-radius: 8px;
            font-size: 0.95rem;
            line-height: 1.5;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            word-wrap: break-word;
        }

        & .info-content {
            margin: 1rem 0;
            padding: 1rem;
            background-color: #e3f2fd;
            color: #0d47a1;
            border: 1px solid #bbdefb;
            border-radius: 8px;
            font-size: 0.95rem;
            line-height: 1.5;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            word-wrap: break-word;
        }
    }

    & .modal-actions {
        display: flex;
        align-items: center;
        padding-bottom: 2rem;
        justify-content: center;
        gap: 1rem;

        & button {
            padding: 0 2rem;

            & span {
                font-size: 1.2em;
            }
        }
    }
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease-in-out;
}

.modal-actions .btn-md2:hover {
    border-style: solid;
    border-width: 1px;
    font-weight: 700;
    color: white !important;
    background-color: #424e5b !important;
}

.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-main-img {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
    max-width: 90%;
    padding: 10px;
}

.modal-thumb {
    width: 80px; height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    border-radius: 4px;
}

.modal-thumb:hover, .modal-thumb.modal-active {
    opacity: 1;
    border: 2px solid #fff;
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    color: white; font-size: 40px;
    cursor: pointer;
}

/* ---------------------</MODALES>-------------------- */
/* ----------------------<FOOTER>--------------------- */

.footer-div {
    background: #1c252c;
    padding: 1rem 0 0;
    margin-top: 0;
}

.footer-div ul {
    list-style-type: none;
    margin-bottom: 0;
}

.legal {
    font-size: .7rem;
    text-align: center;
    color: #fff;
    justify-content: center;
    padding: 10px 20px;
    background-color: rgba(55, 68, 78, .6);
    gap: 1rem;
}

.footer-list-item {
    display: flex;
    font-size: inherit;
    align-items: center;
    color: #fff;
}

.footer-list-item a {
    margin-left: 1rem;
    text-decoration: inherit;
    color: #fff;
}

.footer-list-item a span {
    margin-left: 1rem;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
}

.footer-list-item a .underline:hover {
    text-decoration: underline;
}

.legal a {
    color: white;
    text-decoration: underline !important;
    cursor: pointer;
}

.footer-items {
    justify-content: center;
}

@media (min-width: 990px) and (max-width: 1200px) {
    .footer-items {
        flex-direction: row;
    }
}

@media (max-width: 990px) {
    .footer-items {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .footer-items div {
        width: 300px;
    }

    .footer-items div:nth-of-type(2),
    .footer-items div:nth-of-type(3) {
        justify-content: flex-start !important;
    }

}

/* ----------------------</FOOTER>-------------------- */
/* ----------------------<PANEL>---------------------- */

.sidebar-flotante {
    position: fixed;
    left: 20px;
    top: 30%;
    transform: translateY(-50%);
    width: 250px;
    max-width: 90vw;
    height: auto;
    max-height: 80vh;
    background: white;
    border-radius: 15px;
    border: 2px solid #424e5b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 20px;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    visibility: visible;
}

.sidebar-flotante.oculto {
    transform: translateY(-50%) translateX(-350px);
    opacity: 0;
    visibility: hidden;
}

.sidebar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #424e5b;
}

.sidebar-content .btn-md2:hover {
    border-style: solid;
    border-width: 1px;
    font-weight: 700;
    color: white !important;
    background-color: #424e5b !important;
}

.sidebar-content p {
    margin: 1rem 0 0 0 !important;
}

.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    color: #424e5b;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
}

.close-btn:hover {
    color: #ff3742;
    transform: scale(1.1);
}

.mini-panel {
    position: fixed;
    left: 0.5rem;
    top: 30%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #424e5b 100%);
    border-radius: 25px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    animation: bounceIn 0.6s ease;
}

.mini-panel button {
    top: 7%;
    position: absolute;
}

.mini-panel.mostrar {
    display: flex;
}

.arrow-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.arrow-btn:hover {
    transform: scale(1.2);
}

@keyframes bounceIn {
    0% {
        transform: translateY(-50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%) scale(1.05);
    }
    70% {
        transform: translateY(-50%) scale(0.9);
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .sidebar-flotante {
        width: 260px;
        left: 10px;
    }

    .mini-panel {
        right: 10px;
    }
}

.sidebar-flotante h3 {
    text-align: center;
    font-size: 1.5em;
}

@media (max-width: 768px) {
    .sidebar-flotante, .mini-panel,
    .mini-panel.mostrar {
        display: none;
    }
}

/* ----------------------</PANEL>--------------------- */
/* ----------------------<PRIVACY>-------------------- */

.policy-content {
    color: #424e5b;
    margin: 5rem 0;
    font-size: 1rem;
}

.policy-content h1 {
    font-size: 1.7rem;
    font-weight: 700;
}

.privacy-nav {
    margin-top: 5rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, .1);
}

.privacy-nav ul {
    list-style: none;
    padding-left: 0;
}

.privacy-nav ul li {
    margin-bottom: .5rem;
}

.privacy-nav ul li a {
    cursor: pointer;
    color: #424e5b;
    text-transform: uppercase;
    text-decoration: none;
    font-size: .85rem;
    width: 100%;
    display: block;
    padding: .5rem 1rem;
}

.privacy-nav ul li a.activo {
    color: #ffffff;
    background-color: #424e5b;
    border-radius: 20px;
    font-weight: 600;
}

.policy-content h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-top: 2rem;
}

.policy-content h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    margin-top: 2rem;
}

.policy-content table {
    width: 100%;
    background-color: #f5f5f5;
    font-size: .8rem;
    margin: 3rem 0;
    border-collapse: collapse;
}

.policy-content table thead {
    background-color: #ececec;
}

.policy-content table th, .policy-content table tr {
    border: 1px solid #d7d7d7;
}

.policy-content table thead th, .policy-content table thead tr {
    padding: 10px;
}

.policy-content table tbody td {
    padding: 10px;
    border: 1px solid #d7d7d7;
}

.info-panel > * {
    display: none;
}

.info-panel > * {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-panel > *[style*="display: block"] {
    opacity: 1;
    transform: translateY(0);
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background: #30343d;
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.cookie-content {
    max-width: 800px;
    text-align: center;
}

.cookie-content h3 { margin-top: 0; font-size: 1.2rem; }
.cookie-content p { font-size: 0.9rem; color: #ccc; margin-bottom: 20px; }

.cookie-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-buttons button {
    padding: 10px 25px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-accept { background-color: #646cff; color: white; }
.btn-accept:hover { background-color: #535bf2; }

.btn-reject { background-color: #4a4e57; color: white; }
.btn-reject:hover { background-color: #5a5f6a; }

@media (min-width: 768px) {
    .cookie-banner { left: auto; width: 400px; }
}

/* ---------------------</PRIVACY>-------------------- */