/*
Theme Name: Open Source Civic
Author: WordPress Telex
Description: A nature-inspired theme for the Guilford Land Trust, built on Twenty Twenty-Five. Earthy greens, warm naturals, and elegant typography celebrate the beauty of Connecticut's protected lands.
Version: 0.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: open-source-civic
Tags: block-theme, full-site-editing, accessibility-ready

Guilford Land Trust — Protecting Guilford's natural heritage since 1966.
*/


/* Customize buttons */

#glct-buttons button, input[type="submit"] {
  appearance: none;
  background-color: #27421D;
  border-radius: 6px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 16px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
}

.wp-block-table td, .wp-block-table tr {
  border-color: #FDFCFA;
}

.wp-block-list {
    padding-left: 12px; /* Adjust this number to change the indent distance */
}

.wp-block-list li {
  list-style-type: disc;
}


/* Remove gravity forms titles */

.gform_title {
	display: none;
}




#support-table td {
  border:#E8E0D4;
  vertical-align: top;
}

/* Customize The Events Calendar (tribe) pages and forms */

.tribe-events-widget-events-list__header {
  display: none !important;
}

.tribe-events-widget-events-list__view-more {
  display: none !important;
}

.tribe-events-widget-events-list__event-details {
  color: #366619 !important;
}

.custom-event-date-display code {
    font-family: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', sans-serif;
}



/* Equal-height card layout */
.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}
.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: center;
}

.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* Header nav refinement */
.glt-header-nav a {
  transition: color 0.2s ease;
}

/* Hero overlay gradient */
.glt-hero .wp-block-cover__background {
  background: linear-gradient(
    180deg,
    rgba(27, 50, 32, 0.35) 0%,
    rgba(27, 50, 32, 0.65) 100%
  ) !important;
}

/* Stat counter styling */
.glt-stat-number {
  display: block;
  line-height: 1;
}

/* Card image uniformity */
.glt-land-card img {
  height: 220px;
  object-fit: cover;
  width: 100%;
}

/* Subtle card hover */
.glt-land-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.glt-land-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27, 50, 32, 0.12);
}

/* Leaf divider */
.glt-leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.glt-leaf-divider::before,
.glt-leaf-divider::after {
  content: '';
  height: 1px;
  width: 60px;
  background: #A8B5A0;
}

/* CTA section texture */
.glt-cta-section {
  position: relative;
}
.glt-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%);
  pointer-events: none;
}

/* Footer styling */
.glt-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(168, 181, 160, 0.5);
  transition: text-decoration-color 0.2s ease;
}
.glt-footer a:hover {
  text-decoration-color: #2D5F3A;
}

/* Donate button pulse on hover */
.glt-donate-btn .wp-block-button__link {
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.glt-donate-btn .wp-block-button__link:hover {
  transform: scale(1.03);
}

/* Mission quote styling */
.glt-mission-quote {
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid #6B8F3D;
}

/* Property Gallery Block */
.glct-property-gallery-block {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.glct-gallery-title {
  font-family: 'Poppins', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1B3220;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.glct-properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.glct-prop-widget {
  background: #FFFFFF;
  border: 1px solid #E8E0D4;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glct-prop-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(27, 50, 32, 0.1);
}

.glct-prop-widget p {
  margin: 0;
}

.glct-prop-widget p:last-child {
  padding: 0.625rem 0.75rem;
}

.glct-prop-widget p:last-child a {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1B3220;
  text-decoration: none;
  line-height: 1.3;
  display: block;
}

.glct-prop-widget p:last-child a:hover {
  color: #2D5F3A;
}

.glct-prop-img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

/* Archive card images via post-featured-image */
.glt-land-card .wp-block-post-featured-image {
  margin: 0;
}
.glt-land-card .wp-block-post-featured-image img {
  height: 220px;
  object-fit: cover;
  width: 100%;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

/* Query loop grid equal-cards support */
.wp-block-post-template.equal-cards {
  gap: 1.5rem;
}
.wp-block-post-template.equal-cards > .wp-block-post {
  display: flex;
  flex-direction: column;
}
.wp-block-post-template.equal-cards > .wp-block-post > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Read more link styling in archive cards */
.glt-land-card .wp-block-read-more {
  text-decoration: none;
}
.glt-land-card .wp-block-read-more:hover {
  color: var(--wp--preset--color--forest);
}

/* Masonry grid layout for archive pages */
.wp-block-post-template.glt-masonry-grid {
  display: columns !important;
  columns: 3;
  column-gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wp-block-post-template.glt-masonry-grid > .wp-block-post {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: block;
}

.wp-block-post-template.glt-masonry-grid .glt-land-card {
  display: block;
}

/* Remove fixed image height for masonry — let images use natural aspect ratio */
.wp-block-post-template.glt-masonry-grid .glt-land-card .wp-block-post-featured-image img {
  height: auto;
  aspect-ratio: auto;
}

@media (max-width: 960px) {
  .wp-block-post-template.glt-masonry-grid {
    columns: 2;
  }
}

@media (max-width: 600px) {
  .wp-block-post-template.glt-masonry-grid {
    columns: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .glt-stat-grid .wp-block-column {
    flex-basis: 50% !important;
  }

  .glct-properties-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
}