/* CSS específico para list_rentals.html */
/* Heredan de tema-variables.css para soporte de temas */

/* Variables premium - Heredan del tema activo */
:root {
    --premium-primary: var(--tema-primario, #1e90ff);
    --premium-secondary: var(--tema-secundario, #4169e1);
}

/* Header premium con gradiente */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--premium-primary), var(--premium-secondary)) !important;
}

.rentals-header {
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.15);
    margin-bottom: 2rem;
}

.rentals-header h2 {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Filtros con estilo premium card */
.search-filters {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(30, 144, 255, 0.2);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.15);
}

.input-group-text {
    border: none;
    background: linear-gradient(135deg, var(--premium-primary), var(--premium-secondary)) !important;
    color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--premium-primary);
    box-shadow: 0 0 0 0.25rem rgba(30, 144, 255, 0.25);
}

/* Tarjetas premium */
.rental-property-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 144, 255, 0.2);
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.15);
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.rental-property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 144, 255, 0.2);
    border-color: rgba(30, 144, 255, 0.3);
}

/* Imagen optimizada con mejor proporción multimedia */
.rental-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.rental-hero-image {
    width: 100%;
    height: 180px; /* Incrementado para mejor proporción multimedia */
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0 !important;
    background-size: cover;
    background-position: center;
    display: block;
}

.rental-property-card:hover .rental-hero-image {
    transform: scale(1.03);
}

/* Mejor handling para diferentes tipos de media */
.rental-hero-image img,
.rental-hero-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Placeholder para archivos multimedia faltantes */
.rental-hero-image.bg-light {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    height: 180px;
    color: #6c757d;
}

.rental-hero-image.bg-light i {
    font-size: 3rem;
    opacity: 0.6;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Mejorar el aspect ratio para multimedia */
.rental-image-wrapper::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio ideal para multimedia */
    position: relative;
}

.rental-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Botones centrados */
.rental-footer .btn {
    flex: 1;
    max-width: 120px;
}

.rental-footer .d-flex {
    justify-content: center;
    gap: 10px;
}

/* Overlay */
.rental-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rental-property-card:hover .rental-overlay {
    opacity: 1;
}

/* Badges */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white;
}

.bg-info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
    color: white;
}

/* Elementos */
.bg-primary-subtle {
    background-color: rgba(30, 144, 255, 0.08) !important;
    border: 1px solid rgba(30, 144, 255, 0.1);
    border-radius: 6px;
}

.text-primary {
    color: var(--premium-primary) !important;
}

/* Título */
.card-title {
    color: var(--premium-primary) !important;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

/* Specs */
.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(30, 144, 255, 0.08);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #333 !important;
    border: 1px solid rgba(30, 144, 255, 0.1);
}

/* Precio */
.price-display {
    border-top: 1px solid rgba(30, 144, 255, 0.1);
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
    padding: 12px 0;
    text-align: center;
}

/* Botones con bordes ovalados */
.btn-outline-primary {
    border-color: var(--premium-primary);
    color: var(--premium-primary);
    transition: all 0.3s ease;
    border-radius: 25px !important;
}

.btn-outline-primary:hover {
    background: var(--premium-primary);
    border-color: var(--premium-primary);
    color: white;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--premium-primary), var(--premium-secondary)) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
    border-radius: 25px !important;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1c7ed6, #1971c2) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.4);
    color: white !important;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

/* Sistema de precios unificado */
.rental-pricing, .sale-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rental-primary {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 4px;
}

.rental-period {
    font-size: 0.9rem;
    color: var(--premium-primary) !important;
    font-weight: 600;
    margin-left: 4px;
}

.rental-secondary {
    color: #666 !important;
    font-size: 0.75rem;
    text-align: center;
}

.rental-secondary small {
    color: #666 !important;
}

.price-display, .rental-primary {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.currency-symbol {
    font-size: 1rem;
    color: var(--premium-primary) !important;
    font-weight: 600;
    margin-right: 4px;
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--premium-primary) !important;
}

.price-consult {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--premium-primary) !important;
    font-weight: 600;
}

.price-consult i {
    color: var(--premium-primary) !important;
}

/* Sección sin resultados */
/* Estado vacío */
.no-rentals {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(30, 144, 255, 0.2);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.15);
    border-radius: 12px;
}

.no-rentals .premium-icon-lg {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--premium-primary), var(--premium-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 15px 35px rgba(30, 144, 255, 0.3);
}

.no-rentals .premium-icon-lg i {
    font-size: 2rem;
    color: white;
}

.no-rentals h3 {
    color: #1e90ff !important;
    text-shadow: none;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-rentals p {
    color: #6c757d !important;
}

/* Animaciones y transiciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rental-card {
    animation: fadeInUp 0.6s ease-out;
}

.rental-card:nth-child(2) { animation-delay: 0.1s; }
.rental-card:nth-child(3) { animation-delay: 0.2s; }
.rental-card:nth-child(4) { animation-delay: 0.3s; }
.rental-card:nth-child(5) { animation-delay: 0.4s; }
.rental-card:nth-child(6) { animation-delay: 0.5s; }

/* Responsivo */
@media (max-width: 768px) {
    .rentals-header h2 {
        font-size: 1.5rem;
    }
    
    .search-filters {
        padding: 1.5rem !important;
    }
    
    .rental-hero-image {
        height: 180px;
    }
    
    .card-title {
        font-size: 1rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rental-card {
    animation: fadeInUp 0.6s ease-out;
}

.rental-card:nth-child(2) { animation-delay: 0.1s; }
.rental-card:nth-child(3) { animation-delay: 0.2s; }
.rental-card:nth-child(4) { animation-delay: 0.3s; }
.rental-card:nth-child(5) { animation-delay: 0.4s; }
.rental-card:nth-child(6) { animation-delay: 0.5s; }

/* Grid de listado de propiedades */
.row.rental-grid {
    display: flex;
    flex-wrap: wrap;
}

.col-xl-3, .col-lg-4, .col-md-6 {
    display: flex;
    flex-direction: column;
}

.col-xl-3 > .card, .col-lg-4 > .card, .col-md-6 > .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rental-footer {
    margin-top: auto;
}

/* Responsive optimizado para multimedia */
@media (max-width: 768px) {
    .search-filters .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .rental-image-wrapper::before {
        padding-top: 60%; /* Aspect ratio más compacto en móvil */
    }
}

@media (max-width: 576px) {
    .rentals-header {
        margin-bottom: 1rem;
    }
    
    .rentals-header .py-3 {
        padding: 1rem 0 !important;
    }
    
    .search-filters {
        padding: 1rem !important;
    }
    
    .rental-image-wrapper::before {
        padding-top: 65%; /* Aspect ratio móvil pequeño */
    }
    
    .rental-property-card {
        margin-bottom: 1.5rem;
    }
    
    .rental-hero-image.bg-light i {
        font-size: 2.5rem; /* Icono más pequeño en móvil */
    }
}