/* CSS Variables for colors and fonts */
:root {
    --primary-color: #3581a4;
    --secondary-color: #a9cce3;
    --accent-color: #e67e22;
    --accent-hover-color: #d35400;
    --text-color: #333;
    --background-light: #f4f7f6;
    --background-dark: #34495e;
    --white: #fff;
    --border-color: #ccc;
    --nav-hover-color: #4a7c8c;
    --box-shadow-color: rgba(0,0,0,0.1);
    --font-family-body: 'Open Sans', sans-serif;
    --font-family-heading: 'Montserrat', sans-serif;
}

html {
    overflow-y: scroll;
}

/* General Body Styles */
body {
    font-family: var(--font-family-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-color);
}

/* Header */
header {
    background-image: url('/images/header_banner.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding-top: 1rem;    
    text-align: center;
    justify-content: center;
}

header h1 {
    margin: 0 60px;
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    border-bottom: 2px solid var(--white);
    padding: 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header h2 {
    margin: 0 100px;
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    color: var(--white);
    border: none;
    padding: 0.5rem 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Navigation */
nav {
    /* Converted --primary-color (#3581a4) to rgba for transparency */
    background-color: rgba(53, 129, 164, 0.7);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    margin: 0 1rem;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav ul li a {
    display: inline-flex;
    color: var(--white);
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: var(--nav-hover-color);
}

nav ul li a.active {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* Main Content */
main {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

section {
    margin-bottom: 2rem;
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--box-shadow-color);
}

h2 {
    font-family: var(--font-family-heading);
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);    
    margin: 0;
}

/* Call to Action Button */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--accent-hover-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    background-color: var(--background-dark);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        /* flex-direction: column; */
        align-items: center;
    }
}

/* Contact Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
}
fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* padding: 1.5rem; */
}
legend {
    font-weight: bold;
    color: var(--primary-color);
    padding: 0 0.5rem;
}
form div {
    display: flex;
    flex-direction: column; /* Stack on small screens */
    gap: 0.5rem; /* Adjust gap for stacking */
    margin: 0.5rem 0;
}
label {
    font-weight: bold;
    width: auto; /* Remove fixed width */
}

/* On larger screens, go back to side-by-side */
@media (min-width: 500px) {
    form div {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
    label {
        width: 150px; /* A more predictable width */
        flex-shrink: 0; /* Prevent the label from shrinking */
    }
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {    
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.5rem;
}
textarea {
    resize: vertical;
}

.alternative-contact {
    margin: 1.5rem 0;
    padding: 1rem;
    /* background-color: #f0f4f8; */
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.alternative-contact p {
    margin: 5px 0;
}

.google-form-iframe {
    width: 100%;
    height: fit-content;
    border: none;
    margin: 0;
}

@media (max-width: 768px) {
    .google-form-iframe {
        height: 1000px; /* Adjust height for smaller screens if needed */
    }
}

.captcha-submit {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* About Page Photo */
.about-container {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    align-items: center; /* Center image on mobile */            
}

.about-photo {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 50%; /* Circular photo */
    box-shadow: 0 4px 8px var(--box-shadow-color);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    padding: 10px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .about-container {
        flex-direction: row; /* Side-by-side on desktop */
        align-items: center;
        gap: 2rem;        
    }
    .about-photo {        
        margin-top: 0;
    }
}