/* =========================================================
   Handcrafted Italy – Blog CSS (index + sidebar)
   Shared layout for:
   - handcrafted-italy.php (index)
   - blog-content.php (single post)
   - blog-all.php (all posts grid)
   ========================================================= */

/* ---------------------------------------------
   BASE FRAME
---------------------------------------------- */

/* Grey band across page – used by all blog pages */
#content-frame {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 40px;
  background: #f2f3f5;
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #444;
}

/* Handcrafted Italy home (has .hc class) */
#content-frame.hc {
  padding: 30px 0 40px;
}

/* Intro + main inner containers at 80% width */
.hc-inner {
  width: 80%;
  margin: 0 auto;
  padding: 18px 14px 36px;
  box-sizing: border-box;
}

/* Intro header band also at 80% width */
#content-frame.hc .hc-inner-intro {
  width: 80%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ---------------------------------------------
   BLOG INTRO: LOGO + TEXT (Handcrafted Italy)
---------------------------------------------- */

body.has-igd-header #content-frame.hc {
  /* drop content below the fixed IGD header while keeping grey background */
  padding-top: 140px;
}

/* blog masthead image */
#content-frame.hc .blog-logo {
  text-align: center;
  margin: 0 auto 24px;
}

#content-frame.hc .blog-logo img {
  max-width: 260px;
  height: auto;
  display: inline-block;
}

/* wider intro text block on handcrafted-italy */
#content-frame.hc .center-text {
  width: 90%;
  max-width: 1040px;
  margin: 0 auto 32px;
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  text-align: center;
}

/* ---------------------------------------------
   PAGE HEADER (used if you show title/subtitle)
---------------------------------------------- */

#content-frame.hc .page-header {
  text-align: center;
  margin: 10px auto 22px;
}

#content-frame.hc .page-title {
  font-family: "Sarala", system-ui, sans-serif;
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 6px;
  color: #2f2a24;
}

#content-frame.hc .page-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  color: #777;
}

/* Helper alignment if you re-use .page-title / .blog-button */
.page-title,
.blog-button {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------
   MAIN ROW: LEFT (posts) + RIGHT (sidebar)
   – Handcrafted Italy home
---------------------------------------------- */

#content-frame.hc .hc-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 20px;
}

#content-frame.hc .hc-left {
  flex: 0 0 70%;
  max-width: 70%;
  overflow-x: hidden;
}

#content-frame.hc .hc-right {
  flex: 0 0 30%;
  max-width: 30%;
}

/* White card panels */
#content-frame.hc .hc-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  padding: 18px 18px 20px;
  border: 1px solid #eee4d7;
}

/* Ensure images inside panels behave */
#content-frame.hc .hc-panel img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------
   FILTER PILLS (All posts / Food / Travel / etc.)
   – Handcrafted Italy home (AJAX)
---------------------------------------------- */

#content-frame.hc .listing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 24px;
  padding: 0;
  list-style: none;
}

#content-frame.hc .listing-links .filter-pill {
  border-radius: 999px;
  border: 1px solid #e1d7ca;
  padding: 6px 14px;
  background: #f8f4ee;
  font-size: 13px;
  line-height: 1.2;
  color: #7a6347;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

#content-frame.hc .listing-links .filter-pill.is-active,
#content-frame.hc .listing-links .filter-pill:hover {
  background: #aa8453;
  border-color: #aa8453;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Hide any optional dot span */
#content-frame.hc .listing-links .filter-pill .dot {
  display: none !important;
}

/* ---------------------------------------------
   MAIN LISTINGS: VERTICAL CARDS
   (one per row, image on left, text on right)
   – used by inc.blog-list.php
---------------------------------------------- */

#listings {
  display: block;
  margin: 0;
  padding: 0;
}

/* Clearfix */
.blog-list-card::after {
  content: "";
  display: table;
  clear: both;
}

.blog-list-card {
  list-style: none;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eee4d7;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  padding: 16px 18px;
  margin-bottom: 22px;
  overflow: hidden;
}

.blog-list-card:last-child {
  margin-bottom: 0;
}

/* Thumbnail left, text right */
.blog-list-card .blc-thumb {
  display: block;
  float: left;
  width: 260px;
  max-width: 40%;
  margin: 0 18px 10px 0;
  border-radius: 10px;
  overflow: hidden;
}

.blog-list-card .blc-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-list-card:hover .blc-thumb img {
  transform: scale(1.04);
}

/* Text column */
.blog-list-card .blc-title {
  font-family: "Sarala", system-ui, sans-serif;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 4px;
  color: #2f2a24;
}

.blog-list-card .blc-title a {
  color: inherit;
  text-decoration: none;
}

.blog-list-card .blc-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.blog-list-card .blc-date {
  font-size: 0.85rem;
  color: #9a8470;
  margin-bottom: 6px;
}

.blog-list-card .blc-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 10px;
  color: #555;
}

/* Footer row with category & Read link */
.blog-list-card .blc-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

/* Category pill in card footer */
.blog-list-card .home-cat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f2e4d6;
  color: #7a5530;
  border: 1px solid #e2c8ab;
  text-decoration: none;
}

/* Read article link */
.blog-list-card .home-read-link {
  margin-left: auto;
  font-size: 0.9rem;
  color: #aa8453;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.blog-list-card .home-read-link span {
  font-size: 1.2em;
  line-height: 1;
}

/* Hover state for read link */
.blog-list-card .home-read-link:hover {
  color: #8f6a3d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------
   SIDEBAR: LATEST POSTS LIST
---------------------------------------------- */

.blog-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.blog-list-wrap-small {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f0e8dc;
  text-decoration: none;
}

.blog-list-wrap-small:last-child {
  border-bottom: none;
}

/* Thumbnail on the left */
.blog-list-image-small {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f3ee;
}

.blog-list-image-small img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

/* Text block on the right */
.blog-list-text-small {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-list-title-small {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
  color: #333;
}

.blog-list-date-small {
  font-size: 0.8rem;
  color: #a08c76;
}

/* On hover, slightly darken text */
.blog-list-wrap-small:hover .blog-list-title-small {
  color: #000;
}

/* ---------------------------------------------
   SIDEBAR PANEL HEADING
---------------------------------------------- */

#content-frame.hc .hc-right h2 {
  font-family: "Sarala", system-ui, sans-serif;
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: #2f2a24;
}

/* ---------------------------------------------
   RESPONSIVE – shared
---------------------------------------------- */

@media (max-width: 1100px) {
  .hc-inner,
  #content-frame.hc .hc-inner-intro {
    width: 90%;
  }

  #content-frame.hc .hc-left {
    flex: 0 0 68%;
    max-width: 68%;
  }

  #content-frame.hc .hc-right {
    flex: 0 0 32%;
    max-width: 32%;
  }
}

@media (max-width: 960px) {
  .hc-inner,
  #content-frame.hc .hc-inner-intro {
    width: 94%;
  }
  #content-frame.hc .hc-row {
    flex-direction: column;
  }
  #content-frame.hc .hc-left,
  #content-frame.hc .hc-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .blog-list-card {
    padding: 14px 14px 12px;
  }

  .blog-list-card .blc-thumb {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
    border-radius: 10px;
  }

  .blog-list-card .blc-title {
    font-size: 1rem;
  }

  .blog-list-card .blc-summary {
    font-size: 0.88rem;
  }

  .blog-list-image-small img {
    width: 70px;
    height: 70px;
  }
}

/* =========================================================
   Handcrafted Italy hero (logo + intro text)
   – more precise control on handcrafted-italy.php
   ========================================================= */

/* Blog logo block – centered and dropped down from the menu */
#content-frame .blog-logo {
  width: 80%;
  max-width: 960px;
  margin: 80px auto 24px; /* move up/down by changing 80px */
  text-align: center;
}

#content-frame .blog-logo img {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Intro text block under the logo (used on handcrafted-italy and can re-use elsewhere) */
#content-frame .center-text {
  width: 80%;
  max-width: 960px;
  margin: 0 auto 32px;
  font-family: "Roboto", "Nunito Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  text-align: left;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  #content-frame .blog-logo {
    margin-top: 60px;
    margin-bottom: 18px;
  }

  #content-frame .center-text {
    width: 90%;
    margin-bottom: 24px;
    font-size: 0.95rem;
  }
}

/* =========================================================
   Category links row – centred (for non-AJAX & AJAX)
========================================================= */

#content-frame .listing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  justify-content: center;
  text-align: center;
}

/* =========================================================
   SINGLE POST LAYOUT – blog-content.php
   Two panels on grey background
   ========================================================= */

/* Wrapper becomes transparent: only panels are white */
.blog-wrap {
  width: 80%;
  max-width: 1400px;
  margin: 0 auto 40px;
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  background: transparent;
  box-shadow: none;
  border: 0;
  box-sizing: border-box;
}

/* Left/right become the two white cards */
.blog-left,
.blog-right {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eee4d7;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  padding: 18px 18px 20px;
}

/* Proportions similar to handcrafted-italy.php */
.blog-left {
  flex: 0 0 70%;
  max-width: 70%;
}

.blog-right {
  flex: 0 0 30%;
  max-width: 30%;
}

/* Stack on smaller screens */
@media (max-width: 960px) {
  .blog-wrap {
    flex-direction: column;
    width: 94%;
  }
  .blog-left,
  .blog-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Slightly tighten top spacing in the article body if needed */
.blog-left h1,
.blog-left h2:first-child {
  margin-top: 0;
}

/* =========================================================
   ALL POSTS GRID – blog-all.php
   Panel card on grey background
   ========================================================= */

/* Filters row – same pill style as elsewhere, on grey background */
#blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 24px auto 16px;
  width: 80%;
  max-width: 1400px;
}

#blog-filters .filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid #1aada3;
  border-radius: 999px;
  color: #1aada3 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#blog-filters .filter-pill:hover,
#blog-filters .filter-pill.is-active {
  background: #1aada3;
  border-color: #1aada3;
  color: #fff !important;
}

/* White panel that holds the grid */
#blog-all-panel {
  width: 80%;
  max-width: 1400px;
  margin: 0 auto 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 20px;
  box-sizing: border-box;
  text-align: left !important;
  border: 1px solid #eee4d7;
}

/* Grid of cards */
#blog-all-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

/* Individual cards */
.blog-all-card {
  background: #fff;
  border: 1px solid #f3f3f3;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-all-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
}

.blog-all-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.blog-all-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-all-date {
  font-size: 12px;
  color: #888;
}

.blog-all-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  text-decoration: none;
}

.blog-all-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-all-cat {
  font-size: 12px;
  color: #1aada3;
  font-weight: 500;
}

/* Responsive breakpoints for grid */
@media (max-width: 1200px) {
  #blog-filters,
  #blog-all-panel {
    width: 88%;
  }
  #blog-all-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  #blog-filters,
  #blog-all-panel {
    width: 94%;
  }
  #blog-all-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #blog-all-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #blog-all-inner {
    grid-template-columns: 1fr;
  }
}
/* EXTRA HEADROOM
   ------------------------------ */

/* More space above logo + panels on handcrafted-italy.php */
body.has-igd-header #content-frame.hc {
  padding-top: 200px;  /* was 140px – increase/decrease as you like */
}

/* More space above the two panels on blog-content.php */
.blog-wrap {
  margin-top: 80px;    /* was 0 – gives breathing room under the header */
}
/* FINAL OVERRIDE – Handcrafted Italy logo size */
#content-frame.hc .blog-logo img,
#content-frame .blog-logo img {
  max-width: 420px;   /* make it larger again – adjust to taste */
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
