/* =========================================================
   Blog Listing + Single Post
   ========================================================= */

:root{
  --afb-blue: #2563eb;
  --afb-blue-dark: #1d4ed8;
  --afb-ink: #111827;
  --afb-muted: #6b7280;
  --afb-border: #e5e7eb;
  --afb-bg-soft: #f8fafc;
  --afb-white: #ffffff;
  --afb-radius: 14px;
  --afb-radius-sm: 10px;
  --afb-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --afb-shadow-hover: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.afb-container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- BREADCRUMB ---------- */
.afb-breadcrumb{
  padding: 0 0 18px 0;
  font-size: 13px;
  color: var(--afb-muted);
}
.afb-breadcrumb a{
  color: var(--afb-muted);
  text-decoration: none;
}
.afb-breadcrumb a:hover{ color: var(--afb-blue); }
.afb-breadcrumb span[aria-hidden]{ margin: 0 6px; }
.afb-breadcrumb span:last-child{ color: var(--afb-ink); }

/* ---------- HERO ---------- */
.afb-hero {
    background: linear-gradient(120deg, #eef3ff 0%, #f8fafc 60%);
    padding: 0;
    overflow: hidden;
    min-height: 320px;
}

.afb-hero__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.afb-eyebrow{
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--afb-blue);
  margin-bottom: 12px;
}

.afb-hero__heading{
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  color: var(--afb-ink);
  margin: 0 0 14px;
}

.afb-hero__desc{
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--afb-muted);
  max-width: 48ch;
  margin: 0;
}

.afb-hero__art{
  display: flex;
  justify-content: center;
}
.afb-hero__art img{
  max-width: 114%;
  height: auto;
  border-radius: var(--afb-radius);
}

.afb-hero__placeholder{
  width: 100%;
  max-width: 380px;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #dbe4ff 0%, #f0f4ff 100%);
  border-radius: var(--afb-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.afb-hero__laptop{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.afb-hero__laptop-icon{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--afb-white);
  color: var(--afb-blue);
  font-weight: 800;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--afb-shadow);
}
.afb-hero__laptop-label{
  font-weight: 700;
  color: var(--afb-ink);
}

/* ---------- LISTING HEAD ---------- */
.afb-listing{
  padding: 48px 0 64px;
}

.afb-listing__head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.afb-listing__head h2{
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  color: var(--afb-ink);
  margin: 0 0 6px;
}
.afb-listing__head p{
  color: var(--afb-muted);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- SEARCH ---------- */
.afb-search{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--afb-white);
  border: 1px solid var(--afb-border);
  border-radius: 999px;
  padding: 10px 18px;
  min-width: 280px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.afb-search:focus-within{
  border-color: var(--afb-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.afb-search svg{ color: var(--afb-muted); flex-shrink: 0; }
.afb-search input{
  border: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  width: 100%;
  background: transparent;
  color: var(--afb-ink);
}
.afb-search input::placeholder{ color: #9ca3af; }

/* ---------- GRID / CARDS ---------- */
.afb-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.afb-card{
  background: var(--afb-white);
  border: 1px solid var(--afb-border);
  border-radius: var(--afb-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--afb-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.afb-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--afb-shadow-hover);
  border-color: #dbe4ff;
}

.afb-card__media{
  display: block;
  aspect-ratio: 18/10;
  background: linear-gradient(135deg, #e7edff 0%, #f4f7ff 100%);
  overflow: hidden;
  position: relative;
}
.afb-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.afb-card:hover .afb-card__media img{ transform: scale(1.06); }

.afb-card__media-fallback{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  color: var(--afb-blue);
}

.afb-card__body{
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.afb-card__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}

.afb-card__category{
  color: var(--afb-blue);
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
}
a.afb-card__category:hover{ text-decoration: underline; }

.afb-card__date{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--afb-muted);
}

.afb-card__title{
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.afb-card__title a{
  color: var(--afb-ink);
  text-decoration: none;
}
.afb-card__title a:hover{ color: var(--afb-blue); }

.afb-card__excerpt{
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--afb-muted);
  margin: 0;
  flex: 1;
}

.afb-readmore{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--afb-blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-top: 4px;
  transition: gap .2s ease, color .2s ease;
}
.afb-readmore svg{ transition: transform .2s ease; }
.afb-readmore:hover{ gap: 10px; color: var(--afb-blue-dark); }
.afb-readmore:hover svg{ transform: translateX(2px); }

.afb-no-posts{
  text-align: center;
  color: var(--afb-muted);
  padding: 48px 0;
}

/* ---------- PAGINATION ---------- */
.afb-pagination{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.afb-pagination__item a,
.afb-pagination__item span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--afb-radius-sm);
  border: 1px solid var(--afb-border);
  background: var(--afb-white);
  color: var(--afb-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .18s ease;
}
.afb-pagination__item a:hover{
  border-color: var(--afb-blue);
  color: var(--afb-blue);
}
.afb-pagination__item span.current{
  background: var(--afb-ink);
  border-color: var(--afb-ink);
  color: #fff;
}
.afb-pagination__item span.dots{
  border: none;
  background: none;
}

/* ---------- NEWSLETTER ---------- */
.afb-newsletter{
  padding: 0 0 64px;
}
.afb-newsletter__inner{
  background: linear-gradient(120deg, #eaf0ff 0%, #f4f7ff 100%);
  border: 1px solid #dbe4ff;
  border-radius: 18px;
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  box-shadow: 10px 10px 24px rgba(15, 23, 42, 0.06);
}

.afb-newsletter__icon{
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--afb-white);
  color: var(--afb-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--afb-shadow);
}
.afb-newsletter__icon svg {
    width: 60%;
    height: 60%;
}

.afb-newsletter__label{
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--afb-blue);
  margin-bottom: 4px;
}
.afb-newsletter__text h3{
  font-size: 19px;
  font-weight: 800;
  color: var(--afb-ink);
  margin: 0 0 4px;
}
.afb-newsletter__text p{
  font-size: 13.5px;
  color: var(--afb-muted);
  margin: 0;
}

.afb-newsletter__form{
  display: flex;
  position: relative;
  flex-wrap: wrap;
}
.afb-newsletter__input-wrap{
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--afb-white);
  border: 1px solid var(--afb-border);
  border-radius: 10px 0 0 10px;
  padding: 0 14px;
  min-width: 240px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.afb-newsletter__input-wrap:focus-within{
  border-color: var(--afb-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.afb-newsletter__input-wrap svg{ color: var(--afb-muted); flex-shrink: 0; }
.afb-newsletter__input-wrap input{
  border: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  padding: 11px 0;
  width: 100%;
  background: transparent;
}

.afb-newsletter__form button{
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--afb-blue);
  border: none;
  border-radius: 0 10px 10px 0;
  padding: 0 22px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.afb-newsletter__form button:hover{
  background: var(--afb-blue-dark);
  transform: translateY(-2px);
}

.afb-newsletter__success{
  width: 100%;
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #15803d;
}

/* ---------- SINGLE POST ---------- */
.afb-single__head{
  padding: 8px 0 24px;
  max-width: 1130px;
}
.afb-single__meta{ justify-content: flex-start; gap: 18px; margin-bottom: 14px; }
.afb-single__title{
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--afb-ink);
  margin: 0 0 12px;
}
.afb-single__excerpt{
  font-size: 16px;
  line-height: 1.6;
  color: var(--afb-muted);
  margin: 0;
}

.afb-single__thumb{
  border-radius: var(--afb-radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--afb-shadow);
}
.afb-single__thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.afb-single__body{
  max-width: 1180px;
  padding-bottom: 48px;
}
.image_with_text {
    align-items: center;
    gap: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.image_with_text > p > img {
    width: 100%;
    border: 3px solid #2563EB;
        box-shadow: 0 0 40px 13px rgb(58 58 58 / 12%);
}
.afb-single__content{
  font-size: 16px;
  line-height: 1.8;
  color: #1f2937;
}
.afb-single__content h2{ font-size: 24px; font-weight: 800; margin: 32px 0 14px; color: var(--afb-ink); }
.afb-single__content h3{ font-size: 20px; font-weight: 700; margin: 28px 0 12px; color: var(--afb-ink); }
.afb-single__content p{ margin: 0 0 18px; }
.afb-single__content ul,
.afb-single__content ol{ margin: 0 0 18px 22px; padding: 0; }
.afb-single__content li{ margin-bottom: 8px; }
.afb-single__content a{ color: var(--afb-blue); text-decoration: underline; }
.afb-single__content img{ max-width: 100%; height: auto; border-radius: var(--afb-radius-sm); margin: 8px 0 20px; }
.afb-single__content blockquote{
  border-left: 3px solid var(--afb-blue);
  background: var(--afb-bg-soft);
  padding: 14px 20px;
  margin: 0 0 20px;
  color: var(--afb-muted);
  font-style: italic;
  border-radius: 0 var(--afb-radius-sm) var(--afb-radius-sm) 0;
}
.afb-single__content pre,
.afb-single__content code{
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--afb-radius-sm);
}
.afb-single__content pre{ padding: 16px; overflow-x: auto; margin: 0 0 20px; }
.afb-single__content code{ padding: 2px 6px; font-size: 13.5px; }

.afb-single__tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}
.afb-single__tags a{
  font-size: 13px;
  font-weight: 600;
  color: var(--afb-blue);
  background: #eef3ff;
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background .2s ease;
}
.afb-single__tags a:hover{ background: #dbe4ff; }

.afb-single__author{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--afb-bg-soft);
  border: 1px solid var(--afb-border);
  border-radius: var(--afb-radius);
  margin-top: 24px;
}
.afb-single__author img{ border-radius: 50%; }
.afb-single__author strong{ display: block; color: var(--afb-ink); font-size: 15px; }
.afb-single__author span{ display: block; color: var(--afb-muted); font-size: 13px; margin-top: 2px; }

/* ---------- RELATED ---------- */
.afb-related{ padding: 8px 0 56px; }
.afb-related__heading{
  font-size: 22px;
  font-weight: 800;
  color: var(--afb-ink);
  margin: 0 0 24px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px){
  .afb-grid{ grid-template-columns: repeat(2, 1fr); }
  .afb-newsletter__inner{ grid-template-columns: 1fr; text-align: center; }
  .afb-newsletter__icon{ margin: 0 auto; }
  .afb-newsletter__form{ justify-content: center; }
}

@media (max-width: 860px){
  .afb-hero__grid{ grid-template-columns: 1fr; }
  .afb-hero__art{ order: -1; }
  .afb-listing__head{ flex-direction: column; align-items: stretch; }
  .afb-search{ width: 100%; }
}

@media (max-width: 640px){
  .afb-grid{ grid-template-columns: 1fr; }
  .afb-newsletter__input-wrap{ min-width: 0; flex: 1; }
  .afb-single__author{ flex-direction: column; text-align: center; }
  .afb-container.afb-hero__grid {
      padding-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce){
  .afb-card, .afb-card__media img, .afb-readmore, .afb-readmore svg, .afb-newsletter__form button{
    transition: none;
  }
}
