/* HouseFigures.com Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --light-bg: #f8fafc;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Site Header */
.site-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header nav {
    padding: 1rem 0;
}

.logo {
    text-decoration: none !important;
    color: var(--primary-color) !important;
}

.logo strong {
    font-size: 1.5rem;
    display: block;
}

.logo small {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Calculator Page Layout */
.calculator-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Calculator Form */
.calculator-form {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calculator-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix,
.input-suffix {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.input-prefix {
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
}

.input-suffix {
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0;
}

.input-group input {
    border-radius: 0;
    border-left: none;
    border-right: none;
    flex: 1;
}

.input-group input:first-child {
    border-radius: 0.375rem 0 0 0.375rem;
    border-right: 1px solid var(--border-color);
}

.input-group input:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
    border-left: 1px solid var(--border-color);
}

.input-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Results Panel */
.results-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.results-panel h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.summary-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Chart Container */
.chart-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.chart-container h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Breakdown Sections */
.breakdown-section {
    margin-bottom: 1.5rem;
}

.breakdown-section h5 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.breakdown-item.total {
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    background: var(--light-bg);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 0.375rem;
}

.breakdown-item.final {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.breakdown-label {
    color: var(--text-color);
}

.breakdown-value {
    font-weight: 600;
    color: var(--primary-color);
}

.breakdown-value.negative {
    color: var(--danger-color);
}

/* Status Indicators */
.status-indicator {
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.status-indicator.good {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-indicator.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-indicator.danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Homepage Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 3rem 0;
}

.calculator-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calculator-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.calculator-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
}

.category-section h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Features Section */
.features-section {
    background: var(--light-bg);
    padding: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.feature-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Tips Section */
.tips-section {
    padding: 3rem 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.tip-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Related Calculators */
.related-calculators {
    padding: 3rem 0;
    background: var(--light-bg);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.related-card h4 {
    margin-bottom: 1rem;
}

.related-card h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-card h4 a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-copyright {
    text-align: right;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-form,
    .results-panel {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
