/* cariprojek.my — Mobile-first, clean, fast, GEO-optimized */
:root {
    --bg: #0f1117;
    --surface: #1a1d28;
    --card: #222536;
    --accent: #4f8cff;
    --accent-hover: #6da0ff;
    --text: #e8eaf0;
    --text-muted: #8b90a0;
    --border: #2d3045;
    --green: #34d399;
    --tag-bg: #2a3a5c;
    --radius: 10px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.site-logo span { color: var(--accent); }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--text-muted); font-size: 0.9rem; }
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.hero h1 { font-size: 1.6rem; margin-bottom: 0.5rem; line-height: 1.3; }
.hero p { color: var(--text-muted); font-size: 0.95rem; max-width: 540px; margin: 0 auto 1rem; }
.hero-stats { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-stats .stat {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.hero-stats .stat strong { color: var(--accent); }
@media (min-width: 640px) {
    .hero h1 { font-size: 2rem; }
}

/* Area Tiles */
.area-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}
@media (min-width: 640px) { .area-grid { grid-template-columns: repeat(5, 1fr); } }
.area-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    color: var(--text);
    transition: border-color 0.15s;
}
.area-tile:hover { border-color: var(--accent); color: var(--text); }
.area-name { display: block; font-weight: 600; font-size: 0.85rem; }
.area-count { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Project Grid */
.project-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 0.5rem 0 1rem; }
@media (min-width: 520px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }

/* Project Card */
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    transition: transform 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.card-image { aspect-ratio: 16/9; overflow: hidden; background: var(--surface); }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.card-body .location { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.tag {
    background: var(--tag-bg);
    color: var(--accent);
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}
.tag.freehold { background: #1a3a2a; color: var(--green); }
.card-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.card-price { font-size: 0.95rem; font-weight: 600; color: var(--green); }
.card-completion { font-size: 0.7rem; color: var(--text-muted); }

/* Breadcrumb */
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); padding: 0.75rem 0 0.25rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.3rem; }

/* Project Hero */
.project-hero-image {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--surface);
    margin: 0.5rem 0;
}
.project-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-hero { padding: 1rem 0 0.5rem; }
.project-hero h1 { font-size: 1.5rem; margin-bottom: 0.2rem; }
.project-hero .subtitle { color: var(--text-muted); font-size: 0.9rem; }
@media (min-width: 640px) { .project-hero h1 { font-size: 1.75rem; } }

/* Citation Gold */
.citation-gold {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 0.75rem 0 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Sections */
.section { margin: 1.5rem 0; }
.section h2 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* Specs Table */
.specs-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
.specs-table th, .specs-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.specs-table th { color: var(--text-muted); font-weight: 500; width: 35%; }

/* Unit Types Table */
.unit-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.unit-types-table th { width: auto; font-weight: 600; color: var(--accent); }
.unit-types-table td { white-space: nowrap; }

/* Selling Points */
.selling-points { list-style: none; }
.selling-points li {
    padding: 0.35rem 0 0.35rem 1.3rem;
    position: relative;
    font-size: 0.9rem;
}
.selling-points li::before {
    content: "\2713";
    color: var(--green);
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* Facilities */
.facilities-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facility-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
}

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.gallery-item figcaption {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Proximity */
.proximity-list { list-style: none; }
.proximity-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.proximity-list .distance { color: var(--green); font-weight: 600; white-space: nowrap; }

/* YouTube */
.video-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 520px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
.video-card {
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    color: var(--text);
}
.video-card:hover { color: var(--text); }
.video-card .thumb { position: relative; padding-top: 56.25%; background: #000; }
.video-card .thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.video-card .thumb .play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.video-card .thumb .play-btn::after {
    content: "";
    border-left: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    margin-left: 2px;
}
.video-card .vid-info { padding: 0.5rem 0.6rem; }
.video-card .vid-title { font-size: 0.78rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card .vid-views { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
    padding: 0.65rem 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    list-style: none;
}
.faq-item summary::before { content: "+"; color: var(--accent); margin-right: 0.6rem; font-weight: 700; }
.faq-item[open] summary::before { content: "\2212"; }
.faq-item p { padding: 0 0 0.65rem 1.3rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

/* CTA */
.cta-section { text-align: center; padding: 2rem 0; }
.cta-section h2 { border-bottom: none; }
.cta-section p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.cta-btn {
    display: inline-block;
    background: #25D366;
    color: #fff;
    padding: 0.7rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s;
}
.cta-btn:hover { background: #20bd5a; color: #fff; }

/* Floating WhatsApp */
.wa-float {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: #25D366;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    z-index: 90;
    transition: transform 0.15s;
}
.wa-float:hover { transform: scale(1.1); }

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.25rem;
    margin-top: 2rem;
}
.footer-content { text-align: center; }
.footer-brand { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.footer-agent { font-size: 0.8rem; color: var(--text-muted); }
