/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

/* =========================================================================
   Custom styles - transferred from Customizer > Additional CSS (2026-06-19)
   No selectors, values, or !important flags were changed; only spacing
   and section comments were tidied.
   ========================================================================= */

/* ---- Print -------------------------------------------------------------- */
@media print {
  body { font-size: 12pt; line-height: 1.4; }
  .main-header-bar-wrap,
  .post-navigation,
  .comments-area,
  .site-footer,
  .entry-meta,
  .ast-single-related-posts-container { display: none; }
  .wp-block-gallery,
  .wp-block-image,
  .wp-block-table { break-inside: avoid; }
}

/* ---- Navigation --------------------------------------------------------- */
ul.sub-menu { font-size: 11pt; }

/* ---- Single post: flush banner image ------------------------------------ */
/* Remove Astra's article padding that creates a gap above the banner */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-single:not(.ast-related-post) {
  padding: 0 !important;
}

/* Also kill any top margin on the container itself */
#primary.content-area,
.ast-container,
#content.site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Ensure the banner image sits flush */
.entry-content > .wp-block-image:first-child,
.entry-content > figure:first-child,
.entry-content > .wp-block-cover:first-child {
  margin-top: 0 !important;
  display: block;
}

/* ---- Header: site identity & logo --------------------------------------- */
.ast-site-identity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* Fix site logo alignment */
.site-logo-img,
.custom-logo-link {
  display: flex;
  align-items: center;
}

.ast-site-title-wrap {
  display: flex;
  align-items: center;
}

/* ---- Homepage recipe grid (all widths) ---------------------------------- */
/* Stop long titles from forcing grid columns beyond their share */
.wp-block-post-template li {
  min-width: 0;
  overflow: hidden;
}

.wp-block-post-title,
.wp-block-post-title a {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  display: block;
  width: 90%;
}

/* ---- Homepage recipe grid (phones, max-width 768px) --------------------- */
/* Uniform image height + always-visible titles */
@media (max-width: 768px) {
  .wp-block-post-template {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
  }
  .wp-block-post-template li {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* every featured image cropped to the same box */
  .wp-block-post-template .wp-block-post-featured-image {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 3 / 2 !important;
    overflow: hidden !important;
    margin: 0 !important;
  }
  .wp-block-post-template .wp-block-post-featured-image a,
  .wp-block-post-template .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  /* keep the title visible no matter what */
  .wp-block-post-template .wp-block-post-title {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* ---- Prototype: Ottolenghi-inspired single recipe posts ----------------- */
body.single-post article.fk-recipe-layout-ready {
  --fk-recipe-red: #d10521;
  --fk-recipe-ink: #232323;
  --fk-recipe-muted: #6f6a66;
  --fk-recipe-line: #eee6df;
  --fk-recipe-chip: #f8f4f0;
}

body.single-post .entry-header.fk-recipe-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: stretch;
  width: min(100vw - 44px, 1420px);
  margin: 0 0 clamp(34px, 5vw, 72px) 50%;
  padding: clamp(18px, 3vw, 42px) 0 0;
  text-align: left;
  transform: translateX(-50%);
}

body.single-post .fk-recipe-hero-media,
body.single-post .fk-recipe-hero-media .post-thumb,
body.single-post .fk-recipe-hero-media img {
  width: 100%;
  height: 100%;
}

body.single-post .fk-recipe-hero-media {
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  background: #f6f3ee;
}

body.single-post .fk-recipe-hero-media img {
  display: block;
  object-fit: cover;
}

body.single-post .fk-recipe-hero-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(20px, 4vw, 58px) 0;
}

body.single-post .fk-recipe-hero .entry-title {
  color: var(--fk-recipe-red);
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(3.2rem, 5.4vw, 6rem);
  font-weight: 400;
  line-height: 1.02;
  margin: 0 0 clamp(24px, 3.6vw, 48px);
  text-transform: none;
}

body.single-post .fk-recipe-hero .entry-meta {
  color: var(--fk-recipe-muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin: 0;
}

body.single-post .fk-recipe-hero .entry-meta a {
  background: var(--fk-recipe-chip);
  border-radius: 999px;
  color: var(--fk-recipe-ink);
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0.35rem 0.45rem 0;
  padding: 0.28rem 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
}

body.single-post .fk-recipe-stats {
  border-top: 1px solid var(--fk-recipe-line);
  display: grid;
  gap: 0.85rem 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(22px, 3vw, 44px);
  padding-top: 1.05rem;
}

body.single-post .fk-recipe-stat span {
  color: var(--fk-recipe-red);
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

body.single-post .fk-recipe-stat strong {
  color: var(--fk-recipe-ink);
  display: block;
  font-size: clamp(0.9rem, 1.1vw, 1.08rem);
  line-height: 1.2;
}

body.single-post article.fk-recipe-layout-ready .entry-content {
  width: min(100vw - 44px, 1120px);
  margin: 0 0 0 50%;
  padding: 0 0 clamp(48px, 7vw, 96px);
  transform: translateX(-50%);
}

body.single-post .entry-content .fk-recipe-intro {
  color: var(--fk-recipe-ink);
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  line-height: 1.55;
  max-width: 820px;
}

body.single-post .entry-content .fk-recipe-intro + .fk-recipe-intro {
  margin-top: 1.1rem;
}

body.single-post .fk-recipe-section {
  border-top: 1px solid var(--fk-recipe-line);
  display: grid;
  gap: 0 clamp(34px, 5vw, 76px);
  grid-template-columns: minmax(160px, 250px) minmax(0, 640px);
  margin-top: clamp(34px, 5vw, 64px);
  padding-top: clamp(26px, 4vw, 46px);
}

body.single-post .fk-recipe-section > h2 {
  color: var(--fk-recipe-red);
  font-family: "Roboto Condensed", sans-serif;
  font-size: clamp(1.9rem, 2.35vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  margin: 0;
}

body.single-post .fk-recipe-section > :not(h2) {
  grid-column: 2;
}

body.single-post .fk-recipe-section p,
body.single-post .fk-recipe-section li {
  color: var(--fk-recipe-ink);
  font-size: clamp(0.96rem, 1vw, 1.06rem);
  line-height: 1.62;
}

body.single-post .fk-recipe-section p {
  margin-bottom: 0.8rem;
}

body.single-post .fk-recipe-section ul {
  margin: 0 0 1.4rem;
  padding-left: 1.1rem;
}

body.single-post .fk-recipe-section li + li {
  margin-top: 0.45rem;
}

body.single-post .fk-recipe-section strong {
  color: var(--fk-recipe-red);
  font-weight: 600;
}

@media (max-width: 860px) {
  body.single-post .entry-header.fk-recipe-hero {
    grid-template-columns: 1fr;
    gap: 0;
    width: min(100vw, 760px);
  }

  body.single-post .fk-recipe-hero-media {
    aspect-ratio: 4 / 3;
  }

  body.single-post .fk-recipe-hero-details {
    padding: clamp(28px, 8vw, 54px) clamp(20px, 6vw, 48px);
  }
}

@media (max-width: 680px) {
  body.single-post .entry-header.fk-recipe-hero,
  body.single-post article.fk-recipe-layout-ready .entry-content {
    width: calc(100vw - 32px);
  }

  body.single-post .fk-recipe-hero .entry-title {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  body.single-post .fk-recipe-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.single-post .fk-recipe-section {
    display: block;
  }

  body.single-post .fk-recipe-section > h2 {
    margin-bottom: 1.15rem;
  }
}
