/* Color Palette */
:root {
  --primary-color: #005961; /* Dark Teal from Logo */
  --accent-color: #009BAA;  /* Lighter Turquoise from Logo */
  --light-color: #f4f4f4;
  --dark-color: #333;
  --text-color: #444;
}

/* Core Typography & Layout */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--text-color);
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    color: var(--dark-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem; /* Larger font size for the most important heading */
    font-weight: 700; /* Bold font weight */
    line-height: 1.2;
}

h2 {
    font-size: 2rem; /* A distinct, smaller size for secondary headings */
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem; /* Even smaller for sub-headings */
    font-weight: 600;
}

@media(max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

p {
    margin-bottom: 15px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

header .container {
    overflow: visible; /* This creates the exception for the header */
}

/* Header & Navigation */
header {
    background-color: var(--dark-color);
    background-image: url('/images/bk-header-river.jpg');
    background-repeat: no-repeat;
    background-position: center center; /* This centers the image horizontally and vertically */
    background-size: cover; /* This scales the image to cover the entire header space */
    color: #fff;
    padding: 1rem 0;
    border-bottom: 3px solid var(--primary-color);
    min-height: 150px;
    position: relative;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Adjust 0.4 to make it darker or lighter */
    z-index: 1;
}

.logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

.tagline {
    margin-top: 5px;
    font-style: italic;
    font-size: 0.9em;
    color: #ccc;
    text-align: center;
}

/* Navigation Menu */
nav.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

nav.main-nav li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    padding: 10px 15px;
    display: block;
}

nav.main-nav a:hover {
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-menu .bar {
    width: 2rem;
    height: 0.25rem;
    background: white;
    border-radius: 10px;
}

/* Footer */
footer {
    padding: 20px;
    margin-top: 40px;
    background-color: var(--dark-color);
    color: #fff;
    text-align: center;
}

/* Homepage specific styles */
.content-with-image {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.office-img {
    max-width: 40%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-with-image .intro-text {
    flex: 1;
}

/* --- Home Page CTA Section --- */
#home-cta {
    padding: 40px 0;
    text-align: center;
}

/* --- Hero Header & Primary CTA --- */
.hero-header {
    display: flex;
    align-items: center; /* Vertically aligns the text and button */
    justify-content: space-between; /* Pushes them to opposite sides */
    gap: 30px; /* Adds space between the text and button */
    margin-top: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1; /* Allows the text to take up available space */
    min-width: 300px;
}

.hero-cta {
    flex-shrink: 0; /* Prevents the button from shrinking */
}

.button-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: center;
}

.button-primary:hover {
    background-color: var(--dark-color);
}


/* --- Responsive stacking for the hero header --- */
@media (max-width: 768px) {
    .hero-header {
        flex-direction: column; /* Stacks the items vertically */
        align-items: stretch; /* Makes items full-width */
        text-align: center;
    }

    .hero-cta {
        margin-top: 20px; /* Adds space above the button on mobile */
    }
}

.card-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    flex: 1;
    min-width: 280px; /* Ensures cards don't get too squished */
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.card p {
    flex-grow: 1; /* Makes sure the button aligns to the bottom */
}

.button-secondary {
    background-color: var(--dark-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 15px; /* Adds space above the button */
    transition: background-color 0.3s ease;
}

.button-secondary:hover {
    background-color: var(--primary-color);
}

/* Make cards stack on mobile */
@media (max-width: 768px) {
    .card-container {
        flex-direction: column;
    }
}

/* --- Resources Page List Styles --- */
.resource-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.resource-list li {
    flex: 1 1 30%;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px; /* Keep this on the parent for the shadow */
    display: flex; /* Helps the link fill the space */
}

.resource-list li a {
    background-color: var(--primary-color); /* Moved from li */
    border-radius: 8px; /* Moved from li */
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    display: block;
    padding: 20px;
    text-align: center;
    width: 100%; /* Ensures link fills the li */
    transition: background-color 0.3s ease; /* Add for smooth hover */
}

.resource-list li a:hover {
    background-color: var(--dark-color);
}

/* Staff Page Styles */
.staff-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.staff-member {
    flex: 1 1 300px; /* Allows cards to be responsive and wrap */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.staff-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover;
    margin-bottom: 15px;
}

.staff-title {
    font-style: italic;
    color: var(--text-color);
}

/* Media query to handle the layout on smaller screens */
@media (max-width: 768px) {
    .resource-list li {
        flex: 1 1 100%; /* Items take full width on smaller screens */
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    /* Header and Navigation adjustments */
    header {
        background-image: none; /* Hide image on mobile */
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
        align-items: center;
    }

    .logo-container {
        flex-grow: 0;
    }

    .hamburger-menu {
        display: flex;
    }

    nav.main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--dark-color);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    nav.main-nav.active {
        display: block;
    }

    nav.main-nav ul {
        flex-direction: column;
        text-align: center;
        padding: 0;
    }

    /* Homepage content adjustments */
    .content-with-image {
        flex-direction: column;
    }

    .office-img {
        max-width: 100%;
    }
}

/* --- FAQs Page --- */
/* Makes the question part of the accordion bold and look clickable */
summary {
  font-weight: bold;
  cursor: pointer;
  padding: 0.5em 0; /* Adds a little vertical spacing */
}

/* --- Dictionary Page Styles --- */

/* Bolds the dictionary term */
dt {
  font-weight: bold;
  color: var(--primary-color);
}

/* Adds a nice space after each definition */
dd {
  margin-bottom: 1.25em; /* Adjust as needed */
  margin-left: 0; /* Resets default indentation */
}

/* --- Contact Page Layout --- */
.contact-main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.contact-details {
    flex: 1;
    min-width: 300px;
}

.map-placeholder {
    flex: 1;
    min-width: 300px;
    min-height: 300px;
    background-color: #e9e9e9;
    border: 1px solid #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder iframe {
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

#contact-cta {
    margin-top: 50px;
    text-align: center;
}

/* --- Contact Form Styles --- */
.contact-form {
    margin: 30px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    box-sizing: border-box; /* <-- Add this line to fix the overflow */
}

/* --- Form Fieldset Styles --- */
fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

legend {
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0 10px;
    color: var(--primary-color);
}

/* --- Mortgage Calculator Styles --- */
.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.calculator-inputs, .calculator-results {
    flex: 1;
    min-width: 300px;
}

.calculator-inputs h3, .calculator-results h3 {
    margin-top: 0;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.calculator-inputs label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.calculator-inputs input, .calculator-inputs select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

#calculate-btn {
    width: 100%;
    margin-top: 25px;
}

.total-payment {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
}

.payment-breakdown {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
}

.payment-breakdown div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-color);
}

.payment-breakdown span {
    font-weight: bold;
}