/* Estilos para Filtrado Dinámico de Propiedades */

/* Grid de propiedades */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Tarjetas de propiedades */
.property-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.property-card.destacada {
    border: 2px solid #FF6B35;
}

.destacada-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF6B35;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

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

.property-info {
    padding: 20px;
}

.property-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.property-location {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.property-location i {
    color: #FF6B35;
    margin-right: 5px;
}

.property-description {
    color: #777;
    font-size: 14px;
    margin: 10px 0;
}

.property-price {
    font-size: 20px;
    font-weight: bold;
    color: #2E86AB;
    margin: 15px 0;
}

.property-stats {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 12px;
    color: #888;
}

.property-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-stats i {
    color: #FF6B35;
}

/* Acciones de propiedades */
.property-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.property-actions a,
.property-actions button {
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Botón Ver Detalles */
.btn-primary {
    background: #2E86AB;
    color: white;
}

.btn-primary:hover {
    background: #1e5f7a;
    transform: translateY(-2px);
}

/* Botón WhatsApp */
.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
}

/* Botón Contactar - NARANJA ESTANDARIZADO GLOBAL */
.btn-contactar,
.contact-btn,
button[class*="contact"],
a[class*="contact"],
.property-actions .contact-btn,
.project-card .contact-btn,
.contact-buttons .contact-btn {
    background: #FF6B35 !important;
    color: white !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14px !important;
}

.btn-contactar:hover,
.contact-btn:hover,
button[class*="contact"]:hover,
a[class*="contact"]:hover,
.property-actions .contact-btn:hover,
.project-card .contact-btn:hover,
.contact-buttons .contact-btn:hover {
    background: #e55a2b !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

/* Botones de ordenamiento activos */
.sort-button.active {
    background: #2E86AB !important;
    color: white !important;
    border-color: #2E86AB !important;
}

/* Modal de contacto */
.contact-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

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

.modal-header {
    position: relative;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

.modal-body h4 {
    margin: 0 0 20px 0;
    color: #FF6B35;
    font-size: 16px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #FF6B35;
}

.btn-send {
    background: #FF6B35;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-send:hover {
    background: #e55a2b;
}

/* Contador de propiedades */
.properties-counter {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .property-card {
        margin: 0 10px;
    }
    
    .property-info {
        padding: 15px;
    }
    
    .property-actions a,
    .property-actions button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Estilos para botones de ordenamiento */
.sort-buttons-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sort-button {
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-button:hover {
    border-color: #FF6B35;
    color: #FF6B35;
}

.sort-button.active {
    background: #2E86AB;
    color: white;
    border-color: #2E86AB;
}

/* Animaciones de carga */
.properties-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 16px;
    color: #666;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF6B35;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efectos de transición para cambio de propiedades */
.properties-grid.updating {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.properties-grid.updated {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Estilos para propiedades destacadas */
.property-card.destacada::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #e55a2b);
}

/* Mejoras visuales adicionales */
.property-price {
    background: linear-gradient(135deg, #2E86AB, #1e5f7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.property-card:hover .property-price {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

