/*
 * Oak Mortgage Group Directory - Premium CSS
 * Mobile-first responsive design
 * Color Scheme: Forest Green (#2C5530), Gold (#D4AF37), Light Gray (#F8F9FA)
 */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #2C5530;
    --secondary-color: #D4AF37;
    --accent-color: #F8F9FA;
    --text-color: #212529;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --container-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    max-width: 800px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #1e3a20;
    border-color: #1e3a20;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: #c09a2d;
    border-color: #c09a2d;
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-call {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 8px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-call:hover {
    background-color: #c09a2d;
    color: var(--text-color);
}

button {
    font-family: var(--font-body);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
}

.nav-menu li a:not(.btn-call)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu li a:not(.btn-call):hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-menu li a.active {
    color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(44, 85, 48, 0.85), rgba(44, 85, 48, 0.85)),
                url('Images/dallas-skyline-mortgage-hero.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    position: relative;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SEARCH SECTION ===== */
.search-section {
    background-color: var(--accent-color);
    padding: 50px 0;
}

.search-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.search-section > .container > p {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
}

.filters select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== FEATURED COMPANIES ===== */
.featured-companies {
    background-color: var(--white);
}

.featured-companies h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.featured-companies .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

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

.company-profile {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.company-profile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.company-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.company-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.company-profile:hover .company-image img {
    transform: scale(1.05);
}

.company-content {
    padding: 1.5rem;
}

.company-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stars {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.rating-number {
    font-weight: 600;
    color: var(--text-color);
}

.review-count {
    color: var(--light-text);
    font-size: 0.9rem;
}

.company-description {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-info {
    background-color: var(--accent-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.contact-btn {
    width: 100%;
    margin-top: 1rem;
}

.cta-section {
    text-align: center;
    margin-top: 2rem;
}

/* ===== WHY CHOOSE SECTION ===== */
.why-choose {
    background-color: var(--accent-color);
}

.why-choose h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.why-choose .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

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

.benefit-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.benefit-card p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== NEIGHBORHOODS SECTION ===== */
.neighborhoods-section {
    background-color: var(--white);
}

.neighborhoods-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.neighborhoods-section .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.neighborhoods-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.neighborhoods-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.neighborhoods-text h3 {
    margin-bottom: 2rem;
}

.neighborhood-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.neighborhood-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.neighborhood-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.neighborhood-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== MARKET DATA SECTION ===== */
.market-data {
    background-color: var(--accent-color);
}

.market-data h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.market-data .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.market-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
    align-items: start;
}

.market-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.market-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-card p {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0;
}

.market-text {
    margin-top: 2rem;
}

.market-text h3 {
    margin-bottom: 1.5rem;
}

.market-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ===== CALCULATOR SECTION ===== */
.calculator-section {
    background-color: var(--white);
}

.calculator-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.calculator-section .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

.calculator-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.calculator-form {
    background-color: var(--accent-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--light-text);
    font-size: 0.85rem;
}

#calculateBtn {
    width: 100%;
    margin-bottom: 1.5rem;
}

.calculator-results {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.result-main {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.result-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.breakdown-item span:first-child {
    color: var(--light-text);
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: var(--text-color);
}

.calculator-disclaimer {
    background-color: #fff3cd;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.calculator-disclaimer p {
    margin-bottom: 0;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    background-color: var(--accent-color);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.faq-section .section-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 0;
}

.faq-item a {
    color: var(--primary-color);
    text-decoration: underline;
}

.faq-item a:hover {
    color: var(--secondary-color);
}

/* ===== CTA FINAL SECTION ===== */
.cta-final {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a20 100%);
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
}

.cta-final h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-final p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 50px 0 30px;
}

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

.footer-column h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-column p {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #e0e0e0;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-column a {
    color: #e0e0e0;
}

.footer-column a:hover {
    color: var(--secondary-color);
}

.fair-housing {
    font-size: 0.9rem;
    color: #b0b0b0;
    font-style: italic;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px and below) */
@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .hero {
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .companies-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .neighborhoods-content,
    .market-content,
    .calculator-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .market-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        display: none;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .companies-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .market-stats {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    section {
        padding: 40px 0;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        padding: 60px 15px;
    }

    .container {
        padding: 0 15px;
    }

    .company-content,
    .benefit-card,
    .faq-item {
        padding: 1.25rem;
    }

    .calculator-form {
        padding: 1.5rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

/* ===== PRINT STYLES ===== */
@media print {
    header, .hero, .search-section, .cta-final, footer {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: underline;
    }
}
