/*
Theme Name:     Twenty Twenty-Five Child
Theme URI:      https://example.com/twenty-twenty-five-child/
Description:    Child theme for the Twenty Twenty-Five theme
Author:         Your Name
Author URI:     https://example.com
Template:       twentytwentyfive
Version:        2.3
License:        GNU General Public License v2 or later
License URI:    https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    twentytwentyfive-child
*/

/* Global mobile overflow fix */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Increase body text on mobile */
@media (max-width: 768px) {
  body {
    font-size: 1.05rem;
  }

  .wp-block-paragraph,
  .entry-content p,
  article p {
    font-size: 1.05rem;
    line-height: 1.7;
  }
}

/* Make bold text more prominent across the site */
strong,
b,
.wp-block-list strong,
.wp-block-paragraph strong,
.entry-content strong {
  font-weight: 600;
}

/* Projects button on home page */
.wch-projects-button .wp-block-button__link {
  background: #fff;
  color: #2a6d65 !important;
  padding: 12px 20px 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #2a6d65;
  box-shadow: 0 2px 6px rgba(42, 109, 101, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.wch-projects-button .wp-block-button__link::before {
  content: "🌿";
  margin-right: 6px;
}

.wch-projects-button .wp-block-button__link:hover {
  background: #2a6d65;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(42, 109, 101, 0.25);
}

.wch-projects-button {
  margin-bottom: 0 !important;
}

header {
  background: linear-gradient(
    to right,
    #dceae9 0px,
    #dceae9 calc(50% - 150px),
    #eff4f7 calc(50% + 150px),
    #eff4f7 100%
  );
}

header .alignfull {
  background-image: url("graphics/header-background.png");
  max-width: 960px;
  height: 132px;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
}

.header-container {
  padding: 0;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 !important;
  padding: 0;
  height: 132px;
  width: 960px;
  max-width: 100%;
  padding-top: var(--wp--preset--spacing--30);
  padding-bottom: var(--wp--preset--spacing--30);
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  color: #2f5597;
}
header .site-logo img {
  height: 72px;
  width: auto;
}

.navigation-block a {
  color: #464646 !important;
  font-size: 1.3rem;
}

.hamburger {
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 20px;
  vertical-align: middle;
  width: 40px;
  height: 40px;
  position: relative;
}
.hamburger .bar {
  display: block;
  width: 32px;
  height: 6px;
  margin: 5px auto;
  background: #2a6d65;
  border-radius: 0;
  transition: 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -450px;
  height: 100vh;
  width: 350px;
  background: #2a6d65;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  border-radius: 0 8px 8px 0;
  z-index: 2001;
  min-width: 220px;
  padding: 20px;
  list-style: none;
  color: #fff;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  overflow-x: hidden;
}
.mobile-menu.open {
  left: 0;
}
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 15px 0 0 0;
}
.mobile-menu li {
  padding: 5px 0px;
}
.mobile-menu li.has-submenu {
  padding: 5px 0px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.mobile-menu li.has-submenu .parent-link {
  flex: 1;
}
.mobile-menu li.divided {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  padding-left: 0px;
  padding-right: 0px;
}
.mobile-menu li.submenu-item {
  padding: 3px 0px;
  padding-left: 20px;
}
.mobile-menu .submenu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 15px;
  margin-left: 5px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.mobile-menu .submenu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.mobile-menu .submenu-toggle.expanded {
  transform: rotate(180deg);
}
.mobile-menu ul.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.mobile-menu ul.submenu.expanded {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}
.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  padding: 8px 20px;
}
.mobile-menu li.submenu-item a {
  color: #a8d5a8;
  font-size: 1.05rem;
  font-weight: 400;
  padding: 6px 15px;
}
.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0);
  z-index: 2000;
  pointer-events: none;
  max-width: inherit;
  transition: background 0.3s ease-in-out;
}
.menu-overlay.open {
  background: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2f5597;
}

h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2a6d65;
}

h5 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: #2a6d65;
}

main {
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 300;
  margin: 0 !important;
  padding: 15px;
  background-image: linear-gradient(
      to bottom,
      #98c3c0 0px,
      #ddebea 200px,
      transparent 100%
    ),
    url("graphics/main-back.png"), url("graphics/watermark.png") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-position: center top, center top, center right !important;
  background-blend-mode: lighten !important;
  min-height: 100vh !important;
}

/* Also apply to body to ensure background shows on all non-events pages */
body:not([class*="tribe"]):not([class*="events"]) {
  background-image: linear-gradient(
      to bottom,
      #98c3c0 0px,
      #ddebea 200px,
      transparent 100%
    ),
    url("graphics/main-back.png"), url("graphics/watermark.png") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-position: center top, center top, center right !important;
  background-blend-mode: lighten !important;
  min-height: 100vh !important;
}

footer {
  background-color: #333;
  color: white;
}

/* Footer container for max-width */
.footer-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
}

/* Ensure footer columns use full width */
footer .wp-block-columns {
  max-width: 100% !important;
  width: 100%;
  display: flex;
}
footer .wp-block-column {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  box-sizing: border-box;
  font-family: "League Spartan", Arial, sans-serif;
}

footer .wch-info {
  font-size: 1rem;
  color: #ccc;
  margin-top: 10px;
}

footer ul {
  margin: 0;
}

footer li {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer li.divided {
  margin-top: 20px;
}

footer li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
}

footer li a:hover {
  text-decoration: underline;
}

.close-menu {
  display: block;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  margin: 20px 0 30px 20px;
  cursor: pointer;
  line-height: 1;
  text-align: left;
}
.close-menu:focus {
  outline: 2px solid #fff;
}

/* Hero Banner Styles */
.hero-banner {
  width: 100vw;
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  margin-left: 50%;
  transform: translateX(-50%);
  height: 150px;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.hero-content {
  width: 100%;
  height: 100%;
  display: flex;
  margin: 0;
  padding: 0;
}

/* Outer cells (images 1 and 4) take remaining space */
.hero-image-1,
.hero-image-4 {
  flex: 1;
  height: 150px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* First and fourth cells have green background for tinted images */
.hero-image-1,
.hero-image-4 {
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  position: relative;
}

/* Center three cells have content width (960px / 3 = 320px each) */
.hero-image-2,
.hero-image-3,
.hero-text {
  flex: 0 0 320px;
  width: 320px;
  height: 150px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.hero-image-1 img,
.hero-image-4 img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
  opacity: 0.3;
  filter: grayscale(100%);
}

.hero-image-2 img,
.hero-image-3 img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
}

.hero-text {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: #2a6d65;
}

.hero-text {
  padding-top: 30px;
  padding-bottom: 30px;
  padding-left: 2px;
  padding-right: 5px;
  box-sizing: border-box;
}

.hero-text blockquote {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  font-style: italic;
  text-align: right;
  quotes: "" " " "";
  /* Ensure consistent line-height regardless of quote mark size */
  position: relative;
  /* Add padding to ensure text doesn't overlap with corner quotes */
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  /* Ensure text appears above background quotes */
  z-index: 1;
}

.hero-text blockquote:before {
  content: open-quote;
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.15);
  /* Position in top-left corner with equal spacing from margins */
  position: absolute;
  left: 0.5rem;
  top: 0;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}

.hero-text blockquote:after {
  content: close-quote;
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.15);
  /* Position in bottom-right corner with equal spacing from margins */
  position: absolute;
  right: 1.7rem;
  bottom: -5rem;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
}

/* Mobile styles for hero banner */
@media (max-width: 768px) {
  /* Reduce skip link target padding on mobile */
  #wp--skip-link--target {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .hero-banner {
    height: auto;
    min-height: auto;
  }

  .hero-content {
    display: block; /* Change from flex to block for better control */
    height: auto;
  }

  /* Hide the outer translucent images on mobile */
  .hero-image-1,
  .hero-image-4 {
    display: none;
  }

  /* Create a wrapper for the two images to display side by side */
  .hero-image-2,
  .hero-image-3 {
    display: inline-block;
    width: 50%;
    height: 120px;
    vertical-align: top;
    margin: 0;
    padding: 0;
  }

  .hero-image-2 img,
  .hero-image-3 img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
  }

  /* Make quote section compact and match image height */
  .hero-text {
    display: block;
    width: 100%;
    height: 120px; /* Match the height of the image row */
    min-height: 120px;
    padding: 10px 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-text blockquote {
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 0.5rem;
    margin: 0;
    text-align: center;
  }

  /* Adjust quote marks for smaller space */
  .hero-text blockquote:before {
    font-size: 3rem;
    left: 0.2rem;
    top: -0.3rem;
  }

  .hero-text blockquote:after {
    font-size: 3rem;
    right: 0.2rem;
    bottom: -2rem;
  }
}

/* Header responsive styles */
@media (max-width: 960px) {
  header .alignfull {
    max-width: 100%;
    background-size: cover;
    background-position: center;
  }

  .header-row {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 768px) {
  header .alignfull {
    height: 100px;
  }

  .header-row {
    height: 100px;
    padding-left: 15px;
    padding-right: 15px;
  }

  header .site-logo img {
    height: 50px;
  }

  .navigation-block a {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  header .alignfull {
    height: 80px;
  }

  .header-row {
    height: 80px;
    padding-left: 10px;
    padding-right: 10px;
  }

  header .site-logo img {
    height: 40px;
  }

  .hamburger {
    width: 35px;
    height: 35px;
    margin-right: 10px;
  }

  .hamburger .bar {
    width: 28px;
    height: 5px;
    margin: 4px auto;
  }
}

/* Hide default WP navigation hamburger menu in responsive mode */
@media (max-width: 900px) {
  .wp-block-navigation__responsive-container-open,
  .wp-block-navigation__responsive-dialog {
    display: none !important;
  }
}

/* Green Component Block Styles */
.wch-green-component {
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: "League Spartan", Arial, sans-serif;
  margin: 20px 0;
  border-radius: 4px;
  padding: 20px;
  box-sizing: border-box;
}

.wch-green-component-wrapper {
  margin: 20px 0;
}

.wch-green-component p {
  margin: 0;
  color: white;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 400;
}

/* Block Editor specific styles for sidebar blocks */
.wp-block-wch-events-sidebar,
.wp-block-wch-bluesky-sidebar {
  margin-bottom: 20px;
}

/* Events Sidebar */
.events-sidebar {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: white;
  position: relative;
}

.events-sidebar h2 {
  color: white;
  margin: 0 0 15px 0;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.events-sidebar h2::after {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23a8d5c9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
  flex-shrink: 0;
}

.events-sidebar .event-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.events-sidebar .event-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.events-sidebar .event-item h3 {
  margin: 0 0 4px 0;
  font-size: 0.95em;
  line-height: 1.3;
}

.events-sidebar .event-item h3 a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.events-sidebar .event-item h3 a:hover {
  text-decoration: underline;
}

.events-sidebar .event-date {
  font-size: 0.85em;
  margin: 0;
  opacity: 0.9;
}

.events-sidebar .event-location {
  font-size: 0.85em;
  margin: 3px 0 0 0;
  opacity: 0.85;
  font-style: italic;
}

.events-sidebar .view-all-events {
  display: inline-block;
  margin-top: 15px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9em;
  transition: transform 0.2s;
}

.events-sidebar .view-all-events:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

/* BlueSky Sidebar */
.bluesky-sidebar {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  padding: 20px;
  border-radius: 8px;
  color: white;
}

.bluesky-sidebar h2 {
  color: white;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.bluesky-sidebar .bluesky-post {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.bluesky-sidebar .bluesky-post:before,
.bluesky-sidebar .bluesky-post:after {
  content: none !important; /* remove any theme pseudo separators */
  display: none !important;
}

/* Ensure no extra top borders from adjacent posts */
.bluesky-sidebar .bluesky-post + .bluesky-post {
  border-top: none !important;
}

/* Remove divider on last */
.bluesky-sidebar .bluesky-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bluesky-sidebar .bluesky-images {
  margin-bottom: 10px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.bluesky-sidebar .bluesky-image {
  max-width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.bluesky-sidebar .bluesky-content p {
  margin: 5px 0;
  font-size: 0.9em;
  line-height: 1.4;
}

.bluesky-sidebar .bluesky-meta {
  font-size: 0.8em;
  opacity: 0.9;
  margin-top: 8px;
}

.bluesky-sidebar .bluesky-meta .author {
  font-weight: bold;
}

.bluesky-sidebar .bluesky-meta .date {
  margin-left: 10px;
}

/* Unified Bluesky post structure adjustments */
.bluesky-post-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
}
.bluesky-post-link:hover {
  text-decoration: none !important;
}
/* Ensure only outer container has divider */
.bluesky-post {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  margin: 0 0 14px 0;
  padding: 0 0 14px 0;
}
.bluesky-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
/* Remove any border from inner link */
.bluesky-post-link {
  border: none !important;
}

/* Ensure RichText input styling in editor */
.wch-green-component-editor .wch-green-component .green-component-text,
.wch-green-component-editor .wch-green-component .green-component-text:focus,
.wch-green-component-editor .wch-green-component .green-component-text:active,
.wch-green-component-editor .wch-green-component p,
.wch-green-component-editor .wch-green-component p:focus,
.edit-post-visual-editor
  .wch-green-component-editor
  .wch-green-component
  .green-component-text,
.block-editor-writing-flow
  .wch-green-component-editor
  .wch-green-component
  .green-component-text,
.wp-block-editor
  .wch-green-component-editor
  .wch-green-component
  .green-component-text {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: white !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-size: 1.2rem !important;
  font-family: "League Spartan", Arial, sans-serif !important;
}

/* Extra specific rule for white text in editor */
.wch-white-text-editor,
.wch-white-text-editor:focus,
.wch-white-text-editor:active,
.wch-green-component-editor .wch-white-text-editor,
.wch-green-component-editor .wch-white-text-editor:focus,
.wch-green-component-editor .wch-white-text-editor:active,
.block-editor-writing-flow .wch-white-text-editor,
.edit-post-visual-editor .wch-white-text-editor {
  color: white !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.wch-green-component-editor .wch-green-component::after {
  content: "Green Component";
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .wch-green-component {
    height: 120px;
    margin: 15px 0;
    padding: 15px;
  }

  .wch-green-component p {
    font-size: 1.1rem;
  }
}

/* Custom Gallery Block Styles */

/* Climate Hub Gallery Style */
.wp-block-gallery.is-style-climate-hub-gallery {
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  padding: 0;
  border-radius: 0;
  margin: 30px 0;
}

.wp-block-gallery.is-style-climate-hub-gallery .wp-block-image {
  overflow: hidden;
  transition: transform 0.3s ease;
  border-radius: 0 !important;
}

.wp-block-gallery.is-style-climate-hub-gallery .wp-block-image:hover {
  transform: scale(1.02);
}

.wp-block-gallery.is-style-climate-hub-gallery .wp-block-image img {
  border-radius: 0 !important;
}

.wp-block-gallery.is-style-climate-hub-gallery figcaption {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 10px;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 0.9rem;
}

/* Rounded Corners Gallery Style */
.wp-block-gallery.is-style-rounded-gallery .wp-block-image {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.wp-block-gallery.is-style-rounded-gallery .wp-block-image:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.wp-block-gallery.is-style-rounded-gallery .wp-block-image img {
  border-radius: 12px;
}

.wp-block-gallery.is-style-rounded-gallery figcaption {
  background: rgba(42, 109, 101, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 0 0 12px 12px;
  margin-top: -4px;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 0.9rem;
}

/* White Border Gallery Style */
.wp-block-gallery.is-style-white-border-gallery {
  background: white !important;
  padding: 10px;
  border: 4px solid white;
  margin: 30px 0;
  position: relative;
  cursor: pointer !important;
  transition: none;
}

.wp-block-gallery.is-style-white-border-gallery .wp-block-image {
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: none;
  cursor: pointer !important;
}

.wp-block-gallery.is-style-white-border-gallery .wp-block-image:hover {
  transform: none;
  box-shadow: none;
}

.wp-block-gallery.is-style-white-border-gallery .wp-block-image img {
  border: none;
  border-radius: 0;
  cursor: pointer !important;
}

.wp-block-gallery.is-style-white-border-gallery figcaption {
  display: none;
}

.wp-block-gallery.is-style-white-border-gallery::after {
  content: "SEE OUR GALLERY";
  display: block !important;
  text-align: right !important;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #2f5597;
  margin-top: 0;
  margin-left: auto;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: 100%;
  float: right;
}

/* Make the entire gallery clickable */
.wp-block-gallery.is-style-white-border-gallery {
  text-decoration: none;
}

.wp-block-gallery.is-style-white-border-gallery:hover::after {
  color: #1e3d6f;
}

/* Sidebar Gallery Style - Vertical layout for right column */
.wp-block-gallery.is-style-sidebar-gallery {
  margin: 0 0 30px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  /* Override default WordPress gallery grid */
  grid-template-columns: none !important;
  grid-gap: 8px !important;
  /* Make it clickable */
  cursor: pointer !important;
  transition: transform 0.2s ease;
}

.wp-block-gallery.is-style-sidebar-gallery:hover {
  transform: translateY(-1px);
}

/* Force single column layout */
.wp-block-gallery.is-style-sidebar-gallery.columns-1 {
  grid-template-columns: 1fr !important;
}

.wp-block-gallery.is-style-sidebar-gallery .wp-block-image {
  margin: 0 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42, 109, 101, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Ensure no grid positioning */
  grid-column: 1 !important;
  /* Clickable styling */
  cursor: pointer !important;
}

.wp-block-gallery.is-style-sidebar-gallery .wp-block-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(42, 109, 101, 0.25);
}

.wp-block-gallery.is-style-sidebar-gallery .wp-block-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.wp-block-gallery.is-style-sidebar-gallery figcaption {
  background: rgba(42, 109, 101, 0.9);
  color: white;
  padding: 8px 12px;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 5px;
  border-radius: 0 0 6px 6px;
  text-align: center;
}

/* General gallery improvements */
.wp-block-gallery {
  margin: 25px 0;
}

.wp-block-gallery .wp-block-image {
  margin-bottom: 10px;
}

/* Mobile responsive for custom gallery styles */
@media (max-width: 768px) {
  .wp-block-gallery.is-style-climate-hub-gallery {
    padding: 15px;
    margin: 20px 0;
  }

  .wp-block-gallery.is-style-climate-hub-gallery .wp-block-image,
  .wp-block-gallery.is-style-rounded-gallery .wp-block-image {
    margin-bottom: 15px;
  }

  .wp-block-gallery.is-style-white-border-gallery {
    padding: 15px;
    margin: 20px 0;
    border-width: 3px;
  }

  .wp-block-gallery.is-style-white-border-gallery::after {
    font-size: 0.8rem;
    margin-top: 4px;
  }

  .wp-block-gallery.is-style-sidebar-gallery {
    gap: 6px !important;
  }

  .wp-block-gallery.is-style-sidebar-gallery .wp-block-image img {
    height: 180px;
  }

  .wp-block-gallery.is-style-sidebar-gallery figcaption {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

/* Ensure proper cursor behavior for links and interactive elements */
a,
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link,
.navigation-block a,
.mobile-menu a,
footer a,
.hamburger,
.wp-block-gallery.is-style-white-border-gallery,
.wp-block-gallery.is-style-sidebar-gallery {
  cursor: pointer !important;
}

a:hover,
button:hover,
.wp-block-button__link:hover,
.navigation-block a:hover,
.mobile-menu a:hover,
footer a:hover,
.wp-block-gallery.is-style-white-border-gallery:hover,
.wp-block-gallery.is-style-sidebar-gallery:hover {
  cursor: pointer !important;
}

/* Front Page Two-Column Layout */
.front-page-two-column-layout {
  display: flex;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
}

.main-content-column {
  flex: 0 0 calc(70% - 20px);
  width: calc(70% - 20px);
}

/* Remove default padding from main content in two-column layout */
.main-content-column .wp-block-group.alignfull {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.main-content-column main {
  padding-left: 40px !important;
  padding-right: 0 !important;
}

/* Fix heading alignment in main content column */
.main-content-column .wp-block-heading,
.main-content-column h1,
.main-content-column h2,
.main-content-column h3,
.main-content-column h4,
.main-content-column h5,
.main-content-column h6 {
  margin-left: -40px;
}

/* Specific fix for alignwide headings in main content column */
.main-content-column .alignwide.wp-block-post-title,
.main-content-column .alignwide.wp-block-heading,
.main-content-column .alignwide h1,
.main-content-column .alignwide h2,
.main-content-column .alignwide h3,
.main-content-column .alignwide h4,
.main-content-column .alignwide h5,
.main-content-column .alignwide h6 {
  /* Complete alignwide behavior reset */
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  position: relative !important;
  /* Remove any box-sizing issues */
  box-sizing: border-box !important;
  /* Force normal block behavior */
  display: block !important;
  /* Reset any flex/grid positioning */
  flex: none !important;
  grid-column: auto !important;
  /* Remove any absolute/fixed positioning */
  top: auto !important;
  bottom: auto !important;
}

/* Fix for alignwide headings in hero template pages */
main .alignwide.wp-block-post-title,
main .alignwide.wp-block-heading,
main .alignwide h1,
main .alignwide h2,
main .alignwide h3,
main .alignwide h4,
main .alignwide h5,
main .alignwide h6 {
  /* Complete alignwide behavior reset for hero template */
  max-width: 960px !important;
  width: 100% !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  position: relative !important;
  box-sizing: border-box !important;
  display: block !important;
  flex: none !important;
  grid-column: auto !important;
  top: auto !important;
  bottom: auto !important;
  /* Force proper centering and alignment */
  margin-left: auto !important;
  margin-right: auto !important;
}

.sidebar-column {
  flex: 0 0 calc(30% - 20px);
  width: calc(30% - 20px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sidebar Components */
.sidebar-component {
  padding: 20px;
  color: white;
  font-family: "League Spartan", Arial, sans-serif;
  margin-bottom: 0;
}

.sidebar-component h3 {
  color: white;
  margin: 0 0 15px 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.sidebar-component h3 a {
  text-decoration: none;
}

.sidebar-component p {
  margin: 0;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 300;
}

.sidebar-component-green {
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
}

.sidebar-component-blue {
  background: linear-gradient(to bottom, #92cbdd 0%, #2f5597 200px);
  position: relative;
}

.sidebar-component-blue .bluesky-title-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.sidebar-component-blue .bluesky-title-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* Bluesky header link for logo */
.sidebar-component-blue .bluesky-header-link {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  text-decoration: none;
}

.sidebar-component-blue .bluesky-logo {
  width: 32px;
  height: 32px;
  opacity: 1;
  color: #1185fe;
  display: block;
}

/* Bluesky Feed Styles */
.bluesky-feed {
  margin: 0;
  padding: 0;
  position: relative;
}

.bluesky-post {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  text-decoration: none !important;
  display: block;
  transition: background-color 0.2s ease;
}

.bluesky-post:hover {
  background-color: rgba(255, 255, 255, 0.05);
  text-decoration: none !important;
  color: inherit;
}

.bluesky-post:visited {
  color: inherit;
  text-decoration: none !important;
}

.bluesky-post:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.bluesky-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
}

.bluesky-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.1);
}

.bluesky-avatar:not([src]),
.bluesky-avatar[src=""] {
  display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .bluesky-avatar {
    width: 28px;
    height: 28px;
  }

  .bluesky-header {
    gap: 5px;
  }
}

.bluesky-author-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0; /* Allows text to truncate if needed */
}

.bluesky-header strong {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.bluesky-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 300;
  margin: 0;
}

.bluesky-repost-indicator {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin: 0 4px;
}

.bluesky-content {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 300;
}

/* Bluesky image styles */
.bluesky-images {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bluesky-image {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.1);
  flex: 1;
  max-height: 120px;
  min-width: 0;
  display: block !important; /* Ensure images are visible */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Single image layout - use CSS class instead of :has() */
.bluesky-images.single-image .bluesky-image {
  max-height: 200px;
  width: 100%;
  flex: none;
}

/* Mobile responsive adjustments for images */
@media (max-width: 768px) {
  .bluesky-image {
    max-height: 100px;
  }

  .bluesky-images.single-image .bluesky-image {
    max-height: 160px;
  }
}
.sidebar-component a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.sidebar-component a:hover {
  color: white;
}

/* Override for Bluesky posts - no underlines */
.sidebar-component-blue .bluesky-post {
  text-decoration: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

.sidebar-component-blue .bluesky-post:hover {
  text-decoration: none !important;
}

/* Nuclear override for all potential border sources */
.sidebar-component-blue .bluesky-post,
.sidebar-component-blue .bluesky-post:before,
.sidebar-component-blue .bluesky-post:after,
.sidebar-component-blue .bluesky-header,
.sidebar-component-blue .bluesky-header:before,
.sidebar-component-blue .bluesky-header:after,
.sidebar-component-blue .bluesky-content,
.sidebar-component-blue .bluesky-content:before,
.sidebar-component-blue .bluesky-content:after {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Ensure no extra borders on Bluesky feed container and children */
.sidebar-component-blue .bluesky-feed {
  border: none !important;
}

.sidebar-component-blue .bluesky-feed > * {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

/* Ensure shortcode blocks don't add borders */
.sidebar-component-blue .wp-block-shortcode {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Prevent any extra spacing in the feed */
.sidebar-component-blue .bluesky-feed * {
  margin: 0;
  padding: 0;
}

/* Reset margins/padding only for direct children that need it */
.sidebar-component-blue .bluesky-post {
  margin: 0 0 15px 0 !important;
  padding: 0 0 15px 0 !important;
}

.sidebar-component-blue .bluesky-header {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

.sidebar-component-blue .bluesky-content {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-component-blue .bluesky-images {
  margin: 8px 0 !important;
  padding: 0 !important;
}

/* Override any WordPress link or paragraph styling */
.sidebar-component-blue a.bluesky-post,
.sidebar-component-blue a.bluesky-post:hover,
.sidebar-component-blue a.bluesky-post:focus,
.sidebar-component-blue a.bluesky-post:active,
.sidebar-component-blue a.bluesky-post:visited {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.sidebar-component-blue a.bluesky-post:last-child {
  border-bottom: none !important;
}

/* Mobile responsive for front page layout */
@media (max-width: 768px) {
  .front-page-two-column-layout {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }

  .main-content-column,
  .sidebar-column {
    flex: none;
    width: 100%;
  }

  .sidebar-column {
    gap: 15px;
  }

  .sidebar-component {
    padding: 20px;
    margin-bottom: 15px;
  }

  .sidebar-component h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .sidebar-component p {
    font-size: 0.95rem;
  }
}

/* Page Two-Column Layout (for content pages with sidebar galleries) */
.page-two-column-layout {
  display: flex;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  align-items: flex-start;
}

/* WordPress columns-based two-column layout */
.wp-block-columns.page-two-column-layout {
  max-width: 960px;
  margin: 0 auto;
  gap: 40px;
}

.wp-block-columns.page-two-column-layout .wp-block-column.page-main-content {
  flex-basis: 70% !important;
}

.wp-block-columns.page-two-column-layout .wp-block-column.page-sidebar {
  flex-basis: 30% !important;
}

.page-main-content {
  flex: 0 0 calc(70% - 20px);
  width: calc(70% - 20px);
}

.page-sidebar {
  flex: 0 0 calc(30% - 20px);
  width: calc(30% - 20px);
  padding-top: 0;
}

.page-sidebar .wp-block-gallery.is-style-sidebar-gallery {
  margin-top: 0;
}

/* Mobile responsive for page layout */
@media (max-width: 768px) {
  .page-two-column-layout {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }

  .page-main-content,
  .page-sidebar {
    flex: none;
    width: 100%;
  }

  .page-sidebar {
    /* Reset margin on mobile since layout stacks vertically */
    margin-top: 0 !important;
  }

  .page-sidebar .wp-block-gallery.is-style-sidebar-gallery .wp-block-image img {
    height: 200px;
  }
}

/* Gallery Page Header with Dropdown Title */
.gallery-header {
  margin: 84px 0 40px 0; /* increased top space (was 64px) */
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Restore lost clickable title styles */
.gallery-title-clickable {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  padding: 0;
  color: #2f5597;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.05;
  border-radius: 8px;
  user-select: none;
  transition: background 0.25s ease, color 0.25s ease, padding 0.25s ease,
    margin 0.25s ease;
  position: relative;
  z-index: 2; /* ensure above any overlapping elements */
}

.gallery-title-clickable:hover {
  background: rgba(47, 85, 151, 0.05);
  padding: 4px 8px;
  margin: -4px -8px;
}

.gallery-header-actions {
  margin-top: 10px;
}

.gallery-add-photos-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.55); /* more translucent default */
  color: #1d4f4a;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  text-decoration: none;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.gallery-add-photos-btn:hover {
  background: #ffffff; /* solid white on hover */
  color: #123330;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-color: #ffffff;
  text-decoration: none;
}

.dropdown-arrow {
  margin-left: 10px;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.gallery-title-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.gallery-title-dropdown {
  position: relative;
  z-index: 20;
}

.gallery-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 2px solid #2f5597;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  margin-top: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
  z-index: 1000;
}
.gallery-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  overflow: auto; /* allow scroll if tall */
}

.dropdown-option {
  padding: 15px 20px;
  color: #2f5597;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.dropdown-option:last-child {
  border-bottom: none;
}

.dropdown-option:hover {
  background: #f8f9fa;
}

.dropdown-option.active {
  background: rgba(47, 85, 151, 0.1);
  font-weight: 600;
}

/* Dropdown loading state */
.dropdown-loading {
  padding: 20px;
  text-align: center;
  color: #666;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dropdown-loading .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* Ensure proper gallery display with 4 columns */
.wp-block-gallery.columns-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Responsive gallery columns */
@media (max-width: 768px) {
  .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .wp-block-gallery.columns-4 {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Lightbox Styles */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
  touch-action: pinch-zoom;
}

.gallery-lightbox.active .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
  touch-action: manipulation;
}

.lightbox-close:hover {
  background: white;
  transform: scale(1.1);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
  touch-action: manipulation;
}

.lightbox-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
  transform: translateY(-50%) scale(1);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-counter {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-family: "League Spartan", Arial, sans-serif;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
  .lightbox-content {
    padding: 10px;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-counter {
    bottom: 20px;
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .lightbox-content {
    padding: 5px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-counter {
    bottom: 15px;
    font-size: 11px;
    padding: 4px 10px;
  }
}

/* Loading message styling */
.loading {
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-counter {
    bottom: 20px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* Ensure proper gallery display with 4 columns */
.wp-block-gallery.columns-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1rem !important;
}

.wp-block-gallery.columns-4 .wp-block-image {
  margin: 0 !important;
  width: 100% !important;
  height: auto !important;
}

.wp-block-gallery.columns-4 .wp-block-image img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 8px;
}

/* Remove any green backgrounds from gallery images */
.wp-block-gallery,
.wp-block-gallery .wp-block-image,
.gallery-section .wp-block-gallery {
  background: transparent !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .wp-block-gallery.columns-4 .wp-block-image img {
    height: 150px !important;
  }
}

@media (max-width: 480px) {
  .wp-block-gallery.columns-4 {
    grid-template-columns: 1fr !important;
  }

  .wp-block-gallery.columns-4 .wp-block-image img {
    height: 250px !important;
  }
}

.gallery-section h2 {
  color: #2f5597;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin: 30px 0 20px 0;
  text-align: center;
}

/* Gallery section transitions */
.gallery-section,
.wp-block-gallery {
  transition: opacity 0.3s ease-in-out;
}

/* Loading state for galleries */
.gallery-content .loading {
  text-align: center;
  color: #2a6d65;
  font-style: italic;
  padding: 40px 20px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  border-top-color: #2a6d65;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Gallery content container */
.gallery-content {
  min-height: 200px;
}

/* Mobile responsive for gallery header */
@media (max-width: 768px) {
  .gallery-header {
    margin: 32px 0 30px 0; /* keep some extra top space on mobile */
    flex-direction: column;
    gap: 15px;
  }

  .gallery-add-photos-btn {
    padding: 8px 14px; /* ensure tap target */
    font-size: 0.9rem;
  }
}

/* Photo Submission Page Styles */
.photo-submission-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.submission-header {
  text-align: center;
  margin-bottom: 40px;
}

.back-to-gallery {
  text-align: left;
  margin-bottom: 20px;
}

.back-gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f8f9fa;
  color: #2f5597;
  text-decoration: none;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-gallery-btn:hover {
  background: #e9ecef;
  border-color: #d1d5da;
  color: #1e3a5f;
  text-decoration: none;
}

.back-icon {
  font-size: 1rem;
  margin-right: 4px;
}

.submission-header h1 {
  color: #2f5597;
  margin-bottom: 15px;
}

.submission-header p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.5;
}

.photo-submission-form {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.form-section {
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
}

.form-section:last-child {
  border-bottom: none;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 0;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-family: "League Spartan", Arial, sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "League Spartan", Arial, sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2a6d65;
  box-shadow: 0 0 0 3px rgba(42, 109, 101, 0.1);
}

.photo-upload-area {
  margin-top: 10px;
}

.upload-dropzone {
  border: 3px dashed #ddd;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #2a6d65;
  background: rgba(42, 109, 101, 0.05);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #999;
}

.upload-dropzone h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.upload-dropzone p {
  color: #666;
  margin-bottom: 5px;
}

.upload-browse-btn {
  background: none;
  border: none;
  color: #2a6d65;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  font-family: "League Spartan", Arial, sans-serif;
}

.upload-browse-btn:hover {
  color: #1e4d47;
}

.upload-note {
  font-size: 0.9rem;
  color: #999;
}

.uploaded-photos {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.uploaded-photo {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 1;
}

.uploaded-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-photo:hover {
  background: rgba(255, 0, 0, 1);
}

.form-actions {
  padding: 30px;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submit-photos-btn {
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "League Spartan", Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(42, 109, 101, 0.2);
}

.submit-photos-btn:hover {
  background: linear-gradient(135deg, #246057 0%, #3f7870 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 109, 101, 0.3);
}

.submit-photos-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cancel-btn {
  color: #666;
  text-decoration: none;
  font-weight: 600;
  font-family: "League Spartan", Arial, sans-serif;
  transition: color 0.3s ease;
}

.cancel-btn:hover {
  color: #333;
}

.submission-message {
  background: white;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.submission-message.success {
  border-left: 5px solid #22c55e;
}

.submission-message.error {
  border-left: 5px solid #ef4444;
}

.submission-message h3 {
  color: #2f5597;
  margin-bottom: 15px;
}

.return-gallery-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2a6d65 0%, #4a8a7f 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-family: "League Spartan", Arial, sans-serif;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.return-gallery-btn:hover {
  background: linear-gradient(135deg, #246057 0%, #3f7870 100%);
  color: white;
  text-decoration: none;
}

/* Mobile responsive for photo submission */
@media (max-width: 768px) {
  .photo-submission-page {
    padding: 10px;
  }

  .form-section {
    padding: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .upload-dropzone {
    padding: 30px 15px;
  }

  .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  .upload-dropzone h3 {
    font-size: 1.1rem;
  }

  .uploaded-photos {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .form-actions {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 20px;
  }

  .submit-photos-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .photo-submission-page {
    padding: 5px;
  }

  .form-section {
    padding: 15px;
  }

  .upload-dropzone {
    padding: 20px 10px;
  }

  .upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
  }

  .upload-dropzone h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .upload-dropzone p {
    font-size: 0.9rem;
  }

  .uploaded-photos {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }

  .form-actions {
    padding: 15px;
  }

  .submission-header h1 {
    font-size: 2rem;
  }

  .submission-header p {
    font-size: 1rem;
  }
}

/* Main content responsive */
@media (max-width: 768px) {
  main {
    padding: 20px;
    background-position: center top, center top, center right;
    background-size: cover, cover, 200px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 15px;
    background-size: cover, cover, 150px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }
}

/* Gallery dropdown responsive */
@media (max-width: 768px) {
  .gallery-dropdown-menu {
    min-width: 100%;
    left: 0;
    right: 0;
    max-width: none;
  }

  .gallery-title-clickable {
    font-size: 2rem;
  }

  .dropdown-arrow {
    margin-left: 8px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery-title-clickable {
    font-size: 1.8rem;
  }

  .gallery-title-clickable:hover {
    padding: 2px 6px;
    margin: -2px -6px;
  }

  .dropdown-option {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .dropdown-arrow {
    margin-left: 6px;
    font-size: 0.9rem;
  }
}

/* Footer responsive */
@media (max-width: 768px) {
  footer .wp-block-columns {
    flex-direction: column;
    display: flex;
  }

  footer .wp-block-column {
    flex: none;
    max-width: 100%;
    margin-bottom: 5px;
  }

  /* Reorder columns on mobile - first column (organization/copyright) goes last */
  footer .wp-block-column:first-child {
    order: 3;
  }

  footer .wp-block-column:nth-child(2) {
    order: 1;
  }

  footer .wp-block-column:nth-child(3) {
    order: 2;
  }

  .footer-container {
    padding: 0 20px;
  }

  /* Remove default list indentation on mobile */
  footer ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 0 15px;
  }

  footer .wp-block-column {
    margin-bottom: 3px;
  }

  /* Additional list indentation reset for smaller screens */
  footer ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  footer li {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}

/* Remove unnecessary spacing at bottom of page */
.wp-block-spacer {
  height: 40px !important;
  min-height: 40px !important;
}

/* Alternative: minimize spacer height if display:none causes issues */
.wp-block-spacer[style*="--wp--preset--spacing--70"] {
  height: 40px !important;
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
  /* Increase touch targets */
  .gallery-add-photos-btn,
  .back-gallery-btn,
  .submit-photos-btn {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Improve button spacing */
  .gallery-header {
    gap: 15px;
  }

  /* Better mobile menu sizing */
  .mobile-menu {
    width: 320px;
    min-width: 280px;
    padding: 15px;
  }

  .mobile-menu li {
    padding: 3px 0px;
  }

  .mobile-menu li.divided {
    margin-top: 8px;
    padding-top: 8px;
    padding-left: 0px;
    padding-right: 0px;
  }

  .mobile-menu li.submenu-item {
    padding: 2px 0px;
    padding-left: 20px;
  }

  .mobile-menu a {
    padding: 8px 20px;
    display: block;
    font-size: 1.1rem;
    margin-left: 0;
    padding-left: 20px;
  }

  .mobile-menu li.submenu-item a {
    font-size: 0.95rem;
    padding: 6px 15px;
  }
}

/* Expand Your Knowledge Topics Table */
.eyk-topics-table {
  width: 100%;
  margin: 30px 0;
  border-collapse: separate;
  border-spacing: 0;
}

.eyk-topics-table td {
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.eyk-topics-table td:first-child {
  border-left: 3px solid #2a6d65;
}

.eyk-topics-table tr.section-header td {
  background: transparent;
  border: none;
  border-left: none;
  padding-top: 35px;
  padding-bottom: 12px;
  padding-left: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2a6d65;
  text-align: left;
}

.eyk-topics-table tbody tr.section-header:first-child td {
  padding-top: 0;
}

.eyk-topics-table tr:hover td {
  background: #f0f7f6;
}

.eyk-topics-table tr.section-header:hover td {
  background: transparent;
}

.eyk-topics-table a {
  color: #2a6d65;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  display: block;
  transition: color 0.2s ease;
}

.eyk-topics-table a:hover {
  color: #1a4f47;
}

/* .eyk-topics-table a:hover::first-letter {
  text-decoration: none;
  font-size: 2em;
  line-height: 1;
  margin-right: 0.2em;
  position: relative;
  top: 6px;
} */

.eyk-topics-table td:empty {
  background: transparent;
  border: none;
}

/* Sources and Read More Tables */
.sources-table {
  width: 100%;
  margin: 20px 0 30px 0;
  border-collapse: separate;
  border-spacing: 0;
}

.sources-table td {
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  background: #f9f9f9;
  border-left: 3px solid #2a6d65;
  transition: all 0.2s ease;
  line-height: 1.6;
}

.sources-table tr:hover td {
  background: #f0f7f6;
}

.sources-table a {
  color: #2a6d65;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.sources-table a:hover {
  color: #1a4f47;
  text-decoration: underline;
}

/* Projects Tables */
.wp-block-heading + .wp-block-paragraph + .wp-block-paragraph + .projects-table,
h2.wp-block-heading:has(+ p) {
  margin-top: 40px;
}

.projects-table {
  width: 100%;
  margin: 20px 0 30px 0;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.projects-table tr {
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.projects-table tr:hover {
  background: #f0f7f6;
  transform: translateX(5px);
}

.projects-table td {
  padding: 20px;
  border: 1px solid #e0e0e0;
  vertical-align: top;
  height: 100%;
}

/* First column (logo) styling - using :first-child for reliability */
.projects-table td:first-child {
  width: 100px;
  padding: 0;
  vertical-align: middle;
  border-left: 4px solid #2a6d65;
  background: #fff;
}

/* Legacy class support */
.projects-table td.project-icon {
  width: 100px;
  text-align: center;
  border-left: 4px solid #2a6d65;
  padding: 0;
  vertical-align: middle;
}

.projects-table td:first-child img,
.projects-table td.project-icon img {
  width: 100%;
  max-width: 80px;
  height: auto;
  max-height: 80px;
  object-fit: contain;
  display: block;
  margin: 10px auto;
}

.projects-table td:first-child .placeholder-icon,
.projects-table td.project-icon .placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  font-size: 3.5em;
  font-weight: 400;
  line-height: 1;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Icon styles for each project */
.projects-table tr:nth-child(1) .placeholder-icon::before {
  content: "🏠";
} /* Retrofit - house */
.projects-table tr:nth-child(2) .placeholder-icon::before {
  content: "🌱";
} /* Growers - seedling */
.projects-table tr:nth-child(3) .placeholder-icon::before {
  content: "🎤";
} /* Speakeasy - microphone */
.projects-table tr:nth-child(4) .placeholder-icon::before {
  content: "☕";
} /* Climate Club - coffee */
.projects-table tr:nth-child(5) .placeholder-icon::before {
  content: "♻️";
} /* Circular Shop - recycle */
.projects-table tr:nth-child(6) .placeholder-icon::before {
  content: "🛡️";
} /* Resilience - shield */
.projects-table tr:nth-child(7) .placeholder-icon::before {
  content: "📍";
} /* Pop-Ups - pin */

/* Background colors on TD cells */
.projects-table tr:nth-child(1) td:first-child,
.projects-table tr:nth-child(1) td.project-icon {
  background: linear-gradient(135deg, #e8f3f1 0%, #d4e9e5 100%);
}
.projects-table tr:nth-child(2) td:first-child,
.projects-table tr:nth-child(2) td.project-icon {
  background: linear-gradient(135deg, #e8f5e9 0%, #d4ead6 100%);
}
.projects-table tr:nth-child(3) td:first-child,
.projects-table tr:nth-child(3) td.project-icon {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.projects-table tr:nth-child(4) td:first-child,
.projects-table tr:nth-child(4) td.project-icon {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}
.projects-table tr:nth-child(5) td:first-child,
.projects-table tr:nth-child(5) td.project-icon {
  background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}
.projects-table tr:nth-child(6) td:first-child,
.projects-table tr:nth-child(6) td.project-icon {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}
.projects-table tr:nth-child(7) td:first-child,
.projects-table tr:nth-child(7) td.project-icon {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

/* Icon colors to match backgrounds */
.projects-table tr:nth-child(1) .placeholder-icon {
  color: #2a6d65;
}
.projects-table tr:nth-child(2) .placeholder-icon {
  color: #2e7d32;
}
.projects-table tr:nth-child(3) .placeholder-icon {
  color: #e65100;
}
.projects-table tr:nth-child(4) .placeholder-icon {
  color: #f57f17;
}
.projects-table tr:nth-child(5) .placeholder-icon {
  color: #558b2f;
}
.projects-table tr:nth-child(6) .placeholder-icon {
  color: #1565c0;
}
.projects-table tr:nth-child(7) .placeholder-icon {
  color: #7b1fa2;
}
.projects-table tr:nth-child(5) .placeholder-icon {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.projects-table td.project-content {
  line-height: 1.6;
}

.projects-table td.project-content strong {
  font-size: 1.2rem;
  color: #2a6d65;
}

.projects-table td.project-content a {
  color: #2a6d65;
  text-decoration: none;
  transition: color 0.2s ease;
}

.projects-table td.project-content a:hover {
  color: #1a4f47;
  text-decoration: underline;
}

/* Future Projects Table */
.future-projects-table {
  width: 100%;
  margin: 20px 0 30px 0;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.future-projects-table tr {
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.future-projects-table tr:hover {
  background: #f0f7f6;
  transform: translateX(5px);
}

.future-projects-table td {
  padding: 15px 20px;
  border: 1px solid #e0e0e0;
  line-height: 1.6;
  vertical-align: top;
}

.future-projects-table td:first-child {
  width: 30%;
  min-width: 200px;
  border-left: 3px solid #95c9c3;
  background: #fff;
}

.future-projects-table strong {
  color: #2a6d65;
  font-size: 1.05rem;
}

.future-projects-table a {
  color: #2a6d65;
  text-decoration: none;
}

.future-projects-table a:hover {
  color: #1a4f47;
  text-decoration: underline;
}

/* Future Projects Table - Mobile */
@media (max-width: 768px) {
  .future-projects-table {
    display: block;
    border-spacing: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .future-projects-table tbody {
    display: block;
  }

  .future-projects-table tr {
    display: block;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #95c9c3;
    border-radius: 6px;
    overflow: hidden;
    transform: none;
  }

  .future-projects-table tr:hover {
    transform: none;
  }

  .future-projects-table td {
    display: block;
    width: auto !important;
    min-width: unset !important;
    border: none;
    border-left: none;
    padding: 12px 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .future-projects-table td:first-child {
    background: #f5faf9;
    border-bottom: 1px solid #e8f0ef;
    padding-bottom: 10px;
  }

  .future-projects-table td:last-child {
    padding-top: 10px;
  }
}

/* Climate Clock Styles */
.climate-clock-page {
  background: linear-gradient(135deg, #2a6d65 0%, #1a4f47 100%);
  min-height: 100vh;
  padding: 0;
}

.climate-clock-container {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.climate-clock-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.climate-clock-title {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #2a6d65;
  margin-bottom: 40px;
  text-align: center;
}

.climate-clock-display {
  margin-bottom: 40px;
}

.clock-section {
  margin-bottom: 30px;
}

.clock-section.deadline {
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 30px;
}

.clock-label {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2a6d65;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.clock-time {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #2a6d65;
  color: white;
  padding: 20px 15px;
  border-radius: 10px;
  min-width: 90px;
  box-shadow: 0 4px 10px rgba(42, 109, 101, 0.3);
  transition: transform 0.3s ease;
}

.time-unit:hover {
  transform: translateY(-5px);
}

.time-number {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

.time-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.progress-bar-container {
  max-width: 500px;
  margin: 0 auto;
}

.progress-bar {
  background: #e0e0e0;
  height: 30px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  background: linear-gradient(90deg, #ff6b35 0%, #f7931e 50%, #ff4444 100%);
  height: 100%;
  border-radius: 15px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.climate-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #2a6d65, #1a4f47);
  color: white;
  padding: 25px 20px;
  border-radius: 15px;
  min-width: 120px;
  box-shadow: 0 6px 15px rgba(42, 109, 101, 0.3);
}

.stat-value {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  text-align: center;
}

.climate-clock-content {
  background: white;
  padding: 60px 20px;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.explanation-section {
  text-align: center;
}

.explanation-section h2 {
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #2a6d65;
  margin-bottom: 30px;
}

.explanation-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 20px;
  text-align: left;
}

/* Pulse animation for stats */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .climate-clock-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }

  .climate-clock-wrapper {
    padding: 30px 20px;
    margin: 0 10px;
  }

  .clock-time {
    gap: 15px;
  }

  .time-unit {
    padding: 15px 10px;
    min-width: 70px;
  }

  .time-number {
    font-size: 1.8rem;
  }

  .time-label {
    font-size: 0.8rem;
  }

  .climate-stats {
    gap: 20px;
  }

  .stat-item {
    padding: 20px 15px;
    min-width: 100px;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .explanation-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .explanation-section p {
    font-size: 1rem;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .climate-clock-container {
    padding: 40px 10px;
  }

  .time-unit {
    min-width: 60px;
    padding: 12px 8px;
  }

  .time-number {
    font-size: 1.5rem;
  }

  .climate-stats {
    flex-direction: column;
    align-items: center;
  }

  .stat-item {
    width: 100%;
    max-width: 200px;
  }
}

/* Override: provide consistent internal top spacing above gallery title like other pages (70px) */
#wp--skip-link--target > div.gallery-header {
  padding-top: 70px;
  margin: 0 0 40px 0; /* bottom space preserved, remove external top margin to prevent collapse */
}
@media (max-width: 768px) {
  #wp--skip-link--target > div.gallery-header {
    padding-top: 40px; /* smaller top padding on mobile */
    margin: 0 0 30px 0;
  }
}

/* Events Page Background (matches standard site layered background) */
/* Target all possible events page variations */
body.tribe-events-page-template,
body.post-type-archive-tribe_events,
body.tribe-events-page,
body.single-tribe_events,
body.events,
body.tribe-events,
.events-page,
/* Also target by URL pattern as fallback */
body[class*="tribe"],
body[class*="events"] {
  background-image: linear-gradient(
      to bottom,
      #98c3c0 0px,
      #ddebea 200px,
      transparent 100%
    ),
    url("graphics/main-back.png"), url("graphics/watermark.png") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-position: center top, center top, center right !important;
  background-blend-mode: lighten !important;
  min-height: 100vh;
}

/* Fallback - if the above doesn't work, force it on pages containing events */
body:has(.tribe-events),
body:has(.tribe-common) {
  background-image: linear-gradient(
      to bottom,
      #98c3c0 0px,
      #ddebea 200px,
      transparent 100%
    ),
    url("graphics/main-back.png"), url("graphics/watermark.png") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-position: center top, center top, center right !important;
  background-blend-mode: lighten !important;
  min-height: 100vh;
}

/* Apply the standard main background to events main element for consistency */
.events-page main.events-archive,
body.tribe-events-page-template main,
body.post-type-archive-tribe_events main,
body[class*="tribe"] main,
body[class*="events"] main {
  background: transparent;
  padding: 15px;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 300;
}

/* Make only TEC specific containers transparent */
.events-page .tribe-events-view,
.events-page .tribe-events-calendar-month,
.events-page .tribe-events-calendar-list,
body.tribe-events-page-template .tribe-events-view,
body.post-type-archive-tribe_events .tribe-events-view,
body[class*="tribe"] .tribe-events-view,
body[class*="events"] .tribe-events-view,
.tribe-events,
.tribe-common {
  background: transparent !important;
  background-color: transparent !important;
}

/* Links Directory Block */
.wch-links-directory {
  margin: 2rem 0;
}

.links-directory-toolbar {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #4a9d8f;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.links-directory-toolbar .toolbar-left,
.links-directory-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.links-directory-toolbar label {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  white-space: nowrap;
}

.links-directory-toolbar select,
.links-directory-toolbar input[type="text"] {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
  transition: border-color 0.2s;
}

.links-directory-toolbar select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
  appearance: none;
  cursor: pointer;
}

.links-directory-toolbar input[type="text"] {
  padding: 0.5rem 0.75rem;
  min-width: 250px;
}

.links-directory-toolbar select:hover,
.links-directory-toolbar input[type="text"]:hover {
  border-color: #4a9d8f;
}

.links-directory-toolbar select:focus,
.links-directory-toolbar input[type="text"]:focus {
  outline: none;
  border-color: #4a9d8f;
  box-shadow: 0 0 0 3px rgba(74, 157, 143, 0.1);
}

.links-directory-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.links-directory-table thead {
  background: #4a9d8f;
  color: white;
}

.links-directory-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s;
}

.links-directory-table th:hover {
  background-color: #3d8478;
}

.links-directory-table th.sortable::after {
  content: "⇅";
  margin-left: 0.5rem;
  opacity: 0.5;
  font-size: 0.9rem;
}

.links-directory-table th.sort-asc::after {
  content: "↑";
  opacity: 1;
}

.links-directory-table th.sort-desc::after {
  content: "↓";
  opacity: 1;
}

.links-directory-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background-color 0.15s;
}

.links-directory-table tbody tr:hover {
  background-color: #f9f9f9;
}

.links-directory-table tbody tr:last-child {
  border-bottom: none;
}

.links-directory-table td {
  padding: 1rem;
  vertical-align: top;
}

.links-directory-table td:first-child {
  font-weight: 600;
  width: 40%;
}

.links-directory-table td:last-child {
  width: 60%;
  color: #555;
  line-height: 1.6;
}

.links-directory-table a {
  color: #4a9d8f;
  text-decoration: none;
  transition: color 0.2s;
}

.links-directory-table a:hover {
  color: #3d8478;
  text-decoration: underline;
}

.links-directory-section {
  margin-bottom: 2rem;
}

.links-directory-section:last-child {
  margin-bottom: 0;
}

.links-directory-category-header {
  background: linear-gradient(135deg, #4a9d8f 0%, #3d8478 100%);
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0;
  border-left: 4px solid #2d6760;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.links-directory-count {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
  margin-left: 0.5rem;
}

/* Hide sections when filtered */
.links-directory-section.hidden {
  display: none;
}

/* Loading state */
.links-directory-loading {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-style: italic;
}

/* Empty state */
.links-directory-empty {
  text-align: center;
  padding: 3rem;
  color: #999;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background: #fafafa;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .wch-links-directory {
    margin-left: 15px;
    margin-right: 15px;
    overflow: visible;
  }

  .links-directory-table {
    font-size: 0.9rem;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .links-directory-table thead {
    display: none;
  }

  .links-directory-table,
  .links-directory-table tbody,
  .links-directory-table tr,
  .links-directory-table td {
    display: block;
    width: 100%;
  }

  .links-directory-table tbody {
    background: transparent;
  }

  .links-directory-table tr {
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #2a6d65;
    border-radius: 4px;
    padding: 0.75rem;
    background: #f9f9f9;
    overflow: visible;
  }

  .links-directory-table td {
    padding: 0.25rem 0;
    border: none;
    width: 100% !important;
    background: transparent;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
  }

  .links-directory-table td:first-child {
    font-weight: 600;
    color: #2a6d65;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    overflow: visible;
    white-space: normal;
  }

  .links-directory-table td:last-child {
    font-size: 0.85rem;
    color: #666;
  }

  .links-directory-category-header {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .links-directory-toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .links-directory-toolbar .toolbar-left,
  .links-directory-toolbar .toolbar-right {
    width: 100%;
  }

  .links-directory-toolbar select,
  .links-directory-toolbar input[type="text"] {
    width: 100%;
  }
}

/* Topic Pages - Heading Spacing */
style + h3.wp-block-heading {
  margin-top: 0.5em !important;
}

.wp-block-paragraph + h3.wp-block-heading,
p + h3.wp-block-heading {
  margin-top: 1.5em !important;
}

h3.wp-block-heading + .wp-block-paragraph,
h3.wp-block-heading + p {
  margin-top: 0 !important;
}

h4.wp-block-heading + .wp-block-table,
h4.wp-block-heading + figure,
h5.wp-block-heading + .wp-block-table,
h5.wp-block-heading + figure {
  margin-top: 0 !important;
}

/* EYK Topics Table */
.eyk-topics-table table {
  width: 98% !important;
  max-width: 98% !important;
}

.eyk-topics-table td {
  padding: 8px 4px !important;
  vertical-align: top;
}

.eyk-topics-table tr.section-header td {
  padding-top: 30px !important;
  font-weight: bold;
}

.eyk-topics-table tr.section-header:first-child td {
  padding-top: 0 !important;
}

.eyk-topics-table a {
  display: inline-block;
  padding-top: 8px;
  position: relative;
  top: -8px;
}

.eyk-topics-table a::first-letter {
  font-size: 2em !important;
  /* line-height: 0.9 !important; */
  padding-left: 12px !important;
  padding-right: 8px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  display: inline-block;
}

/* ====================================
   Contact Form 7 Styling
   ==================================== */

/* Form Container - matching table style */
.wpcf7 {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #2a6d65;
  border-radius: 2px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: none;
  transition: all 0.2s ease;
}

.wpcf7:hover {
  background: #f0f7f6;
}

/* Form Elements */
.wpcf7 form {
  margin: 0;
}

.wpcf7 p {
  margin-bottom: 15px;
}

/* Labels */
.wpcf7 label {
  display: block;
  color: #2f5597;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

/* Input Fields */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  background: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-color: #2a6d65;
  background: #f0f7f6;
  box-shadow: 0 0 0 2px rgba(42, 109, 101, 0.1);
}

/* Textarea */
.wpcf7 textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* Select Dropdown */
.wpcf7 select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232a6d65' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Checkboxes */
.wpcf7 .wpcf7-list-item {
  margin: 0 0 10px 0;
  display: block;
}

.wpcf7 .wpcf7-list-item:first-child {
  margin-top: 10px;
}

.wpcf7 .wpcf7-list-item-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 400;
  font-family: inherit;
  color: #333;
  padding-left: 0;
  font-size: 0.95rem;
  line-height: 1.1;
  transform: translateY(-5px);
}

.wpcf7 .wpcf7-list-item-label span {
  position: relative;
  top: -3px;
}

.wpcf7 input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  margin-bottom: -3px;
  cursor: pointer;
  accent-color: #2a6d65;
  flex-shrink: 0;
}

.wpcf7 input[type="checkbox"]:focus {
  outline: 2px solid #2a6d65;
  outline-offset: 2px;
}

/* Submit Button - compact style */
.wpcf7 input[type="submit"] {
  background: #2a6d65;
  color: #ffffff;
  border: none;
  border-radius: 2px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "League Spartan", Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wpcf7 input[type="submit"]:hover {
  background: #1a4f47;
  transform: translateY(-1px);
}

.wpcf7 input[type="submit"]:active {
  transform: translateY(0);
}

/* Response Messages */
.wpcf7-response-output {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0 0 0;
  font-weight: 500;
  transition: all 0.3s ease;
}

.wpcf7-mail-sent-ok {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
  border-color: #2a6d65;
  color: #1a4f47;
  border-left: 4px solid #2a6d65;
}

.wpcf7-validation-errors {
  background: linear-gradient(135deg, #fff3e0 0%, #fff8f0 100%);
  border-color: #f57c00;
  color: #e65100;
  border-left: 4px solid #f57c00;
}

.wpcf7-mail-sent-ng {
  background: linear-gradient(135deg, #ffebee 0%, #fff5f5 100%);
  border-color: #d32f2f;
  color: #b71c1c;
  border-left: 4px solid #d32f2f;
}

/* Validation Error Highlighting */
.wpcf7-not-valid {
  border-color: #d32f2f !important;
  background: #fff5f5 !important;
}

.wpcf7-not-valid-tip {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}

/* Loading Spinner */
.wpcf7-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(42, 109, 101, 0.2);
  border-top-color: #2a6d65;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .wpcf7 {
    padding: 20px;
  }

  .wpcf7 input[type="submit"] {
    width: 100%;
    padding: 16px;
  }

  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 input[type="tel"],
  .wpcf7 textarea,
  .wpcf7 select {
    font-size: 16px; /* Prevents zoom on mobile */
  }
}

/* Required Field Asterisks */
.wpcf7 .wpcf7-form-control-wrap abbr[title="required"] {
  color: #d32f2f;
  text-decoration: none;
  border: none;
}

/* Override browser autocomplete yellow background */
.wpcf7 input:-webkit-autofill,
.wpcf7 input:-webkit-autofill:hover,
.wpcf7 input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #333 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Mobile: EYK tables single column */
@media (max-width: 768px) {
  .eyk-topics-table,
  .eyk-topics-table tbody,
  .eyk-topics-table tr,
  .eyk-topics-table td {
    display: block;
    width: 100%;
  }

  .eyk-topics-table tr {
    margin-bottom: 0;
  }

  .eyk-topics-table td {
    border-left: 3px solid #2a6d65;
    margin-bottom: 8px;
  }

  .eyk-topics-table td:empty {
    display: none;
  }

  .eyk-topics-table tr.section-header td {
    border-left: none;
    padding-left: 0;
  }
}

/* Response output - hidden by default, shown only on errors */
.wpcf7-response-output {
  display: none !important;
  line-height: 1.6;
  padding: 12px 16px !important;
  margin: 15px 0 0 0 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  border-radius: 2px !important;
  border: 1px solid !important;
}

/* Show and style for validation errors (orange) */
.wpcf7 form.invalid .wpcf7-response-output {
  display: block !important;
  background-color: #fff3cd !important;
  border-color: #ffc107 !important;
  color: #856404 !important;
}

/* Show and style for submission errors (red) */
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  display: block !important;
  background-color: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24 !important;
}

/* Hide on successful submission (we show custom thank you message instead) */
.wpcf7 form.sent .wpcf7-response-output {
  display: none !important;
}
