/* ---------------------------------------------------------------
   Note: .homepage-blog is now defined in homepage.css only.
   .views-view-responsive-grid !important overrides removed.
   .article-hero merged into .page-hero (pages.css).
   Article pages use .page-hero.page-hero--short for shorter hero.
   --------------------------------------------------------------- */

.article-body img[src*="green-and-grow-logo"] {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

/* Target the blockquote pattern from WordPress imports */
.article-body blockquote {
  background: #f9f9f9;
  border-left: 4px solid #4a7c3f;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.article-body blockquote h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #2c2c2c;
}

.article-body blockquote p {
  display: block;
  margin: 0;
  color: #555;
  line-height: 1.6;
}


/* Card Wrapper Base */
.article-card {
  background: #ffffff;
  border: 1px solid #e3dbdf;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.3s ease;
}

.article-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Image Wrapper and Hover Scaling Mechanics */
.article-card__image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10; /* Maintains a professional landscape crop ratio */
}

.article-card__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Trigger image scaling on card hover */
.article-card:hover .article-card__image-wrapper img {
  transform: scale(1.06);
}

/* Dynamic Hover Overlay */
.article-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(46, 90, 38, 0.15); /* Translucent signature green shade tint */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Stops overlay from interrupting standard click navigation triggers */
}

.article-card:hover .article-card__overlay {
  opacity: 1;
}

/* Magnifying Glass (Pure CSS Graphic Asset - No SVGs or Web-Fonts Required) */
.zoom-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #1c3d17; /* Dark hunter green circle */
  border-radius: 50%;
  transform: rotate(-45deg); /* Flips the handle downwards to the bottom right angle */
}

.zoom-icon::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 7px;
  width: 3px;
  height: 12px;
  background-color: #1c3d17; /* Magnifying glass handle stick */
  border-radius: 2px;
}

/* Text Content Area Formatting */
.article-card__content {
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card__title {
  font-family: inherit;
  color: #1a4214; /* Emerald accent heading text color context */
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 15px 0;
}

.article-card__title a {
  font-family: inherit;
  color: #1a4214; /* Emerald accent heading text color context */
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 15px 0;
}

.article-card__excerpt {
  font-size: 0.95rem;
  color: #666666;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1; /* Pushes the 'Read More' link to lock identically to card floorings */
}

.article-card__link {
    font-weight: 700;
    font-variant: small-caps;
    color: #044704 !important;
}

.article-card__link a {
    font-weight: 700;
    font-variant: small-caps;
    color: #044704 !important;
    text-decoration: none;
}

/* 'Read More' CTA Anchoring formatting */
.article-card__more {
  font-size: 0.85rem;
  font-weight: 700;
  color: #214d1a;
  text-decoration: none;
  letter-spacing: 0.5px;
  display: inline-block;
  align-self: flex-start;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.article-card__more:hover {
  color: #12300d;
  border-bottom-color: #214d1a;
}


/* Article page: two-column layout (body + sidebar) */
.single-article .content-area {
  display: flex;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.single-article .article-body {
  flex: 1;
  min-width: 0;
}

.single-article .sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Sidebar blocks within article pages */
.single-article .sidebar-block {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.single-article .sidebar-block__title {
  font-size: var(--font-size-h4, 1.1rem);
  margin: 0 0 var(--spacing-sm);
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-accent);
}

.single-article .sidebar-block__content {
  padding-left: 2rem;
}

/* ---------------------------------------------------------------
   Note: .taxonomy-articles and .search-results-page sidebar layouts
   have been merged into .single-article (defined above).
   Taxonomy and search pages now use .single-article.article-body.
   --------------------------------------------------------------- */

/* Article card spacing inside the single-article body area */
.single-article .article-body .article-card {
  margin-bottom: 1rem;
}

/* -----------------------------------------------
   Responsive — Article Pages & Sidebar
   ----------------------------------------------- */

/* Tablet: sidebar still sits beside body but narrower */
@media (max-width: 980px) {
  .single-article .sidebar {
    width: 260px;
  }

  .single-article .sidebar-block__content {
    padding-left: 1rem;
  }

  .article-card__title,
  .article-card__title a {
    font-size: 1.2rem;
  }

  .article-card__content {
    padding: 20px 16px;
  }
}

/* Mobile: sidebar stacks below body, full width */
@media (max-width: 767px) {
  .single-article .content-area {
    flex-direction: column;
  }

  .single-article .article-body {
    width: 100%;
  }

  .single-article .sidebar {
    width: 100%;
    margin-top: var(--spacing-lg);
  }

  .single-article .sidebar-block {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .single-article .sidebar-block__content {
    padding-left: 0.5rem;
  }

  .article-card__title,
  .article-card__title a {
    font-size: 1.1rem;
  }

  .article-card__excerpt {
    font-size: 0.9rem;
  }

  .article-card__content {
    padding: 16px 14px;
  }
}

/* Small mobile: tighter spacing */
@media (max-width: 479px) {
  .article-card__title,
  .article-card__title a {
    font-size: 1rem;
  }

  .article-card__content {
    padding: 12px 12px;
  }

  .article-card__excerpt {
    font-size: 0.85rem;
  }

  .single-article .sidebar-block {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

/* =============================================
   Article Layout Variants
   Controlled by field_article_layout on the
   Article content type.
   ============================================= */

/* --- Image Above (default) --- */
.article-layout--image-above .field--name-field-image {
  margin-bottom: 1.5rem;
}
.article-layout--image-above .field--name-field-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
}

/* --- Image Floated Right --- */
.article-layout--image-floated .article-layout__body-float::after {
  content: '';
  display: table;
  clear: both;
}
.article-layout--image-floated .article-layout__float-image {
  float: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 45%;
}
.article-layout--image-floated .article-layout__float-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
}

/* --- Image Between Paragraphs --- */
.article-layout--image-between .article-layout__between-image {
  margin: 1.5rem 0;
}
.article-layout--image-between .article-layout__between-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
}

/* --- Image Below Body --- */
.article-layout--image-below .field--name-field-image {
  margin-top: 1.5rem;
}
.article-layout--image-below .field--name-field-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md, 8px);
}

/* --- Image Hero (page-level) --- */
.page-hero--article-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.page-hero--article-hero .page-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}
.page-hero--article-hero .page-hero__title {
  color: #fff;
  font-size: 2.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Responsive: floated image stacks on mobile */
@media (max-width: 767px) {
  .article-layout--image-floated .article-layout__float-image {
    float: none;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* =============================================
   Search Results
   Remove the default <ol> numbering from the
   search results listing.
   ============================================= */

.article-body .search-results {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  margin-bottom: 1.5rem;
}
