/* ==========================================================================
   PÁGINA DE PROPIEDAD INDIVIDUAL - Mobile First Corregido
   ========================================================================== */

/* Hero de la Propiedad */
.propiedad-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    margin-top: 80px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.propiedad-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.propiedad-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.propiedad-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    z-index: 2;
}

.propiedad-hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    color: var(--white);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    font-weight: 400;

}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb span {
    opacity: 0.6;
}

.propiedad-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Meta información */
.propiedad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item strong {
    color: var(--red);
    margin-right: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Sección de Información */
.propiedad-info {
    padding: 4rem 1.5rem;
    background: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sección de contenido */
.info-section {
    margin-bottom: 4rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--black);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--red);
}

.info-section p {
    color: var(--grey);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

/* Características Grid */
.caracteristicas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.caracteristica-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--light-grey);
    border-left: 3px solid var(--red);
    transition: all 0.3s;
}

.caracteristica-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.caracteristica-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.caracteristica-content h4 {
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.caracteristica-content p {
    color: var(--grey);
    line-height: 1.7;
    margin: 0;
}

/* Galería de Imágenes */
.galeria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.galeria-item {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}


.galeria-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--red);
}

.galeria-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.galeria-item:hover img {
    transform: scale(1.1);
}

/* Sidebar */
.info-sidebar {
    position: static;
    height: auto;
}

.sidebar-card {
    background: var(--light-grey);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e5e5;
}

.sidebar-card:last-child {
    margin-bottom: 0;
}

.sidebar-card h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-subtitle {
    color: var(--grey);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

    /* Ajuste: contacto en sidebar para propiedades individuales (fondo blanco y texto oscuro) */
    .info-sidebar .contacto-info {
        padding: 1.5rem;
        background: var(--white);
        color: var(--black);
        border: 1px solid #eaeaea;
        box-shadow: 0 6px 18px rgba(0,0,0,0.06);
        border-radius: 6px;
    }
    .info-sidebar .contacto-info h3 {
        color: var(--black);
    }
    .info-sidebar .contacto-info .contacto-item strong {
        color: var(--black);
    }
    .info-sidebar .contacto-info .contacto-item a,
    .info-sidebar .contacto-info .contacto-item p {
        color: var(--grey);
    }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #e5e5e5;
    background: var(--white);
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    color: var(--black);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--red);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Botones */
.btn-primary {
    background: var(--red);
    color: var(--white);
    padding: 1rem 3rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(198, 0, 0, 0.3);
}

.btn-block {
    width: 100%;
}

/* Información de Contacto */
.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacto-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.contacto-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contacto-item strong {
    display: block;
    color: var(--black);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.contacto-item a,
.contacto-item p {
    color: var(--grey);
    text-decoration: none;
    font-weight: 300;
    font-size: 0.95rem;
}

.contacto-item a:hover {
    color: var(--red);
}

/* Sección de Contacto Principal / Registro Brokers */
.seccion-contacto {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem;
    background: var(--light-grey);
}

.contacto-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contacto-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--black);
    margin-bottom: 1rem;
}

.contacto-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: var(--red);
    margin: 1.5rem auto 0;
}

.contacto-header p {
    color: var(--grey);
    font-size: 1.05rem;
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Lightbox para Galería */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.lightbox-close:hover {
    color: var(--red);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--red);
    border-color: var(--red);
}

/* ==========================================================================
   RESPONSIVE - Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 960px) {
    .propiedad-hero {
        height: 70vh;
    }

    .propiedad-hero-content {
        padding: 3rem;
    }

    .propiedad-info {
        padding: 5rem 2rem;
    }

    .info-grid {
        grid-template-columns: 2fr 1fr;
        gap: 4rem;
    }

    .info-sidebar {
        position: sticky;
        top: 110px;
        height: fit-content;
    }

    .caracteristicas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================================
   RESPONSIVE - Desktop (1280px+)
   ========================================================================== */


@media (min-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr 380px;
        gap: 5rem;
    }

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Párrafos en dos columnas - AGREGAR ESTA SECCIÓN */
.info-principal .info-section:first-child {
    column-count: 1;
}

@media (min-width: 768px) {
    .info-principal .info-section:first-child {
        column-count: 2;
        column-gap: 3rem;
    }

    .info-principal .info-section:first-child h2 {
        column-span: all;
    }
}

.responsive-video {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* MENSAJES DEL FORMULARIO BROKER - MEJORADOS */
.form-mensaje-broker {
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s ease-out;
}

.form-mensaje-success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.form-mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Animación de entrada */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icono antes del mensaje */
.form-mensaje-broker::before {
    content: '';
    display: inline-block;
    margin-right: 10px;
    font-size: 1.3rem;
}

.form-mensaje-success::before {
    content: '✓';
    color: #28a745;
}

.form-mensaje-error::before {
    content: '✕';
    color: #dc3545;
}

/* Estilos adicionales para el botón cuando está deshabilitado */
.broker-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .form-mensaje-broker {
        font-size: 1rem;
        padding: 1.2rem 1.5rem;
    }
}
