/* =========================================================================
   Jasainstalasi.com — base stylesheet
   Plain, hand-written CSS (no build step) so the whole project can be
   uploaded to shared hosting and edited directly if needed.
   ========================================================================= */

:root {
    --color-primary: #0b5fd7;
    --color-primary-dark: #073e8c;
    --color-primary-light: #eaf2fe;
    --color-accent: #f7941d;
    --color-text: #16213a;
    --color-text-muted: #5b6579;
    --color-bg: #ffffff;
    --color-bg-alt: #f6f8fc;
    --color-border: #e4e8f1;
    --color-success: #1a9c5f;
    --color-danger: #d7373f;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(16, 24, 64, 0.08);
    --shadow-md: 0 8px 24px rgba(16, 24, 64, 0.10);
    --container-w: 1200px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
    border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-outline { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-white { background: #fff; color: var(--color-primary); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-whatsapp { background: #25D366; color: #fff; }

/* --- Header --------------------------------------------------------------*/
.site-header {
    position: sticky; top: 0; z-index: 40; background: #fff;
    border-bottom: 1px solid var(--color-border);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--color-primary); }
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 22px; flex: 1; justify-content: center; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--color-text); padding: 8px 2px; }
.main-nav a:hover { color: var(--color-primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; }

@media (max-width: 920px) {
    .main-nav { position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column; align-items: flex-start;
        padding: 20px; gap: 4px; overflow-y: auto; transform: translateX(100%); transition: transform .2s ease; }
    .main-nav.open { transform: translateX(0); }
    .main-nav a { width: 100%; padding: 12px 8px; border-bottom: 1px solid var(--color-border); }
    .nav-toggle { display: block; }
    .header-actions .btn span { display: none; }
}

/* --- Hero ------------------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff; padding: 56px 0 72px; position: relative; overflow: hidden;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 10px; }
.hero p.lead { font-size: 17px; opacity: .92; max-width: 640px; margin: 0 auto 28px; }
.hero-inner { text-align: center; }

.search-card {
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    padding: 18px; max-width: 880px; margin: 0 auto; display: grid; gap: 10px;
    grid-template-columns: 1fr 1fr 1fr auto;
}
.search-card select, .search-card input[type="text"] {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
    font-size: 14.5px; color: var(--color-text); background: #fff;
}
.search-card .btn { padding: 12px 26px; }
@media (max-width: 760px) {
    .search-card { grid-template-columns: 1fr; }
}

.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -34px; position: relative; z-index: 2; }
.quick-link { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 16px; display: flex; gap: 12px; align-items: center; border: 1px solid var(--color-border); }
.quick-link .ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--color-primary-light); color: var(--color-primary); flex-shrink: 0; }
.quick-link strong { display: block; font-size: 14px; }
.quick-link span { font-size: 12.5px; color: var(--color-text-muted); }
@media (max-width: 900px) { .quick-links { grid-template-columns: repeat(2, 1fr); } }

/* --- Sections ------------------------------------------------------------*/
.section { padding: 56px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; margin: 0; }
.section-head p { color: var(--color-text-muted); margin: 4px 0 0; }
.section-head .more { font-weight: 700; color: var(--color-primary); font-size: 14px; }

/* --- Category grid ---------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-card {
    border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px 16px; text-align: center;
    transition: box-shadow .15s ease, transform .15s ease; background: #fff;
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cat-card .ic { width: 54px; height: 54px; border-radius: 14px; background: var(--color-primary-light); color: var(--color-primary);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.cat-card strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.cat-card span { font-size: 12.5px; color: var(--color-text-muted); }

/* --- Cards / listing ---------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.article-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: #fff; transition: box-shadow .15s ease; }
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card .thumb { aspect-ratio: 16/9; background: var(--color-bg-alt) center/cover no-repeat; }
.article-card .body { padding: 16px; }
.article-card .cat-tag { font-size: 12px; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: .04em; }
.article-card h3 { font-size: 17px; margin: 6px 0 8px; }
.article-card p { font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 0; }

.tech-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; padding: 18px; display: flex; gap: 14px; }
/* Base avatar look (photo thumbnail or initial-letter fallback), reused
   anywhere a technician's photo is shown — search cards, profile header,
   dashboard, etc. background-position/size here is what actually makes an
   uploaded photo fill the circle instead of showing only its top-left
   corner; a caller only needs to override width/height/font-size. */
.avatar { border-radius: 50%; background-color: var(--color-primary-light); background-position: center; background-size: cover; background-repeat: no-repeat; flex-shrink: 0; display:flex; align-items:center; justify-content:center; color: var(--color-primary); font-weight:700; overflow:hidden; }
.tech-card .avatar { width: 64px; height: 64px; font-size:20px; }
.tech-card h3 { font-size: 16px; margin: 0 0 2px; display: flex; align-items: center; gap: 6px; }
.tech-card .loc { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.tech-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 11.5px; background: var(--color-primary-light); color: var(--color-primary); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.badge-verified { display: inline-flex; align-items:center; gap:3px; font-size: 11px; background: #e6f7ee; color: var(--color-success); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.rating { color: #f5a524; font-size: 13px; font-weight: 700; }

/* --- Promo banner strip ------------------------------------------------- */
.promo-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .promo-strip { grid-template-columns: 1fr; } }
.promo-banner { border-radius: var(--radius-md); overflow: hidden; position: relative; min-height: 140px; background-size: cover; background-position: center; }

/* --- Forms --------------------------------------------------------------*/
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
    font-size: 14.5px; font-family: inherit; color: var(--color-text); background: #fff;
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(11,95,215,.12); }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { font-size: 12.5px; color: var(--color-text-muted); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--color-danger); margin-top: 4px; font-weight: 600; }

/* WhatsApp/phone input with a fixed "+62" country-code prefix (see
   partials/phone_input.php). */
.phone-input { display: flex; align-items: stretch; }
.phone-input .phone-prefix {
    display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--color-border);
    border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    background: #f8fafc; color: var(--color-text-muted); font-size: 14.5px; font-weight: 700; white-space: nowrap;
}
.phone-input .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Rich text editor (Quill) — match the look of .form-control inputs. */
.rich-editor-toolbar.ql-toolbar.ql-snow { border: 1px solid var(--color-border); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: #f8fafc; }
.rich-editor-body.ql-container.ql-snow { border: 1px solid var(--color-border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-size: 14.5px; }
.rich-editor-body .ql-editor { min-height: 260px; }
.auth-card { max-width: 440px; margin: 48px auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--color-text-muted); font-size: 14px; margin-bottom: 24px; }

/* --- Alerts / flashes ---------------------------------------------------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; font-weight: 600; }
.alert-success { background: #e6f7ee; color: var(--color-success); }
.alert-error { background: #fdecec; color: var(--color-danger); }

/* --- Footer ---------------------------------------------------------------*/
.site-footer { background: #0e1b34; color: #c6cede; padding: 52px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; font-size: 13.5px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; font-size: 12.5px; color: #8b93a7; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }

/* --- Sticky WhatsApp / mobile CTA ---------------------------------------- */
.sticky-cta { position: fixed; right: 18px; bottom: 18px; z-index: 50; }
.sticky-cta a { width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* --- Utility --------------------------------------------------------------*/
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); font-size: 13.5px; font-weight: 600; }
.pagination .active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--color-primary); }
.prose { font-size: 15.5px; }
.prose h2 { font-size: 21px; margin-top: 1.6em; }
.prose h3 { font-size: 17.5px; margin-top: 1.4em; }
.prose ul { padding-left: 1.4em; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px; z-index: 100; }
.skip-link:focus { left: 10px; }

/* --- Admin panel (shared light shell) -------------------------------------*/
.admin-body { background: var(--color-bg-alt); min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #0e1b34; color: #c6cede; padding: 20px 14px; }
.admin-sidebar .brand { color: #fff; padding: 0 6px 20px; }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; color: #c6cede; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .grp { text-transform: uppercase; font-size: 11px; color: #6d7793; margin: 18px 6px 6px; letter-spacing: .05em; }
.admin-main { padding: 26px 30px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }
.stat-card .num { font-size: 26px; font-weight: 800; }
.stat-card .lbl { font-size: 13px; color: var(--color-text-muted); }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
table.admin-table th { color: var(--color-text-muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.status-pending { background: #fff4e0; color: #a0630c; }
.status-verified, .status-published, .status-confirmed { background: #e6f7ee; color: var(--color-success); }
.status-rejected, .status-closed { background: #fdecec; color: var(--color-danger); }
.status-draft, .status-new { background: #eef1f8; color: var(--color-text-muted); }
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
}
