/* ============================================================================
   VARIABLES
   ============================================================================ */

:root {
    --primary-color: #d8cab8;
    --text-dark: #545454;
    --text-light: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-card: #2a2a2a;
    --bg-secondary: #222;
    --bg-tertiary: #333;
    --bg-quaternary: #545454;
    --text-gray: #f0f0f0;
    --text-gray-light: #ccc;
    --text-gray-lighter: #aaa;
    --text-gray-dark: #888;
    --header-height: 80px;
    --status-venta: #16a34a;
    --status-vendido: #b91c1c;
    --status-alquiler: #2563eb;
    --status-reservado: #ea580c;
}

/* ============================================================================
   RESET
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-gray);
}

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

/* ============================================================================
   CABECERA
   ============================================================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* IMPORTANTE: QUITAMOS overflow: hidden para que salga el menú */
}

/* Control estricto del Logo */
.logo-container .custom-logo-link img,
.logo-container img {
    max-height: 60px;
    width: auto;
    display: block;
}

.logo-container h1 a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

/* ============================================================================
   MENÚ ESCRITORIO (>768px)
   ============================================================================ */

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .main-navigation ul {
        display: flex;
        gap: 30px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .main-navigation a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s;
    }

    .main-navigation a:hover {
        color: #d8cab8;
    }
}

/* ============================================================================
   MENÚ MÓVIL (<768px)
   ============================================================================ */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 30px;
        cursor: pointer;
        padding: 0;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1a1a1a;
        padding: 0;
        /* Oculto por defecto */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    /* Clase para mostrarlo */
    .main-navigation.open {
        max-height: 500px;
        border-bottom: 1px solid #333;
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 20px;
        list-style: none;
        text-align: center;
    }

    .main-navigation li {
        margin-bottom: 15px;
    }

    .main-navigation a {
        color: #fff;
        font-size: 1.2rem;
        display: block;
    }
}

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */

.valley-breadcrumbs {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #888;
}

.valley-breadcrumbs a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.valley-breadcrumbs a:hover {
    color: #d8cab8;
}

.valley-breadcrumbs span:last-child {
    color: #d8cab8;
    font-weight: 600;
}

.valley-breadcrumbs span:not(:last-child) {
    color: #888;
}

/* ============================================================================
   HÉROE
   ============================================================================ */

.hero {
    height: 100vh;
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: var(--text-dark);
    color: var(--text-light);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--bg-tertiary);
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #444;
}

/* ============================================================================
   PROPIEDADES DESTACADAS
   ============================================================================ */

.featured-properties {
    padding: 80px 20px;
    background-color: var(--bg-dark);
}

.featured-properties__container {
    max-width: 1200px;
    margin: 0 auto;
}

.featured-properties__title {
    color: var(--text-light);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 600;
}

.featured-properties__layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.featured-properties__content {
    flex: 0 0 70%;
}

.featured-properties__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.featured-properties__sidebar {
    flex: 0 0 30%;
}

.featured-contact-form {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 120px;
}

.featured-contact-form__title {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.featured-contact-form__subtitle {
    color: var(--text-gray-light);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.contact-form-featured .form-field {
    margin-bottom: 20px;
}

.contact-form-featured .form-label {
    display: block;
    color: var(--text-gray-light);
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-form-featured .form-label .required {
    color: var(--primary-color);
}

.contact-form-featured .form-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.contact-form-featured .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.featured-contact-form__button {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    padding: 15px 30px;
}

.form-response {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-response.success {
    background-color: rgba(22, 163, 74, 0.2);
    color: var(--status-venta);
    border: 1px solid var(--status-venta);
    display: block;
}

.form-response.error {
    background-color: rgba(185, 28, 28, 0.2);
    color: var(--status-vendido);
    border: 1px solid var(--status-vendido);
    display: block;
}

/* ============================================================================
   ARCHIVO DE PROPIEDADES
   ============================================================================ */

.archive-propiedades {
    padding-top: 120px;
    padding-bottom: 60px;
}

.archive-propiedades__title {
    color: var(--text-gray);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.archive-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.archive-content {
    flex: 0 0 75%;
}

/* Barra Lateral de Contacto */
.property-sidebar {
    flex: 0 0 25%;
    position: -webkit-sticky; /* Para Safari */
    position: sticky;
    top: 120px; /* Ajusta esto para que no choque con la cabecera fija (aprox 100px + 20px margen) */
    height: fit-content; /* Importante para que no se estire */
    align-self: start; /* Evita que Flexbox lo estire */
    z-index: 10;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
    background: var(--bg-card);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-sticky h2 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.sidebar-sticky p {
    color: var(--text-gray-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.contact-form-sidebar .form-field {
    margin-bottom: 15px;
}

.contact-form-sidebar label {
    display: block;
    color: var(--text-gray-light);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.contact-form-sidebar input[type="text"],
.contact-form-sidebar input[type="email"],
.contact-form-sidebar input[type="tel"] {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.contact-form-sidebar input[type="text"]:focus,
.contact-form-sidebar input[type="email"]:focus,
.contact-form-sidebar input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form-sidebar button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    text-align: center;
    cursor: pointer;
    border: none;
}

#form-response {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
    font-size: 0.9rem;
}

#form-response.success {
    background-color: rgba(22, 163, 74, 0.2);
    color: var(--status-venta);
    border: 1px solid var(--status-venta);
    display: block;
}

#form-response.error {
    background-color: rgba(185, 28, 28, 0.2);
    color: var(--status-vendido);
    border: 1px solid var(--status-vendido);
    display: block;
}

.property-filters {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.property-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.property-filters__field {
    display: flex;
    flex-direction: column;
}

.property-filters__field label {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.property-filters__field input[type="number"],
.property-filters__field select {
    background-color: var(--bg-dark);
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--text-gray);
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.property-filters__field input[type="number"]:focus,
.property-filters__field select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.property-filters__field input[type="number"]::placeholder {
    color: #666;
}

.property-filters__field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.property-filters__field--checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-filters__field--checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.property-filters__field--submit {
    display: flex;
    gap: 10px;
    flex-direction: row;
}

.property-filters__field--submit .btn-primary {
    flex: 1;
    text-align: center;
}

/* ============================================================================
   TARJETAS DE PROPIEDADES
   ============================================================================ */

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.property-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.property-card__link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.property-card .card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.property-card__image {
    position: relative;
}

.property-card__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.property-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-light);
    background-color: var(--primary-color);
    z-index: 2;
}

.property-status.status-en-venta {
    background-color: var(--status-venta);
}

.property-status.status-vendido {
    background-color: var(--status-vendido);
}

.property-status.status-alquiler {
    background-color: var(--status-alquiler);
}

.property-status.status-reservado {
    background-color: var(--status-reservado);
}

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

.card-reference {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.property-card h3,
.property-card__title {
    color: var(--text-light);
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.property-ref {
    font-size: 0.75rem;
    color: var(--text-gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.price-pill,
.property-card__price {
    background: var(--bg-quaternary);
    color: var(--primary-color);
    display: inline-block;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1rem;
}

.property-card__details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e0e0e0;
}

.detail-item svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-color);
}

.property-card__location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.property-card__location svg {
    width: 18px;
    height: 18px;
    fill: var(--text-light);
}

/* ============================================================================
   TARJETAS DE PROMOCIÓN
   ============================================================================ */

.promo-card {
    border: 1px solid #d8cab8 !important;
    background: #333 !important;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(216, 202, 184, 0.3);
}

.promo-badge {
    background: #ea580c;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-align: center;
    display: block;
}

/* ============================================================================
   PROPIEDADES RELACIONADAS
   ============================================================================ */

.related-properties {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #333;
}

.related-properties h3 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.label-featured {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.label-featured svg {
    width: 14px;
    height: 14px;
    fill: #d8cab8;
    stroke: #d8cab8;
}

.label-obra-nueva {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d8cab8;
    border: 1px solid #d8cab8;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ============================================================================
   BOTÓN DE FAVORITOS
   ============================================================================ */

.btn-favorite {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-favorite:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-favorite svg {
    width: 20px;
    height: 20px;
    stroke: #333;
    fill: none;
    transition: all 0.3s ease;
}

.btn-favorite.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.btn-favorite.active {
    background: rgba(255, 255, 255, 1);
    border-color: #ef4444;
}

/* Botón de favorito en single-propiedad */
.info-bar .btn-favorite {
    position: static;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
}

.info-bar .btn-favorite svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    fill: none;
}

.info-bar .btn-favorite.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.info-bar .btn-favorite:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ============================================================================
   FICHA DE PROPIEDAD INDIVIDUAL
   ============================================================================ */

.property-hero {
    width: 100%;
    height: 60vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
}

.property-hero__blur {
    position: absolute;
    inset: 0;
    filter: blur(4px);
    transform: scale(1.1);
    background-size: cover;
    background-position: center;
}

.property-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 1;
}

.property-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
}

.property-hero__button {
    margin-top: 0;
}

.property-bar {
    background-color: var(--bg-secondary);
    padding: 30px 50px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.property-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.property-bar__title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.property-bar__ref {
    font-size: 0.8rem;
    color: var(--text-gray-lighter);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.property-bar__location {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray-light);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-bar__location svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
}

.property-bar__right {
    text-align: right;
}

.property-bar__price {
    display: inline-block;
    background-color: var(--bg-quaternary);
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 800;
    padding: 10px 25px;
    border-radius: 50px;
    margin-bottom: 15px;
}

/* ============================================================================
   FICHA DE PROPIEDAD INDIVIDUAL - LAYOUT
   ============================================================================ */

.property-content-container {
    display: flex;
    gap: 40px;
    align-items: start;
}

.property-main-content {
    flex: 2;
}

.property-sidebar-single {
    flex: 1;
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    height: fit-content;
    align-self: start;
    z-index: 10;
}

.sidebar-form-card {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .property-content-container {
        flex-direction: column;
    }

    .property-sidebar-single {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .property-content-container {
        flex-direction: column;
    }

    .property-sidebar-single {
        position: static;
        width: 100%;
    }
}

/* Estilos antiguos (mantener compatibilidad) */
.property-content-container-old {
    max-width: 800px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.features-box {
    background-color: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.section-pill-title {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-card) !important;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.single-propiedad .feature-extra-item {
    color: var(--text-light);
    font-size: 0.95rem;
    position: relative;
    padding-left: 20px;
}

.single-propiedad .feature-extra-item::before {
    content: '\2022';
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

.description-box {
    background-color: var(--bg-quaternary);
    border-radius: 15px;
    padding: 30px;
    color: var(--text-light);
}

.description-box .entry-content {
    color: var(--text-gray);
    line-height: 1.8;
}

.description-box .entry-content p {
    margin-bottom: 1rem;
}

.property-main {
    padding: 0;
}

/* Ocultar galerías nativas de WordPress en página de propiedad */
.single-propiedad .entry-content .wp-block-gallery,
.single-propiedad .entry-content .wp-block-image,
.single-propiedad-custom .entry-content .wp-block-gallery,
.single-propiedad-custom .wp-block-image {
    display: none;
}

.single-propiedad .entry-content img[alt=""],
.single-propiedad .entry-content img:not([alt]) {
    display: none;
}

.single-propiedad .entry-content .wp-block-gallery * {
    display: none !important;
}

/* Estilos robustos para galería de WordPress */
.wp-block-gallery {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wp-block-gallery * {
    display: block;
    width: 100%;
    height: auto;
}

.wp-block-gallery img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.wp-block-image {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
}

.wp-block-gallery::before,
.wp-block-gallery::after,
.wp-block-image::before,
.wp-block-image::after,
.wp-block-gallery *::before,
.wp-block-gallery *::after,
.wp-block-image *::before,
.wp-block-image *::after {
    content: none !important;
    display: none !important;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

/* Estilos del footer se pueden añadir aquí */

/* ============================================================================
   MEDIA QUERIES
   ============================================================================ */

@media (max-width: 768px) {
    .property-bar__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-bar__right {
        text-align: left;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .archive-propiedades {
        padding-top: 100px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .property-filters__grid {
        grid-template-columns: 1fr;
    }

    .property-filters__field--submit {
        flex-direction: column;
    }

    .archive-layout {
        flex-direction: column;
    }

    .archive-content {
        flex: 1;
        width: 100%;
    }

    .property-sidebar,
    .property-sidebar-single {
        display: none !important;
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
    }

    .featured-properties__layout {
        flex-direction: column;
        gap: 30px;
    }

    .featured-properties__content {
        flex: 1;
        width: 100%;
    }

    .featured-properties__grid {
        grid-template-columns: 1fr;
    }

    .featured-properties__sidebar {
        flex: 1;
        width: 100%;
    }

    .featured-contact-form {
        position: relative;
        top: 0;
    }
}

/* ============================================================================
   BARRA DE FILTROS
   ============================================================================ */

.filters-bar {
    background: #2a2a2a;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 150px;
}

.filter-group label {
    color: #d8cab8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="number"] {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus {
    outline: none;
    border-color: #d8cab8;
}

.filter-group select option {
    background: #1a1a1a;
    color: #fff;
}

.filter-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 0.95rem;
    text-transform: none;
    font-weight: 400;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d8cab8;
}

.filter-actions {
    display: flex;
    align-items: end;
    flex: 0 0 auto;
}

.filter-actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-filter {
    background: #d8cab8;
    color: #222;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-filter:hover {
    background: #c4b5a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 202, 184, 0.3);
}

.btn-clear {
    background: transparent;
    color: #d8cab8;
    border: 1px solid #d8cab8;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    margin: 0;
}

.btn-clear:hover {
    background: #d8cab8;
    color: #222;
    transform: translateY(-2px);
}

/* Botón toggle de filtros (solo móvil) */
.btn-toggle-filters {
    display: none;
    width: 100%;
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #333;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-align: center;
}

.btn-toggle-filters:hover {
    background: #333;
    border-color: #d8cab8;
}

/* Wrapper de filtros */
.filters-wrapper {
    /* Visible por defecto en escritorio */
}

@media (max-width: 768px) {
    .btn-toggle-filters {
        display: block;
    }

    .filters-wrapper {
        display: none;
    }

    .filters-wrapper.open {
        display: block;
    }
}

@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .filter-group {
        width: 100%;
        min-width: 100%;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .filter-actions-group {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        gap: 15px;
    }

    .btn-filter,
    .btn-clear {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.site-footer {
    background-color: #111;
    color: #ccc;
    padding: 60px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h4 {
    color: #d8cab8;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-column p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #d8cab8;
}

.site-info {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #999;
}

.site-info p {
    margin: 0;
}

.legal-links {
    display: inline-flex;
    gap: 15px;
    margin-left: 20px;
}

.legal-links a {
    color: #666;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #ccc;
}

@media (max-width: 768px) {
    .site-info {
        flex-direction: column;
        align-items: center;
    }

    .legal-links {
        margin-left: 0;
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================================================
   MODAL DE CONTACTO
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #d8cab8;
}

.modal-title {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-subtitle {
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-call-block {
    background: rgba(216, 202, 184, 0.1);
    border-left: 3px solid #d8cab8;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.modal-call-block p {
    margin: 0;
    color: #d8cab8;
    font-size: 0.95rem;
}

.modal-call-block a {
    color: #d8cab8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.modal-call-block a:hover {
    color: #fff;
}

.contact-modal-form .form-field {
    margin-bottom: 20px;
}

.contact-modal-form .form-label {
    display: block;
    color: #ccc;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-modal-form .form-label .required {
    color: #d8cab8;
}

.contact-modal-form .form-input {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-modal-form .form-input:focus {
    outline: none;
    border-color: #d8cab8;
}

.contact-modal-form select.form-input {
    cursor: pointer;
}

.modal-submit {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    padding: 15px 30px;
}

#modal-form-response {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   PROMOCIONES DE OBRA NUEVA
   ============================================================================ */

.archive-promociones {
    padding-top: 120px;
    padding-bottom: 60px;
}

.archive-promociones__title {
    color: var(--text-light);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
}

.promociones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.promo-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.promo-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.promo-card__image {
    position: relative;
    overflow: hidden;
}

.promo-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-dark);
    background: var(--primary-color);
    z-index: 2;
}

.promo-card__body {
    background: var(--bg-dark);
    padding: 30px;
}

.promo-card__title {
    color: var(--text-light);
    margin: 0 0 20px 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.promo-data {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.promo-card__button {
    width: 100%;
    text-align: center;
    cursor: pointer;
    border: none;
    margin-top: 10px;
}

/* ============================================================================
   MENÚ DESTACADO
   ============================================================================ */

.menu-highlight {
    border: 1px solid #d8cab8 !important;
    border-radius: 50px !important;
    padding: 8px 20px !important;
    background: rgba(216, 202, 184, 0.1) !important;
    transition: all 0.3s ease;
}

.menu-highlight:hover {
    background: rgba(216, 202, 184, 0.2) !important;
    border-color: #d8cab8 !important;
    transform: translateY(-3px);
}

/* ============================================================================
   PLANTILLA DE PÁGINAS ESTÁTICAS (TEXTOS LEGALES)
   ============================================================================ */

.entry-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #ccc;
}

.entry-content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
}

.entry-content h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.entry-content h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 12px;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: #fff;
}

.entry-content strong {
    color: #fff;
    font-weight: 600;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #aaa;
}

/* ============================================================================
   BANNER DE CONSENTIMIENTO DE COOKIES
   ============================================================================ */

#cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #1a1a1a;
    padding: 20px;
    z-index: 99999;
    transition: bottom 0.5s ease;
    border-top: 1px solid #333;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

#cookie-banner.show {
    bottom: 0;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-banner-text a:hover {
    color: #fff;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-accept {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 0.9rem;
}

.btn-accept:hover {
    background: #b08d4d;
    transform: translateY(-2px);
}

.btn-reject {
    background: transparent;
    color: #ccc;
    border: 1px solid #555;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
}

.btn-reject:hover {
    border-color: #888;
    color: #fff;
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .btn-accept,
    .btn-reject {
        flex: 1;
    }

    .promociones-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Botón flotante móvil CTA */
    .mobile-cta {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 99999999 !important;
        width: 90% !important;
        max-width: 400px !important;
        background: #d8cab8 !important;
        color: #222 !important;
        padding: 15px !important;
        border-radius: 50px !important;
        justify-content: center !important;
        align-items: center !important;
        font-weight: bold !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
        font-size: 16px !important;
    }

    .mobile-cta:hover {
        background: #c4b5a0 !important;
        transform: translateX(-50%) translateY(-2px) !important;
        box-shadow: 0 7px 25px rgba(0, 0, 0, 0.4) !important;
    }

    .mobile-cta:active {
        transform: translateX(-50%) translateY(0) !important;
    }
}

/* Ocultar botón flotante cuando el modal esté abierto */
body.modal-open .mobile-cta {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ocultar botón flotante en escritorio (solo aplica fuera del media query móvil) */
@media (min-width: 769px) {
    .mobile-cta {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* ============================================================================
   PÁGINA 404
   ============================================================================ */

.error-404-container {
    padding: 80px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

h1.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: #d8cab8;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.5;
}

h2.error-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.error-message {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Formulario de búsqueda en 404 */
.error-search {
    margin-bottom: 40px;
}

.error-search .search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    justify-content: center;
}

.error-search .search-field {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    min-width: 200px;
}

.error-search .search-field:focus {
    outline: none;
    border-color: #d8cab8;
}

.error-search .search-submit {
    background: #d8cab8;
    color: #222;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-search .search-submit:hover {
    background: #c4b5a0;
    transform: translateY(-2px);
}

.error-separator {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.error-separator h3 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
}

@media (max-width: 768px) {
    h1.error-code {
        font-size: 5rem;
    }

    h2.error-title {
        font-size: 1.5rem;
    }

    .error-search .search-form {
        flex-direction: column;
        width: 100%;
    }

    .error-search .search-field,
    .error-search .search-submit {
        width: 100%;
    }
}
