/*
Theme Name: بهترین‌ساز
Theme URI: https://behtarinsaz.com
Description: قالب اختصاصی دایرکتوری متخصصان ساختمانی ایران
Author: Behtarinsaz
Template: hello-elementor
Version: 1.0.0
Text Domain: behtarinsaz
*/

/* ==============================
   DESIGN TOKENS
   ============================== */
:root {
    --btz-primary:     #1a6fb5;
    --btz-primary-d:   #124f85;
    --btz-accent:      #f59e0b;
    --btz-accent-d:    #d97706;
    --btz-dark:        #0f172a;
    --btz-text:        #1e293b;
    --btz-muted:       #64748b;
    --btz-light:       #f1f5f9;
    --btz-white:       #ffffff;
    --btz-border:      #e2e8f0;
    --btz-green:       #10b981;
    --btz-wa:          #25d366;
    --btz-radius:      12px;
    --btz-radius-sm:   6px;
    --btz-shadow:      0 2px 16px rgba(0,0,0,.08);
    --btz-shadow-lg:   0 8px 32px rgba(0,0,0,.14);
    --btz-font:        'Vazirmatn', 'IRANYekan', Tahoma, Arial, sans-serif;
    --btz-header-h:    70px;
}

/* ==============================
   RESET / BASE
   ============================== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--btz-font);
    color: var(--btz-text);
    background: #f8fafc;
    direction: rtl;
    margin: 0;
}

a { color: var(--btz-primary); text-decoration: none; }
a:hover { color: var(--btz-primary-d); }
img { max-width: 100%; height: auto; }

.btz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ==============================
   TOP BAR
   ============================== */
.btz-topbar {
    background: var(--btz-dark);
    color: rgba(255,255,255,.75);
    font-size: 12px;
    padding: .4rem 0;
}

.btz-topbar .btz-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.btz-topbar a {
    color: rgba(255,255,255,.75);
    margin-right: 1rem;
    transition: color .2s;
}
.btz-topbar a:hover { color: #fff; }

/* ==============================
   HEADER
   ============================== */
.btz-header {
    background: var(--btz-white);
    border-bottom: 1px solid var(--btz-border);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.btz-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--btz-header-h);
    gap: 1rem;
}

/* Logo */
.btz-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.btz-logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--btz-primary), var(--btz-primary-d));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.btz-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.btz-logo-text strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--btz-primary);
}

.btz-logo-text span {
    font-size: 11px;
    color: var(--btz-muted);
}

/* Nav */
.btz-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.btz-nav a {
    display: block;
    padding: .5rem .85rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--btz-text);
    border-radius: var(--btz-radius-sm);
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.btz-nav a:hover,
.btz-nav a.active {
    background: var(--btz-light);
    color: var(--btz-primary);
}

/* CTA button in header */
.btz-header-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    background: var(--btz-accent);
    color: var(--btz-white) !important;
    border-radius: var(--btz-radius-sm);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s, transform .15s;
}

.btz-header-cta:hover {
    background: var(--btz-accent-d);
    transform: translateY(-1px);
    color: #fff !important;
}

/* Hamburger */
.btz-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: .5rem;
    background: none;
    border: none;
}

.btz-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--btz-text);
    border-radius: 2px;
    transition: all .25s;
}

/* Mobile menu */
.btz-mobile-menu {
    display: none;
    background: var(--btz-white);
    border-top: 1px solid var(--btz-border);
    padding: 1rem 1.25rem;
}

.btz-mobile-menu.open { display: block; }

.btz-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.btz-mobile-menu a {
    display: block;
    padding: .65rem 1rem;
    font-size: 15px;
    color: var(--btz-text);
    border-radius: var(--btz-radius-sm);
}

.btz-mobile-menu a:hover { background: var(--btz-light); }

/* ==============================
   HERO SEARCH (homepage)
   ============================== */
.btz-hero {
    background: linear-gradient(135deg, #0f4c81 0%, #1a6fb5 50%, #0ea5e9 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.btz-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.btz-hero h1 {
    font-size: clamp(22px, 4vw, 38px);
    font-weight: 800;
    margin: 0 0 .75rem;
    line-height: 1.4;
    position: relative;
}

.btz-hero p {
    font-size: 16px;
    opacity: .85;
    margin: 0 0 2rem;
    position: relative;
}

.btz-hero-search {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

.btz-hero-search input,
.btz-hero-search select {
    flex: 1 1 200px;
    padding: .85rem 1.1rem;
    border: none;
    border-radius: var(--btz-radius-sm);
    font-family: var(--btz-font);
    font-size: 14px;
    color: var(--btz-text);
    background: #fff;
    direction: rtl;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.btz-hero-search button {
    padding: .85rem 2rem;
    background: var(--btz-accent);
    color: #fff;
    border: none;
    border-radius: var(--btz-radius-sm);
    font-family: var(--btz-font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}

.btz-hero-search button:hover {
    background: var(--btz-accent-d);
    transform: translateY(-1px);
}

/* ==============================
   SECTION TITLES
   ============================== */
.btz-section {
    padding: 3rem 0;
}

.btz-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--btz-dark);
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.btz-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--btz-border);
    margin-right: .5rem;
}

/* ==============================
   CATEGORY CARDS
   ============================== */
.btz-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.btz-cat-card {
    background: var(--btz-white);
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--btz-text);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

.btz-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--btz-shadow-lg);
    border-color: var(--btz-primary);
    color: var(--btz-primary);
}

.btz-cat-card .icon {
    font-size: 32px;
    line-height: 1;
}

.btz-cat-card .label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.btz-cat-card .count {
    font-size: 11px;
    color: var(--btz-muted);
}

/* ==============================
   CITY CHIPS
   ============================== */
.btz-city-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.btz-city-chip {
    padding: .55rem 1.1rem;
    background: var(--btz-white);
    border: 1px solid var(--btz-border);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--btz-text);
    text-decoration: none;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.btz-city-chip:hover {
    background: var(--btz-primary);
    border-color: var(--btz-primary);
    color: #fff;
}

/* ==============================
   CONTRACTOR CARD
   ============================== */
.btz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.btz-card {
    background: var(--btz-white);
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius);
    box-shadow: var(--btz-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

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

.btz-card-img {
    position: relative;
    overflow: hidden;
}

.btz-card-img img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform .35s;
}

.btz-card:hover .btz-card-img img {
    transform: scale(1.04);
}

.btz-verified-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--btz-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.btz-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.btz-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.btz-card-title a {
    color: var(--btz-dark);
}

.btz-card-title a:hover { color: var(--btz-primary); }

.btz-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.btz-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--btz-light);
    color: var(--btz-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btz-tag.cat { background: #eff6ff; color: var(--btz-primary); }
.btz-tag.city { background: #f0fdf4; color: #16a34a; }

.btz-stars { color: var(--btz-accent); letter-spacing: 1px; }

.btz-rating-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: 13px;
}

.btz-rating-row .score { font-weight: 700; color: var(--btz-dark); }
.btz-rating-row .count { color: var(--btz-muted); }

.btz-excerpt {
    font-size: 13px;
    color: var(--btz-muted);
    line-height: 1.7;
    flex: 1;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btz-card-actions {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--btz-border);
}

.btz-btn-sm {
    flex: 1;
    padding: .5rem .75rem;
    border-radius: var(--btz-radius-sm);
    font-family: var(--btz-font);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: opacity .2s, transform .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
}

.btz-btn-sm:hover { opacity: .85; transform: translateY(-1px); }

.btz-btn-call    { background: var(--btz-primary); color: #fff; }
.btz-btn-wa      { background: var(--btz-wa);      color: #fff; }
.btz-btn-profile { background: var(--btz-light);   color: var(--btz-text); border: 1px solid var(--btz-border); }

/* ==============================
   SEARCH BOX (shortcode)
   ============================== */
.btz-search-box {
    background: #fff;
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--btz-shadow);
}

.btz-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
}

.btz-input,
.btz-select {
    flex: 1 1 180px;
    padding: .7rem 1rem;
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius-sm);
    font-family: var(--btz-font);
    font-size: 14px;
    color: var(--btz-text);
    background: var(--btz-light);
    direction: rtl;
    outline: none;
    transition: border-color .2s, background .2s;
}

.btz-input:focus, .btz-select:focus {
    border-color: var(--btz-primary);
    background: #fff;
}

.btz-btn {
    padding: .7rem 1.75rem;
    background: var(--btz-primary);
    color: #fff;
    border: none;
    border-radius: var(--btz-radius-sm);
    font-family: var(--btz-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, transform .15s;
}

.btz-btn:hover {
    background: var(--btz-primary-d);
    transform: translateY(-1px);
}

/* ==============================
   TAXONOMY HEADER
   ============================== */
.btz-tax-header {
    background: linear-gradient(135deg, var(--btz-primary) 0%, var(--btz-primary-d) 100%);
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.btz-tax-header h1 {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 800;
    margin: 0 0 .6rem;
}

.btz-tax-header p {
    font-size: 15px;
    opacity: .85;
    margin: 0;
}

/* ==============================
   PROFILE PAGE
   ============================== */
.btz-profile-hero {
    background: linear-gradient(135deg, #0f4c81, #1a6fb5);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.btz-profile-hero-inner {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.btz-profile-avatar img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.3);
    flex-shrink: 0;
}

.btz-profile-avatar .placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    flex-shrink: 0;
}

.btz-profile-info h1 {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    margin: 0 0 .6rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.btz-verified-badge {
    font-size: 13px;
    background: rgba(255,255,255,.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.btz-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    font-size: 14px;
    opacity: .9;
    margin-bottom: .8rem;
}

.btz-contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.btz-contact-bar a {
    padding: .6rem 1.25rem;
    border-radius: var(--btz-radius-sm);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: opacity .2s, transform .15s;
}

.btz-contact-bar a:hover { opacity: .88; transform: translateY(-1px); }

.btz-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.btz-portfolio-grid a img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--btz-radius-sm);
    transition: transform .25s;
}

.btz-portfolio-grid a:hover img { transform: scale(1.04); }

/* ==============================
   BREADCRUMB
   ============================== */
.btz-breadcrumb {
    font-size: 13px;
    color: var(--btz-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    margin: 1.5rem 0;
}

.btz-breadcrumb a { color: var(--btz-primary); }
.btz-breadcrumb .sep { opacity: .4; }

/* ==============================
   RESULTS FEEDBACK
   ============================== */
.btz-found  { color: var(--btz-muted); font-size: 13px; margin-bottom: 1rem; }
.btz-loading { text-align: center; padding: 4rem; color: var(--btz-muted); font-size: 15px; }
.btz-no-result { text-align: center; padding: 4rem; color: var(--btz-muted); }

.btz-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    margin-top: 2rem;
    font-size: 14px;
    color: var(--btz-muted);
}

.btz-page-btn {
    padding: .5rem 1.25rem;
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius-sm);
    background: #fff;
    cursor: pointer;
    font-family: var(--btz-font);
    font-size: 13px;
    color: var(--btz-text);
    transition: all .2s;
}

.btz-page-btn:hover {
    background: var(--btz-primary);
    border-color: var(--btz-primary);
    color: #fff;
}

/* ==============================
   INFO BOX (sidebar)
   ============================== */
.btz-info-box {
    background: var(--btz-white);
    border: 1px solid var(--btz-border);
    border-radius: var(--btz-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.btz-info-box h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--btz-border);
}

.btz-info-row {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: 13px;
    color: var(--btz-text);
    margin-bottom: .75rem;
}

.btz-info-row .icon { flex-shrink: 0; margin-top: 1px; }

/* ==============================
   FOOTER
   ============================== */
.btz-footer {
    background: var(--btz-dark);
    color: rgba(255,255,255,.75);
    margin-top: 4rem;
    padding: 3rem 0 0;
}

.btz-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.btz-footer-brand strong {
    display: block;
    font-size: 20px;
    color: #fff;
    margin-bottom: .5rem;
}

.btz-footer-brand p {
    font-size: 13px;
    line-height: 1.8;
    margin: 0 0 1rem;
}

.btz-footer h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 .75rem;
}

.btz-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.btz-footer a {
    color: rgba(255,255,255,.65);
    font-size: 13px;
    transition: color .2s;
}

.btz-footer a:hover { color: #fff; }

.btz-footer-bottom {
    padding: 1.25rem 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.4);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .btz-nav { display: none; }
    .btz-hamburger { display: flex; }
    .btz-header-cta { display: none; }

    .btz-hero { padding: 2.5rem 0 2rem; }
    .btz-hero-search input,
    .btz-hero-search select,
    .btz-hero-search button { width: 100%; flex: none; }

    .btz-footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .btz-footer-brand { grid-column: 1 / -1; }

    .btz-grid { grid-template-columns: 1fr; }
    .btz-cat-grid { grid-template-columns: repeat(3, 1fr); }

    .btz-profile-hero-inner { flex-direction: column; }
}

@media (max-width: 480px) {
    .btz-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .btz-footer-grid { grid-template-columns: 1fr; }
}
