/* ============================================================
   PropertiKu - Main Stylesheet
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --primary: #0d6efd;
    --primary-dark: #0854d0;
    --card-radius: 12px;
    --transition: .25s ease;
}

/* ── Typography ────────────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2d3748;
    -webkit-font-smoothing: antialiased;
}

/* ── Hover Lift Effect ─────────────────────────────────────────────────── */
.hover-lift {
    transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

/* ── Property Card ─────────────────────────────────────────────────────── */
.property-card {
    border-radius: var(--card-radius);
    transition: all var(--transition);
    overflow: hidden;
}
.property-card:hover .card-img-top,
.property-card:hover .property-image {
    transform: scale(1.05);
}
.property-card .card-body {
    padding: 14px 16px;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Category Card ─────────────────────────────────────────────────────── */
.category-card {
    border-radius: var(--card-radius);
    cursor: pointer;
    transition: all var(--transition);
    min-width: 110px;
}
.category-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.15) !important;
}
.category-card:hover .bi {
    color: var(--primary-dark) !important;
}
.category-card:hover .rounded-circle {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

/* ── Hero Section ──────────────────────────────────────────────────────── */
.hero-slide {
    position: relative;
}
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at bottom, rgba(0,0,0,0.2) 0%, transparent 70%);
}
.hero-slide .container {
    position: relative;
    z-index: 1;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
    backdrop-filter: blur(8px);
}
.navbar-dark .nav-link {
    transition: color var(--transition);
    font-size: 14.5px;
}
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    color: #fff !important;
}

/* ── Search Card (hero) ────────────────────────────────────────────────── */
.search-hero-card {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}
.input-group-text {
    border-color: #dee2e6;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    font-weight: 500;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    transition: all var(--transition);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    color: var(--primary);
    border-color: #dee2e6;
    transition: all var(--transition);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}
.pagination .page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── Property Detail ───────────────────────────────────────────────────── */
.property-description {
    font-size: 15px;
    line-height: 1.8;
}
.property-description p {
    margin-bottom: 1rem;
}

/* Gallery thumbnails */
.carousel-indicators button {
    border-radius: 6px !important;
    opacity: 0.6;
    transition: opacity var(--transition);
}
.carousel-indicators button.active {
    opacity: 1;
    border-color: var(--primary) !important;
}

/* ── User Dashboard ────────────────────────────────────────────────────── */
.dashboard-sidebar {
    min-height: calc(100vh - 80px);
    border-right: 1px solid #e2e8f0;
}
.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    font-size: 14px;
    transition: all var(--transition);
}
.dashboard-nav-link:hover,
.dashboard-nav-link.active {
    background: rgba(13, 110, 253, 0.08);
    color: var(--primary);
}
.dashboard-nav-link.active {
    font-weight: 600;
}

/* ── Status Badges ─────────────────────────────────────────────────────── */
.status-aktif    { color: #198754; background: rgba(25,135,84,.1);  }
.status-pending  { color: #f59e0b; background: rgba(245,158,11,.1); }
.status-ditolak  { color: #dc3545; background: rgba(220,53,69,.1);  }
.status-nonaktif { color: #6c757d; background: rgba(108,117,125,.1);}

/* ── Membership Cards ──────────────────────────────────────────────────── */
.membership-card {
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    transition: all var(--transition);
    cursor: pointer;
}
.membership-card:hover,
.membership-card.selected {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(13,110,253,0.15);
    transform: translateY(-2px);
}
.membership-card.featured {
    border-color: var(--primary);
    position: relative;
}
.membership-card.featured::before {
    content: 'TERPOPULER';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

/* ── Upload Dropzone ───────────────────────────────────────────────────── */
.dropzone {
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    background: #f8faff;
    transition: all var(--transition);
    cursor: pointer;
}
.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(13,110,253,0.04);
}
.dropzone i {
    font-size: 2.5rem;
    color: #a5b4fc;
}

/* ── Image Preview Thumbnails ──────────────────────────────────────────── */
.img-preview-wrap {
    position: relative;
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}
.img-preview-wrap img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-wrap .remove-img {
    position: absolute;
    top: 3px; right: 3px;
    background: rgba(220,53,69,.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* ── Lazy Load Fade ────────────────────────────────────────────────────── */
.lazy-img {
    opacity: 0;
    transition: opacity .4s ease;
}
.lazy-img.loaded {
    opacity: 1;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer a:hover { color: #60a5fa !important; }

/* ── Responsive Tweaks ─────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .display-4 { font-size: 1.8rem; }
    .property-card .card-body { padding: 10px 12px; }
    .pagination .page-link { padding: 4px 8px; font-size: 12px; }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Print ─────────────────────────────────────────────────────────────── */
@media print {
    #navbar, footer, .btn, .sidebar { display: none !important; }
}
