/*
Theme Name: Conservancy Mirror
Author: You
Description: A simple theme to mirror the main conservancy website design.
Version: 1.0
*/

/* 
  ==============================================
  BASE LAYOUT & MAIN SITE MIRROR STYLES
  ==============================================
*/
body {
  --primary-darkest: #68724d;
  --primary-medium-dark: #629044;
  --primary-medium-light: #8fd16a;
  --primary-light: #b4c366;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --sidebar-width: 250px;
}
body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #fdfdfd;
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 15px; }
.top-bar { display: flex; justify-content: space-between; align-items: stretch; background-color: var(--primary-darkest); padding: 0; min-height: 90px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); position: relative; }
.logo-container { width: var(--sidebar-width); background-color: #ffffff; padding: 10px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-container img { max-width: 100%; height: auto; display: block; }
.main-nav { display: flex; align-items: center; padding-right: 40px; }
.main-nav ul { list-style-type: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.main-nav ul li a { color: var(--text-light); text-decoration: none; font-size: 1.2rem; font-weight: 500 !important; padding: 10px 18px; border-radius: 5px; transition: background-color 0.3s, color 0.3s; display: flex; align-items: center; justify-content: center; }
.main-nav ul li a.active, .main-nav ul li a:hover { background-color: var(--primary-medium-light); color: var(--text-light); }
.main-body-container { display: flex; }
.sidebar { width: var(--sidebar-width); flex-shrink: 0; background-color: #f0f2e6; padding: 25px; border-right: 1px solid #ddd; min-height: calc(100vh - 90px); box-sizing: border-box; }
.sidebar h3 { color: var(--primary-darkest); border-bottom: 2px solid var(--primary-darkest); padding-bottom: 10px; margin-top: 0; font-size: 1.1rem; }
.sidebar ul { list-style-type: none; padding: 0; margin: 0; }
.sidebar ul li a { display: block; color: var(--primary-darkest); padding: 10px 15px; text-decoration: none; border-radius: 5px; margin-bottom: 5px; transition: background-color 0.3s; font-weight: 500; }
.sidebar ul li a.active, .sidebar ul li a:hover { background-color: var(--primary-light); }
.content-area { flex-grow: 1; padding: 40px; box-sizing: border-box; background-color: #ffffff; }

/* 
  ==============================================
  WORDPRESS NEWSLETTER & SINGLE POST STYLES
  ==============================================
*/
.wordpress-content-wrapper { max-width: 900px; margin: 0 auto; }
.newsletter-item { margin-bottom: 60px; border-bottom: 1px solid #eee; padding-bottom: 40px; }
.newsletter-item:last-of-type { border-bottom: none; }
.wordpress-content-wrapper h2 a { color: inherit; text-decoration: none; transition: color 0.3s ease; text-align: center; /* THIS IS THE FIX */}
.wordpress-content-wrapper h2 a:hover { color: var(--primary-medium-light); }
.wordpress-content-wrapper p, .wordpress-content-wrapper li, .wordpress-content-wrapper blockquote { font-size: 1.1rem; line-height: 1.8; }
.newsletter-item .more-link { font-weight: bold; color: var(--primary-medium-dark); }
.newsletter-navigation .nav-links { display: flex; justify-content: space-between; border-top: 1px solid #ddd; padding-top: 20px; margin-top: 20px; }
.newsletter-navigation .nav-previous a, .newsletter-navigation .nav-next a { font-weight: bold; color: var(--primary-darkest); text-decoration: none; padding: 10px 15px; border: 1px solid var(--primary-darkest); border-radius: 5px; transition: all 0.3s ease; }
.newsletter-navigation .nav-previous a:hover, .newsletter-navigation .nav-next a:hover { background-color: var(--primary-darkest); color: var(--text-light); }

/* --- NEW: SINGLE POST "STICKY" BACK BUTTON --- */
.single-post-layout {
    display: grid;
    /* THIS IS THE CRITICAL FIX: The content column (1fr) is now first */
    grid-template-columns: 1fr 200px;
    gap: 40px;
    align-items: start;
}
.sticky-sidebar {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 40px; /* How far from the top of the viewport to "stick" */
}
.back-to-news-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: var(--primary-medium-dark);
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.back-to-news-link:hover {
    background-color: var(--primary-darkest);
    color: var(--text-light);
    border-color: var(--primary-darkest);
}
.newsletter-content h1 {
    font-size: 2.8rem;
    color: var(--primary-darkest);
    margin-top: 0;
    text-align: center; /* THIS IS THE FIX */
}

/* --- Responsive Fallback for the Sticky Sidebar --- */
@media (max-width: 1200px) {
    .single-post-layout {
        display: block; /* Stack the columns on top of each other */
    }
    .sticky-sidebar {
        position: static; /* Un-stick the sidebar */
        margin-top: 40px; /* Add space above it when it's at the bottom */
        height: auto;
    }
}


/* 
  ==============================================
  ALL OTHER WORDPRESS & PLUGIN STYLES
  ==============================================
*/
.wordpress-content-wrapper { max-width: 900px; margin: 0 auto; }
.newsletter-item { margin-bottom: 60px; border-bottom: 1px solid #eee; padding-bottom: 40px; }
.newsletter-item:last-of-type { border-bottom: none; }
.wordpress-content-wrapper h1, .wordpress-content-wrapper h2 { color: var(--primary-darkest); font-size: 2.5rem; text-align: center; margin-bottom: 20px; }
.wordpress-content-wrapper h1 a, .wordpress-content-wrapper h2 a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
.wordpress-content-wrapper h1 a:hover, .wordpress-content-wrapper h2 a:hover { color: var(--primary-medium-light); }
.wordpress-content-wrapper p, .wordpress-content-wrapper li, .wordpress-content-wrapper blockquote { font-size: 1.1rem; line-height: 1.8; }
.newsletter-item .more-link { font-weight: bold; color: var(--primary-medium-dark); }
.newsletter-navigation .nav-links { display: flex; justify-content: space-between; border-top: 1px solid #ddd; padding-top: 20px; margin-top: 20px; }
.newsletter-navigation .nav-previous a, .newsletter-navigation .nav-next a { font-weight: bold; color: var(--primary-darkest); text-decoration: none; padding: 10px 15px; border: 1px solid var(--primary-darkest); border-radius: 5px; transition: all 0.3s ease; }
.newsletter-navigation .nav-previous a:hover, .newsletter-navigation .nav-next a:hover { background-color: var(--primary-darkest); color: var(--text-light); }
.back-to-news-link { display: inline-block; margin-top: 40px; font-weight: bold; color: var(--primary-medium-dark); }
.tribe-events-header { background-color: #f0f2e6 !important; padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.tribe-events-header .tribe-common-c-btn, .tribe-events-header .tribe-events-c-view-selector__button { background-color: var(--primary-darkest) !important; color: var(--text-light) !important; border: none !important; border-radius: 5px !important; }
.tribe-events-header .tribe-common-c-btn:hover, .tribe-events-header .tribe-events-c-view-selector__button:hover { background-color: var(--primary-medium-light) !important; }
.tribe-events-header .tribe-events-c-view-selector__button--active { background-color: var(--primary-medium-light) !important; }
.tribe-events-c-search__input { border: 1px solid #ccc !important; padding: 8px 12px !important; border-radius: 5px !important; }
.tribe-events-c-top-bar__nav-link, .tribe-events-c-top-bar__today-button { background-color: var(--primary-darkest) !important; color: var(--text-light) !important; border-radius: 5px !important; padding: 5px 10px !important; }
.tribe-events-c-top-bar__nav-link:hover, .tribe-events-c-top-bar__today-button:hover { background-color: var(--primary-medium-light) !important; }
.tribe-events-c-top-bar__datepicker-button { background-color: #fff !important; border: 1px solid #ccc !important; border-radius: 5px !important; color: var(--text-dark) !important; }
.tribe-events-calendar-month, .tribe-events-calendar-month__header, .tribe-events-calendar-month__day-cell { border-color: #ddd !important; background-color: #fff !important; }
.tribe-events-calendar-month__weekday { color: var(--primary-darkest); font-weight: bold; }
.tribe-events-calendar-month__day-cell--today .tribe-events-calendar-month__day-date-link { background-color: var(--primary-light) !important; color: var(--primary-darkest) !important; }
.tribe-events-calendar-month__event-title-link { font-weight: bold; color: var(--primary-medium-dark) !important; background-color: rgba(180, 195, 102, 0.2) !important; border-left: 3px solid var(--primary-light) !important; padding: 5px 8px !important; border-radius: 3px; }
.tribe-events-c-subscribe-dropdown__button { background-color: var(--primary-darkest) !important; color: var(--text-light) !important; border-radius: 5px !important; }
.tribe-events-c-subscribe-dropdown__button:hover { background-color: var(--primary-medium-light) !important; }
.tribe-events-c-subscribe-dropdown__content { background-color: #f0f2e6 !important; border: 1px solid #ddd !important; border-radius: 5px !important; margin-top: 5px !important; }
.tribe-events-c-subscribe-dropdown__list-item-link { color: var(--primary-darkest) !important; font-weight: bold !important; padding: 8px 15px !important; }
.tribe-events-c-subscribe-dropdown__list-item-link:hover { background-color: var(--primary-light) !important; color: var(--primary-darkest) !important; }
.single-tribe_events .tribe-events-single-event-title { font-size: 2.8rem; color: var(--primary-darkest); border-bottom: 2px solid var(--primary-medium-light); padding-bottom: 15px; margin-bottom: 20px; }
.single-tribe_events .tribe-events-single-event-meta { margin-bottom: 30px; }
.tribe-events-meta-group .tribe-events-c-small-label, .tribe-events-c-details-container__label { font-weight: bold; color: var(--primary-darkest); }
.tribe-events-single-section-title { font-size: 1.8rem; color: var(--primary-darkest); border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-top: 40px; }
.tribe-events-c-details-container { border-left: 4px solid var(--primary-light); padding-left: 20px; margin-top: 20px; }
.single-tribe_events .tribe-events .tribe-events-c-subscribe-dropdown__button { padding: 10px 15px !important; }