/* assets/css/custom.css
 * Custom styles for TrustyBlog theme
 * Mobile-first, future-proof, namespaced tfb-*
 * - Defines --tfb-base-size
 * - Removes duplicate blocks (lists, alignwide/full)
 * - Fixes hero grid logic (1-col -> 2-col at md)
 * - Adds focus-visible + reduced-motion helpers
 */

/*------------------------------------*\
  Reset & Base
\*------------------------------------*/
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  /* Colors */
  --tfb-color-primary:   #8A36F3;
  --tfb-color-secondary: #F1E5F5;
  --tfb-color-tertiary:  #D3BAEB;
  --tfb-color-bg:        #F7F5FF;
  --tfb-text-color:      #08080E;

  /* Typography */
  --tfb-base-size: 100%; /* was referenced but undefined */
  --tfb-font-heading: 'Sora', Roboto, Arial, sans-serif;
  --tfb-font-body: Arial, sans-serif;

  /* Spacing */
  --tfb-space-xs:  .25rem;
  --tfb-space-sm:  .5rem;
  --tfb-space-md:  1rem;
  --tfb-space-lg:  1.5rem;
  --tfb-space-xl:  2rem;
  --tfb-space-xxl: 4rem;

  /* Breakpoints */
  --bp-sm:  480px;
  --bp-md:  768px;
  --bp-lg: 1200px;

  color-scheme: light;
}

html {
  font-size: var(--tfb-base-size);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tfb-color-bg);
  color: var(--tfb-text-color);
  font-family: var(--tfb-font-body);
  font-size: 18px;
  line-height: 1.6;
}

/* Utility hidden until focus */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: var(--tfb-space-md);
  top: var(--tfb-space-md);
  background: #fff;
  padding: var(--tfb-space-sm);
  z-index: 1000;
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Visible focus without changing theme colors */
:where(a, button, [role="button"], input, textarea, select):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Push down your sticky header whenever the admin bar is showing */
body.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .header { top: 46px; }
}

/*------------------------------------*\
  Typography
\*------------------------------------*/
h1, h2, h3, h4 {
  font-family: var(--tfb-font-heading);
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--tfb-text-color);
  line-height: 1.2;
}

/* Responsive sizes via clamp() */
h1 { font-size: clamp(2.5rem, 5vw, 52px); font-weight: 800; color: var(--tfb-color-primary); }
h2 { font-size: clamp(1.75rem, 4vw, 35px); font-weight: 600; }
h3 { font-size: clamp(1.375rem, 3vw, 24px); font-weight: 600; }
h4 { font-size: clamp(1.125rem, 2.5vw, 20px); font-weight: 600; }

hr {
  border: none;
  height: 1px;
  background-color: var(--tfb-color-primary);
  margin: 2rem 0;
}

/* Blockquotes */
.tfb-post-content blockquote {
  border-left: 5px solid var(--tfb-color-primary);
  padding: 1.5rem 1rem;
  margin: 2rem 0;
  font-style: italic;
  background: var(--tfb-color-secondary);
}

/* Lists (single, de-duplicated block) */
.tfb-post-content ul,
.tfb-post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  padding-left: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.tfb-post-content ul { list-style-type: disc; }
.tfb-post-content ol { list-style-type: decimal; }
.tfb-post-content ul ul,
.tfb-post-content ul ul ul,
.tfb-post-content ol ol,
.tfb-post-content ol ol ol { margin: 0 0 1.5rem 1.5rem; }
.tfb-post-content ul li::marker,
.tfb-post-content ol li::marker { color: var(--tfb-color-primary); }

/* Code blocks, preformatted text */
.tfb-post-content pre,
.tfb-post-content code {
  font-family: Menlo, Consolas, monospace;
  background: #f4f4f4;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/*------------------------------------*\
  Primary text nav (scoped)
\*------------------------------------*/

/* Reset only inside this nav */
.primary-nav-wrapper #primary-menu ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Desktop: show links inline, hide hamburger */
.primary-nav-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.primary-nav-wrapper .hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.primary-nav-wrapper #primary-menu {
  display: flex;
  gap: 1.25rem;
}

/* ---------- Mobile (≤767px) ---------- */
@media (max-width: 767px) {
  /* anchor absolute children */
  .header .header__inner { position: relative; }

  /* put the hamburger at the top-right,
     leave ~60px for the purple user icon */
  .primary-nav-wrapper {
    position: absolute;
    right: 20px;
    top: 12px;
    z-index: 51;
  }

  /* show the hamburger on mobile */
  .primary-nav-wrapper .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    font-size: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
  }
  .primary-nav-wrapper .hamburger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  /* hide inline links by default */
  .primary-nav-wrapper #primary-menu {
    display: none;
  }

  /* dropdown panel */
  .primary-nav-wrapper #primary-menu.is-open {
    display: block;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 8px;
  }

  /* stack links vertically */
  .primary-nav-wrapper #primary-menu ol {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* link styling */
  .primary-nav-wrapper #primary-menu a {
    display: block;
    text-decoration: none;
    color: var(--tfb-text-color, #111);
    padding: 12px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease;
  }
  .primary-nav-wrapper #primary-menu a:hover {
    background: var(--tfb-color-secondary, #F1E5F5);
  }
  .primary-nav-wrapper #primary-menu a:focus-visible {
    border-color: var(--tfb-color-primary, #8A36F3);
    outline: none;
  }

  /* highlight current item if WP adds the class */
  .primary-nav-wrapper #primary-menu li.current-menu-item > a,
  .primary-nav-wrapper #primary-menu li.current_page_item > a {
    background: var(--tfb-color-primary, #8A36F3);
    color: #fff;
  }

  /* keep search visible on mobile,
     but hide ONLY while the menu is open */
  .primary-nav-wrapper.open ~ .form-search { display: none; }
}

/* ---------- Medium (765px–960px): move search + user pic to next row ---------- */
@media (min-width: 765px) and (max-width: 960px) {
  /* allow wrapping inside the header */
  .header .header__inner {
    display: flex;      /* safe even if already flex */
    flex-wrap: wrap;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    position: relative; /* keeps ≤550px absolute children working later */
  }

  /* top row: logo + primary nav */
  .header .header__logo { order: 1; }
  .header .primary-nav-wrapper { order: 2; margin-left: auto; }

  /* second row: search (left, fluid) + user menu (right) */
  .header .form-search {
    order: 3;
    flex: 1 1 60%;
    min-width: 280px;
  }
  .header .user-menu {
    order: 4;
    margin-left: auto;  /* pushes avatar to the right on the second row */
  }
}





/*------------------------------------*\
  Container
\*------------------------------------*/
.tfb-container {
  max-width: var(--bp-lg);
  margin: 0 auto;
  padding: 0 var(--tfb-space-md);
}

.section__inner { padding: 10rem 10px 40px 10px; }

/*------------------------------------*\
  Blog Header (Title + Subtitle)
\*------------------------------------*/
.tfb-blog-header {
  text-align: center;
  margin: var(--tfb-space-xxl) 0 var(--tfb-space-xl);
}
.tfb-blog-title {
  font-family: var(--tfb-font-heading);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
}
.tfb-blog-subtitle {
  font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  margin-top: var(--tfb-space-sm);
  color: var(--tfb-text-color);
}

/*------------------------------------*\
  Filter Bar (Category Pills)
\*------------------------------------*/
.tfb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tfb-space-md);
  background: var(--tfb-color-secondary);
  padding: var(--tfb-space-md) var(--tfb-space-xl);
  border-radius: 0.5rem;
  margin-bottom: var(--tfb-space-xl);
}

/* Pills - shared styles */
.tfb-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tfb-space-sm);
}
.tfb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding: var(--tfb-space-xs) var(--tfb-space-md);
  background: #d3baeb;
  border-radius: 0.5rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--tfb-text-color);
  transition: background 0.2s, color 0.2s, outline-color 0.2s;
  outline: 0 solid transparent;
}
.tfb-pill:hover { background: #cdb0ea; }
.tfb-pill--active,
.tfb-pill--active:hover {
  background: var(--tfb-color-primary);
  color: #fff;
}
.tfb-pill--all {
  background: transparent;
  border: 0.125rem solid var(--tfb-color-primary);
  color: var(--tfb-color-primary);
}
.tfb-pill--all:hover {
  background: var(--tfb-color-primary);
  color: #fff;
}

/* Desktop: show pills inline, hide mobile toggle */
.tfb-category-pills--desktop { display: flex; }
.tfb-category-pills--mobile  { display: none; }

/* ---------- Mobile collapsible ---------- */
@media (max-width: 640px) {
  /* Hide desktop, show mobile */
  .tfb-category-pills--desktop { display: none; }
  .tfb-category-pills--mobile  { display: block; width: 100%; }

  /* Summary styled like a pill */
  .tfb-filter-collapsible > summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.2;
    padding: 0.4rem 0.75rem;
    min-height: 2.2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    background: #d3baeb;
    border: 0.125rem solid #cdb0ea;
    color: var(--tfb-text-color);
  }
  .tfb-filter-collapsible > summary::-webkit-details-marker { display: none; }

  /* Hamburger icon */
  .tfb-filter-collapsible > summary .tfb-filter-icon {
    width: 16px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
    border-radius: 2px;
    margin-left: 0.25rem;
  }

  /* Space when open */
  .tfb-filter-collapsible[open] .tfb-category-pills {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tfb-space-sm);
  }
}



/*------------------------------------*\
  Hero Featured (1-col -> 2-col at md)
\*------------------------------------*/
.tfb-hero-featured {
  display: grid;
  grid-template-columns: 1fr 1fr; /* even split between image/text */
  gap: 20px;
  align-items: stretch;
  background-color: #e7d4fb; /* your purple background */
  border-radius: 10px;
  padding: 20px;
}

/* Image container */
.tfb-hero-featured .tfb-hero-image {
  border-radius: 10px;
  overflow: hidden;
}

.tfb-hero-featured .tfb-hero-image img {
    max-width: 100%;
    max-height: 330px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.tfb-hero-title {
  font-family: var(--tfb-font-heading);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: var(--tfb-space-md);
  text-transform: capitalize;
}
.tfb-hero-excerpt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: var(--tfb-space-lg);
}
.tfb-hero-cta {
  display: inline-block;
  background: var(--tfb-color-primary);
  color: #fff;
  padding: var(--tfb-space-sm) var(--tfb-space-xl);
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
}

/* Stack hero on very small screens */
@media screen and (max-width: 600px) {
  .tfb-hero-featured { grid-template-columns: 1fr !important; gap: var(--tfb-space-md); }
  .tfb-hero-image, .tfb-hero-content { width: 100%; }
  .tfb-hero-image img { width: 100%; height: auto; }
  .tfb-hero-content { padding: var(--tfb-space-md) 0; }
  .tfb-hero-cta { display: block; width: 100%; text-align: center; margin-top: var(--tfb-space-md); }
}

/*------------------------------------*\
  Post Grid — fixed columns by breakpoint
\*------------------------------------*/
.tfb-post-grid {
  display: grid;
  gap: var(--tfb-space-lg);
  grid-template-columns: 1fr;            /* phones: 1 col */
}

/* tablets: 2 cols */
@media (min-width: 768px) {
  .tfb-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* desktop+: 3 cols (always stays 3 even on last page) */
@media (min-width: 1200px) {
  .tfb-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tfb-post-card {
  background: var(--tfb-color-tertiary);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s;
}
.tfb-post-card:hover { transform: translateY(-0.25rem); }
.tfb-card-image img {
  border: 10px solid var(--tfb-color-tertiary);
  border-radius: 16px;
  width: 100%;
  display: block;
}
.tfb-card-body { padding: var(--tfb-space-md); }
.tfb-card-title {
  font-family: var(--tfb-font-heading);
  margin: 0 0 var(--tfb-space-sm);
  text-transform: none;
}
.tfb-card-excerpt {
  font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  margin-bottom: var(--tfb-space-sm);
  color: #333;
}
.tfb-card-date {
  font-size: 0.75rem;
  color: #444;
}
.tfb-post-card .tfb-card-date {
	margin-top: auto;
	align-self: flex-start;
}


/* Blog Post Back link */
.tfb-back-nav { margin: var(--tfb-space-md) 0 var(--tfb-space-sm); }
.tfb-back-link {
  text-decoration: none;
  color: var(--tfb-color-primary);
  font-weight: 600;
}
.tfb-back-link:hover,
.tfb-back-link:focus { text-decoration: underline; }

/* Prominent author block */
.tfb-author-block {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--tfb-space-md);
  align-items: start;
  margin: var(--tfb-space-lg) 0 var(--tfb-space-xl);
}
.tfb-author-avatar img { border-radius: 50%; display:block; }
.tfb-author-name {
  margin: 0;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  text-transform: none;
}
.tfb-author-name a { color: var(--tfb-text-color); text-decoration: none; }
.tfb-author-name a:hover { text-decoration: underline; }
.tfb-author-title {
  margin: .15rem 0 .5rem;
  color: #555;
  font-size: .95rem;
}
.tfb-author-byline {
  margin: 0 0 .5rem 0;
  color: #666;
  font-size: .95rem;
}
.tfb-author-bio {
  margin: 0;
  color: #333;
  max-width: 60ch;
  line-height: 1.5;
}

.tfb-author-follow {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #666;
}
.tfb-follow-icon svg {
  width: 18px; height: 18px;
  display: inline-block;
  vertical-align: middle;
  transition: color .2s ease, transform .2s ease;
  color: #111; /* brand-neutral; change if you like */
}

.tfb-follow-icon:hover svg {
	color: #1da1f2;
	transform: translateY(-1px);
}



@media (max-width: 560px) {
  .tfb-author-block { grid-template-columns: 64px 1fr; }
}


/*------------------------------------*\
  Subscribe Block
\*------------------------------------*/
.tfb-subscribe-block {
  background: var(--tfb-color-secondary) url(https://trustyfans.com/build/assets/footer-bg-BdqXOgTe.svg) no-repeat center / cover;
  padding: var(--tfb-space-xl);
  border-radius: 0.5rem;
  text-align: center;
  margin: var(--tfb-space-lg) 0;
}
.tfb-subscribe-title {
  color: var(--tfb-color-primary) !important;
  margin: var(--tfb-space-sm) 0;
  font-weight: 800;
}
.tfb-subscribe-btn {
  background: var(--tfb-color-primary);
  color: #fff;
  padding: var(--tfb-space-sm) var(--tfb-space-lg);
  border: none;
  border-radius: 0.50rem;
  cursor: pointer;
}

.tfb-subscribe-privacy {
	font-size: clamp(0.75rem, 2vw, 0.875rem);
	margin: 10px 0 0 0;
}

.tfb-subscribe-privacy a {
  color: var(--tfb-color-primary);
}


/*------------------------------------*\
  Brevo (Sendinblue) Form Overrides
\*------------------------------------*/
#sib_signup_form_1 .sib_signup_box_inside_1 {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tfb-space-sm);
  justify-content: center;
  margin-top: var(--tfb-space-md);
}
#sib_signup_form_1 .sib-FIRSTNAME-area,
#sib_signup_form_1 .sib-email-area { margin: 0; padding: 0; }
#sib_signup_form_1 .sib-FIRSTNAME-area input,
#sib_signup_form_1 .sib-email-area input {
  width: 300px;
  padding: var(--tfb-space-md);
  border: 1px solid #ccc;
  border-radius: 0.50rem;
  font-family: var(--tfb-font-body);
  font-size: 1rem;
  color: var(--tfb-text-color);
}
#sib_signup_form_1 .sib_loader { text-align: center; width: 100%; margin-bottom: var(--tfb-space-md); }
#sib_signup_form_1 .sib-default-btn {
  background: var(--tfb-color-primary);
  color: #fff;
  padding: var(--tfb-space-sm) var(--tfb-space-lg);
  border: none;
  border-radius: 0.50rem;
  cursor: pointer;
  font-family: var(--tfb-font-body);
  font-size: 1rem;
  transition: background 0.2s;
}
#sib_signup_form_1 .sib-default-btn:hover { background: #7222cc; }
.tfb-subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tfb-space-sm);
  justify-content: center;
  margin: 0.75em 0 0 0;
}
#sib_signup_form_1 p { margin: 0; }

/* Brevo alert messages */
form#sib_signup_form_1 .sib_signup_box_inside_1 .sib_msg_disp {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0;
  order: -1; /* before inputs */
}
form#sib_signup_form_1 .sib_msg_disp > p.sib-alert-message {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  box-sizing: border-box;
}
form#sib_signup_form_1 .sib_msg_disp > p.sib-alert-message-error {
  background-color: #FDEDF9;
  border: 1px solid var(--tfb-color-tertiary);
  color: var(--tfb-color-primary);
}
form#sib_signup_form_1 .sib_msg_disp > p.sib-alert-message-success {
  background: none; border: none; color: var(--tfb-text-color);
}
form#sib_signup_form_1 .sib_msg_disp > p.sib-alert-message-warning {
  background-color: #FFF9E5;
  border: 1px solid #FFE58F;
  color: #B36B00;
}

/* Stack Brevo form fields on small screens */
@media screen and (max-width: 570px) {
  #sib_signup_form_1 .sib_signup_box_inside_1 { flex-direction: column; align-items: center; }
  #sib_signup_form_1 .sib-FIRSTNAME-area input,
  #sib_signup_form_1 .sib-email-area input { width: 100% !important; max-width: none; }
  #sib_signup_form_1 .sib-default-btn { width: 100%; max-width: none; text-align: center; }
}

/*------------------------------------*\
  Single Post Hero
\*------------------------------------*/
.tfb-single-hero-image {
  height: clamp(16rem, 25vw, 24rem);
  overflow: hidden;
  margin-inline: -10px;
}
.tfb-single-hero-image img {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  object-fit: cover;
  object-position: center 30%;
}

/*------------------------------------*\
  Post Content & Share
\*------------------------------------*/
.tfb-post-header {
  padding: 0 var(--tfb-space-md);
  margin: var(--tfb-space-xl) 0 var(--tfb-space-lg);
}
.tfb-post-title {
  font-family: var(--tfb-font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 var(--tfb-space-md);
}
.tfb-post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #555; /* slightly stronger contrast */
  margin-bottom: var(--tfb-space-lg);
}
.tfb-post-content {
  padding: 0 var(--tfb-space-md);
  margin-bottom: var(--tfb-space-xl);
}
.tfb-post-content h2,
.tfb-post-content h3,
.tfb-post-content h4,
.tfb-post-content h5,
.tfb-post-content h6 { text-transform: none; }
.tfb-post-content h3,
.tfb-post-content h4,
.tfb-post-content h5,
.tfb-post-content h6 { padding: 0.5rem 0 0 0; }
.tfb-post-content h2 { padding: 2.5rem 0 1rem; }
.tfb-post-content h2:first-child { padding: 1rem 0; }
.tfb-post-content p + p { margin-top: var(--tfb-space-md); }
.tfb-post-content a,
.tfb-post-content a:visited,
.tfb-post-content a:hover,
.tfb-post-content a:active,
.tfb-post-content a:focus {
  color: var(--tfb-color-primary);
  text-decoration: underline;
}

/* Author avatar/name inline */
.tfb-post-meta-author { display: inline-flex; align-items: center; gap: var(--tfb-space-md); }
.tfb-post-meta-author img {
  margin-right: 0;
  width: 40px; height: 40px; border-radius: 25%;
}

/* Gutenberg buttons */
.wp-block-button { text-align: center; margin: var(--tfb-space-lg) 0; }
.wp-block-button .wp-block-button__link {
  display: inline-block;
  padding: var(--tfb-space-sm) var(--tfb-space-lg);
  margin: var(--tfb-space-lg) 0 var(--tfb-space-sm) 0;
  background-color: var(--tfb-color-primary);
  color: #fff;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
  background-color: var(--tfb-color-primary);
  color: #fff;
  text-decoration: none;
}
@media (max-width: 480px) {
  .wp-block-button .wp-block-button__link { width: 100%; box-sizing: border-box; }
}

/* Wide/full image alignments (single copy) */
.alignwide .wp-block-image img,
.wp-block-image.alignwide img { max-width: 100%; }

.alignfull .wp-block-image img,
.wp-block-image.alignfull img {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}
.wp-block-image img{
	border-radius:8px;
}

@media (max-width: 500px) {
  .wp-block-image .alignright, .wp-block-image .alignleft {
    width: 100%;
    height: auto;
  }
	.wp-block-image img {
		width:100%;
	}
}


/* Share icons */
.tfb-post-share {
  display: flex;
  align-items: center;
  gap: var(--tfb-space-sm);
  padding: 0 var(--tfb-space-md);
  margin-bottom: var(--tfb-space-xl);
  overflow: visible; /* allow “Copied!” label to show */
}
.tfb-share-icon {
  width: 2.5rem; height: 2.5rem;
  background: var(--tfb-color-primary); color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
}
.tfb-share-icon.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  speak: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 1.25rem; line-height: 1;
}
.tfb-share-twitter {
  background-image: url('https://trustyfans.com/build/assets/logo-x-Z2gUQ9zd.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60% 60%;
}
/* “Copied!” state becomes a text label */
.tfb-share-copy.copied {
  display: inline-block; position: relative;
  width: auto !important; height: auto !important;
  padding: 0 !important; margin-left: 0.5rem;
  background: none !important; color: var(--tfb-text-color) !important;
  font-family: var(--tfb-font-body) !important; font-size: 1rem !important; line-height: 1.2 !important;
  border: none !important;
}

/*------------------------------------*\
  Related Posts Carousel
\*------------------------------------*/
.tfb-related-posts { margin: var(--tfb-space-xxl) 0; text-align: center; }
.tfb-related-title {
  font-family: var(--tfb-font-heading);
  font-size: clamp(1.75rem, 5vw, 2rem);
  margin-bottom: var(--tfb-space-lg);
}
.tfb-related-carousel { position: relative; max-width: var(--bp-lg); margin: 0 auto; overflow: visible; }
.tfb-carousel-window { overflow: hidden; }
.tfb-carousel-track { display: flex; gap: var(--tfb-space-lg); transition: transform 0.3s ease; }
.tfb-carousel-track > * { flex: 0 0 calc((100% - 2 * var(--tfb-space-lg)) / 3); }

.tfb-carousel-prev,
.tfb-carousel-next {
  position: absolute; top: 50%;
  width: 36px; height: 36px;
  background: #fff;
  border: 1px solid var(--tfb-color-primary);
  border-radius: 50%;
  color: var(--tfb-color-primary);
  font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  transform: translateY(-50%);
}
.tfb-carousel-prev { left: 0;  transform: translate(-50%, -50%); }
.tfb-carousel-next { right: 0; transform: translate( 50%, -50%); }

.tfb-carousel-dots { margin-top: var(--tfb-space-lg); }
.tfb-carousel-dots button {
  width: 25px; height: 5px;
  margin: 0 var(--tfb-space-xs);
  background: #ddd; border: none; border-radius: 20px; cursor: pointer;
}
.tfb-carousel-dots button.active { background: var(--tfb-color-primary); }

/* 2-at-a-time on tablet; 1-at-a-time on very small */
@media (max-width: 768px) {
  .tfb-carousel-track > * { flex: 0 0 calc((100% - var(--tfb-space-lg)) / 2); }
}
@media (max-width: 500px) {
  .tfb-related-carousel .tfb-carousel-track > * { flex: 0 0 100% !important; }
}

/*------------------------------------*\
  Pagination (arrows + dots)
\*------------------------------------*/
.tfb-pagination {
  display: flex; justify-content: center; align-items: center;
  margin: var(--tfb-space-xl) 0; gap: var(--tfb-space-lg);
}
.tfb-pagination-arrows a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0 var(--tfb-space-sm);
  background: #fff; border: 2px solid var(--tfb-color-primary); border-radius: 50%;
  color: var(--tfb-color-primary); text-decoration: none; font-size: 1.25rem;
  transition: background 0.2s, color 0.2s;
}
.tfb-pagination-arrows a:hover { background: var(--tfb-color-primary); color: #fff; }
.tfb-pagination-arrows a.prev:before { content: '‹'; }
.tfb-pagination-arrows a.next:after  { content: '›'; }
.tfb-pagination-arrows a span { display: none; }

.tfb-pagination-numbers { display: flex; gap: var(--tfb-space-sm); }
.tfb-pagination-numbers .page-numbers {
  margin: 0; padding: var(--tfb-space-xs);
  background: none; border: none; color: var(--tfb-text-color);
  font-size: 0.875rem; text-decoration: none;
}
.tfb-pagination-numbers .current { font-weight: bold; }

/* Native WP pagination: centered dots with edge arrows */
.navigation.pagination {
  position: relative;
  padding: 0 var(--tfb-space-lg);
  margin-bottom: var(--tfb-space-xxl);
}
.navigation.pagination .nav-links {
  display: flex; justify-content: center; align-items: center; width: 100%;
  gap: var(--tfb-space-xs);
}
.navigation.pagination .nav-links .page-numbers:not(.prev):not(.next) {
  width: 25px; height: 5px; padding: 0; border-radius: 20px;
  background: var(--tfb-color-secondary); text-indent: -9999px; overflow: hidden;
  border: none; cursor: pointer;
}
.navigation.pagination .nav-links .page-numbers.current:not(.prev):not(.next) {
  background: var(--tfb-color-primary); border-color: var(--tfb-color-primary);
}
.navigation.pagination .nav-links .prev.page-numbers,
.navigation.pagination .nav-links .next.page-numbers {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; line-height: 2.5rem; text-align: center;
  background: #fff; border: 2px solid var(--tfb-color-primary);
  border-radius: 50%; color: var(--tfb-color-primary); font-size: 2.25rem;
  padding: 0; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.navigation.pagination .nav-links .prev.page-numbers { left: 0; }
.navigation.pagination .nav-links .next.page-numbers { right: 0; }
.navigation.pagination .nav-links .prev.page-numbers:hover,
.navigation.pagination .nav-links .next.page-numbers:hover {
  background: var(--tfb-color-primary); color: #fff;
}

/*------------------------------------*\
  Footer Social Icons
\*------------------------------------*/
.socials a img { width: 24px; height: 24px; object-fit: contain; }
.socials a[href*="bluesky"] img { width: 24px; height: 24px; }

/*------------------------------------*\
  Blog CTA Blocks
\*------------------------------------*/
.tfb-cta {
  padding: var(--tfb-space-xl);
  border-radius: 0.5rem;
  text-align: center;
  margin: var(--tfb-space-lg) 0;
}
.tfb-cta.tf-cta--light{
  background: var(--tfb-color-secondary) url(https://trustyfans.com/build/assets/footer-bg-BdqXOgTe.svg) no-repeat center / cover;
}
.tfb-cta.tf-cta--dark{
  background: var(--tfb-color-tertiary) url(https://trustyfans.com/build/assets/footer-bg-BdqXOgTe.svg) no-repeat center / cover;
}
.tfb-cta__title {
  color: var(--tfb-color-primary) !important;
  margin: var(--tfb-space-sm) 0;
  font-weight: 800;
}
.tfb-cta__subtitle { padding: 0 var(--tfb-space-xxl); }
@media screen and (max-width: 760px) { .tfb-cta__subtitle { padding: 0; } }

a.tfb-btn,
a.tfb-btn:link,
a.tfb-btn:visited {
  background: var(--tfb-color-primary);
  color: #fff;
  text-decoration: none;
  padding: var(--tfb-space-sm) var(--tfb-space-lg);
  border: none;
  border-radius: 0.50rem;
  cursor: pointer;
  display: inline-block;
  margin: var(--tfb-space-lg) auto 0;
}
a.tfb-btn:hover,
a.tfb-btn:focus-visible {
  background: var(--tfb-color-primary);
  color: #fff;
  text-decoration: none;
}

.user-menu {
    position: relative;
    min-width: 75px;

    @media screen and (max-width: 1023px) {
        min-width: 55px;
    }

    @media screen and (max-width: 500px) {
        min-width: 90px;
    }

    .user-menu__head {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }

    .user-menu__head img {
        width: 48px;
        min-width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: 100%;
        overflow: hidden;
    }

    .user-menu__head span {
        position: relative;
        width: 20px;
        height: 20px;

        &:after {
            content: "";
            position: absolute;
            top: calc(50% - 6px);
            left: calc(50% - 1px);
            display: block;
            width: 8px;
            height: 8px;
            border-width: 0 2px 2px 0;
            border-color: var(--c-purple);
            transform: rotate(45deg);
            transition: transform 0.1s linear;
        }
    }

    &.is-active .user-menu__head span:after {
        top: calc(50% - 3px);
        transform: rotate(-135deg);
    }

    .user-menu__body {
        position: absolute;
        width: 100%;
        top: 115%;
        right: -25%;
        min-width: 200px;
        z-index: 20;
        display: flex;
        flex-direction: column;
        gap: 4px;
        background-color: var(--c-white);
        padding: 4px;
        border-radius: 10px;
        box-shadow: 0px 5px 20px 5px rgba(0, 0, 0, 0.05);

        @media screen and (max-width: 767px) {
            right: 0;
        }
		
		svg {
			width: 24px;
			height: 24px;
		}
		
		a {
			text-decoration: none;
		}
    }

    .user-menu__body a {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 8px;
        padding: 18.4px 12px;
        border-radius: 10px;
        font-size: 16px;
        font-family: Arial, sans-serif;
        font-weight: 400;

    }

    .user-menu__body a:hover,
    .user-menu__body a.is-active {
        background-color: var(--c-soft-white);
        color: var(--c-purple);
    }

    .user-menu__body a img {
        width: 24px;
        height: 24px;
    }
}

[x-cloak] {
	display: none;
}
