/* Market & Agents Page Styles */
/* ============================================
   MARKET PAGE
   ============================================ */
.market-page {
    padding-top: 60px;
    min-height: 100vh;
}

.market-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2d4a7c 100%);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
}

.market-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.market-hero p {
    opacity: 0.9;
    font-size: 1.125rem;
}

.market-filters {
    max-width: 1200px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.market-filters .filter-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-xl);
}

.market-filters .filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 1.5rem;
    align-items: end;
}

.market-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.market-filters .filter-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-gray);
}

.market-filters .filter-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--bg-light);
    height: 44px;
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #1e40af;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.market-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.market-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}
.report-btn:hover { background: #1e40af; }
.report-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.report-btn.outline {
    background: white;
    color: #374151;
    border: 1px solid #e2e8f0;
}
.report-btn.outline:hover { background: #f8fafc; }

.chart-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.chart-section .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-section .chart-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-section .chart-header select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.chart-container {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.blue { background: var(--primary-blue); }
.legend-dot.navy { background: #1e3a5f; }
.legend-dot.yellow { background: var(--primary-gold); }
.legend-dot.green { background: #059669; }

.chart-placeholder.large { height: 280px; }
.chart-placeholder.medium { height: 200px; }

.chart-filters {
    display: flex;
    gap: 0.75rem;
}

/* Market Snapshot */
.market-snapshot {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.snapshot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.snapshot-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.snapshot-header select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.snapshot-card {
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.snapshot-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.snapshot-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.snapshot-change {
    font-size: 0.8125rem;
    font-weight: 600;
}

.snapshot-change.positive { color: #059669; }
.snapshot-change.negative { color: #dc2626; }

/* Market Sidebar */
.market-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.market-sidebar .contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.market-sidebar .contact-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.market-sidebar .contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.market-sidebar .contact-form .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.market-sidebar .contact-form input,
.market-sidebar .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.btn-contact {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.btn-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
}

/* ============================================
   AGENTS PAGE
   ============================================ */
.agents-page {
    padding-top: 60px;
    min-height: 100vh;
    background: var(--bg-light);
}

.agents-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2d4a7c 100%);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
}

.agents-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.agents-hero p {
    opacity: 0.9;
    font-size: 1.125rem;
}

.agents-search {
    max-width: 900px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.agents-search .search-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
}

.agents-search .search-input-wrapper {
    margin-bottom: 1rem;
}

.agents-search .search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.agents-search .search-filters select {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.agents-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.agents-grid.list {
    grid-template-columns: 1fr;
}

.agent-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agent-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.agent-card.list {
    flex-direction: row;
    align-items: center;
}

.agent-card .agent-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.agent-card .agent-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-gold);
}

.agent-card .verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: #059669;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.agent-card .agent-info {
    flex: 1;
}

.agent-card .agent-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.agent-card .agent-agency {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.agent-card .agent-specialty {
    font-size: 0.8125rem;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.agent-card .agent-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.agent-card .agent-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 0.875rem;
}

.agent-card .reviews-count {
    color: var(--text-gray);
    font-weight: 400;
}

.agent-card .agent-listings {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.agent-card .agent-languages {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.language-tag {
    padding: 0.25rem 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-gray);
}

.agent-card .agent-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-contact-agent,
.btn-view-profile {
    flex: 1;
    padding: 0.625rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-contact-agent {
    background: var(--primary-blue);
    color: white;
    border: none;
}

.btn-view-profile {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

/* Featured Agencies */
.featured-agencies {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.featured-agencies h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.agencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.agency-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.agency-card:hover {
    box-shadow: var(--shadow-md);
}

.agency-card .agency-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.agency-card .agency-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.agency-card .agency-info p {
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.agency-card .agency-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-gold);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-header p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.modal-content .contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-content .contact-form input,
.modal-content .contact-form select,
.modal-content .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.btn-send {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

