/* Base Styles & Typography */
:root {
    --primary-color: #0056b3; /* Dark Blue */
    --secondary-color: #007bff; /* Brighter Blue */
    --accent-color: #28a745; /* Green for actions */
    --text-color: #333;
    --light-text-color: #fff;
    --background-light: #f8f9fa; /* Light Grey */
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1em;
}

h1 {
    font-size: 2.8em;
    text-align: center;
    color: var(--light-text-color);
}

h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 0.5em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container .logo {
    height: 70px; /* Adjust as needed */
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--light-text-color);
    font-weight: 600;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a .fas {
    margin-right: 8px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

nav ul li a:hover::after,
nav ul li a.active::after { /* Add 'active' class to current page link */
    width: 100%;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(rgba(0, 86, 179, 0.7), rgba(0, 86, 179, 0.7)), url('hero-image.jpg') no-repeat center center/cover; /* Replace 'hero-image.jpg' with a suitable image */
    color: var(--light-text-color);
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 40px;
}

.hero-banner p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 20px auto 30px;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.button .fas {
    margin-right: 8px;
}

.primary-button {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}

.primary-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.secondary-button {
    background-color: var(--accent-color);
    color: var(--light-text-color);
}

.secondary-button:hover {
    background-color: #218838; /* A darker green */
    transform: translateY(-2px);
}

.button-group {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.button.button-small {
    font-size: 0.9em; /* Smaller button for cards */
    padding: 8px 15px;
}

/* Content Sections (General) */
.content-section {
    padding: 60px 0;
    margin-bottom: 40px;
    background-color: var(--light-text-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.light-background {
    background-color: var(--background-light);
    box-shadow: none;
}

.content-section p {
    max-width: 800px;
    margin: 0 auto 1.5em;
    text-align: center;
    font-size: 1.1em;
}

/* --- Home Page Specific Styles --- */
/* Services Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.service-item .fas {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-item h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.service-item p {
    font-size: 0.95em;
    color: #666;
    text-align: center;
}

.event-placeholder {
    font-style: italic;
    color: #777;
    text-align: center;
    margin-top: 30px;
}

/* --- Contact Page Specific Styles --- */

/* Adjust hero banner for internal pages */
.hero-banner.small-banner {
    padding: 80px 20px; /* Reduced padding for a more compact banner */
    margin-bottom: 60px; /* More space below banner */
}

.hero-banner.small-banner h1 {
    font-size: 2.5em; /* Slightly smaller heading for internal pages */
}

.hero-banner.small-banner p {
    font-size: 1.1em;
    margin-bottom: 0;
}

/* Contact Info Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.contact-card {
    background-color: #fff;
    padding: 35px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Vertically centers content */
}

.contact-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-card .fas {
    font-size: 3.5em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-card p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
    max-width: none; /* Override center text for cards */
    text-align: center;
}

.contact-card address {
    font-style: normal; /* Removes default italic for address */
    margin-top: 10px;
    line-height: 1.8;
    color: #555;
}

.contact-card .contact-link {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1em;
    word-break: break-all; /* Helps with long emails/numbers on small screens */
}

.contact-card .contact-link:hover {
    text-decoration: underline;
}

/* Map Section */
.map-container {
    border-radius: 8px;
    overflow: hidden; /* Ensures the iframe corners are rounded */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.map-container iframe {
    display: block; /* Removes extra space below iframe */
}

/* Contact Form */
.form-intro {
    font-size: 1.1em;
    margin-bottom: 30px;
    text-align: center;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: var(--text-color);
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact-form .button {
    width: auto; /* Buttons inside form don't need full width by default */
    padding: 12px 30px;
    display: block; /* Make button full width if needed, or inline-block with margins */
    margin: 20px auto 0; /* Center the button */
}

/* --- Providers Page Specific Styles --- */
.section-description {
    max-width: 800px;
    margin: 0 auto 3em; /* Added more space below description */
    text-align: center;
    font-size: 1.1em;
    color: #555;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid for cards */
    gap: 30px; /* Space between cards */
    margin-top: 40px;
}

.provider-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex; /* Use flexbox for vertical alignment */
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Distribute space */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.provider-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.provider-card a {
    text-decoration: none; /* Remove underline from card links */
    color: inherit; /* Inherit color from parent */
    display: block; /* Make the whole logo clickable area */
    margin-bottom: 20px;
}

.provider-logo {
    max-width: 150px; /* Max width for logos */
    height: auto;
    display: block; /* Remove extra space below images */
    margin: 0 auto; /* Center the logo */
    filter: grayscale(80%); /* Make logos subtle until hover */
    transition: filter 0.3s ease;
}

.provider-card:hover .provider-logo {
    filter: grayscale(0%); /* Full color on hover */
}

.provider-name {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.provider-description {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take up available space */
}

.provider-card .button {
    font-size: 0.9em; /* Smaller button for cards */
    padding: 8px 15px;
    margin-top: auto; /* Push button to the bottom */
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 0.9em;
}

footer p {
    margin: 5px 0;
}

.footer-links a {
    color: var(--light-text-color);
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

footer .credit {
    margin-top: 15px;
    font-size: 0.8em;
}

footer .credit a {
    color: rgba(255, 255, 255, 0.7);
}

footer .credit a:hover {
    color: var(--light-text-color);
}


/* Back-to-Top Button */
#backToTop {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%; /* Make it round */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    line-height: 1; /* Adjust for better vertical centering of arrow */
}

#backToTop:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    .hero-banner {
        padding: 70px 20px;
    }

    .button-group {
        flex-direction: column;
        gap: 15px;
    }

    /* Contact Page Specific */
    .contact-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-form {
        padding: 30px 20px;
    }

    /* Providers Page Specific */
    .providers-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .provider-card {
        padding: 25px;
    }

    .provider-logo {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .logo-container .logo {
        height: 60px;
    }

    nav ul li a {
        font-size: 1em;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.6em;
    }

    .content-section {
        padding: 40px 0;
    }

    /* Contact Page Specific */
    .hero-banner.small-banner h1 {
        font-size: 2em;
    }

    .contact-card .fas {
        font-size: 3em;
    }

    .contact-card h3 {
        font-size: 1.4em;
    }

    .contact-form {
        padding: 20px 15px;
    }

    /* Providers Page Specific */
    .provider-name {
        font-size: 1.3em;
    }

    .provider-description {
        font-size: 0.9em;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        font-size: 20px;
        padding: 8px 12px;
    }
}