:root {
    --primary-green: #5b875e;
    --primary-black: #1a1a1a;
    --secondary-grey: #f4f4f4;
    --text-dark: #333333;
    --text-light: #ffffff;
}

/* Ensure modals appear above fixed site headers */
.valuation-modal {
    z-index: 10001 !important;
}

.modal-backdrop {
    z-index: 10000 !important;
}

/* Container Styles - Scoped to avoid affecting global site */
.property-valuation-calculator *,
.property-valuation-calculator *::before,
.property-valuation-calculator *::after {
    box-sizing: border-box;
}

/* Bootstrap Grid Polyfill for Calculator Scoping */
.property-valuation-calculator .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.property-valuation-calculator .col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .property-valuation-calculator .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.property-valuation-calculator,
.property-valuation-results {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 900px;
    margin: 160px auto 60px;
    /* Increased top margin to clear fixed headers */
    border-top: 5px solid var(--primary-green);
    position: relative;
}

.property-valuation-results {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-top: none;
    /* Results styling differs slightly */
}

/* Fix for nested results container in Content Element */
.property-valuation-calculator .property-valuation-results {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    border: none;
}

/* Headings */
.property-valuation-calculator h1,
.property-valuation-results h1 {
    color: var(--primary-black);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.property-valuation-results h1 {
    border-bottom: none;
    display: block;
    padding-bottom: 0;
}

.property-valuation-calculator h2,
.property-valuation-results h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.property-valuation-results h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #555;
}

/* Progress Bar */
.valuation-progress-bar {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.valuation-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.progress-step.active .step-number {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 0 0 3px rgba(91, 135, 94, 0.2);
}

.progress-step.completed .step-number {
    background: var(--primary-black);
    color: white;
}

.step-label {
    font-size: 14px;
    color: #666;
}

/* Form Actions & Buttons */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.property-valuation-calculator .btn,
.property-valuation-results .btn {
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    user-select: none;
}

.property-valuation-calculator .btn-primary {
    background: var(--primary-green);
    border: none;
    color: white;
}

.property-valuation-calculator .btn-primary:hover {
    background: #456a48;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.property-valuation-calculator .btn-success {
    background: var(--primary-green);
    border: none;
    color: white;
}

.property-valuation-calculator .btn-success:hover {
    background: #456a48;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.property-valuation-calculator .btn-secondary,
.property-valuation-results .btn-secondary {
    background: #333;
    color: white;
    border: none;
}

.property-valuation-calculator .btn-secondary:hover,
.property-valuation-results .btn-secondary:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Form Groups & Inputs */
.property-valuation-calculator .form-group {
    margin-bottom: 20px;
}

.property-valuation-calculator label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

/* Typography */
.property-valuation-calculator h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--primary-black);
    font-weight: 800;
}

/* Enhanced Form Inputs */
.property-valuation-calculator .form-control,
.property-valuation-calculator .form-select {
    border-radius: 8px;
    /* Softer corners */
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    /* More breathing room */
    width: 100%;
    display: block;
    background-color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    height: auto;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.property-valuation-calculator .form-control:hover,
.property-valuation-calculator .form-select:hover {
    border-color: #bbb;
}

.property-valuation-calculator .form-control:focus,
.property-valuation-calculator .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(91, 135, 94, 0.1);
    /* Nice glow */
    outline: none;
}

/* Custom Select Arrow */
.property-valuation-calculator .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Results: Value Display */
.values-box {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.value-display {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 1.5rem;
}

.value-item {
    flex: 1;
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}

.value-item.featured {
    background: #28a745;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.25);
    border: 1px solid #1e7e34;
    position: relative;
    z-index: 2;
}

.value-item.featured .value-label,
.value-item.featured .value-amount,
.value-item.featured .value-note {
    color: #ffffff;
}

.value-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.value-amount {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.value-note {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Results: Sections */
.breakdown-section,
.methodology-section,
.micro-details-section,
.investment-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.breakdown-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.breakdown-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.breakdown-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Results: Location Factors */
.factor-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 0.5rem;
}

.factor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.factor-name {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.factor-percentage {
    font-weight: 700;
    font-size: 0.95rem;
}

.factor-percentage.text-success {
    color: #28a745;
}

.factor-percentage.text-danger {
    color: #dc3545;
}

/* Results: AI & Charts */
.score-display {
    text-align: center;
}

.score-number {
    font-size: 3rem;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 1rem;
}

.score-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #218838);
    transition: width 0.5s ease;
}

.badge {
    font-size: 1rem;
    padding: 10px 20px;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: black;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* Results: Disclaimer */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.disclaimer h4,
.disclaimer p {
    color: #856404;
}

/* AI Analysis Section Styles */
.ai-analysis-section {
    background: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 2rem;
}

.ai-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #d32f2f;
}

.ai-header i {
    font-size: 24px;
    margin-right: 10px;
}

.ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.ai-item h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.ai-highlight-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.ai-highlight-title {
    color: #1565c0;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.risk-chance-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

.risk-title {
    color: #d32f2f;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.chance-title {
    color: #2e7d32;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.expert-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

/* Print & Responsive */
@media print {

    .actions-section,
    .btn {
        display: none;
    }

    body,
    .property-valuation-results {
        background: white;
        padding: 0;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .value-display {
        flex-direction: column;
    }

    .value-item.featured {
        transform: scale(1);
    }

    .ai-grid,
    .risk-chance-section {
        grid-template-columns: 1fr;
    }
}

/* PDF Generation Styles - Ultra Compact (Target: 1-2 Pages) */
.pdf-mode {
    padding: 10mm !important;
    /* Slightly more padding to prevent edge cutting */
    background: white !important;
    width: 100% !important;
    /* Use 100% of container found by html2pdf */
    max-width: 190mm !important;
    /* Force simpler width control */
    margin: 0 auto !important;
    box-shadow: none !important;
    font-family: Arial, sans-serif !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
    color: #333 !important;
    box-sizing: border-box !important;
}

.pdf-mode *,
.pdf-mode *::before,
.pdf-mode *::after {
    box-sizing: border-box !important;
    max-width: 100% !important;
    /* Prevent ANY child from overflowing */
}

.pdf-mode h1 {
    font-size: 16px !important;
    margin-bottom: 5px !important;
    color: var(--primary-green) !important;
    text-align: center;
}

.pdf-mode h2,
.pdf-mode h3 {
    font-size: 12px !important;
    margin-bottom: 3px !important;
    margin-top: 5px !important;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
    page-break-after: avoid;
}

.pdf-mode .valuation-progress-bar,
.pdf-mode .actions-section {
    display: none !important;
}

/* 3-Column Property Details */
.pdf-mode .property-details-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    margin-bottom: 5px !important;
}

.pdf-mode .detail-item {
    padding: 3px !important;
    background: #f9f9f9 !important;
    border: 1px solid #eee !important;
}

/* Single Row Valuation Results */
.pdf-mode .value-display {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 3px !important;
    padding: 5px !important;
    margin-bottom: 5px !important;
    border: 1px solid #ddd;
    background: #fdfdfd;
}

.pdf-mode .value-item {
    padding: 2px !important;
    min-width: auto !important;
    flex: 1 !important;
    text-align: center;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-right: 1px solid #eee !important;
}

.pdf-mode .value-item.featured {
    transform: none !important;
    /* CRITICAL: Remove scale transform in PDF */
    box-shadow: none !important;
    border: none !important;
    border-right: 1px solid #eee !important;
    background: transparent !important;
}

.pdf-mode .value-item:last-child {
    border-right: none !important;
}

.pdf-mode .value-item .label,
.pdf-mode .value-label {
    font-size: 8px !important;
    margin-bottom: 1px !important;
    color: #666 !important;
}

.pdf-mode .value-item .value,
.pdf-mode .value-amount {
    font-size: 13px !important;
    /* Consistent size */
    font-weight: bold !important;
    margin-bottom: 0 !important;
    color: var(--primary-green) !important;
}

/* Fix Breakdown Section Sizes */
.pdf-mode .breakdown-section,
.pdf-mode .methodology-section {
    padding: 5px !important;
    margin-bottom: 5px !important;
    background: transparent !important;
    border: 1px solid #eee !important;
}

.pdf-mode .breakdown-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
    margin-bottom: 5px !important;
}

.pdf-mode .breakdown-item {
    padding: 3px !important;
    box-shadow: none !important;
    border: 1px solid #eee !important;
    background: #fcfcfc !important;
}

.pdf-mode .breakdown-label {
    font-size: 8px !important;
    margin-bottom: 1px !important;
}

.pdf-mode .breakdown-value {
    font-size: 11px !important;
    /* Reduced from 1.5rem */
    font-weight: bold !important;
}

/* Fix Score/AI Sizes - Ultra Compact */
.pdf-mode .score-display {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    margin-bottom: 5px !important;
}

.pdf-mode .score-number {
    font-size: 18px !important;
    /* drastically reduced from 3rem */
    font-weight: bold !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

.pdf-mode .score-bar {
    height: 8px !important;
    /* Slimmer bar */
    flex-grow: 1 !important;
    margin-bottom: 0 !important;
    max-width: 200px !important;
    /* Limit width */
}

.pdf-mode .badge {
    font-size: 9px !important;
    padding: 3px 8px !important;
}

/* Location Factors - Slimmer Bars */
.pdf-mode .factor-item {
    padding: 5px !important;
    margin-bottom: 0 !important;
    border: 1px solid #eee !important;
}

.pdf-mode .factor-header {
    margin-bottom: 2px !important;
}

.pdf-mode .factor-name {
    font-size: 9px !important;
}

.pdf-mode .factor-percentage {
    font-size: 9px !important;
}

.pdf-mode .progress {
    height: 6px !important;
    /* Slim progress bars */
    margin-bottom: 2px !important;
}


/* Factors Grid (Micro & Macro) */
.pdf-mode .location-factors {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    /* Side by side */
    gap: 5px !important;
    margin-bottom: 5px !important;
}

.pdf-mode .factor-item {
    margin-bottom: 0 !important;
}

/* Compact Tables */
.pdf-mode table {
    margin-bottom: 5px !important;
    width: 100% !important;
    border-collapse: collapse;
}

.pdf-mode table th,
.pdf-mode table td {
    padding: 2px 3px !important;
    font-size: 8px !important;
    border: 1px solid #eee;
}

/* Side-by-Side Micro Details & Investment Score */
.pdf-mode .micro-details-section,
.pdf-mode .investment-section {
    margin-bottom: 5px !important;
    padding: 5px !important;
}

/* AI Analysis Grid (4 cols) */
.pdf-mode .ai-analysis-section {
    margin-top: 5px !important;
    padding: 5px !important;
    background: #f4f6f9 !important;
}

.pdf-mode .ai-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 3px !important;
    margin-bottom: 5px !important;
}

.pdf-mode .ai-item {
    padding: 3px;
    background: white;
    border: 1px solid #eee;
}

.pdf-mode .ai-item h4 {
    font-size: 8px !important;
    margin-bottom: 1px !important;
    color: #1565c0;
}

.pdf-mode .ai-item p {
    font-size: 9px !important;
    margin: 0 !important;
}

/* Risks & Chances (Side by Side) */
.pdf-mode .risk-chance-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 5px !important;
}

.pdf-mode .expert-summary {
    padding: 5px !important;
    margin-top: 5px !important;
    background: white !important;
    border: 1px solid #ccc !important;
    font-size: 9px !important;
}

.pdf-mode .disclaimer {
    margin-top: 5px;
    font-size: 7px;
    color: #888;
    padding: 2px;
    border-top: 1px solid #eee;
}

/* Ensure no page breaks inside critical elements */
.pdf-mode .value-display,
.pdf-mode .ai-grid,
.pdf-mode .risk-chance-section,
.pdf-mode table {
    page-break-inside: avoid;
}

/* Micro-Location Table Styling (Screen) */
.micro-details-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.micro-details-section table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid #e0e0e0;
    text-align: left;
    color: #555;
    font-size: 0.9rem;
}

.micro-details-section table td {
    padding: 12px;
    border-top: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 0.95rem;
}

.micro-details-section table tr:hover {
    background-color: #fcfcfc;
}

.micro-details-section .text-success {
    color: #28a745 !important;
}

.micro-details-section .text-danger {
    color: #dc3545 !important;
}

/* PDF Overrides for Table */
.pdf-mode .micro-details-section table th {
    background-color: #f4f4f4 !important;
    padding: 4px !important;
    font-size: 8px !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
}

.pdf-mode .micro-details-section table td {
    padding: 3px !important;
    font-size: 8px !important;
    border: 1px solid #eee !important;
}

.pdf-mode .micro-details-section h3 {
    font-size: 11px !important;
    margin-bottom: 5px !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;

}

/* Property Grid & Cards */
.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 160px auto 60px;
    /* Increased top margin for fixed header */
    max-width: 1200px;
    /* Also added a max-width for better alignment */
    padding: 0 20px;
}

@media (max-width: 992px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .property-grid {
        grid-template-columns: 1fr;
    }
}

.property-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-green);
}

.property-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.property-card:hover .property-card-image img {
    transform: scale(1.05);
}

.property-card-no-image {
    color: #999;
    font-size: 0.9rem;
}

.property-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.property-card-content h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--primary-black);
    font-weight: 700;
    line-height: 1.3;
}

.property-location {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.property-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
}

.property-card-metrics .metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.property-card-metrics .metric-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-card-metrics .metric-value {
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
}

.property-card-score {
    margin-top: auto;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.property-card-score .score-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.property-card-score .score-value {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f0f7f1;
}

.property-card-actions {
    margin-top: 10px;
}

.property-card-actions .btn {
    width: 100%;
}

/* Property Details View */
.property-details {
    max-width: 1000px;
    margin: 160px auto 60px;
    /* Increased margin to clear fixed header */
    background: #fff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary-green);
}

.property-details-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.property-details-header h1 {
    font-size: 2.2rem;
    color: var(--primary-black);
    margin-bottom: 10px;
}

.property-details-header .location {
    font-size: 1.1rem;
    color: #666;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-item img {
    width: 100%;
    border-radius: 8px;
    height: 200px;
    object-fit: cover;
}

.details-section {
    margin-bottom: 40px;
}

.details-section h2 {
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

.value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.value-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eee;
}

.value-card .label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.value-card .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
}

.value-card.realistic {
    background: var(--primary-green);
}

.value-card.realistic .label,
.value-card.realistic .value {
    color: #fff;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th,
.details-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.details-table th {
    color: #666;
    font-weight: 500;
    width: 30%;
}

/* Score colors from original results if needed */
.score-10,
.score-9 {
    color: #2e7d32;
}

.score-8,
.score-7 {
    color: #43a047;
}

.score-6,
.score-5 {
    color: #fb8c00;
}

.score-4,
.score-3 {
    color: #f4511e;
}

.score-2,
.score-1 {
    color: #d32f2f;
}

/* New Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.details-section h2 {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
    color: var(--primary-black);
}

.details-section h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    color: #444;
}

.special-features p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    background: #fdfdfd;
    padding: 15px;
    border-left: 3px solid #eee;
}

/* Bidding Section */
.score-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9f8;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #eef2ee;
}

.score-section .value-card.score {
    background: white;
    margin-bottom: 0;
    flex: 0 0 200px;
}

.bidding-action {
    flex-grow: 1;
    text-align: right;
}

.bid-form-box {
    text-align: left;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    margin-top: 20px;
}

.bid-form-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-green);
}

.bid-form-box .form-group {
    margin-bottom: 15px;
}

.bid-form-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.bid-form-box .form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* AI Analysis Section Enhancements */
.ai-analysis {
    background: #fdfdfd;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-top: 40px;
}

.ai-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .ai-details-grid {
        grid-template-columns: 1fr;
    }
}

.ai-sub-section h3 {
    font-size: 1.1rem;
    color: var(--primary-green);
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.ai-risks-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .ai-risks-benefits {
        grid-template-columns: 1fr;
    }
}

.ai-risks h4 {
    color: #d32f2f;
    margin-bottom: 10px;
}

.ai-opportunities h4 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.factors-list {
    list-style: none;
    padding: 0;
}

.factors-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ai-risks ul,
.ai-opportunities ul {
    padding-left: 20px;
}

.ai-risks li {
    color: #555;
    margin-bottom: 5px;
}

.ai-opportunities li {
    color: #555;
    margin-bottom: 5px;
}

/* Quick fixes for images */
.gallery-item img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}