/* Grid de propiedades */
.apis-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    min-height: 200px;
}

/* Indicador de carga */
.apis-properties-grid.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.apis-properties-grid.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

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

/* Tarjeta de propiedad */
.apis-property-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.apis-property-card:hover {
    transform: translateY(-5px);
}

/* Imagen de la propiedad */
.apis-property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

/* Tipo de operación en esquina izquierda */
.apis-property-operacion {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.85em;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Estilo para VENTA - Gris */
.apis-property-operacion.venta {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: 1px solid #495057;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* Estilo para ALQUILER - Azul */
.apis-property-operacion.alquiler {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: 1px solid #138496;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

/* Tipo de inmueble / Estado de ficha */
.apis-property-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    z-index: 2;
}

/* Estado de ficha con estilo amarillo */
.apis-property-estado {
    background: #ffcc00 !important;
    color: #000 !important;
    font-weight: 600;
    border: 1px solid #e6b800;
    box-shadow: 0 2px 4px rgba(255, 204, 0, 0.3);
    font-size: 0.85em;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenido de la propiedad */
.apis-property-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.apis-property-title {
    margin: 10px 0;
    font-size: 1.2em;
    color: #333;
}

.apis-property-location {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.apis-property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.apis-property-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9em;
}

.apis-property-price {
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 15px;
}

.apis-property-link {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background 0.3s ease;
}

.apis-property-link:hover {
    background: #2980b9;
}

/* Mensaje de no propiedades */
.apis-no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Paginación moderna y elegante */
.apis-pagination-summary {
    text-align: center;
    color: #495057;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.apis-pagination-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

.apis-properties-pagination {
    display: flex;
    justify-content: center;
    margin: 50px 0 30px 0;
}

.apis-properties-pagination .pagination {
    margin: 0;
    padding: 8px;
    gap: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.apis-properties-pagination .page-item {
    margin: 0;
}

.apis-properties-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    background: transparent;
    border: none;
    color: #495057;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.apis-properties-pagination .page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.apis-properties-pagination .page-link:hover {
    color: #007bff;
    transform: translateY(-2px);
}

.apis-properties-pagination .page-link:hover::before {
    transform: scale(1);
}

.apis-properties-pagination .page-item.active .page-link {
    background: #007bff;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    position: relative;
    z-index: 1;
}

.apis-properties-pagination .page-item.active .page-link::before {
    display: none;
}

.apis-properties-pagination .page-item.disabled .page-link {
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.apis-properties-pagination .page-item.disabled .page-link:hover {
    color: #adb5bd;
    transform: none;
}

.apis-properties-pagination .page-item.disabled .page-link::before {
    display: none;
}

/* Flechas de navegación especiales */
.apis-properties-pagination .page-link[aria-label="Anterior"],
.apis-properties-pagination .page-link[aria-label="Siguiente"] {
    min-width: 48px;
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    margin: 0 4px;
}

.apis-properties-pagination .page-link[aria-label="Anterior"]:hover,
.apis-properties-pagination .page-link[aria-label="Siguiente"]:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Puntos suspensivos mejorados */
.apis-properties-pagination .page-item.disabled .page-link {
    background: transparent;
    border: none;
    color: #6c757d;
    font-weight: 600;
    cursor: default;
    min-width: 20px;
}

/* Primera y última página destacadas */
.apis-properties-pagination .page-item:first-child .page-link,
.apis-properties-pagination .page-item:last-child .page-link {
    font-weight: 600;
}

/* Responsive para móviles */
@media (max-width: 576px) {
    .apis-pagination-summary {
        font-size: 14px;
        padding: 12px 16px;
        margin-bottom: 25px;
    }
    
    .apis-properties-pagination .pagination {
        gap: 3px;
        padding: 6px;
    }
    
    .apis-properties-pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 14px;
    }
    
    .apis-properties-pagination .page-link[aria-label="Anterior"],
    .apis-properties-pagination .page-link[aria-label="Siguiente"] {
        min-width: 42px;
        margin: 0 2px;
    }
}

/* Animación de carga para el paginador */
.apis-properties-pagination.loading {
    opacity: 0.6;
    pointer-events: none;
}

.apis-properties-pagination.loading .pagination {
    position: relative;
}

.apis-properties-pagination.loading .pagination::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .apis-properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .apis-property-features {
        flex-wrap: wrap;
    }
    
    .apis-properties-pagination {
        flex-wrap: wrap;
    }
} 

/* Información adicional de paginación */
.pagination-info {
    text-align: center;
    margin-top: 15px;
}

.pagination-info small {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.pagination-info small i {
    color: #007bff;
}

/* Mejoras para iconos en paginación */
.apis-properties-pagination .page-link i {
    font-size: 14px;
    line-height: 1;
}

.apis-properties-pagination .page-link[aria-label="Anterior"] i,
.apis-properties-pagination .page-link[aria-label="Siguiente"] i {
    font-size: 16px;
    font-weight: bold;
}

/* Hover especial para primera y última página */
.apis-properties-pagination .page-item:first-child .page-link:hover,
.apis-properties-pagination .page-item:last-child .page-link:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Responsive para información de página */
@media (max-width: 576px) {
    .pagination-info {
        margin-top: 12px;
    }
    
    .pagination-info small {
        font-size: 12px;
        padding: 4px 10px;
    }
} 