/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Colors */
:root {
    --dark-green: #3b4b05;
    --warm-brown: #755637;
    --sage-green: #d7e0d1;
    --warm-beige: #cac6ae;
    --text-dark: #121e04;
    --warning-red: #FF0000;
}

/* Base Styles */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--warm-beige);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Lora', serif;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    text-align: center;
    color: var(--dark-green);
    margin: 30px auto 20px;
    position: relative;
}

h2::before, h2::after {
    content: "";
    display: block;
    width: 50%;
    height: 2px;
    background-color: var(--warm-brown);
    margin: 8px auto;
}

p {
    max-width: 700px;
    margin: 10px auto;
    padding: 0 10px;
}

/* Header */
#header {
    background-color: var(--dark-green);
    text-align: center;
    position: relative;
    padding: 10px 0;
    width: 100%;
}

.branding {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.branding .logo-text {
    width: 500px;
    height: 160px;
    background: url('/assets/images/site_header.png') no-repeat center center;
    background-size: contain;
    text-indent: -9999px;
}

.branding .active,
.branding h1:hover {
    transform: scale(1.05);
    transition: scale 1s ease-in-out;
}

.branding p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--warm-beige);
}

/* Hamburger Button */
.hamburger {
    display: none;
    background-color: var(--dark-green);
    color: var(--warm-beige);
    border: none;
    font-size: 2rem;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px; /* Adjust for spacing */
    align-self: center; /* Centers inside flex header */
}

.hamburger.active {
    background-color: var(--warm-brown);
    color: var(--warm-beige);
}

/* Desktop Nav */
.desktop-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    position: relative;
    left: 0;
    padding: 10px 0;
    width: 100%;
    background-color: var(--dark-green);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.desktop-menu li {
    margin: 0 10px;
}

.desktop-menu a {
    text-decoration: none;
    color: var(--warm-beige);
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.desktop-menu a:hover,
.desktop-menu a.active {
    background-color: var(--warm-brown);
    color: var(--warm-beige);
    transform: scale(1.05);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: var(--dark-green);
    width: 90%;
    max-width: 300px;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu li {
    width: 100%;
    text-align: center;
    margin: 5px 0;
    list-style: none;
}

.mobile-menu a {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--sage-green);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.mobile-menu a:hover {
    background-color: var(--warm-brown);
    color: var(--warm-beige);
    transform: scale(1.03);
}

/* Sections */
.intro, .construction {
    background-color: var(--sage-green);
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    margin: 40px auto 20px;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.intro img {
    max-width: 700px;
    align-self: center;
}

/* Footer container */
footer {
    background-color: var(--dark-green);
    color: var(--warm-beige);
    padding: 5px;
    margin-top: auto;
    width: 100%;

    display: flex;
    align-items: center;
}

/* Give all three regions some flex basis */
.footer-badge {
    flex: 1;                   /* take up equal side space  */
    display: flex;
    justify-content: center;   /* center the badge within its zone */
    align-items: center;
    padding: 0 10px;
}

.footer-center {
    flex: 2;          /* wider than sides so links don’t squash */
    text-align: center;
}

/* Badge images */
.footer-badge img {
    display: block;
    max-width: 145px;
}

/* Links inside the center */
.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
    margin: 0;
}

/* existing link styles */
.footer-links li {
    margin: 5px;
}

.footer-links a {
    color: var(--warm-beige);
    text-decoration: none;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.footer-links a:hover {
    background-color: var(--warm-brown);
    transform: scale(1.05);
}

footer p {
    font-size: 0.9rem;
    margin-top: 5px;
}


/* Blog Styling */
.blog-posts {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.post-preview {
    position: relative;
    background-color: var(--sage-green);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    z-index: 0;
    overflow: hidden; 
}

/* Add background image using CSS variable populated by PHP inline style */
.post-preview::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: var(--post-bg, none);
    background-size: cover;
    background-position: center;
    opacity: 0.4; /* Adjust for visibility without overpowering text */
    z-index: 1;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* On hover, increase visibility for subtle pop */
.post-preview:hover::before {
    opacity: 0.15;
}

.post-preview h2,
.post-preview p,
.post-preview a {
    position: relative;
    z-index: 2; /* Ensure text stays above background image */
}

.post-preview h2 {
    font-family: 'Lora', serif;
    color: var(--text-dark);
    font-size: 1.5rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.post-preview a {
    color: inherit;
    text-decoration: none;
}

.post-preview a:hover {
    text-decoration: underline;
    text-decoration-color: var(--warm-brown);
}

.post-preview p {
    margin-bottom: 0.5rem;
}

.read-more {
    color: var(--warm-brown);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Older Blog Posts Grid */
.older-blog-posts {
    max-width: 1000px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.post-grid {
    background-color: var(--sage-green);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post-grid h2 {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.post-grid p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.post-grid a {
    color: var(--warm-brown);
    font-weight: 600;
    text-decoration: none;
}

.post-grid a:hover {
    text-decoration: underline;
}

/* Article Page Styling */

.article {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--sage-green);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.article h1 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.article .meta {
    font-size: 0.95rem;
    color: var(--dark-green);
    font-style: italic;
}

.article-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.article-body p {
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    max-height: 400px; /* adjust based on your design */
    object-fit: cover; /* keeps the crop area looking good */
    display: block;
    margin: 1.5rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.article-body h2 {
    font-family: 'Lora', serif;
    font-size: 1.7rem;
    color: var(--dark-green);
    margin: 1.5rem 0 1rem;
    text-align: center;
    position: relative;
}

.article-body h3 {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    color: var(--warm-brown);
    margin: 1rem 0 0.5rem;
}

.article footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
}

.article footer a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 0.25rem;
    font-weight: 600;
}

.article footer a:hover {
    text-decoration: underline;
}

.article-body figure {
    margin: 1.5rem auto;
    text-align: center;
}

.article-body figcaption {
    font-size: 0.9rem;
    color: var(--dark-green);
    margin-top: 0.5rem;
}

.article-body figcaption a {
    color: var(--warm-brown);
    text-decoration: none;
}

.article-body figcaption a:hover {
    text-decoration: underline;
}

/* Services */
.services-grid {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem; /* optional for breathing room */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.service-card {
    background-color: var(--sage-green);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-card img {
    width: 100px;
    height: 100px;
}

.service-card h2 {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 1rem;
    margin: 0;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.call-to-action {
    max-width: 800px;
    margin: 2.5rem auto;
    background-color: var(--sage-green);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    gap: 1rem 2rem;
}

.cta-button {
    text-align: center;
    margin: 2rem 0;
}

.testimonial {
    max-width: 800px;
    margin: 2.5rem auto;
    background-color: var(--sage-green);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    gap: 1rem 2rem;
    font-style: italic;
    text-align: center;
}

#faq {
    max-width: 800px;
    margin: 2.5rem auto;
    background-color: var(--sage-green);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    gap: 1rem 2rem;
}

#faq h2 {
    font-family: 'Lora', serif;
    text-align: center;
    color: var(--dark-green);
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 2rem;
}

#faq details {
    background-color: var(--sage-green);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#faq details[open] {
    background-color: var(--sage-green-hover, #d9e2d5);
}

#faq details:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

#faq summary {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-green);
    list-style: none;
    position: relative;
}

#faq summary::-webkit-details-marker {
    display: none;
}

#faq summary::after {
    content: "▸";
    position: absolute;
    right: 0;
    transition: transform 0.3s ease;
}

#faq details[open] summary::after {
    transform: rotate(90deg);
}

#faq p {
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Contact Form */
.contact-form {
    max-width: 800px;
    margin: 2.5rem auto;
    background-color: var(--sage-green);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    gap: 1rem 2rem;
}

.contact-form h2 {
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-family: 'Lora', serif;
    text-align: center;
}

.contact-form p {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-family: 'Open Sans', sans-serif;
    line-height: 1.5;
    text-align: center;
}

.contact-form ul {
    list-style: disc inside;
    margin-bottom: 1.25rem;
    padding-left: 1.25rem;
}

.contact-form ul li {
    margin-bottom: 0.4rem;
}

.contact-form label {
    display: inline;
    padding: 0.3rem 0.3rem;
    border-radius: 4px;
    margin-top: 0.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-green);
    font-family: 'Lora', serif;
    cursor: pointer;
}

.contact-form .radio-label {
    background-color: transparent;
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-top: 0.3rem;
    margin-bottom: 0.7rem;
    border: 2px solid var(--dark-green);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    border-color: var(--warm-brown);
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 99, 63, 0.2);
}

.contact-form fieldset {
    border: none;
    margin: 1.25rem 0;
    padding: 0;
}

.contact-form legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-green);
    font-family: 'Lora', serif;
}

.contact-form .form-buttons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.contact-form button[type="submit"],
.contact-form button[type="reset"] {
    flex: 1 1 140px;
    max-width: 180px;
    background-color: var(--warm-brown);
    color: var(--warm-beige);
    font-weight: 700;
    padding: 0.75rem 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-form button[type="submit"]:hover {
    background-color: var(--dark-green);
    transform: scale(1.05);
}

.contact-form button[type="reset"]:hover {
    background-color: var(--warning-red);
    transform: scale(1.05);
}

.popup-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--dark-green);
    color: var(--warm-beige);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    z-index: 10000;
    max-width: 90%;
    text-align: center;
}

/* About Page */
#about-us {
    max-width: 800px;
    margin: 3rem auto;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    padding: 0 1rem;
  }
  
  #about-us h1 {
    font-family: 'Lora', serif;
    text-align: center;
    color: var(--dark-green);
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 2.2rem;
  }
  
  #about-us p {
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
  }
  
  #about-us strong {
    color: #2a6a33;
  }
  
  .about-content-container {
    background-color: var(--sage-green);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 40px auto 20px;
    max-width: 95%;
  }
  
  .photo-container {
    text-align: center;
    margin: 2.5rem 0;
  }
  
  .photo-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    object-fit: cover;
  }
  
  .call-to-action {
    text-align: center;
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1.5rem;
  }
  
  .call-to-action a {
    color: var(--dark-green);
    text-decoration: none;
    border-bottom: 2px solid #2a6a33;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
  }
  
  .call-to-action a:hover,
  .call-to-action a:focus {
    color: var(--warm-brown);
    outline: none;
  }

/* Policy Pages Styling */
.policy-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.policy-content {
    flex: 1;
    min-width: 0;
}

.policy-paragraph {
    background-color: var(--sage-green);
    border-left: 6px solid var(--dark-green);
    border-radius: 8px;
    padding: 1.5rem 1.25rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-paragraph:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.policy-paragraph h2 {
    color: var(--warm-brown);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

.policy-paragraph p,
.policy-paragraph ul,
.policy-paragraph li {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.policy-paragraph ul {
    list-style: disc inside;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.policy-paragraph li {
    margin-left: 0.5rem;
}

.policy-paragraph a {
    color: var(--warm-brown);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s;
}

.policy-paragraph a:hover {
    color: var(--dark-green);
}

.policy-nav {
    position: sticky;
    top: 2rem;
    flex: 0 0 250px; /* width */
    align-self: flex-start;
}

.policy-nav h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.policy-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 1rem;
    padding: 0;
}

.policy-nav li {
    margin-bottom: 0.5rem;
}

.policy-nav a {
    background-color: var(--sage-green);
    color: var(--dark-green);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.policy-nav a:hover,
.policy-nav a:focus {
    background-color: var(--warm-brown);
    color: var(--warm-beige);
    transform: scale(1.05);
}

.page-title {
    background-color: var(--dark-green);
    color: var(--warm-beige);
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-title h1 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-title p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
    padding: 0 0.5rem;
    line-height: 1.5;
}

.page-title .last-updated {
    font-style: italic;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    #header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #header h1 {
        width: 300px;
    }
    .hamburger {
        display: block;
        align-self: center;
    }
    .desktop-menu {
        display: none;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .contact-form,
    .intro,
    .blog-posts,
    .article {
        width: 95%;
        max-width: none;
        margin: 1rem auto;
    }
    .contact-form .form-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .contact-form button[type="submit"],
    .contact-form button[type="reset"] {
        max-width: 100%;
        flex-basis: auto;
    }
    .article {
        padding: 1rem 0.5rem;
    }
    .article h1 {
        font-size: 1.8rem;
    }
    .article-body {
        font-size: 1rem;
    }
    .policy-page-container {
        flex-direction: column;
        align-items: stretch;
    }
    .policy-nav {
        position: sticky;
        top: 0;
        background-color: var(--warm-beige);
        border-bottom: 1px solid rgba(0,0,0,0.1);
        z-index: 10;
        flex: none;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 1rem 0.5rem;
    }    
    .policy-nav ul {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }    
    .policy-nav li {
        display: inline-block;
    }
    footer {
        flex-direction: column;
        text-align: center;
    }
    .footer-badge {
        flex: unset;
        margin: 8px 0;
        justify-content: center;
    }
    .footer-center {
        flex: unset;
        width: 100%;
    }
}
