/* ─── ServiceTradie.com.au – Main Stylesheet ─── */

:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --primary-light: #f39c12;
    --secondary: #2c3e50;
    --accent: #27ae60;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border: #dee2e6;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,.15);
    --radius: 12px;
    --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg-light);
    margin: 0;
}

/* Nav */
.navbar { background: var(--secondary) !important; box-shadow: 0 2px 8px rgba(0,0,0,.3); padding: .75rem 0; }
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: #fff !important; letter-spacing: -.5px; }
.navbar-brand span { color: var(--primary); }
.navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary) !important; }
.nav-cta { background: var(--primary); color: #fff !important; border-radius: 6px; padding: .4rem 1rem !important; }
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--secondary) 0%, #1a252f 60%, #2c3e50 100%); color: #fff; padding: 5rem 0 4rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(230,126,34,.15) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 560px; }

.search-bar { background: #fff; border-radius: 50px; display: flex; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.25); overflow: visible; max-width: 750px; position: relative; }
.search-bar input { border: none; outline: none; padding: .9rem 1.25rem; font-size: 1rem; flex: 1; background: transparent; color: var(--text); min-width: 0; }
.search-bar select { border: none; border-left: 1px solid var(--border); outline: none; padding: .9rem 1rem; font-size: .95rem; background: transparent; color: var(--text); min-width: 150px; }
.search-bar select:first-child { border-left: none; }
.search-bar .search-autocomplete-wrap { flex: 1; display: flex; position: relative; min-width: 0; border-left: 1px solid var(--border); }
.search-bar .search-autocomplete-wrap input { border: none; border-left: none; width: 100%; }
.search-bar .btn-search { background: var(--primary); color: #fff; border: none; padding: .9rem 1.5rem; font-size: 1rem; cursor: pointer; white-space: nowrap; font-weight: 600; transition: background .2s; border-radius: 0 50px 50px 0; flex-shrink: 0; }
.search-bar .btn-search:hover { background: var(--primary-dark); }

/* Autocomplete dropdown */
.autocomplete-list { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 260px; overflow-y: auto; z-index: 1000; }
.search-bar .autocomplete-list { left: -1px; right: -1px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.autocomplete-item { padding: .6rem 1rem; font-size: .9rem; color: var(--text); cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background .15s; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--bg-light); color: var(--primary); }
.search-autocomplete-wrap .autocomplete-list { top: 100%; margin-top: 4px; }
.hero-badges { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.hero-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: .3rem .85rem; border-radius: 20px; font-size: .85rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-title { font-size: 2rem; font-weight: 700; color: var(--secondary); }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; }
.section-title span { color: var(--primary); }

/* Category Cards */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.25rem; }
.category-card { background: var(--bg-white); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: all .25s; display: block; border: 2px solid transparent; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); color: var(--primary); }
.category-card i { font-size: 2.25rem; color: var(--primary); display: block; margin-bottom: .75rem; }
.category-card .cat-name { font-weight: 600; font-size: .95rem; }
.category-card .cat-count { font-size: .8rem; color: var(--text-muted); }

/* Business Cards */
.business-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); transition: all .25s; overflow: hidden; display: flex; flex-direction: column; }
.business-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.business-card-body { padding: 1.25rem; flex: 1; }
.business-card-footer { padding: .75rem 1.25rem; background: var(--bg-light); border-top: 1px solid var(--border); }
.biz-logo { width: 56px; height: 56px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; font-weight: 700; flex-shrink: 0; }
.biz-name { font-size: 1.1rem; font-weight: 700; color: var(--secondary); margin: 0; }
.biz-name a { color: inherit; text-decoration: none; }
.biz-name a:hover { color: var(--primary); }
.badge-verified { background: #d4edda; color: #155724; font-size: .75rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }
.badge-featured { background: #fff3cd; color: #856404; font-size: .75rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }
.badge-category { background: #e8f0fe; color: #1a56db; font-size: .75rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }
.star-rating { color: #f39c12; font-size: .95rem; }
.rating-text { font-size: .85rem; color: var(--text-muted); }

/* Stars */
.star-full { color: #f39c12; }
.star-half { color: #f39c12; }
.star-empty { color: #ddd; }

/* Profile Header */
.profile-header { background: linear-gradient(135deg, var(--secondary), #1a252f); color: #fff; padding: 3rem 0 2rem; }
.profile-logo { width: 90px; height: 90px; background: var(--primary); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #fff; font-weight: 700; }
.rating-large { font-size: 3rem; font-weight: 800; color: var(--primary); }
.rating-bar { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: #f39c12; border-radius: 4px; }

/* Forms */
.form-card { background: var(--bg-white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.form-label { font-weight: 600; color: var(--secondary); margin-bottom: .35rem; }
.form-control, .form-select { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .85rem; transition: border-color .2s, box-shadow .2s; width: 100%; display: block; font-size: 1rem; color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,126,34,.15); outline: none; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* Placeholder - lighter and italic to distinguish from entered text */
.form-control::placeholder { color: #a8b0b9; opacity: 1; font-weight: 400; font-style: italic; }
.form-control::-webkit-input-placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }
.form-control::-moz-placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }
.form-control:-ms-input-placeholder { color: #a8b0b9; font-style: italic; }
textarea.form-control::placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }
.search-bar input::placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }
.search-bar input::-webkit-input-placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }
.search-bar input::-moz-placeholder { color: #a8b0b9; opacity: 1; font-style: italic; }

.btn-primary-custom { background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); padding: .65rem 1.75rem; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background .2s, transform .15s; text-decoration: none; display: inline-block; }
.btn-primary-custom:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff; }
.btn-secondary-custom { background: var(--secondary); color: #fff; border: none; border-radius: var(--radius-sm); padding: .65rem 1.75rem; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background .2s; text-decoration: none; display: inline-block; }
.btn-secondary-custom:hover { background: #1a252f; color: #fff; }
.btn-outline-custom { background: transparent; color: var(--primary); border: 2px solid var(--primary); border-radius: var(--radius-sm); padding: .55rem 1.5rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; display: inline-block; }
.btn-outline-custom:hover { background: var(--primary); color: #fff; }
.btn-danger-custom { background: #dc3545; color: #fff; border: none; border-radius: var(--radius-sm); padding: .45rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .2s; text-decoration: none; display: inline-block; }
.btn-danger-custom:hover { background: #c82333; color: #fff; }
.btn-success-custom { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: .45rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .2s; text-decoration: none; display: inline-block; }
.btn-success-custom:hover { background: #219a52; color: #fff; }

/* Filter sidebar */
.filter-card { background: var(--bg-white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); position: sticky; top: 1rem; }
.filter-title { font-weight: 700; font-size: 1.05rem; color: var(--secondary); border-bottom: 2px solid var(--primary); padding-bottom: .5rem; margin-bottom: 1rem; }

/* Portal / Admin */
.portal-sidebar { background: var(--secondary); min-height: 100vh; color: #fff; width: 250px; flex-shrink: 0; }
.portal-sidebar .sidebar-brand { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.portal-sidebar .nav-link { color: rgba(255,255,255,.8); padding: .65rem 1.5rem; display: flex; align-items: center; gap: .65rem; text-decoration: none; transition: all .2s; font-size: .95rem; border-left: 3px solid transparent; }
.portal-sidebar .nav-link:hover, .portal-sidebar .nav-link.active { background: rgba(255,255,255,.1); color: var(--primary); border-left-color: var(--primary); }
.portal-main { flex: 1; padding: 2rem; background: var(--bg-light); min-height: 100vh; }
.portal-wrapper { display: flex; min-height: 100vh; }

.stat-card { background: var(--bg-white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--secondary); line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }
.stat-icon { font-size: 2rem; color: var(--primary); }

/* Tables */
.admin-table { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-table table { margin: 0; width: 100%; border-collapse: collapse; }
.admin-table thead th { background: var(--secondary); color: #fff; font-weight: 600; padding: .85rem 1rem; border: none; font-size: .9rem; }
.admin-table tbody td { padding: .75rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--border); font-size: .9rem; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--bg-light); }

/* Status Badges */
.status-badge { display: inline-block; padding: .2rem .65rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.status-active { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-suspended { background: #f8d7da; color: #721c24; }
.status-new { background: #cce5ff; color: #004085; }
.status-viewed { background: #e2e3e5; color: #383d41; }
.status-responded { background: #d4edda; color: #155724; }
.status-closed { background: #e2e3e5; color: #383d41; }

/* How it works */
.step-number { width: 56px; height: 56px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 auto 1rem; }
.step-card { text-align: center; }
.step-card h5 { font-weight: 700; color: var(--secondary); }

/* CTA */
.cta-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 4rem 0; text-align: center; }
.cta-section h2 { font-size: 2.2rem; font-weight: 800; }
.btn-white { background: #fff; color: var(--primary); border: none; border-radius: var(--radius-sm); padding: .75rem 2rem; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-decoration: none; display: inline-block; transition: all .2s; }
.btn-white:hover { background: var(--bg-light); color: var(--primary-dark); transform: translateY(-2px); }

/* Footer */
footer { background: var(--secondary); color: rgba(255,255,255,.8); padding: 3rem 0 1.5rem; }
footer h5 { color: #fff; font-weight: 700; }
footer a { color: rgba(255,255,255,.7); text-decoration: none; }
footer a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: rgba(255,255,255,.5); }

/* Alerts */
.alert-custom { border-radius: var(--radius-sm); padding: .9rem 1.25rem; margin-bottom: 1rem; border-left: 4px solid; }
.alert-success { background: #d4edda; color: #155724; border-color: #28a745; }
.alert-danger { background: #f8d7da; color: #721c24; border-color: #dc3545; }
.alert-info { background: #d1ecf1; color: #0c5460; border-color: #17a2b8; }
.alert-warning { background: #fff3cd; color: #856404; border-color: #ffc107; }

/* Star Picker */
.star-picker { display: flex; flex-direction: row-reverse; gap: .25rem; }
.star-picker input { display: none; }
.star-picker label { font-size: 2rem; color: #ddd; cursor: pointer; transition: color .15s; }
.star-picker input:checked ~ label, .star-picker label:hover, .star-picker label:hover ~ label { color: #f39c12; }

/* Misc */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.divider { border-top: 2px solid var(--border); margin: 2rem 0; }
.page-header { background: var(--bg-white); padding: 2rem 0; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; color: var(--secondary); margin: 0; }

@media (max-width: 767px) {
    .search-bar { flex-direction: column; border-radius: var(--radius); overflow: visible; }
    .search-bar input, .search-bar select, .search-bar .search-autocomplete-wrap { width: 100%; border: none; border-bottom: 1px solid var(--border); }
    .search-bar .search-autocomplete-wrap { border-left: none; }
    .search-bar .btn-search { width: 100%; border-radius: 0 0 var(--radius) var(--radius); }
    .portal-wrapper { flex-direction: column; }
    .portal-sidebar { width: 100%; min-height: auto; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 3rem 0 2.5rem; }
}


/* ─── Blog ─── */
.blog-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: all .25s; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.blog-card-img { background: linear-gradient(135deg, var(--secondary), #1a252f); height: 180px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.blog-card-body { padding: 1.25rem; flex: 1; }
.blog-card-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg-light); }
.blog-tag { background: #e8f0fe; color: #1a56db; font-size: .75rem; padding: .2rem .65rem; border-radius: 20px; font-weight: 600; display: inline-block; margin-bottom: .5rem; }
.blog-meta { font-size: .82rem; color: var(--text-muted); }
.blog-title { font-size: 1.1rem; font-weight: 700; color: var(--secondary); margin: .4rem 0 .6rem; line-height: 1.3; }
.blog-title a { color: inherit; text-decoration: none; }
.blog-title a:hover { color: var(--primary); }
.blog-excerpt { font-size: .9rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Article content */
.article-header { background: linear-gradient(135deg, var(--secondary) 0%, #1a252f 100%); color: #fff; padding: 3.5rem 0 2.5rem; }
.article-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.25; }
.article-tag { background: rgba(230,126,34,.25); color: var(--primary); font-size: .8rem; padding: .25rem .75rem; border-radius: 20px; font-weight: 600; display: inline-block; margin-bottom: .75rem; border: 1px solid rgba(230,126,34,.4); }
.article-meta { font-size: .88rem; opacity: .75; margin-top: .75rem; }
.article-body { font-size: 1.05rem; line-height: 1.85; color: #333; }
.article-body h2 { font-size: 1.55rem; font-weight: 800; color: var(--secondary); margin: 2.25rem 0 .9rem; padding-bottom: .4rem; border-bottom: 2px solid var(--primary); }
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--secondary); margin: 1.75rem 0 .65rem; }
.article-body p { margin-bottom: 1.15rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.15rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { color: var(--secondary); }
.article-body a { color: var(--primary); }
.article-body a:hover { color: var(--primary-dark); }
.article-body blockquote { border-left: 4px solid var(--primary); background: #fff8f0; padding: 1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0; font-style: italic; color: var(--secondary); }
.article-sidebar { position: sticky; top: 1.5rem; }
.toc-card { background: var(--bg-white); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.toc-card h5 { font-weight: 700; color: var(--secondary); margin-bottom: .75rem; font-size: .95rem; }
.toc-card ol { padding-left: 1.25rem; margin: 0; }
.toc-card li { font-size: .88rem; margin-bottom: .35rem; }
.toc-card a { color: var(--text-muted); text-decoration: none; }
.toc-card a:hover { color: var(--primary); }
.cta-inline { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius); padding: 1.5rem; margin: 2rem 0; text-align: center; }
.cta-inline h4 { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.cta-inline p { opacity: .9; font-size: .95rem; margin-bottom: 1rem; }
