/* =========================================================================
   Irish Wine Estates — single Journal post (single.php)

   Brief section 18. Same design language as the inner pages: deep teal hero
   with the featured image in a copper-framed card, ivory reading column,
   sticky share rail and "On this page" list, author box, previous/next and
   related stories. Scoped under body.iwe-single; shared pieces (crumbs,
   labels, cards, links) come from inner.css and pages.css.
   ========================================================================= */

body.iwe-single #main-content {
  background: var(--iwe-ivory);
}

body.iwe-single .iwe-s {
  margin: 0;
  padding: 0;
}

/* Reading progress */
body.iwe-single .iwe-s-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9995;
  height: 3px;
  pointer-events: none;
}

body.iwe-single .iwe-s-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--iwe-champagne), var(--iwe-burnt-copper));
  transform: scaleX(var(--iwe-progress, 0));
  transform-origin: left center;
}


/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */

body.iwe-single .iwe-s-hero {
  position: relative;
  background-color: var(--iwe-deep-teal);
  background-image:
    radial-gradient(90% 120% at 0% 0%, rgba(19, 184, 137, .12), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600' fill='none' stroke='%2313b889' stroke-opacity='.12' stroke-width='1.1'%3E%3Cpath d='M-40 120c120-60 220 40 340-10s180-150 330-90 220 170 310 120'/%3E%3Cpath d='M-40 170c130-55 230 45 350-5s190-140 330-80 210 160 300 115'/%3E%3Cpath d='M-40 220c140-50 240 50 360 0s200-130 330-70 200 150 290 110'/%3E%3Cpath d='M-40 470c160 30 280-60 420-20s260 120 400 60 160-110 200-90'/%3E%3Cpath d='M-40 520c170 30 290-50 430-12s250 110 390 55 170-100 200-80'/%3E%3C/svg%3E");
  background-size: auto, 900px 600px;
  padding-top: clamp(40px, 4.4vw, 76px);
}

body.iwe-single .iwe-s-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(28px, 4.4vw, 80px);
  align-items: end;
}

body.iwe-single .iwe-s-hero__text {
  padding-bottom: clamp(52px, 5.4vw, 96px);
}

body.iwe-single .iwe-c .iwe-s-title {
  max-width: 22ch;
  margin: 0 0 28px;
  font-family: var(--iwe-font-display);
  font-size: clamp(32px, 3.4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--iwe-ivory);
  text-wrap: balance;
}

body.iwe-single .iwe-s-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.iwe-single .iwe-s-meta__avatar img {
  display: block;
  width: 52px;
  height: 52px;
  border: 2px solid var(--iwe-champagne);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
}

body.iwe-single .iwe-s-meta__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--iwe-font-body);
  color: rgba(247, 240, 227, .8);
}

body.iwe-single .iwe-s-meta__by {
  font-size: 15px;
  font-weight: 600;
  color: var(--iwe-ivory);
}

body.iwe-single .iwe-s-meta__by a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 182, 111, .6);
}

body.iwe-single .iwe-s-meta__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Featured image card, dropping over the edge into the reading area. */
body.iwe-single .iwe-s-hero__media {
  position: relative;
  margin: 0 0 clamp(-90px, -6vw, -40px);
  padding: 0 0 0 clamp(12px, 1.2vw, 18px);
  z-index: 2;
}

body.iwe-single .iwe-s-hero__media::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 0;
  width: clamp(12px, 1.2vw, 18px);
  background: var(--iwe-burnt-copper);
}

body.iwe-single .iwe-s-hero__img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--iwe-midnight);
  box-shadow: 0 30px 60px rgba(16, 24, 44, .28);
}

body.iwe-single .iwe-s-hero__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* -------------------------------------------------------------------------
   Reading layout: share rail | article | contents + visit card
   ------------------------------------------------------------------------- */

body.iwe-single .iwe-s-body {
  padding-block: clamp(110px, 9vw, 150px) clamp(60px, 6vw, 100px);
}

body.iwe-single .iwe-s-layout {
  display: grid;
  grid-template-columns: 56px minmax(0, 720px) minmax(220px, 280px);
  justify-content: space-between;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

body.iwe-single .iwe-s-rail,
body.iwe-single .iwe-s-side {
  position: sticky;
  top: 110px;
}

body.iwe-single .iwe-s-rail__label {
  margin: 0 0 12px;
  font-family: var(--iwe-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(23, 33, 38, .55);
}

body.iwe-single .iwe-s-sharelist {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.iwe-single .iwe-s-sharelist--rail { flex-direction: column; align-items: center; }
body.iwe-single .iwe-s-sharelist li { margin: 0; padding: 0; list-style: none; }

body.iwe-single .iwe-s-sharebtn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(23, 33, 38, .18);
  border-radius: 50%;
  background: transparent;
  color: var(--iwe-midnight);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .3s var(--iwe-ease), color .3s var(--iwe-ease), border-color .3s var(--iwe-ease);
}

body.iwe-single .iwe-s-sharebtn:hover {
  background: var(--iwe-deep-teal);
  border-color: var(--iwe-deep-teal);
  color: var(--iwe-ivory);
}

body.iwe-single .iwe-s-copy__done {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--iwe-font-body);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--iwe-emerald);
}

/* Contents list */
body.iwe-single .iwe-s-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  border-left: 1px solid rgba(23, 33, 38, .15);
}

body.iwe-single .iwe-s-toc__list li {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-increment: toc;
}

body.iwe-single .iwe-s-toc__list a {
  display: flex;
  gap: 10px;
  margin-left: -1px;
  padding: 8px 0 8px 16px;
  border-left: 2px solid transparent;
  font-family: var(--iwe-font-body);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(23, 33, 38, .78);
  text-decoration: none;
  transition: color .3s var(--iwe-ease), border-color .3s var(--iwe-ease);
}

body.iwe-single .iwe-s-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  font-family: var(--iwe-font-display);
  color: var(--iwe-deep-teal);
}

body.iwe-single .iwe-s-toc__list a:hover,
body.iwe-single .iwe-s-toc__list a.is-active {
  color: var(--iwe-midnight);
  border-left-color: var(--iwe-deep-teal);
}

body.iwe-single .iwe-s-toc--inline { display: none; }

/* Visit card */
body.iwe-single .iwe-s-visit {
  margin-top: 34px;
  padding: 24px;
  background: var(--iwe-deep-teal);
  color: var(--iwe-ivory);
}

body.iwe-single .iwe-c .iwe-s-visit p { margin: 0; color: rgba(247, 240, 227, .84); }

body.iwe-single .iwe-c .iwe-s-visit .iwe-s-visit__kicker {
  margin-bottom: 8px;
  font-family: var(--iwe-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--iwe-champagne);
}

body.iwe-single .iwe-c .iwe-s-visit .iwe-s-visit__title {
  margin-bottom: 8px;
  font-family: var(--iwe-font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--iwe-ivory);
}

body.iwe-single .iwe-c .iwe-s-visit .iwe-s-visit__text { margin-bottom: 16px; font-size: 14px; line-height: 1.55; }
body.iwe-single .iwe-s-visit .iwe-p-link { color: var(--iwe-champagne); }


/* -------------------------------------------------------------------------
   Article typography
   ------------------------------------------------------------------------- */

body.iwe-single .iwe-s-content {
  font-family: var(--iwe-font-body);
  font-size: clamp(17px, 1.15vw, 19px);
  line-height: 1.8;
  color: rgba(23, 33, 38, .88);
}

/* The editor stamped black text on every block; let the design colour win. */
body.iwe-single .iwe-s-content .has-black-color,
body.iwe-single .iwe-s-content .has-text-color { color: inherit; }

body.iwe-single .iwe-c .iwe-s-content p {
  margin: 0 0 1.25em;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

/* Opening paragraph as a lede with a copper drop cap. */
body.iwe-single .iwe-c .iwe-s-content > p:first-of-type {
  font-family: var(--iwe-font-display);
  font-size: 1.3em;
  line-height: 1.55;
  color: var(--iwe-midnight);
}

body.iwe-single .iwe-s-content > p:first-of-type::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  font-size: 3.2em;
  font-weight: 700;
  line-height: .8;
  color: var(--iwe-deep-teal);
}

body.iwe-single .iwe-c .iwe-s-content h2 {
  position: relative;
  margin: 2.2em 0 .7em;
  padding-top: .9em;
  font-family: var(--iwe-font-display);
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 700;
  line-height: 1.18;
  color: var(--iwe-midnight);
  scroll-margin-top: 110px;
}

body.iwe-single .iwe-c .iwe-s-content h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--iwe-burnt-copper);
}

body.iwe-single .iwe-c .iwe-s-content h3 {
  margin: 1.8em 0 .5em;
  font-family: var(--iwe-font-display);
  font-size: clamp(21px, 1.6vw, 25px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--iwe-midnight);
}

body.iwe-single .iwe-s-content a {
  color: var(--iwe-deep-teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.iwe-single .iwe-s-content a:hover { color: var(--iwe-emerald); }
body.iwe-single .iwe-s-content strong { color: var(--iwe-midnight); }

body.iwe-single .iwe-s-content ul,
body.iwe-single .iwe-s-content ol {
  margin: 0 0 1.4em;
  padding: 0 0 0 1.4em;
  line-height: 1.7;
}

body.iwe-single .iwe-s-content ul { list-style: none; padding-left: 0; }

body.iwe-single .iwe-s-content ul > li {
  position: relative;
  margin: 0 0 .5em;
  padding-left: 1.5em;
}

body.iwe-single .iwe-s-content ul > li::before {
  content: "";
  position: absolute;
  left: .2em;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--iwe-burnt-copper);
}

body.iwe-single .iwe-s-content ol > li { margin: 0 0 .5em; padding-left: .3em; }
body.iwe-single .iwe-s-content ol > li::marker { color: var(--iwe-deep-teal); font-weight: 700; }

body.iwe-single .iwe-s-content blockquote:not(.instagram-media):not(.twitter-tweet) {
  margin: 1.8em 0;
  padding: .2em 0 .2em 1.2em;
  border-left: 3px solid var(--iwe-champagne);
  font-family: var(--iwe-font-display);
  font-size: 1.2em;
  font-style: italic;
  line-height: 1.5;
  color: var(--iwe-deep-teal);
}

body.iwe-single .iwe-s-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

body.iwe-single .iwe-s-content figure,
body.iwe-single .iwe-s-content .wp-block-image {
  margin: 2em 0;
}

body.iwe-single .iwe-s-content .wp-block-image img { width: 100%; }
body.iwe-single .iwe-s-content .wp-block-image.size-medium img,
body.iwe-single .iwe-s-content .wp-block-image .size-medium { width: auto; margin-inline: auto; }

body.iwe-single .iwe-s-content figcaption,
body.iwe-single .iwe-s-content .wp-element-caption {
  margin-top: .7em;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: rgba(23, 33, 38, .6);
}

body.iwe-single .iwe-s-content hr {
  margin: 2.4em auto;
  width: 80px;
  border: 0;
  border-top: 1px solid var(--iwe-champagne);
}

/* Embeds: responsive video, centred Instagram. */
body.iwe-single .iwe-s-content .wp-block-embed { margin: 2em 0; }
body.iwe-single .iwe-s-content iframe { max-width: 100%; }

body.iwe-single .iwe-s-content .wp-block-embed.is-type-video .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
}

body.iwe-single .iwe-s-content .wp-block-embed.is-type-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.iwe-single .iwe-s-content .instagram-media { margin-inline: auto !important; /* overrides Instagram's inline margin */ }

/* Divi-builder posts rendered inside the reading column. */
body.iwe-single .iwe-s-content .et_pb_section { padding: 0; background-color: transparent; }
body.iwe-single .iwe-s-content .et_pb_row { width: 100%; max-width: none; padding: 0; }


/* -------------------------------------------------------------------------
   Article footer: filed under, share, author, previous / next
   ------------------------------------------------------------------------- */

body.iwe-single .iwe-s-foot {
  margin-top: clamp(40px, 4vw, 64px);
  padding-top: 30px;
  border-top: 1px solid rgba(23, 33, 38, .14);
}

body.iwe-single .iwe-s-filed,
body.iwe-single .iwe-s-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 26px;
}

body.iwe-single .iwe-s-filed__label,
body.iwe-single .iwe-s-share__label {
  font-family: var(--iwe-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(23, 33, 38, .6);
}

body.iwe-single .iwe-s-filed a {
  padding: 7px 14px;
  border: 1px solid rgba(23, 33, 38, .2);
  border-radius: 999px;
  font-family: var(--iwe-font-body);
  font-size: 14px;
  color: var(--iwe-midnight);
  text-decoration: none;
  transition: background-color .3s var(--iwe-ease), color .3s var(--iwe-ease);
}

body.iwe-single .iwe-s-filed a:hover {
  background: var(--iwe-deep-teal);
  border-color: var(--iwe-deep-teal);
  color: var(--iwe-ivory);
}

body.iwe-single .iwe-s-share { display: none; }

body.iwe-single .iwe-s-author {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin: 10px 0 34px;
  padding: clamp(24px, 3vw, 36px);
  background: #f3ecdf;
  border-top: 3px solid var(--iwe-burnt-copper);
}

body.iwe-single .iwe-s-author__photo img {
  display: block;
  width: 110px;
  height: 110px;
  border: 3px solid var(--iwe-ivory);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  box-shadow: 0 0 0 1px var(--iwe-champagne);
}

body.iwe-single .iwe-c .iwe-s-author p.iwe-c-label { margin-bottom: 6px; }

body.iwe-single .iwe-c .iwe-s-author .iwe-s-author__name {
  margin: 0 0 8px;
  font-family: var(--iwe-font-display);
  font-size: 26px;
  line-height: 1.2;
  color: var(--iwe-midnight);
}

body.iwe-single .iwe-c .iwe-s-author .iwe-s-author__bio {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
}

body.iwe-single .iwe-c .iwe-s-author .iwe-s-author__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 0;
}

body.iwe-single .iwe-s-pn {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.iwe-single .iwe-s-pn__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid rgba(23, 33, 38, .14);
  text-decoration: none;
  transition: border-color .3s var(--iwe-ease), background-color .3s var(--iwe-ease);
}

body.iwe-single a.iwe-s-pn__item:hover { border-color: var(--iwe-deep-teal); background: #fffdf8; }
body.iwe-single .iwe-s-pn__item--next { text-align: right; }
body.iwe-single .iwe-s-pn__item--empty { border: 0; }

body.iwe-single .iwe-s-pn__label {
  font-family: var(--iwe-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--iwe-deep-teal);
}

body.iwe-single .iwe-s-pn__item--prev .iwe-s-pn__label::before { content: "\2190\00a0"; }
body.iwe-single .iwe-s-pn__item--next .iwe-s-pn__label::after { content: "\00a0\2192"; }

body.iwe-single .iwe-s-pn__title {
  font-family: var(--iwe-font-display);
  font-size: 18px;
  line-height: 1.3;
  color: var(--iwe-midnight);
}


/* -------------------------------------------------------------------------
   Related stories
   ------------------------------------------------------------------------- */

body.iwe-single .iwe-s-related {
  padding-block: clamp(56px, 6vw, 100px);
  background: var(--iwe-mineral-grey);
}

body.iwe-single .iwe-s-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(26px, 3vw, 44px);
}

body.iwe-single .iwe-c .iwe-s-related__head .iwe-c-h2 { margin: 0; }


/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  body.iwe-single .iwe-s-layout {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
  }

  body.iwe-single .iwe-s-rail,
  body.iwe-single .iwe-s-side { display: none; }

  body.iwe-single .iwe-s-toc--inline {
    display: block;
    margin: 0 0 34px;
    padding: 16px 20px;
    background: #f3ecdf;
    border-left: 3px solid var(--iwe-burnt-copper);
  }

  body.iwe-single .iwe-s-toc--inline summary {
    cursor: pointer;
    font-family: var(--iwe-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--iwe-midnight);
  }

  body.iwe-single .iwe-s-toc--inline .iwe-s-toc__list { margin-top: 12px; }
  body.iwe-single .iwe-s-share { display: flex; }
}

@media (max-width: 980px) {
  body.iwe-single .iwe-s-hero__grid { grid-template-columns: 1fr; gap: 0; }
  body.iwe-single .iwe-s-hero__text { padding-bottom: 32px; }
  body.iwe-single .iwe-s-hero__media { margin-bottom: -48px; }
  body.iwe-single .iwe-s-body { padding-top: 84px; }
}

@media (max-width: 767px) {
  body.iwe-single .iwe-c .iwe-s-title { font-size: clamp(28px, 8vw, 38px); }
  body.iwe-single .iwe-s-meta__facts { font-size: 11px; letter-spacing: .08em; }
  body.iwe-single .iwe-s-author { grid-template-columns: 1fr; justify-items: start; }
  body.iwe-single .iwe-s-author__photo img { width: 88px; height: 88px; }
  body.iwe-single .iwe-s-pn { grid-template-columns: 1fr; }
  body.iwe-single .iwe-s-pn__item--next { text-align: left; }
  body.iwe-single .iwe-s-pn__item--empty { display: none; }
  body.iwe-single .iwe-s-sharebtn { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  body.iwe-single .iwe-s-sharebtn,
  body.iwe-single .iwe-s-toc__list a,
  body.iwe-single .iwe-s-filed a,
  body.iwe-single .iwe-s-pn__item { transition: none; }
}
