/* === Base Styles & Resets === */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

/* Accessibility - Skip Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0056b3;
    color: white;
    padding: 8px;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Ensures main content takes up available space */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Typography & Links === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem; /* Use rem for better accessibility */
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

p {
    color: #555;
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 20px; /* Standard indentation */
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: #0056b3; /* Slightly darker blue */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d80;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent bottom space */
}

/* === Header === */
header {
    background: #ffffff;
    color: #333;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky; /* Keep header visible */
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo img {
    height: 70px; /* Increased from 60px */
    width: auto;
    margin-right: 10px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #555;
}

.main-nav > ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 30px;
    margin-bottom: 0; /* Override base li margin */
}

.main-nav a {
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* Optional: Underline effect for active/hover nav items */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: #0056b3;
    transition: width 0.3s ease;
    -webkit-transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
    left: 0;
    background: #0056b3;
}

/* Active link style (requires JS or manual class adding) */
/* .main-nav a.active {
    color: #0056b3;
}
.main-nav a.active::after {
    width: 100%;
    left: 0;
    background: #0056b3;
} */

.menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #333;
    cursor: pointer;
}

/* === Main Content Sections === */
main section {
    padding: 50px 0;
}

main section:nth-child(even) {
    background-color: #ffffff; /* Alternate background for visual separation */
}

main section:last-child {
    border-bottom: none;
}

/* Page Title Banner */
.page-title-banner {
    background-color: #6c757d; /* Example: Dark gray */
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
}

.page-title-banner h1 {
    color: #ffffff;
    margin-bottom: 0;
    font-size: 2.2rem;
    font-weight: 400;
}

/* General Content Area */
.main-content {
    padding-top: 30px;
    padding-bottom: 30px;
}

.main-content h2 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* === Buttons === */
.button, .submit-button, .hero-button, .info-button {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

.button-primary, .hero-button {
    background-color: #0056b3; /* Primary blue */
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.button-primary:hover, .hero-button:hover {
    background-color: #003d80; /* Darker blue */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
}

.button-secondary, .info-button {
    background-color: #6c757d; /* Gray */
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.button-secondary:hover, .info-button:hover {
    background-color: #5a6268; /* Darker gray */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none;
}

.hero-button {
    margin-top: 25px;
}

.info-button {
    padding: 15px 30px; /* Slightly larger padding */
    min-width: 200px;
    margin: 5px;
}

/* === Footer === */
footer {
    background-color: #343a40; /* Dark background */
    color: #adb5bd; /* Lighter text */
    padding: 40px 0 0; /* Padding top, no bottom padding yet */
    margin-top: auto; /* Push footer to bottom */
}

.footer-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo-social .footer-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
}

.footer-logo span {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
}

.social-icons a {
    color: #adb5bd;
    font-size: 1.4rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ffffff;
    text-decoration: none;
}

.social-icons a:last-child {
    margin-right: 0;
}

footer h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.footer-nav ul,
.footer-contact p {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: #ffffff; /* Updated color for visibility */
}

.footer-contact i {
    margin-right: 10px;
    width: 15px; /* Align icons */
    text-align: center;
    color: #ffffff; /* Make icons white */
}

.footer-contact a {
    color: #adb5bd; /* Keep link color distinct initially */
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #495057; /* Separator line */
    padding: 15px 0;
    text-align: center;
    margin-top: 30px;
}

.footer-bottom .copyright {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d; /* Dimmer text for copyright */
}


/* === Specific Page Styles === */

/* --- Homepage --- */
#hero {
    /* Using original background image style */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero_img_rgc1.jpeg'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-align: center;
    padding: 100px 0; /* Keep modern padding */
    position: relative; /* Keep for potential overlay */
    min-height: 60vh; /* Added from original */
    display: flex; /* Added from original */
    flex-direction: column; /* Added from original */
    justify-content: center; /* Added from original */
    align-items: center; /* Added from original */
    border-bottom: none; /* Override section border */
}

/* Keep overlay style if needed, or remove if background-image includes it */
#hero::before { 
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15); /* Reduced overlay opacity further to 0.15 */
}

#hero .container {
    position: relative; /* Ensure content is above overlay */
    z-index: 1;
}

/* Use modern H2/P styles for hero, but keep colors/shadow from original */
#hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7); /* Original shadow */
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e9ecef;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); /* Original shadow */
    max-width: 600px; /* Added from original */
    margin-left: auto; /* Added from original */
    margin-right: auto; /* Added from original */
}

#info-cards {
    background-color: #ffffff;
}

#info-cards .section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

/* Optional title underline */
/* #info-cards .section-title::after { ... } */

.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

#calendar {
    background-color: #e9ecef; /* Light gray background */
}

#calendar .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#calendar h3 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
}

.event-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 700px;
}

.event-item {
    background-color: #ffffff;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-date {
    background-color: #0056b3;
    color: #ffffff;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    margin-right: 20px;
    min-width: 60px;
}

.event-date .day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.event-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.event-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

#quick-links-wrapper {
    background-color: #ffffff;
}

.quick-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.quick-link-item {
    background-color: #f8f9fa;
    padding: 30px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: inherit; /* Make sure text color is inherited */
    text-decoration: none; /* Remove underline from link */
}

.quick-link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.quick-link-item i {
    font-size: 2.5rem;
    color: #0056b3;
    margin-bottom: 15px;
}

.quick-link-item h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.quick-link-item p {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0; /* Remove extra margin if wrapped in <a> */
}

/* --- Welcome Gallery Section (Homepage) --- */
#welcome-gallery {
    background-color: #f8f9fa; /* Match body background or choose another */
    padding: 50px 0; /* Ensure consistent padding */
}

#welcome-gallery .section-title {
     border-bottom: none; /* Remove bottom border if not desired */
     margin-bottom: 30px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust minmax for desired size */
    gap: 10px; /* Adjust gap between photos */
    margin-bottom: 20px; /* Add space below gallery */
}

.photo-gallery img {
    width: 100%;
    height: 200px; /* Example fixed height - adjust or use aspect-ratio */
    object-fit: cover; /* Cover the grid area, may crop */
    border-radius: 5px; /* Optional rounded corners */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Optional subtle shadow */
    display: block; /* Ensure proper block behavior */
}

/* --- About Page --- */
.content-area::after { /* Clearfix for floated elements */
    content: "";
    display: table;
    clear: both;
}

.subpage-links {
    float: right;
    width: 28%; /* Adjust width as needed */
    min-width: 180px;
    margin-left: 30px;
    margin-bottom: 20px;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f8f9fa; /* Light background */
}

.subpage-links h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.subpage-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subpage-links li {
    margin-bottom: 8px;
}

.subpage-links a {
    text-decoration: none;
    /* color: #0056b3; */ /* Inherits link color */
}

.subpage-links a:hover {
    /* text-decoration: underline; */ /* Inherits link hover */
}

.about-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.about-section h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Beliefs Page --- */
.belief-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.belief-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.belief-item h2 {
    border-bottom: none;
    padding-bottom: 0;
}

/* --- Leadership Page --- */
.leader-profile {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.leader-profile:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.leader-profile img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
    shape-outside: circle(50%);
    background-color: #e9ecef;
}

.leader-profile h3 {
    margin-top: 0;
}

.leader-profile h4 {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 15px;
}

.leader-profile p {
    font-size: 0.95rem;
    clear: right; /* Prevent text wrapping issue if image is tall */
}

.leader-profile::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Connect Page --- */
.connect-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
    overflow: hidden; /* Contain the float */
}

.connect-section-image {
    width: auto;
    max-width: 200px; /* Adjust width as needed */
    float: left; /* Float image to the left */
    margin-right: 20px; /* Space between image and text */
    margin-bottom: 10px; /* Space below image if text is short */
    border-radius: 5px; /* Optional: Slightly rounded corners */
    object-fit: cover; /* Covers the area, might crop slightly */
}

.connect-section h2 {
    border-bottom: none; /* Remove border from h2 inside connect section */
    padding-bottom: 0;
    margin-bottom: 10px;
    margin-top: 0; /* Ensure no extra top margin */
}

.connect-section p {
    margin-bottom: 20px;
}

.connect-section .button {
    margin-top: 10px; /* Added slight space above button */
}

.connect-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- Resources Page --- */
.resource-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.resource-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sermon-item, .book-item {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #0056b3;
}

.sermon-item h3, .book-item h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.sermon-item p, .book-item p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.sermon-item a, .book-item a {
    margin-right: 10px;
    font-size: 0.9rem;
}

/* --- Contact Page --- */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-details h2,
.contact-form-container h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.contact-info-item {
    margin-bottom: 20px;
}

.contact-info-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-info-item p {
    margin-bottom: 5px;
    color: #555;
}

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

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    color: #333;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Lato', sans-serif;
    line-height: 1.5;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Use button-primary style for submit */
.contact-form .submit-button {
    width: auto;
    padding: 12px 30px;
    /* Inherits from .button-primary now */
    background-color: #0056b3; /* Ensure it uses primary blue */
}
.contact-form .submit-button:hover {
     background-color: #003d80; /* Ensure it uses darker primary blue */
}

/* --- Calendar Section --- */
#calendar iframe {
    width: 100%;       /* Take full width of its container */
    max-width: 650px;  /* Reduced from 800px */
    height: 400px;     /* Reduced from 450px */
    display: block;    /* Prevent extra space below */
    margin: 0 auto;    /* Center the iframe within its container */
    border: 1px solid #ccc; /* Keep a subtle border */
}

/* === Responsive Design === */

/* Medium Devices (Tablets) */
@media (max-width: 992px) {
    .header-container {
        /* Adjust if needed */
    }
    .logo span {
        font-size: 1.3rem; /* Slightly smaller */
    }
    .main-nav li {
        margin-left: 20px;
    }
    .main-nav a {
        font-size: 0.85rem;
    }

    .footer-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #hero h2 {
        font-size: 2.5rem; /* Adjust hero title */
    }
    #hero p {
        font-size: 1.1rem; /* Adjust hero text */
    }
}

/* Small Devices (Mobile) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }

    .container {
        width: 95%;
        padding: 0 15px;
    }

    /* --- Mobile Header & Navigation --- */
    .header-container {
        position: relative; /* Needed for absolute positioning of nav */
    }

    .menu-toggle {
        display: block; /* Show hamburger icon */
    }

    .main-nav {
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out, box-shadow 0.3s ease;
        box-shadow: none;
    }

    .main-nav.active {
        max-height: 500px; /* Adjust as needed, should be enough for links */
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .main-nav li {
        margin: 0;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f1f1f1;
        text-transform: none;
        font-weight: 400;
        font-size: 1rem;
    }

    .main-nav li:last-child a {
        border-bottom: none;
    }

    .main-nav a:hover {
        background-color: #f8f9fa;
    }

    .main-nav a::after { /* Hide underline effect on mobile */
        display: none;
    }

    /* Mobile Dropdown Adjustments */
    .main-nav li.dropdown > a::after {
        display: none; /* Hide desktop arrow */
    }
    .dropdown-menu {
        display: none !important; /* Ensure hidden initially */
        position: static;
        box-shadow: none;
        border: none;
        background-color: transparent;
        padding: 0;
        min-width: 0;
    }
    .main-nav.active .dropdown-menu {
        display: block; /* Show when nav is active */
    }
    .main-nav.active .dropdown-menu li a {
        padding: 12px 20px 12px 40px; /* Indent */
        font-size: 0.95rem;
        background-color: #fdfdfd; /* Slight background difference */
    }
    .main-nav.active .dropdown-menu li:last-child a {
        border-bottom: 1px solid #f1f1f1; /* Add border back */
    }

    /* --- Other Mobile Adjustments --- */
    #hero {
        padding: 60px 0;
        min-height: 40vh; /* Adjust height on mobile */
    }
    #hero h2 {
        font-size: 2.2rem;
    }
    #hero p {
        font-size: 1rem;
        max-width: 90%; /* Allow slightly wider text */
    }

    .button-container {
        flex-direction: column;
        align-items: center;
    }
    .info-button {
        width: 80%;
        max-width: 300px;
    }

    /* Make Google Calendar iframe responsive */
    #calendar iframe {
        height: 450px; /* Adjusted height for mobile */
        max-width: 100%;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Smaller min size */
        gap: 5px;
    }
    .photo-gallery img {
        height: 150px; /* Adjust height */
    }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-date {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: flex-start;
    }

    .leader-profile img {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        width: 120px;
        height: 120px;
    }
    .leader-profile::after { /* Remove clearfix */
        display: none;
    }

    /* Adjust Connect Page Image layout for mobile */
    .connect-section-image {
        float: none; /* Remove float */
        display: block; /* Ensure block display */
        margin: 0 auto 20px auto; /* Center image with bottom margin */
        max-width: 80%; /* Limit width relative to container */
        /* max-height: 180px; Keep or remove height limit as preferred */
    }

    .connect-section {
        text-align: center; /* Center text below stacked image */
        overflow: visible; /* Reset overflow from desktop float containment */
    }

    .connect-section p {
         margin-left: auto; /* Re-center paragraph if needed */
         margin-right: auto;
    }

    .footer-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo-social {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-logo a {
        justify-content: center;
    }
    .social-icons {
        margin-top: 15px;
    }
    .footer-contact p {
        justify-content: center;
    }

    .subpage-links {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-bottom: 30px; /* Add space when stacked */
    }

     .contact-content {
         grid-template-columns: 1fr; /* Stack contact sections */
     }
} 

/* --- Dropdown Menu Styles --- */
.main-nav li.dropdown {
    position: relative; /* Explicitly set position relative */
}

/* Optional: Add dropdown indicator arrow */
.main-nav li.dropdown > a::after {
    content: ' ▼';
    font-size: 0.6em;
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #ffffff;
    min-width: 200px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    border-radius: 0 0 4px 4px; 
    padding: 10px 0; 
    margin: 0;
    list-style: none;
    z-index: 1100; /* Ensure high z-index */
}

/* Show dropdown on hover (for desktop) */
.main-nav li.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0; 
}

.dropdown-menu li a {
    display: block; 
    padding: 8px 20px; 
    color: #333;
    text-transform: none; 
    font-size: 0.9rem;
    font-weight: 400; 
    white-space: nowrap; 
    border-bottom: none; 
}

/* Remove hover underline effect within dropdown */
.dropdown-menu li a::after {
    display: none;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa; 
    color: #0056b3; 
} 