/* AgencyOffice Website Builder — Base Styles */
/* Theme variables (--wb-*) are injected from _Layout.cshtml via WB_SiteConfig */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--wb-font-body);
    line-height: 1.6;
    color: #1a1a2e;
    background: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--wb-font-heading);
    line-height: 1.2;
    margin-top: 0;
}

a { color: var(--wb-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Container */
.wb-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Sections */
.wb-section { padding: 3rem 0; }

/* ======================== */
/* Header                   */
/* ======================== */
.wb-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.wb-header .wb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wb-logo img { height: 48px; width: auto; }
.wb-logo span { font-size: 1.25rem; font-weight: 700; color: var(--wb-secondary); }

.wb-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.wb-nav-item a {
    color: #374151;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.wb-nav-item a:hover { color: var(--wb-primary); text-decoration: none; }

.wb-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.wb-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #374151;
    transition: 0.2s;
}

/* ======================== */
/* Hero                     */
/* ======================== */
.wb-hero {
    background-color: var(--wb-secondary);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.wb-hero h1 { font-size: 2.75rem; margin-bottom: 1rem; }
.wb-hero-sub { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }

/* ======================== */
/* Buttons                  */
/* ======================== */
.wb-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.wb-btn--primary {
    background: var(--wb-primary);
    color: #fff;
}

.wb-btn--primary:hover { opacity: 0.9; text-decoration: none; }
.wb-btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ======================== */
/* Property Grid            */
/* ======================== */
.wb-property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.wb-property-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    color: inherit;
    text-decoration: none;
}

.wb-property-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.wb-property-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.wb-property-card-image img { width: 100%; height: 100%; object-fit: cover; }

.wb-property-card-noimage {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 0.9rem;
}
.wb-property-card--confidential .wb-property-card-noimage {
    background: #1a1a2e; color: #d1d5db; font-weight: 500;
}

.wb-property-card-status {
    position: absolute; top: 0.75rem; left: 0.75rem;
    background: var(--wb-primary); color: #fff;
    padding: 0.25rem 0.75rem; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wb-property-card-body { padding: 1.25rem; }
.wb-property-card-body h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.wb-property-location { color: #6b7280; font-size: 0.9rem; margin: 0 0 0.5rem; }
.wb-property-price { font-size: 1.25rem; font-weight: 700; color: var(--wb-primary); margin: 0 0 0.5rem; }
.wb-property-price-qual { font-size: 0.8rem; font-weight: 400; color: #6b7280; }
.wb-property-card-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.wb-property-tag { display: inline-block; background: #f3f4f6; color: #374151; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; }

/* ======================== */
/* Property Detail          */
/* ======================== */

/* Image Gallery */
.wb-gallery { margin-bottom: 2rem; }
.wb-gallery-main {
    position: relative; border-radius: 8px; overflow: hidden;
    background: #f3f4f6; aspect-ratio: 16/9;
}
.wb-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); color: #fff; border: none;
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.wb-gallery-nav:hover { background: rgba(0,0,0,0.75); }
.wb-gallery-nav--prev { left: 1rem; }
.wb-gallery-nav--next { right: 1rem; }
.wb-gallery-counter {
    position: absolute; bottom: 1rem; right: 1rem;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 0.25rem 0.75rem; border-radius: 4px;
    font-size: 0.8rem;
}
.wb-gallery-thumbs {
    display: flex; gap: 0.5rem; margin-top: 0.75rem;
    overflow-x: auto; padding-bottom: 0.25rem;
}
.wb-gallery-thumb {
    flex-shrink: 0; width: 80px; height: 60px;
    border-radius: 4px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; padding: 0; background: none;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.6;
}
.wb-gallery-thumb:hover { opacity: 0.9; }
.wb-gallery-thumb--active { border-color: var(--wb-primary); opacity: 1; }
.wb-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Property Header */
.wb-property-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.wb-property-header h1 { margin-bottom: 0.25rem; }
.wb-property-location-large { color: #6b7280; font-size: 1rem; margin: 0; }
.wb-property-price-badge { text-align: right; flex-shrink: 0; }
.wb-property-price-qualifier { display: block; font-size: 0.8rem; color: #6b7280; }
.wb-property-price-large { font-size: 1.75rem; font-weight: 700; color: var(--wb-primary); }

/* Key Details Bar */
.wb-property-key-details {
    display: flex; flex-wrap: wrap; gap: 1px;
    background: #e5e7eb; border-radius: 8px; overflow: hidden;
    margin-bottom: 2rem;
}
.wb-property-key-item {
    flex: 1 1 auto; min-width: 120px;
    background: #f9fafb; padding: 1rem 1.25rem;
    text-align: center;
}
.wb-property-key-label { display: block; font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.wb-property-key-value { display: block; font-size: 0.95rem; font-weight: 600; color: #111827; }
.wb-property-status-value { color: var(--wb-primary); }

.wb-property-detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; }
.wb-property-detail-main h2 { font-size: 1.25rem; margin-bottom: 1rem; border-bottom: 2px solid var(--wb-primary); padding-bottom: 0.5rem; display: inline-block; }
.wb-property-description { line-height: 1.7; }
.wb-property-negotiator { font-size: 0.9rem; margin-bottom: 1rem; color: #374151; }
.wb-property-ref { font-size: 0.8rem; color: #9ca3af; margin: 0.25rem 0 0; }
.wb-property-tenure-label { display: block; font-size: 0.85rem; color: #374151; margin-top: 0.25rem; }

/* Property Sections */
.wb-property-section { margin-bottom: 2rem; }
.wb-property-section h2 { font-size: 1.25rem; margin-bottom: 1rem; border-bottom: 2px solid var(--wb-primary); padding-bottom: 0.5rem; display: inline-block; }
.wb-property-description { line-height: 1.7; }

/* Key Features / Bullet Points */
.wb-property-features ul, .wb-property-features ol {
    margin: 0; padding: 0 0 0 1.25rem;
}
.wb-property-features li {
    margin-bottom: 0.35rem; line-height: 1.5;
}

/* Videos */
.wb-property-video { margin-bottom: 1rem; }

/* Documents */
.wb-property-documents { display: flex; flex-direction: column; gap: 0.5rem; }
.wb-property-doc-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 6px; color: inherit; text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    font-size: 0.9rem;
}
.wb-property-doc-link:hover { border-color: var(--wb-primary); background: #fff; text-decoration: none; }
.wb-property-doc-icon {
    flex-shrink: 0; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--wb-primary); color: #fff;
    border-radius: 4px; font-size: 0.7rem; font-weight: 700;
}

/* ======================== */
/* Cards                    */
/* ======================== */
.wb-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.wb-card h3 { margin-bottom: 1rem; }

/* ======================== */
/* CTA Section              */
/* ======================== */
.wb-cta {
    background: var(--wb-secondary);
    color: #fff;
    text-align: center;
}

.wb-cta h2 { margin-bottom: 0.5rem; }
.wb-cta p { opacity: 0.9; margin-bottom: 1.5rem; }

/* ======================== */
/* Forms                    */
/* ======================== */
.wb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.wb-form-group--full { grid-column: 1 / -1; }
.wb-form-group label { display: block; font-weight: 500; margin-bottom: 0.25rem; font-size: 0.9rem; }
.wb-form-group input,
.wb-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}
.wb-form-group input:focus,
.wb-form-group textarea:focus { outline: none; border-color: var(--wb-primary); box-shadow: 0 0 0 3px rgba(248,141,47,0.15); }

/* ======================== */
/* Footer                   */
/* ======================== */
.wb-footer {
    background: #1a1a2e;
    color: #d1d5db;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.wb-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.wb-footer-brand strong { color: #fff; font-size: 1.1rem; }
.wb-footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.wb-footer-links a { color: #9ca3af; font-size: 0.9rem; }
.wb-footer-links a:hover { color: #fff; }
.wb-footer-bottom { border-top: 1px solid #374151; padding-top: 1.5rem; display: flex; justify-content: space-between; font-size: 0.85rem; }
.wb-footer-powered a { color: var(--wb-primary); }

/* ======================== */
/* Articles                 */
/* ======================== */
.wb-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.wb-article-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.wb-article-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.wb-article-card-image { aspect-ratio: 16/9; overflow: hidden; background: #f3f4f6; }
.wb-article-card-image img { width: 100%; height: 100%; object-fit: cover; }
.wb-article-card-body { padding: 1.25rem; }
.wb-article-card-body h3 { font-size: 1.1rem; margin: 0.25rem 0 0.5rem; }
.wb-article-card-body p { color: #6b7280; font-size: 0.9rem; margin: 0 0 0.5rem; }
.wb-article-card-body time { color: #9ca3af; font-size: 0.8rem; }
.wb-article-category { display: inline-block; background: var(--wb-primary); color: #fff; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.wb-article-hero-image { border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; max-height: 400px; }
.wb-article-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.wb-article-meta { color: #6b7280; margin-bottom: 2rem; }
.wb-article-body { line-height: 1.8; }
.wb-article-body h2 { margin-top: 2rem; }
.wb-article-body img { border-radius: 8px; margin: 1.5rem 0; }

/* ======================== */
/* Alerts                   */
/* ======================== */
.wb-alert { padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.wb-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.wb-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ======================== */
/* Video Block               */
/* ======================== */
.wb-video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; }
.wb-video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ======================== */
/* Gallery Block             */
/* ======================== */
.wb-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem;
}
.wb-gallery-item { display: block; border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; }
.wb-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.wb-gallery-item:hover img { transform: scale(1.05); }

/* ======================== */
/* Stats Bar                 */
/* ======================== */
.wb-stats-bar { background: var(--wb-secondary); color: #fff; }
.wb-stats-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 2rem; text-align: center; }
.wb-stat-item { min-width: 120px; }
.wb-stat-value { display: block; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.wb-stat-label { display: block; font-size: 0.85rem; opacity: 0.8; margin-top: 0.25rem; }

/* ======================== */
/* Category Grid             */
/* ======================== */
.wb-category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.wb-category-card {
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
    text-decoration: none; color: inherit; transition: border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}
.wb-category-card:hover { border-color: var(--wb-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-decoration: none; }
.wb-category-card h3 { margin: 0; font-size: 1rem; }

/* ======================== */
/* Map Block                 */
/* ======================== */
.wb-map-embed { border-radius: 8px; overflow: hidden; }
.wb-map-embed iframe { display: block; }

/* ======================== */
/* Property Search           */
/* ======================== */
.wb-search-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.wb-search-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}
.wb-search-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}
.wb-search-field input,
.wb-search-field select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}
.wb-search-field input:focus,
.wb-search-field select:focus {
    outline: none;
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 3px rgba(248,141,47,0.15);
}
.wb-search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.9rem;
}
.wb-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
}
.wb-pagination a,
.wb-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #374151;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.wb-pagination a:hover {
    border-color: var(--wb-primary);
    background: rgba(248,141,47,0.05);
}
.wb-pagination .wb-pagination-active {
    background: var(--wb-primary);
    color: #fff;
    border-color: var(--wb-primary);
}

/* ======================== */
/* Responsive               */
/* ======================== */
@media (max-width: 768px) {
    .wb-nav { display: none; }
    .wb-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 1rem; }
    .wb-nav.open .wb-nav-list { flex-direction: column; gap: 0; }
    .wb-nav.open .wb-nav-item a { display: block; padding: 0.75rem 0; }
    .wb-nav-toggle { display: flex; }

    .wb-hero h1 { font-size: 2rem; }
    .wb-search-fields { grid-template-columns: 1fr; }
    .wb-property-grid { grid-template-columns: 1fr; }
    .wb-article-grid { grid-template-columns: 1fr; }
    .wb-property-detail-grid { grid-template-columns: 1fr; }
    .wb-property-header { flex-direction: column; }
    .wb-property-price-badge { text-align: left; }
    .wb-gallery-thumb { width: 60px; height: 45px; }
    .wb-form-grid { grid-template-columns: 1fr; }
    .wb-footer-grid { grid-template-columns: 1fr; }
    .wb-footer-bottom { flex-direction: column; gap: 0.5rem; }
}
