/* Basic styles */
body {
    font-family: "Source Serif Pro", serif; /* From old site */
    margin: 0;
    padding: 0;
    background-color: #F6F2EC; /* base color */
    color: #21251F; /* contrast color */
    line-height: 1.5;
}

header {
    background-color: #F6F2EC; /* Light background for header */
    padding: 1em 0;
    border-bottom: 1px solid #ddd;
    color: #21251F;
}

.header-content {
    max-width: 1200px; /* Limit width */
    margin: 0 auto; /* Center content */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em;
}

.logo-title-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 70px; /* Adjust as needed */
    margin-right: 15px;
}

.site-title {
    margin: 0;
    font-size: 1.8em; /* Adjust as needed */
    font-style: italic;
    font-weight: normal; /* Match original */
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px; /* Spacing between nav items */
}

nav ul li a {
    text-decoration: none;
    color: #21251F; /* Match original link color */
    font-size: 1em; /* Adjust as needed */
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    top: 100%;
    left: 0;
}

.dropdown:hover > .dropdown-content {
    display: block;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-content {
    display: none;
    position: absolute;
    left: 100%; /* Default: open to the right of parent submenu item */
    top: 0;
    min-width: 200px;
    background-color: #f9f9f9;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001; /* Ensure submenus stack above parent dropdown content and other elements */
}

/* NEW Fix for off-screen dropdowns */

/* If a dropdown's PARENT is already a dropdown-submenu-content (i.e., we are at level 3+ deep), flip its content left */
.dropdown-submenu-content .dropdown-submenu > .dropdown-submenu-content {
    left: auto;
    right: 100%;
}

/* If a top-level .dropdown is the last item in nav, its .dropdown-content aligns right. */
.dropdown:last-child > .dropdown-content {
    left: auto;
    right: 0;
}

/* If a .dropdown-submenu item (at any level) is the last in its list, its .dropdown-submenu-content flips left. */
/* This can override the level 3+ rule if it's also a last-child, which is usually the desired behavior. */
.dropdown-submenu:last-child > .dropdown-submenu-content {
    left: auto;
    right: 100%;
}

.dropdown-submenu:hover > .dropdown-submenu-content {
    display: block;
}

/* Make all nav items consistent */
nav ul li a,
.dropbtn,
.sub-dropbtn {
    display: inline-block;
    padding: 12px 16px;
    text-decoration: none;
    color: #21251F;
    white-space: nowrap;
    font-size: 1em;
}

.dropdown-content a,
.dropdown-submenu-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #21251F;
    white-space: nowrap;
}

.dropdown-content a:hover,
.dropdown-submenu-content a:hover,
.dropbtn:hover,
.sub-dropbtn:hover,
nav ul li a:hover {
    background-color: #f1f1f1;
    text-decoration: none;
}

.dropdown-content .active,
.dropdown-submenu-content .active {
    background-color: #e6e6e6;
}

/* Arrow indicators for submenus */
.dropdown-submenu > a:after {
    content: "›";
    float: right;
    margin-left: 8px;
    transform: rotate(0deg);
    font-size: 1.2em;
    line-height: 1;
}

main {
    padding: 1em;
    max-width: 1200px;
    margin: 2em auto; /* Add some margin to top and bottom */
}

footer {
    padding: 2em 1em;
    background-color: #F6F2EC; /* base color */
    color: #21251F; /* contrast color */
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 2em;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1em;
}

.site-title-footer a {
    text-decoration: none;
    color: #21251F;
    font-size: 1.2em;
    font-style: italic;
    font-weight: normal;
    margin-right: 10px;
}

.site-title-footer a:hover {
    text-decoration: underline;
}

.footer-logo {
    height: 50px;
}

.footer-links {
    margin-bottom: 1em;
}

.footer-bottom {
    font-size: 0.9em;
    color: #555;
}

.footer-bottom p {
    margin: 0.3em 0;
}

footer a {
    color: #5B4460; /* primary color for links in footer */
}

h1, h2, h3, h4, h5, h6 {
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    color: #5B4460; /* Primary color for headings */
}

h1 {
    font-size: clamp(2.5rem, 1.966rem + 1.71vw, 3.375rem); /* huge font size */
    line-height: 1.1;
    margin-bottom: 0.5em;
}

h2 {
    font-size: clamp(2.125rem, 1.706rem + 1.34vw, 2.813rem); /* xx-large font size */
    line-height: 1.2;
    margin-bottom: 0.4em;
}

/* Hero Image */
.hero-image {
    margin: 0 0 2em 0; /* Remove default figure margin, add bottom margin */
    text-align: center; /* Center the image if it's narrower than the container */
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px; /* Match original image style */
}

/* Content Sections */
section {
    margin-bottom: 2em;
}

#who-we-are h1 {
    /* The main page title already styled as h1, this might be redundant or need adjustment based on final structure */
    /* For now, let's assume "The Garden" is the main title for this page section */
    text-align: center; /* As seen in the original for this specific title */
    margin-bottom: 1em;
}

#who-we-are h2 {
    font-size: 1.8em; /* Slightly smaller than top-level h2 */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-style: normal; /* 'Who we are' was not italic in the original snapshot */
    font-weight: bold;
}

#who-we-are h3 {
    font-size: 1.4em;
    margin-top: 1.5em;
    margin-bottom: 0.3em;
    font-style: normal; /* Not italic */
    font-weight: bold;
}

#who-we-are ul {
    list-style: disc; /* Standard bullets */
    padding-left: 20px; /* Indent list */
    margin-bottom: 1em;
}

#who-we-are p, #who-we-are li {
    line-height: 1.6;
}

/* Horizontal Rule */
hr {
    border: 0;
    height: 1px;
    background-color: #ccc; /* A light gray like the original */
    margin: 2em 0;
}

/* Blog Post Summary */
#latest-blog-post h2 {
    text-align: center;
    margin-bottom: 1em;
}

.blog-post-summary {
    border: 1px solid #ddd;
    padding: 1.5em;
    margin-bottom: 1.5em;
    border-radius: 8px;
    background-color: #fff; /* Give it a slightly different background */
}

.blog-post-summary h3 {
    margin-top: 0;
    font-size: 1.6em;
}

.blog-post-summary h3 a {
    text-decoration: none;
    color: var(--wp--preset--color--primary, #5B4460);
}

.blog-post-summary h3 a:hover {
    text-decoration: underline;
}

.blog-post-image {
    margin: 1em 0;
    text-align: center;
}

.blog-post-image img {
    width: 100%;
    /* height: auto; -- replaced by aspect-ratio */
    aspect-ratio: 16 / 9; /* Or another desired ratio, e.g., 3/2 */
    object-fit: cover; /* Ensure image covers the area, may crop */
    transition: transform 0.3s ease;
    border-radius: inherit; /* Inherit from parent .blog-post-image if it has one */
}

.post-date {
    font-size: 0.9em;
    color: #555;
    margin-top: 1em;
}

.all-posts-link {
    text-align: center;
    margin-top: 1em;
}

/* Button Style (from original site) */
.button {
    background-color: #aad58c; /* secondary color */
    border-radius: 50px;
    border-width: 0;
    color: #21251F; /* contrast color */
    font-family: inherit;
    font-size: var(--wp--preset--font-size--normal, 1.125rem);
    line-height: inherit;
    padding: calc(0.667em + 2px) calc(1.333em + 2px);
    text-decoration: none;
    display: inline-block; /* To allow padding and centering */
}

.button:hover {
    background-color: #6a9c58; /* Darker shade for hover */
}

/* Blog Page Specific Styles */
.blog-list {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-summary {
    margin-bottom: 3em; /* More spacing between posts in the listing */
}

.blog-post-summary:last-child {
    margin-bottom: 1em;
}

.blog-post-summary p {
    margin: 1em 0;
}

.blog-post-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin: 1.5em 0;
}

.blog-post-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.blog-post-image:hover img {
    transform: scale(1.05);
}

/* Contact Page Specific Styles */
.contact-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2em;
    padding: 1em;
}

.contact-info {
    background-color: #fff;
    padding: 2em;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.contact-info h2 {
    color: #5B4460;
    margin-top: 0;
}

.contact-info h3 {
    color: #21251F;
    margin: 1.5em 0 0.5em;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.contact-form {
    background-color: #fff;
    padding: 2em;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    color: #21251F;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

/* Responsive adjustments for contact page */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Resources Page Specific Styles */
.resources-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1em;
}

.resource-category {
    margin-bottom: 3em;
}

.resource-category h2 {
    color: #5B4460;
    margin-bottom: 1.5em;
    text-align: center;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
}

.resource-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.resource-card h3 {
    color: #5B4460;
    margin-top: 0;
    margin-bottom: 1em;
}

.resource-card p {
    margin-bottom: 1.5em;
    color: #21251F;
}

.resource-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-card ul li {
    margin-bottom: 0.5em;
}

.resource-card ul li a {
    color: #5B4460;
    text-decoration: none;
    display: inline-block;
    padding: 0.3em 0;
}

.resource-card ul li a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for resources page */
@media (max-width: 768px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb Styles */
.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto 1.5em auto; /* Top, Auto, Bottom, Auto */
    padding: 0 1em;
}

.breadcrumb {
    list-style: none;
    padding: 0.75em 1em;
    margin: 0;
    background-color: #e9ecef; /* A light grey background */
    border-radius: 0.25rem;
    display: flex;
    flex-wrap: wrap; /* Allow breadcrumbs to wrap on small screens */
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">"; /* Separator */
    padding: 0 0.5em;
    color: #6c757d; /* A neutral color for the separator */
}

.breadcrumb-item a {
    text-decoration: none;
    color: #5B4460; /* Primary color */
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #21251F; /* Contrast color for the active page */
    font-weight: bold;
}

/* Resource Page Content Styles */
.resource-page-content {
    max-width: 900px; /* Slightly narrower for better readability */
    margin: 2em auto;
    padding: 1.5em;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.resource-page-content h1 {
    margin-top: 0;
    margin-bottom: 1em;
    text-align: center;
}

.resource-page-content h2,
.resource-page-content h3,
.resource-page-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: #5B4460;
}

.resource-page-content p {
    line-height: 1.7;
    margin-bottom: 1em;
}

.resource-page-content ul,
.resource-page-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em; /* Standard indentation */
}

.resource-page-content li {
    margin-bottom: 0.5em;
}

.resource-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    display: block; /* Center images that are not full width */
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Page Specific Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.gallery-grid figure {
    margin: 0;
    padding: 0;
    border: 1px solid #ddd; /* Light border around images */
    border-radius: 4px;
    overflow: hidden; /* Ensures border-radius is respected by img */
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1; /* Make images square */
    object-fit: cover; /* Cover the area, cropping if necessary */
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Shown in media query as flex */
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002; 
    position: relative;
    box-sizing: border-box;
    /* Removed flex properties, spans are now absolute */
}

.hamburger-menu span {
    display: block;
    position: absolute;
    width: 20px;  /* Centered in 30px button */
    height: 3px;
    background-color: #333; 
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    left: 5px; /* (30px button width - 20px span width) / 2 */
    transform-origin: center; 
}

.hamburger-menu span:nth-child(1) {
    top: 6px;
}

.hamburger-menu span:nth-child(2) {
    top: 13.5px; /* (30px height - 3px span height) / 2 */
}

.hamburger-menu span:nth-child(3) {
    top: 21px; /* 30px - 3px span height - 6px top margin */
}

.hamburger-menu.active span:nth-child(1) {
    top: 13.5px;
    transform: rotate(45deg); 
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    top: 13.5px;
    transform: rotate(-45deg); 
}

/* Mobile Navigation Container */
.mobile-nav-links {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: fixed; /* Take up full screen */
    top: 0;
    left: 0;
    width: 100vw; /* Full viewport width */
    height: 100vh; /* Full viewport height */
    background-color: #F6F2EC; /* Site base background color */
    z-index: 1000; /* Below hamburger menu */
    overflow-y: auto; /* Allow scrolling for long menus */
    padding: 20px; /* General padding */
    padding-top: 80px; /* Padding to clear typical header/hamburger area */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.mobile-nav-links.active {
    display: flex; /* Show the menu - use flex as it's a flex container */
    /* Other styles like position, size, background are inherited from .mobile-nav-links */
}

.mobile-nav-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav-links ul li {
    margin-left: 0;
    border-bottom: 1px solid #eee; /* Separator for items */
}

.mobile-nav-links ul li:last-child {
    border-bottom: none;
}

.mobile-nav-links ul li a,
.mobile-nav-links .dropbtn,
.mobile-nav-links .sub-dropbtn {
    display: block; /* Make links take full width */
    padding: 15px 20px;
    color: #21251F;
    text-decoration: none;
    white-space: normal; /* Allow text wrapping */
}

.mobile-nav-links ul li a:hover,
.mobile-nav-links .dropbtn:hover,
.mobile-nav-links .sub-dropbtn:hover {
    background-color: #e9e4dd;
}

/* Mobile Dropdown/Submenu specific styles */
.mobile-nav-links .dropdown-content,
.mobile-nav-links .dropdown-submenu-content {
    display: none !important; /* Hidden by default, toggled by JS - EXTREME TEST */
    position: static; 
    background-color: #e9e4dd; 
    box-shadow: none;
    min-width: auto;
    padding-left: 20px; 
}

.mobile-nav-links .dropdown-content.active,
.mobile-nav-links .dropdown-submenu-content.active {
    display: block !important; /* Ensure this also has !important to compete if needed */
}

.mobile-nav-links .dropdown-submenu > a:after,
.mobile-nav-links .dropdown > a.dropbtn:after { /* Add to top-level dropdowns too */
    content: "+"; /* Indicate expandable */
    float: right;
    margin-left: 8px;
    font-size: 1.2em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-nav-links .dropdown-submenu > a.active:after,
.mobile-nav-links .dropdown > a.dropbtn.active:after {
    content: "-"; /* Indicate collapsible */
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .header-content {
        justify-content: space-between;
    }
    nav#desktopNav { /* Hide desktop nav */
        display: none;
    }
    .hamburger-menu { /* Show hamburger */
        display: flex; /* Ensure it's flex for its children (spans) */
    }
    .logo-title-container {
       /* Potentially adjust margin if needed, or ensure hamburger doesn't overlap */
    }
    .site-title {
        font-size: 1.5em; /* Slightly smaller title on mobile if needed */
    }

    /* Make sure mobile nav links take full width for dropdowns */
    .mobile-nav-links .dropdown,
    .mobile-nav-links .dropdown-submenu {
        display: block; /* Ensure they take full width to contain children */
        width: 100%;
    }
}

/* Add more styles as we extract content */

.blog-post-header {
    margin-bottom: 2em;
    background-color: transparent; /* Ensure it doesn't override parent background */
}

.blog-post-content {
    line-height: 1.6;
}