/*
 Theme Name: MortgageBroker
 Theme URI: https://hawkmedia.ca
 Author: Hawk Media
 Author URI: https://hawkmedia.ca
 Description: A WordPress theme for mortgage brokers, built with Elementor support.
 Version: 2.1
 Text Domain: mortgagebroker
*/

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #1a2a43;
    color: #fff;
    line-height: 1.6;
}

a {
    color: #d99a21;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #1a2a43;
}

/* Header Banner */
.header-banner {
    background-color: #a7151d;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 16px;
}

.header-banner p {
    margin: 0;
}

/* Golden Line */
.golden-line {
    border-bottom: 1px solid #d99a21;
}

/* Header Container */
.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Logo */
.site-logo {
    flex: 0 0 auto;
}

.site-logo img.custom-logo {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-title {
    font-size: 24px;
    margin: 0;
}

/* Navigation */
.site-nav {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    margin-right: 10px;
}

.menu-container {
    display: none;
    width: 100%;
    background-color: #1a2a43;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 10px;
    z-index: 998;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.primary-menu li {
    margin: 10px 0;
}

.primary-menu a {
    color: #fff;
    font-size: 16px;
    transition: color 0.3s ease;
}

.primary-menu a:hover {
    color: #d99a21;
}

/* Apply Now Button */
.apply-now-btn {
    background-color: #a7151d;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.apply-now-btn:hover {
    background-color: #8a1117;
}

/* Social Links */
.social-links {
    text-align: center;
    margin: 10px auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.social-links a {
    margin: 0 10px;
    color: #d99a21;
    font-size: 14px;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-nav {
        order: -1; /* Hamburger icon left of logo */
        flex: 0 0 auto;
    }

    .site-logo {
        flex: 1;
        text-align: center; /* Center logo on mobile */
    }

    .site-logo img.custom-logo {
        max-width: 80%;
    }

    .apply-now-btn {
        flex: 0 0 auto;
        margin-left: auto; /* Button on right */
    }

    .menu-toggle {
        margin-right: 10px;
    }

    .menu-container {
        width: 100%;
        left: 0;
    }

    .header-banner {
        font-size: 14px;
    }
}

/* Desktop Layout */
@media (min-width: 769px) {
    .header-container {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between; /* Spreads logo and nav/button */
    }

    .site-logo {
        flex: 0 0 auto;
        text-align: left !important; /* Explicitly left-align logo */
        order: -1; /* Logo on left */
    }

    .site-nav {
        flex: 0 0 auto;
        justify-content: flex-end; /* Menu aligns right */
        order: 0; /* Menu before button */
        margin-right: 20px; /* Space between menu and button */
    }

    .menu-toggle {
        display: none;
    }

    .menu-container {
        display: flex !important;
        position: static;
        box-shadow: none;
        padding: 0;
    }

    .primary-menu {
        flex-direction: row;
        justify-content: flex-end; /* Menu items align right */
    }

    .primary-menu li {
        margin: 0 15px; /* Reduced for tighter spacing */
    }

    .apply-now-btn {
        flex: 0 0 auto;
        order: 1; /* Button on far right */
    }

    .header-banner {
        font-size: 18px;
    }
}

/* Retina Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .site-logo img.custom-logo {
        max-width: 100%;
        height: auto;
    }
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}