/* Estilos generales */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Estilos para el archivo de propiedades */
.page-header {
    margin-bottom: 2rem;
}

.property-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

.property-card {
    border: 1px solid #ddd;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}

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

.property-thumbnail {
    position: relative;
    padding-top: 66.67%; /* Aspect ratio 3:2 */
}

.property-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-details {
    padding: 1rem;
}

.property-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.property-title a {
    color: inherit;
    text-decoration: none;
}

.property-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.property-location {
    color: #666;
    margin-bottom: 1rem;
}

.property-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.property-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.feature-icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.feature-icon.dormitorios {
    background-image: url('../images/bed.svg');
}

.feature-icon.banos {
    background-image: url('../images/bath.svg');
}

.feature-icon.superficie {
    background-image: url('../images/area.svg');
}

/* Estilos para la página individual de propiedad */
.inmoweb-property {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.property-header {
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.property-reference {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.property-gallery {
    margin-bottom: 2rem;
}

.property-featured-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
}

.property-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.property-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Crear proporción 1:1 */
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

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

.property-content {
    padding: 2rem;
}

.property-content h3 {
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

.features-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.features-list li {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.property-description {
    margin: 2rem 0;
    line-height: 1.6;
}

.property-location {
    margin: 2rem 0;
}

.property-map {
    height: 400px;
    background: #f8f9fa;
    border-radius: 0;
    margin-top: 1rem;
}

.property-meta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.meta-item {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Paginación */
.pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.pagination .current {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }

    .property-header {
        padding: 1rem;
    }

    .property-content {
        padding: 1rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .property-map {
        height: 300px;
    }
}

/* Mensaje de no hay propiedades */
.no-properties {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 0;
    color: #666;
}

/* Estilos para las plantillas por defecto */

/* Contenedor principal */
.inmoweb-property-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Cabecera de la propiedad */
.property-header {
    background-color: #f5f5f5;
    padding: 30px 0;
    margin-bottom: 30px;
}

.property-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.property-title {
    font-size: 2em;
    margin: 0 0 15px;
    color: #333;
}

.property-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.property-meta span {
    background: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.property-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
}

/* Galería de imágenes */
.property-gallery {
    margin-bottom: 30px;
}

.gallery-main {
    margin-bottom: 10px;
    cursor: pointer;
}

.gallery-main img {
    width: 100%;
    height: auto;
    border-radius: 0;
    transition: opacity 0.3s;
}

.gallery-main img:hover {
    opacity: 0.9;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-thumbs .thumb-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Proporción 1:1 */
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.gallery-thumbs img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.gallery-thumbs .thumb-item:hover,
.gallery-thumbs .thumb-item.active {
    border-color: #2c3e50;
    transform: scale(1.05);
}

.gallery-thumbs .thumb-item:hover img,
.gallery-thumbs .thumb-item.active img {
    transform: scale(1.1);
}

/* Lightbox */
.inmoweb-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inmoweb-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inmoweb-lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.15s ease-in-out;
}

.close-lightbox {
    position: absolute;
    top: -50px;
    right: -10px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 10001;
}

.close-lightbox:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Botones de navegación */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    font-size: 0; /* Ocultar texto, mostrar solo SVG */
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Contador de imágenes */
.lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10001;
}

.lightbox-counter .current-image {
    color: #4CAF50;
    font-weight: 600;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .close-lightbox {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        padding: 12px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .lightbox-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Animación para cambio de imagen */
@keyframes imageChange {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.lightbox-content img.changing {
    animation: imageChange 0.3s ease-out;
}

/* Estados de focus para accesibilidad */
.lightbox-nav:focus,
.close-lightbox:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Efectos hover adicionales */
.lightbox-nav:hover svg {
    transform: scale(1.1);
}

.lightbox-prev:hover svg {
    transform: scale(1.1) translateX(-1px);
}

.lightbox-next:hover svg {
    transform: scale(1.1) translateX(1px);
}

/* Detalles de la propiedad */
.property-details-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.property-details-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.property-details-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.property-details-section li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    width: 100%;
    transition: background-color 0.2s;
}

.property-details-section li:hover {
    background-color: #f8f9fa;
}

.property-details-section li:last-child {
    border-bottom: none;
}

.property-details-section strong {
    font-weight: 600;
    color: #495057;
    display: inline-block;
    width: 120px;
    margin-right: 10px;
}

/* Estilos específicos para características */
.property-features li {
    position: relative;
    padding-left: 5px;
}

.property-features li:before {
    content: "";
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background-color: #3498db;
    opacity: 0;
    transition: opacity 0.2s;
}

.property-features li:hover:before {
    opacity: 1;
}

@media (max-width: 768px) {
    .property-details-section {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .property-details-section strong {
        width: 100%;
        display: block;
        margin-bottom: 0.25rem;
    }

    .property-details-section li {
        padding: 0.5rem 0;
    }
}

/* Mapa */
.property-map {
    height: 400px;
    margin-top: 20px;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Descripción */
.property-description {
    margin-top: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.property-description h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
    .property-details-section {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .property-meta {
        flex-wrap: wrap;
    }

    .property-title {
        font-size: 1.5em;
    }

    .property-price {
        font-size: 1.2em;
    }

    .property-map {
        height: 300px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .gallery-thumbs img {
        height: 80px;
    }
}

/* Iconos para características específicas */
.property-features li[data-feature="dormitorios"] strong:before,
.property-features li[data-feature="banos"] strong:before,
.property-features li[data-feature="aseos"] strong:before,
.property-features li[data-feature="amueblado"] strong:before,
.property-features li[data-feature="terraza"] strong:before,
.property-features li[data-feature="reformado"] strong:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.property-features li[data-feature="dormitorios"] strong:before {
    background-image: url('../images/bed.svg');
}

.property-features li[data-feature="banos"] strong:before,
.property-features li[data-feature="aseos"] strong:before {
    background-image: url('../images/bath.svg');
}

.property-features li[data-feature="amueblado"] strong:before {
    background-image: url('../images/furniture.svg');
}

.property-features li[data-feature="terraza"] strong:before {
    background-image: url('../images/terrace.svg');
}

.property-features li[data-feature="reformado"] strong:before {
    background-image: url('../images/renovation.svg');
}

/* Mejora del diseño para las características */
.property-features li {
    position: relative;
    transition: all 0.3s ease;
    padding: 10px 0;
    border-radius: 4px;
}

.property-features li:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
}

.property-features strong {
    text-transform: capitalize;
    color: #343a40;
}

/* Diseño adaptable adicional */
@media (max-width: 768px) {
    .property-features li {
        padding: 12px 0;
    }
    
    .property-features li:not(:last-child) {
        border-bottom: 1px solid #eee;
    }
} 