:root {
    --primary: #ff5a3c; /* Gold-Orange from screenshot */
    --primary-dark: #e04a2f;
    --secondary: #1b1b1b; /* Black */
    --background: #fdfdfd;
    --surface: #ffffff;
    --text: #2d2d2d;
    --text-muted: #777777;
    --border: #f0f0f0;
    --radius: 0px; /* Sharp corners like screenshot */
    --shadow: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

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

/* Top Bar */
.top-bar {
    background: var(--secondary);
    color: #94a3b8;
    padding: 12px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 25px;
    align-items: center;
}

.top-bar a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar a:hover {
    color: var(--primary);
}

.top-bar i {
    color: var(--primary);
}

/* Main Header */
.header-main {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.header-main nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 90px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.dynamic-logo {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary);
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
}

.logo-text span {
    font-size: 0.7rem;
    color: #94a3b8;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-menu li {
    height: 100%;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a:hover, .nav-menu li a.active {
    color: var(--primary);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu li a:hover::after, .nav-menu li a.active::after {
    transform: scaleX(1);
}

.header-cta {
    background: var(--primary);
    color: white !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    text-decoration: none;
    line-height: 1;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
    transition: background 0.3s;
    margin-right: -20px; /* Pull to edge of container */
}

.header-cta .cta-icon {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.header-cta .cta-text {
    font-weight: 800;
    font-size: 1.3rem;
}

.header-cta:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('../media/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    margin-bottom: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    background: white;
    padding: 0;
    border-radius: 8px;
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-box input {
    flex: 2;
    border: none;
    padding: 18px 25px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-box select {
    flex: 1;
    border: none;
    border-left: 1px solid var(--border);
    padding: 0 20px;
    outline: none;
    background: white;
    font-weight: 500;
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 40px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Property Grid & List */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.property-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.property-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
}

.property-card {
    background: var(--surface);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
    display: flex;
    flex-direction: column;
}

.property-list .property-card {
    flex-direction: row;
    min-height: 300px;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.property-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.property-list .property-image-wrapper {
    width: 40%;
    height: auto;
    min-height: 300px;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.property-card:hover .property-image {
    transform: scale(1.1);
}

.property-badge {
    position: absolute;
    top: 15px;
    padding: 6px 15px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    z-index: 2;
}

.badge-featured {
    left: 0;
    background: var(--primary);
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.badge-status {
    right: 0;
    background: #00aeef; /* Cyan for Rent like screenshot */
}

.badge-status.sale {
    background: #ed1c24; /* Red for Sale */
}

.badge-status.terjual {
    background: #64748b; /* Grey for Sold */
}

.badge-status.terbeli {
    background: #475569; /* Darker Grey for Bought */
}

.badge-status.tersewa {
    background: #334155; /* Even Darker for Rented */
}

/* Sold Out / Unavailable Effect */
.property-card.is-unavailable .property-image {
    filter: grayscale(100%) !important;
    opacity: 0.6 !important;
}

.property-card.is-unavailable .property-title,
.property-card.is-unavailable .property-price {
    color: #94a3b8 !important;
}

.property-card.is-unavailable:hover .property-image {
    transform: none; /* Disable zoom on hover for sold properties */
}

/* Diagonal Status Ribbon */
.status-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.status-ribbon span {
    position: absolute;
    display: block;
    width: 180px;
    padding: 8px 0;
    background-color: #ed1c24; /* Default red, will be overridden by status classes if needed */
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-align: center;
    right: -40px;
    top: 25px;
    transform: rotate(45deg);
}

.status-ribbon.terjual span { background-color: #ef4444; }
.status-ribbon.terbeli span { background-color: #3b82f6; }
.status-ribbon.tersewa span { background-color: #f59e0b; }

.property-content {
    padding: 20px;
    flex: 1;
}

.property-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1b1b1b;
    margin-bottom: 12px;
    line-height: 1.3;
}

.property-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.property-price span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.property-info-list {
    list-style: none;
    margin-bottom: 0;
}

.property-info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.property-info-list li i {
    color: var(--primary);
    width: 20px;
}

.property-stats-bar {
    background: var(--secondary);
    display: flex;
    padding: 15px 10px;
    color: white;
}

.stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item i {
    color: var(--primary);
}

/* Footer */
footer {
    background: #0f172a;
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-copy {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .search-box { flex-direction: column; border-radius: 20px; padding: 16px; }
    .search-box input, .search-box select { border: 1px solid var(--border); margin-bottom: 12px; }
    .property-grid { grid-template-columns: 1fr; }
    .property-grid-4 { grid-template-columns: 1fr; }
    .property-list .property-card { flex-direction: column; }
    .property-list .property-image-wrapper { width: 100%; min-height: 260px; }
}

/* Pagination Styling */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.pagination .page-item a.page-link {
    display: block;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--border);
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.pagination .page-item.active a.page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .page-item a.page-link:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-item.active a.page-link:hover {
    color: white;
    background: var(--primary-dark);
}

/* Admin specific styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: #f8fafc;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    text-align: center;
}

.btn-primary { background: var(--primary); color: white; }
.btn-danger { background: #ef4444; color: white; }
.btn-warning { background: #f59e0b; color: white; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
}
