/* Base Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Container (Updated for wider layout) */
.container {
    max-width: 1300px; /* Increased to accommodate 3 contact items */
    margin: 0 auto;
}

/* Top Bar (Blue) */
.top-bar {
    background-color: #003087;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: white;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: #f4d03f;
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #f4d03f;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.apply-button {
    padding: 8px 20px;
    background-color: #f4d03f;
    color: #003087;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    border: none;
    cursor: pointer;
}

.apply-button:hover {
    background-color: white;
    color: #003087;
}

.social-link i {
    font-size: 1.2em;
    color: #f4d03f;
    transition: color 0.3s;
}

.social-link:hover i {
    color: white;
}

/* Header (White) */
.navbar {
    background-color: white;
    padding: 20px 0;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

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

.logo img {
    max-width: 187.5px;
    height: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
}

.nav-list li {
    margin-left: 25px;
    position: relative;
}

.nav-list li a {
    color: #003087;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s;
}

.nav-list li a:hover {
    color: #f4d03f;
}

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

.dropdown .dropbtn {
    cursor: pointer;
    color: #003087;
    transition: color 0.3s;
}

.dropdown:hover .dropbtn {
    color: #f4d03f;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 11;
    border-radius: 5px;
    top: 100%;
    left: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #003087;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 1em;
    transition: color 0.3s;
}

.dropdown-content a:hover {
    color: #f4d03f;
}

/* Video Section */
.video-section {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
}

.video-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 48, 135, 0.7);
    z-index: 1;
}

/* Hassle-Free Section */
.hassle-free-section {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #003087;
    width: 100%;
    padding: 30px 20px;
    color: white;
    text-align: center;
    z-index: 2;
}

.hassle-free-section h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
}

.hassle-free-section p {
    font-size: 1.3em;
    margin: 0;
}

/* Contact Methods Section (Updated) */
.contact-methods {
    background-color: #f8f9fa;
    padding: 50px 0;
    text-align: center;
}

.contact-methods .container {
    max-width: 1300px; /* Matches the global .container */
    margin: 0 auto;
}

.contact-methods h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.contact-methods p {
    font-size: 1.3em;
    margin-bottom: 40px;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: nowrap; /* Changed to nowrap to keep items in one row */
}

.contact-item {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 380px; /* Reduced from 400px to fit better */
    height: 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-default {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    transition: opacity 0.3s;
}

.contact-item:hover .contact-default {
    opacity: 0;
}

.contact-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-item:hover .contact-hover {
    opacity: 1;
}

.contact-default h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #003087;
}

.contact-default h3 i {
    margin-right: 10px;
    color: #f4d03f;
}

.contact-default p {
    font-size: 1.1em;
    margin: 0;
}

.contact-default a {
    color: #003087;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-default a:hover {
    color: #f4d03f;
}

.contact-button {
    padding: 10px 20px;
    background-color: #003087;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-button:hover {
    background-color: #f4d03f;
    color: #003087;
}

/* Rate Quote Section */
.rate-quote-section {
    padding: 50px 0;
    background-color: #fff;
}

.rate-quote-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.rate-quote-text {
    background-color: #003087;
    border-right: 5px solid #f4d03f;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.rate-quote-text h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.rate-quote-button {
    padding: 15px 30px;
    background-color: #f4d03f;
    color: #003087;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.rate-quote-button:hover {
    background-color: white;
    color: #003087;
}

.rate-quote-image {
    width: 100%;
    max-width: 480px;
    height: 500px;
    overflow: hidden;
}

.family-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Application Process Section */
.application-process {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.application-process .container {
    max-width: 800px;
    margin: 0 auto;
}

.application-process h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #003087;
}

.application-process p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Loan Process Section */
.loan-process {
    padding: 50px 0;
    background-color: #fff;
    text-align: center;
}

.loan-process .container {
    max-width: 1200px;
    margin: 0 auto;
}

.loan-process h2 {
    font-size: 2.2em;
    margin-bottom: 40px;
    color: #003087;
}

.loan-process-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.loan-process-item {
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.loan-process-item p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #333;
}

.loan-process-item .cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #003087;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s, color 0.3s;
}

.loan-process-item .cta-button:hover {
    background-color: #f4d03f;
    color: #003087;
}

/* Can I Qualify Section */
.qualify-section {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.qualify-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.qualify-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.qualify-image {
    width: 100%;
    max-width: 480px;
}

.qualify-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.qualify-text {
    width: 100%;
    max-width: 600px;
    text-align: left;
}

.qualify-text h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #003087;
}

.qualify-text p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

.qualify-text .cta-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: #003087;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s, color 0.3s;
}

.qualify-text .cta-button:hover {
    background-color: #f4d03f;
    color: #003087;
}

/* Cash-Out Refinance Section */
.cash-out-refinance {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.cash-out-refinance .container {
    max-width: 800px;
    margin: 0 auto;
}

.cash-out-refinance h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.cash-out-refinance h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.cash-out-refinance h3 {
    font-size: 1.8em;
    margin: 30px 0 15px;
    color: #003087;
}

.cash-out-refinance p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Refinance Section */
.refinance {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.refinance .container {
    max-width: 800px;
    margin: 0 auto;
}

.refinance h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.refinance h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.refinance p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Mortgage Services Section */
.mortgage-services {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.mortgage-services .container {
    max-width: 800px;
    margin: 0 auto;
}

.mortgage-services h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.mortgage-services h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.mortgage-services h3 {
    font-size: 1.8em;
    margin: 30px 0 15px;
    color: #003087;
}

.mortgage-services p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* 15-Year Fixed Section */
.year-15-fixed {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.year-15-fixed .container {
    max-width: 800px;
    margin: 0 auto;
}

.year-15-fixed h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.year-15-fixed h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.year-15-fixed p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* 30-Year Fixed Section */
.year-30-fixed {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.year-30-fixed .container {
    max-width: 800px;
    margin: 0 auto;
}

.year-30-fixed h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.year-30-fixed h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.year-30-fixed p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* FHA Loan Section */
.fha-loan {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.fha-loan .container {
    max-width: 800px;
    margin: 0 auto;
}

.fha-loan h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.fha-loan h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.fha-loan p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* VA Loan Section */
.va-loan {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.va-loan .container {
    max-width: 800px;
    margin: 0 auto;
}

.va-loan h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.va-loan h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.va-loan p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Jumbo Loan Section */
.jumbo-loan {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.jumbo-loan .container {
    max-width: 800px;
    margin: 0 auto;
}

.jumbo-loan h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.jumbo-loan h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.jumbo-loan p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Commercial Real Estate Loans Section */
.commercial-real-estate-loans {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.commercial-real-estate-loans .container {
    max-width: 800px;
    margin: 0 auto;
}

.commercial-real-estate-loans h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.commercial-real-estate-loans h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.commercial-real-estate-loans p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Construction Loan Services Section */
.construction-loan-services {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.construction-loan-services .container {
    max-width: 800px;
    margin: 0 auto;
}

.construction-loan-services h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.construction-loan-services h2 {
    font-size: 2.2em;
    margin: 40px 0 20px;
    color: #003087;
}

.construction-loan-services h3 {
    font-size: 1.8em;
    margin: 30px 0 15px;
    color: #003087;
}

.construction-loan-services p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Foreign National Loans Section */
.foreign-national-loans {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.foreign-national-loans .container {
    max-width: 800px;
    margin: 0 auto;
}

.foreign-national-loans h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.foreign-national-loans p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Investor Loan Services Section */
.investor-loan-services {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.investor-loan-services .container {
    max-width: 800px;
    margin: 0 auto;
}

.investor-loan-services h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.investor-loan-services p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Reverse Mortgages Section */
.reverse-mortgages {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.reverse-mortgages .container {
    max-width: 800px;
    margin: 0 auto;
}

.reverse-mortgages h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.reverse-mortgages p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Our Team Section */
.our-team {
    padding: 50px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.our-team .container {
    max-width: 800px;
    margin: 0 auto;
}

.our-team h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #003087;
}

.our-team p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* CTA Button (Global) */
.cta-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: #003087;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s, color 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #f4d03f;
    color: #003087;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

.modal-content h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #003087;
}

#email-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#email-form input,
#email-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

#email-form textarea {
    min-height: 100px;
}

#email-form button {
    padding: 10px;
    background-color: #003087;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#email-form button:hover {
    background-color: #f4d03f;
    color: #003087;
}

/* Main Footer */
.main-footer {
    background-color: #003087;
    color: white;
    padding: 40px 0;
}

.main-footer .footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.main-footer .footer-column {
    flex: 1;
    min-width: 200px;
}

.main-footer .footer-column h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.main-footer .footer-column p {
    margin: 0 0 10px;
}

.main-footer .footer-column a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.main-footer .footer-column a:hover {
    color: #f4d03f;
}

.footer-logo {
    max-width: 100px;
    height: auto;
    margin: 10px 0;
}

/* Sub Footer */
.sub-footer {
    background-color: #001f5b;
    color: white;
    padding: 20px 0;
    text-align: center;
}

.sub-footer p {
    margin: 5px 0;
}

.sub-footer a {
    color: #f4d03f;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s;
}

.sub-footer a:hover {
    color: white;
}

.inline-logo {
    max-width: 50px;
    height: auto;
    vertical-align: middle;
    margin: 0 10px;
}

/* Responsive Design (Updated) */
@media (max-width: 1200px) {
    .contact-grid {
        flex-wrap: wrap; /* Allow wrapping on smaller screens */
    }
    .contact-item {
        max-width: 350px; /* Slightly smaller for flexibility */
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }

    .contact-info span {
        display: block;
        margin: 5px 0;
    }

    .top-bar-actions {
        margin-top: 10px;
    }

    .navbar .container {
        flex-direction: column;
        padding: 15px 0;
    }

    .nav-list {
        margin-top: 15px;
    }

    .nav-list li {
        margin: 0 15px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .video-section {
        height: 320px;
    }

    .hassle-free-section {
        padding: 20px 15px;
    }

    .hassle-free-section h1 {
        font-size: 2em;
    }

    .hassle-free-section p {
        font-size: 1.1em;
    }

    .contact-grid {
        flex-direction: column; /* Stack vertically on mobile */
        align-items: center;
    }

    .contact-item {
        max-width: 100%; /* Full width on mobile */
        height: 150px;
    }

    .rate-quote-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .rate-quote-text,
    .rate-quote-image {
        max-width: 100%;
        height: 400px;
    }

    .rate-quote-text h2 {
        font-size: 2em;
    }

    .loan-process-grid {
        flex-direction: column;
        align-items: center;
    }

    .loan-process-item {
        max-width: 100%;
    }

    .qualify-grid {
        flex-direction: column;
        align-items: center;
    }

    .qualify-text {
        text-align: center;
    }

    .main-footer .footer-grid {
        flex-direction: column;
        text-align: center;
    }
}

/* Top Blue Section */
.top-blue-section {
    padding: 50px 0;
    background-color: #003087;
    color: white;
    text-align: center;
}

.top-blue-section .container {
    max-width: 800px;
    margin: 0 auto;
}

.top-blue-section h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
}

.top-blue-section p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Responsive Design for Top Blue Section */
@media (max-width: 768px) {
    .top-blue-section {
        padding: 30px 0;
    }

    .top-blue-section h1 {
        font-size: 2em;
    }

    .top-blue-section p {
        font-size: 1.1em;
    }
}

/* White Subsection (for Competitive Rates and Flexible Terms) */
.white-subsection {
    background-color: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.white-subsection h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #003087;
}

.white-subsection p {
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Post-Grid Text Spacing */
.post-grid-text {
    margin-top: 40px;
    font-size: 1.3em;
    color: #333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .white-subsection {
        padding: 15px;
        margin: 15px 0;
    }

    .white-subsection h2 {
        font-size: 1.8em;
    }

    .white-subsection p {
        font-size: 1.1em;
    }

    .post-grid-text {
        margin-top: 30px;
    }
}
