/************************************************
 BHW Base – Layout (Dara-inspired flexbox design)
 Card-based, spacious, clean aesthetic
************************************************/

/* ------------------------------------------------
   Page banner / hero (full-width)
   Uses an inline image so the complete image displays
   responsively without distortion.
   ------------------------------------------------ */
#bhw-banner {
  width: 100%;
  display: block;
  overflow: hidden;
}

#bhw-banner img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* ------------------------------------------------
   Section containers (full-width, centered content)
   ------------------------------------------------ */
section,
.section {
  width: 100%;
  padding: 4rem 2rem;
}

section:nth-child(even),
.section:nth-child(even) {
}

/* ------------------------------------------------
   Section header (title + description)
   ------------------------------------------------ */
section > h2,
.section > h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  line-height: 1.2;
}

section > p:first-of-type,
.section > p:first-of-type {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ------------------------------------------------
   Card containers (3-col grid on desktop)
   ------------------------------------------------ */
.cards-grid,
.article-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.card,
.article-card {
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
  border-radius: var(--card-border-radius, 4px);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  flex: 0 1 calc(33.333% - 1.35rem);
  min-width: 280px;
}

article.post {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  flex: 0 1 calc(33.333% - 1.35rem);
  min-width: 280px;
}

article.post h1 {
  flex: 1 1 100%;
}

article.post .post-thumbnail {
  flex: 0 0 280px;
}

article.post .entry-content {
  flex: 1 1 320px;
  min-width: 0;
}

.entry-content {
  display: block;
}

.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

.entry-content .post-thumbnail {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: 320px;
}

.card:hover,
.article-card:hover,
article.post:hover {
  box-shadow: var(--card-shadow-hover, 0 4px 16px rgba(0, 0, 0, 0.12));
}

/* ------------------------------------------------
   Card image/media
   ------------------------------------------------ */
.card-image,
.article-card__media,
article.post .post-thumbnail {
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.card-image img,
.article-card__media img,
article.post .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  article.post {
    flex-direction: column;
  }

  article.post .post-thumbnail {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

/* ------------------------------------------------
   Card content (padding inside card)
   ------------------------------------------------ */
.card-content,
.article-card__body,
article.post .entry-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-content h3,
.article-card__header,
article.post .entry-header {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-family: var(--fyc-font-heading, serif);
}

.card-content p,
.article-card__body p,
article.post p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ------------------------------------------------
   Two-column testimonials (smaller cards)
   ------------------------------------------------ */
.testimonials,
.quotes {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial,
.quote {
  flex: 0 1 calc(50% - 1rem);
  min-width: 280px;
  padding: 2rem;
  border-radius: var(--card-border-radius, 4px);
  text-align: center;
  box-shadow: var(--card-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
}

.testimonial-image,
.quote-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-image img,
.quote-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-text,
.quote-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author,
.quote-author {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------
   Article thumbnail styling
   ------------------------------------------------ */
   
/* Blogroll articles - flex layout with thumbnail left */
.blog article.post,
.archive article.post,
.search article.post,
.post-type-archive-podcast article.post {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  max-width: var(--fyc-content-width, 960px);
  margin-bottom: 3rem;
}

.blog article.post h2,
.archive article.post h2,
.search article.post h2,
.post-type-archive-podcast article.post h2 {
  flex: 1 1 100%;
}

.blog article .post-thumbnail,
.archive article .post-thumbnail,
.search article .post-thumbnail,
.post-type-archive-podcast article .post-thumbnail {
  flex: 0 0 280px;
  width: 280px;
  overflow: hidden;
  border-radius: var(--card-border-radius, 4px);
  margin: 0;
}

.blog article.post .post-thumbnail + p,
.archive article.post .post-thumbnail + p,
.search article.post .post-thumbnail + p,
.post-type-archive-podcast article.post .post-thumbnail + p {
  flex: 1 1 320px;
  min-width: 0;
}

@media (max-width: 768px) {
  .blog article.post,
  .archive article.post,
  .search article.post,
  .post-type-archive-podcast article.post {
    flex-direction: column;
  }
  
  .blog article .post-thumbnail,
  .archive article .post-thumbnail,
  .search article .post-thumbnail,
  .post-type-archive-podcast article .post-thumbnail {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

.blog article .post-thumbnail img,
.archive article .post-thumbnail img,
.search article .post-thumbnail img,
.post-type-archive-podcast article .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.blog article .post-content-wrapper,
.archive article .post-content-wrapper,
.search article .post-content-wrapper,
.post-type-archive-podcast article .post-content-wrapper {
  flex: 1 1 320px;
  min-width: 0;
}

/* Hide WordPress block image wrapper */
div.wp-block-image {
  display: none;
}

/* Single post/page - thumbnail with text wrapping */
.entry-content .post-thumbnail {
  float: left;
  margin: 0 1.5rem 1rem 0;
  overflow: hidden;
  border-radius: var(--card-border-radius, 4px);
  max-width: 320px;
}

/* Single post/page - full-width thumbnail (outside .entry-content) */
.single article .post-thumbnail,
.page article .post-thumbnail {
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: var(--card-border-radius, 4px);
  width: 100%;
}

.single article.post {
  box-shadow: none;
}

.single article .post-thumbnail img,
.page article .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* ------------------------------------------------
   Blogroll articles (list view)
#primary,
.layout-primary {
  display: block;
  width: 100%;
}

/* ------------------------------------------------
   Responsive: Two columns on tablet
   ------------------------------------------------ */
@media (max-width: 1000px) {
  .card,
  .article-card,
  article.post {
    flex: 0 1 calc(50% - 1rem);
  }
}

/* ------------------------------------------------
   Responsive: Single column on mobile
   ------------------------------------------------ */
@media (max-width: 768px) {
  section,
  .section {
    padding: 2.5rem 1.5rem;
  }

  section > h2,
  .section > h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  section > p:first-of-type,
  .section > p:first-of-type {
    margin-bottom: 2rem;
  }

  .card,
  .article-card,
  article.post {
    flex: 0 1 100%;
  }

  .testimonial,
  .quote {
    flex: 0 1 100%;
  }
}

@media (max-width: 480px) {
  section,
  .section {
    padding: 2rem 1rem;
  }

  section > h2,
  .section > h2 {
    font-size: 1.25rem;
  }
}
