/* ===== Growers Diaries – Template Tweaks (Single Diary Entry) ===== */

/* Connect a bar to the card immediately following it */
body.single-diary_entry .gd-woodbar,
body.single-diary_entry .gd-hero-bar{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 2;
}

/* If the next element is a gd-card, remove its top corners so it tucks under the bar */
body.single-diary_entry .gd-woodbar + .gd-card,
body.single-diary_entry .gd-hero-bar + .gd-card{
  margin-top: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Hero intro card tweak: add this class to the intro module AND also give it gd-card */
.gd-hero-card{
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  margin-top: 0 !important;
  padding-top: 14px;
}

/* No featured image: collapse hero to single column */
body.single-diary_entry.gd-no-thumb .gd-hero{
  display: block !important;
}

body.single-diary_entry.gd-no-thumb .gd-hero > .et_pb_column:first-child{
  display: none !important;
}

body.single-diary_entry.gd-no-thumb .gd-hero > .et_pb_column{
  width: 100% !important;
  max-width: 100% !important;
}
/* Hero image: fixed frame + crop-to-fill */
body.single-diary_entry .gd-hero-image{
  height: 340px;            /* adjust to taste (300–420) */
  overflow: hidden;
  border-radius: 18px;      /* match your card radius */
}

/* SINGLE diary hero: show full image, never crop */
body.single-diary_entry .gd-hero-image{
  overflow: hidden;
  border-radius: 18px;
}

body.single-diary_entry .gd-hero-image img{
  width: 100%;
  height: auto;          /* key: keeps aspect ratio */
  max-height: 420px;     /* adjust to taste */
  object-fit: contain;   /* belt & braces */
  display: block;
  margin: 0 auto;        /* centers if image ends up narrower */
}

@media (max-width: 980px){
  body.single-diary_entry .gd-hero-image{ height: 300px; }
}
@media (max-width: 600px){
  body.single-diary_entry .gd-hero-image{ height: 260px; }
}
