/* ==========================================================================
   Drinks & Destinations — WordPress additions
   style.css is the untouched HTML build; only WordPress-specific needs live here:
   dynamic tile grid, Contact Form 7 markup, press popup details, admin bar.
   ========================================================================== */

/* ---------- One liner / podcast: tile count driven by ACF ----------
   PHP (dd_tile_spans) sets a span per tile: rows of four, and a final
   incomplete row shares the full width (1 → full, 2 → ½, 3 → ⅓, 5 → 4 + 1 …). */
.ep-grid--auto > .ep-card--m-full { grid-column: 1 / -1; }
@media (min-width: 992px) {
  .ep-grid--auto { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ep-grid--auto > .ep-card,
  .ep-grid--auto > .ep-card--m-full { grid-column: span 3; }
  .ep-grid--auto > .ep-card--span-4 { grid-column: span 4; }
  .ep-grid--auto > .ep-card--span-6 { grid-column: span 6; }
  .ep-grid--auto > .ep-card--span-12 { grid-column: 1 / -1; }
}
.ep-grid--auto div.ep-card__link { display: block; }

/* ---------- In the news (homepage): static four-tile grid ----------
   Reuses .itn-grid from the In the News page; keeps the homepage spacing. */
.press .press-grid { margin-bottom: 0; }
/* Phones: one column that never grows past the screen (the one-line card titles
   would otherwise size the column to the longest title and widen the whole page). */
@media (max-width: 575.98px) { .itn-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact Form 7: newsletter band (.signup-form) ---------- */
.signup__form .wpcf7 { margin: 0; }
.signup-form .wpcf7-form-control-wrap { display: block; }
.signup-form__check .wpcf7-form-control-wrap,
.signup-form__check .wpcf7-form-control,
.signup-form__check .wpcf7-list-item { display: inline-flex; align-items: center; margin: 0; }
.signup-form__check:has(.wpcf7-not-valid) { color: #b3261e; }
.signup-form .signup-form__btn { cursor: pointer; appearance: none; -webkit-appearance: none; border-radius: 0; }
.signup-form.submitting .signup-form__btn { opacity: 0.6; pointer-events: none; }
.signup-form .wpcf7-spinner { display: none; }

.signup-form .wpcf7-not-valid-tip,
.inquiry-form .wpcf7-not-valid-tip {
  margin-top: 4px;
  font-family: var(--f-nav); font-size: var(--fs-xs); line-height: 1.3; color: #b3261e;
}
.signup-form__check .wpcf7-not-valid-tip { display: none; } /* the label turns red instead */

.signup-form .wpcf7-response-output,
.inquiry-form .wpcf7-response-output {
  min-height: 1.4em; margin: 8px 0 0 !important; padding: 0 !important; border: 0 !important;
  font-family: var(--f-nav); font-size: var(--fs-xs); color: var(--c-black);
}
.signup-form.invalid .wpcf7-response-output,
.signup-form.unaccepted .wpcf7-response-output,
.signup-form.failed .wpcf7-response-output,
.signup-form.spam .wpcf7-response-output,
.inquiry-form.invalid .wpcf7-response-output,
.inquiry-form.failed .wpcf7-response-output { color: #b3261e; }

/* ---------- Contact Form 7: experience inquiry dialogs (.inquiry-form) ---------- */
.inquiry-form .wpcf7-form-control-wrap { display: block; }
.inquiry-form__grid > .wpcf7-form-control-wrap[data-name="your-message"] { grid-column: 1 / -1; }
.inquiry-form .inquiry-form__btn { cursor: pointer; appearance: none; -webkit-appearance: none; }
.inquiry-form .wpcf7-spinner { display: none; }
.inquiry-form.submitting .inquiry-form__btn { opacity: 0.6; pointer-events: none; }

/* ---------- In the news popup: rich "Details" (assets/js/main.js → initPressPopups) ---------- */
.press-popup__detail { display: flex; flex-direction: column; gap: 1em; }
.press-popup__detail > * { margin: 0; }
.press-popup__detail img { max-width: 100%; height: auto; }
.press-popup__detail a { color: var(--c-wine); text-decoration: underline; }
.mfp-press .mfp-container { overflow-y: auto; }

/* ---------- Story detail extras ---------- */
.article__video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.article img { max-width: 100%; height: auto; }

/* Detail page: image block set to "Full width" / "Wide width" in the editor
   fills the whole text column, even when the uploaded image is smaller.
   It stays inside the column so it never runs under the Related sidebar. */
.article .alignfull,
.article .alignwide { display: block; width: 100%; max-width: 100%; margin-inline: 0; }
.article .alignfull img,
.article .alignwide img { display: block; width: 100%; height: auto; }

/* Classic editor: Image details → Advanced options → Image CSS Class = "full-width". */
.article img.full-width { display: block; width: 100%; max-width: 100%; height: auto; }
.article .wp-caption:has(img.full-width),
.article p:has(> img.full-width),
.article a:has(> img.full-width) { display: block; width: 100% !important; max-width: 100%; }

/* ---------- Logged-in admin bar: keep the sticky header below it ---------- */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.admin-bar .mobile-menu { inset: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 32px)) 0 0 0; }
@media screen and (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

/* ---------- Industry story detail: "Content sections" repeater rows ----------
   Odd rows:  heading + text left,  image right.
   Even rows: heading + image left, text right.
   Rows without an image (or without text) use the full width. */
.article--rows { display: flex; flex-direction: column; gap: 40px; }
.article--rows > * + * { margin-top: 0; }
.story-row { display: grid; gap: 10px 24px; align-items: start; }
.story-row > * { margin: 0; min-width: 0; }
.story-row__heading {
  font-family: var(--f-times); font-weight: 700; font-size: var(--fs-body); line-height: 1.35; color: var(--c-black);
}
.article .story-row__heading { margin: 0; color: var(--c-black); font-size: var(--fs-body); }
.story-row__text p + p { margin-top: 4px; }
.story-row__text > * + * { margin-top: 12px; }
.story-row__figure img { display: block; width: 100%; height: auto; }
.story-row__figure figcaption {
  margin-top: 10px; font-family: var(--f-times); font-style: italic; font-size: 13px; line-height: 1.5; color: var(--c-black);
}

@media (min-width: 768px) {
  /* Heading sits on its own line on the left; text and image start level below it. */
  .story-row:not(.story-row--no-image):not(.story-row--no-text) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "heading ." "text figure";
  }
  .story-row:nth-of-type(even):not(.story-row--no-image):not(.story-row--no-text) {
    grid-template-areas: "heading ." "figure text";
  }
  .story-row:not(.story-row--has-heading):not(.story-row--no-image):not(.story-row--no-text) {
    grid-template-areas: "text figure";
  }
  .story-row:nth-of-type(even):not(.story-row--has-heading):not(.story-row--no-image):not(.story-row--no-text) {
    grid-template-areas: "figure text";
  }
  .story-row:not(.story-row--no-image):not(.story-row--no-text) .story-row__heading { grid-area: heading; }
  .story-row:not(.story-row--no-image):not(.story-row--no-text) .story-row__text { grid-area: text; }
  .story-row:not(.story-row--no-image):not(.story-row--no-text) .story-row__figure { grid-area: figure; }
}

/* ---------- Article detail: finished images (border + text are in the image) ---------- */
.article .wine-picks--images .wine-pick { padding: 0; border: 0; gap: 0; background: none; }
.article .wine-picks--images .wine-pick img { display: block; width: 100%; height: auto; }

/* ---------- Latest News + Interview detail: full-width row images ---------- */
.article .news-figure img { display: block; width: 100%; height: auto; }
.article--compact .news-figure { margin-block: 16px; }

/* ==========================================================================
   CONSULTING PAGE (page-templates/template-consulting.php) — Figma "Consulting"
   ========================================================================== */
.cs-hero { padding-block: 32px 40px; border-bottom: 1.5px solid #c4c4c4; }
.cs-hero__grid { display: grid; gap: 28px; align-items: start; }
.cs-hero__title {
  font-family: var(--f-serif); font-weight: 400;
  font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -0.005em; color: #1a1a1a;
}
.cs-hero__lead { margin-top: 18px; font-family: var(--f-times); font-size: clamp(1rem, 0.93rem + 0.3vw, 1.25rem); line-height: 1.55; color: #444; }
.cs-hero__btn { margin-top: 18px; }
.cs-hero__media { aspect-ratio: 554 / 381; border: 1px solid #c4c4c4; }

.cs-service { padding-block: 40px; border-bottom: 1.5px solid #c4c4c4; }
.cs-service__title {
  font-family: var(--f-times); font-weight: 700; font-size: clamp(1rem, 0.9rem + 0.35vw, 1.25rem);
  line-height: 1.2; letter-spacing: 0.02em; text-transform: capitalize; color: var(--c-wine);
}
.cs-service__body { margin-top: 20px; font-family: var(--f-times); font-size: var(--fs-body); line-height: 1.6; color: var(--c-black); }
.cs-service__body > * + * { margin-top: 16px; }
.cs-service__body a { color: var(--c-wine); text-decoration: underline; }
.cs-service__body ol,
.cs-service__body ul { padding-left: 28px; font-family: var(--f-times); font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem); line-height: 1.8; color: #444; }
.cs-service__body ol { list-style: decimal; }
.cs-service__body ul { list-style: disc; }

.cs-inquiry { padding-block: 48px; background: var(--c-cream); scroll-margin-top: var(--header-h, 80px); }
.cs-inquiry__grid { display: grid; gap: 32px; align-items: start; }
.cs-inquiry__eyebrow { font-family: var(--f-nav); font-weight: 500; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-wine); }
.cs-inquiry__title { margin-top: 14px; font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.3125rem); line-height: 1.2; color: #1a1a1a; }
.cs-inquiry__lead { margin-top: 14px; font-family: var(--f-times); font-size: clamp(1rem, 0.93rem + 0.3vw, 1.25rem); line-height: 1.55; color: #444; }
.cs-inquiry__mail { display: inline-block; margin-top: 14px; font-family: var(--f-nav); font-size: 14px; color: #1a1a1a; text-decoration: none; overflow-wrap: anywhere; }
.cs-inquiry__mail:hover { color: var(--c-wine); text-decoration: underline; }

/* Inline form: Figma field sizes (46px, 1.5px border, 13/14px gaps). */
.cs-form .inquiry-form__grid { gap: 14px 13px; }
.cs-form .inquiry-form__input {
  height: 46px; padding: 0 16px; border: 1.5px solid #9a948d;
  font-size: 13.5px; letter-spacing: 0.1em;
}
.cs-form .inquiry-form__input::placeholder { color: #8f7a6c; }
.cs-form .inquiry-form__select select:has(option[value=""]:checked) { color: #8f7a6c; }
.cs-form .inquiry-form__select::after { right: 16px; border-top-color: #8f7a6c; }
.cs-form .inquiry-form__textarea { height: 112px; min-height: 112px; padding-block: 16px; }
.cs-form .inquiry-form__btn { margin-top: 14px; height: 45px; padding: 0 19px; border-radius: 6px; background: #1a1a1a; font-size: 14px; letter-spacing: 0.14em; }
.cs-form .inquiry-form__btn:hover { background: var(--c-wine); }

@media (min-width: 768px) {
  .cs-hero__grid { grid-template-columns: minmax(0, 599fr) minmax(0, 554fr); gap: 47px; }
  .cs-inquiry__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; }
}
@media (min-width: 1200px) {
  .cs-inquiry__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 701px); }
}
@media (min-width: 992px) {
  .cs-hero { padding-block: 50px 49px; }
  .cs-service { padding-block: 47px 48px; }
  .cs-service__body { margin-top: 24px; }
  .cs-service__body > * + * { margin-top: 24px; }
  .cs-service__body ol { margin-top: 20px; }
  .cs-inquiry { padding-block: 48px 47px; }
}

/* Homepage Consulting: service descriptions use the same size as the intro line (.consulting__lead / .body-lg). */
.consulting .service__text { font-size: var(--fs-body); line-height: 1.4; }

/* Footer logo: 50% larger on phones (19px → 28.5px tall). */
@media (max-width: 767.98px) {
  .footer-bottom__logo .logo__img { height: 28.5px; }
  .footer-bottom__logo .logo__text { font-size: 18px; }
}

/* Footer: agency credit line under the bottom row. */
.footer-credit {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--f-nav); font-size: 10px; line-height: 1.5; color: #a8998e;
}
/* Same as the Privacy / Contact links: no underline until hover. */
.footer-credit a { color: inherit; text-decoration: none; }
.footer-credit a:hover, .footer-credit a:focus-visible { color: var(--c-white); text-decoration: underline; }
@media (min-width: 768px) {
  .footer-credit { text-align: center; }
}

/* "Partner with us" dialog (inc/partner-dialog.php): same type as the Consulting inquiry section. */
.inquiry--partner .inquiry__eyebrow { font-weight: 500; font-size: 14px; letter-spacing: 0.16em; }
.inquiry--partner .inquiry__title { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.3125rem); line-height: 1.2; color: #1a1a1a; }
.inquiry--partner .inquiry__lead { margin-top: 14px; font-size: clamp(1rem, 0.93rem + 0.3vw, 1.25rem); line-height: 1.55; color: #444; }
.inquiry--partner .inquiry__mail { font-size: 14px; color: #1a1a1a; text-decoration: none; }
.inquiry--partner .inquiry__mail:hover { color: var(--c-wine); text-decoration: underline; }
@media (min-width: 768px) {
  .inquiry--partner .inquiry__inner { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
}

/* ---------- Homepage "One liner": visible tile titles + mobile swipe row ---------- */
.ep-grid--titles .pod-card__title {
  margin-top: 12px; text-align: left;
  font-family: var(--f-serif); font-size: 18px; line-height: 1.35; letter-spacing: 0.01em; color: var(--c-black);
}
.ep-grid--titles .ep-card__link:hover .pod-card__title { color: var(--c-wine); }

@media (max-width: 767.98px) {
  /* One tile at a time with the next one peeking; snaps tile by tile (native touch scrolling). */
  .ep-grid.ep-grid--swipe {
    display: flex; gap: 16px;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ep-grid--swipe::-webkit-scrollbar { display: none; }
  /* position: relative keeps each tile's absolutely-positioned bits (screen-reader text)
     inside the scrolling row, so off-screen tiles never widen the page. */
  .ep-grid--swipe { position: relative; }
  .ep-grid--swipe > .ep-card,
  .ep-grid--swipe > .ep-card--m-full { position: relative; flex: 0 0 82%; grid-column: auto; scroll-snap-align: start; }
}
