/* ========================================
   48 Technologies — Editorial Blog Stylesheet
   Loaded only on the blog/archive pages
   ======================================== */

/* --- Custom Properties --- */
.editorial-blog {
  --eb-font-display: 'Instrument Serif', Georgia, serif;
  --eb-font-body: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --eb-text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --eb-text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --eb-text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --eb-text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --eb-text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --eb-text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3rem);

  --eb-space-1:  0.25rem;
  --eb-space-2:  0.5rem;
  --eb-space-3:  0.75rem;
  --eb-space-4:  1rem;
  --eb-space-5:  1.25rem;
  --eb-space-6:  1.5rem;
  --eb-space-8:  2rem;
  --eb-space-10: 2.5rem;
  --eb-space-12: 3rem;
  --eb-space-16: 4rem;
  --eb-space-20: 5rem;

  --eb-radius-sm: 0.375rem;
  --eb-radius-md: 0.5rem;
  --eb-radius-lg: 0.75rem;
  --eb-radius-full: 9999px;

  --eb-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --eb-transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --eb-max-width: 1200px;

  /* Light mode colors */
  --eb-bg:          #FAFAF8;
  --eb-surface:     #FFFFFF;
  --eb-surface-2:   #F5F4F0;
  --eb-border:      #E2E0DB;
  --eb-divider:     #ECEAE5;
  --eb-text:        #1A1A2E;
  --eb-text-muted:  #6B6B7B;
  --eb-text-faint:  #A8A8B5;
  --eb-primary:     #00B4D8;
  --eb-primary-hover: #0096B7;
  --eb-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
  --eb-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
}


/* --- Dark header to match the rest of 48tech.com --- */
.editorial-blog .header-wrap {
  display: block !important;
  position: relative;
  z-index: 100;
  background: #141f33;
}

.editorial-blog .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #141f33 !important;
}

/* Logo on dark background — no filter needed, logo is already designed for dark bg */
.editorial-blog .site-header .header-image {
  width: 120px !important;
  height: auto !important;
}

/* White nav links on dark header */
.editorial-blog .site-header .main-navigation {
  display: flex !important;
}

.editorial-blog .site-header .main-navigation a,
.editorial-blog .site-header .main-navigation .menu-toggle {
  color: #ffffff !important;
  font-family: inherit;
}

.editorial-blog .site-header .main-navigation a:hover {
  color: #5ce6e6 !important;
}

/* Contact nav button — cyan border to match site CTA style */
.editorial-blog .site-header .nav-button > a {
  border: 2px solid #5ce6e6 !important;
  border-radius: 4px;
  padding: 8px 20px !important;
  color: #ffffff !important;
}

.editorial-blog .site-header .nav-button > a:hover {
  background: #5ce6e6 !important;
  color: #141f33 !important;
}

/* Dropdown arrow / toggle icon in white */
.editorial-blog .site-header .dropdown-menu-toggle,
.editorial-blog .site-header .gp-icon svg {
  color: #ffffff !important;
  fill: #ffffff;
}

/* Sub-menu dropdown styling */
.editorial-blog .site-header .sub-menu {
  background: #1a2a44 !important;
  border: 1px solid rgba(92, 230, 230, 0.15);
}

.editorial-blog .site-header .sub-menu a {
  color: #ffffff !important;
}

.editorial-blog .site-header .sub-menu a:hover {
  background: rgba(92, 230, 230, 0.1) !important;
  color: #5ce6e6 !important;
}

/* GP top utility bar — dark navy background */
.editorial-blog .header-wrap > .gb-element-dca49d07 {
  display: flex !important;
  background: #0e1625 !important;
}


/* --- Override GeneratePress default BLOG content layout --- */
.editorial-blog .site-content {
  padding: 0 !important;
}

.editorial-blog #primary {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* Hide the default GeneratePress sidebar on blog page */
.editorial-blog #right-sidebar,
.editorial-blog #left-sidebar,
.editorial-blog .sidebar {
  display: none !important;
}

/* Hide default GP page header / archive title if present */
.editorial-blog .page-header,
.editorial-blog #primary > .entry-header {
  display: none;
}

/* Make content full width */
.editorial-blog .site-content .content-area {
  width: 100% !important;
  max-width: 100% !important;
}

/* Scope editorial styles ONLY to the blog content wrapper — not the GP header/footer */
.editorial-blog-wrap {
  font-family: var(--eb-font-body);
  color: var(--eb-text);
  background: var(--eb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent editorial font from bleeding into GP header */
.editorial-blog .site-header,
.editorial-blog .site-header * {
  font-family: inherit;
}

/* Fix: GP logo sizing — override any max-width/width conflicts */
.editorial-blog .site-header .site-logo img,
.editorial-blog .site-header .header-image.is-logo-image {
  width: 120px !important;
  max-width: 120px !important;
  height: auto !important;
}


/* ========================================
   HERO — Featured Post
   ======================================== */
.eb-hero {
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 1.5rem);
  background: var(--eb-bg);
}

.eb-hero__inner {
  max-width: var(--eb-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.eb-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--eb-space-2);
  font-size: var(--eb-text-xs);
  color: var(--eb-text-muted);
  font-weight: 500;
  margin-bottom: var(--eb-space-4);
  flex-wrap: wrap;
}

.eb-meta-dot {
  color: var(--eb-text-faint);
}

/* Shared badge styles */
.eb-badge {
  display: inline-block;
  padding: var(--eb-space-1) var(--eb-space-3);
  background: var(--eb-primary);
  color: #fff;
  font-size: var(--eb-text-xs);
  font-weight: 600;
  border-radius: var(--eb-radius-full);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
  font-family: var(--eb-font-body);
}

.eb-badge--sm {
  font-size: 0.6875rem;
  padding: 2px var(--eb-space-2);
}

.eb-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.eb-read-time svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.eb-hero__title {
  font-family: var(--eb-font-display);
  font-size: var(--eb-text-2xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--eb-space-5);
}

.eb-hero__title a {
  color: var(--eb-text);
  text-decoration: none;
}

.eb-hero__title a:hover {
  color: var(--eb-primary);
}

.eb-hero__excerpt {
  font-size: var(--eb-text-base);
  color: var(--eb-text-muted);
  line-height: 1.7;
  margin-bottom: var(--eb-space-6);
  max-width: 48ch;
}

.eb-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--eb-space-2);
  font-size: var(--eb-text-sm);
  font-weight: 600;
  color: var(--eb-primary);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: gap var(--eb-transition), color var(--eb-transition);
  font-family: var(--eb-font-body);
}

.eb-hero__cta:hover {
  gap: var(--eb-space-3);
  color: var(--eb-primary-hover);
}

.eb-hero__cta svg {
  transition: transform var(--eb-transition);
}

.eb-hero__cta:hover svg {
  transform: translateX(2px);
}

.eb-hero__image {
  border-radius: var(--eb-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--eb-surface-2);
}

.eb-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eb-hero__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--eb-surface-2);
  color: var(--eb-text-faint);
}

@media (max-width: 768px) {
  .eb-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--eb-space-6);
  }
  .eb-hero__image {
    order: -1;
  }
  .eb-hero__title {
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  }
}


/* ========================================
   CATEGORY FILTER
   ======================================== */
.eb-filter {
  padding: var(--eb-space-8) clamp(1rem, 3vw, 1.5rem) 0;
  background: var(--eb-bg);
}

.eb-filter__inner {
  max-width: var(--eb-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eb-space-4);
  flex-wrap: wrap;
  padding-bottom: var(--eb-space-6);
  border-bottom: 1px solid var(--eb-divider);
}

.eb-filter__label {
  font-family: var(--eb-font-display);
  font-size: var(--eb-text-xl);
  font-weight: 400;
  color: var(--eb-text);
  letter-spacing: -0.01em;
}

.eb-filter__buttons {
  display: flex;
  align-items: center;
  gap: var(--eb-space-2);
  flex-wrap: wrap;
}

.eb-filter__btn {
  padding: var(--eb-space-2) var(--eb-space-4);
  font-family: var(--eb-font-body);
  font-size: var(--eb-text-xs);
  font-weight: 500;
  color: var(--eb-text-muted);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-full);
  background: transparent;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all var(--eb-transition);
  cursor: pointer;
  white-space: nowrap;
}

.eb-filter__btn:hover {
  color: var(--eb-text);
  border-color: var(--eb-text-muted);
}

.eb-filter__btn--active {
  background: var(--eb-text);
  color: var(--eb-bg);
  border-color: var(--eb-text);
}


/* ========================================
   ARTICLE CARDS
   ======================================== */
.eb-articles {
  padding: var(--eb-space-10) clamp(1rem, 3vw, 1.5rem) var(--eb-space-16);
  background: var(--eb-bg);
}

.eb-articles__grid {
  max-width: var(--eb-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--eb-space-6);
}

.eb-articles__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--eb-text-muted);
  font-size: var(--eb-text-base);
  padding: var(--eb-space-16) 0;
}

.eb-card {
  border-radius: var(--eb-radius-lg);
  overflow: hidden;
  background: var(--eb-surface);
  border: 1px solid var(--eb-divider);
  transition: box-shadow 0.3s var(--eb-ease), transform 0.3s var(--eb-ease), border-color 0.3s var(--eb-ease);
}

.eb-card:hover {
  box-shadow: var(--eb-shadow-md);
  transform: translateY(-2px);
  border-color: var(--eb-border);
}

.eb-card:active {
  transform: translateY(0);
}

.eb-card[hidden] {
  display: none;
}

.eb-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.eb-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--eb-surface-2);
}

.eb-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--eb-ease);
}

.eb-card:hover .eb-card__image img {
  transform: scale(1.03);
}

.eb-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eb-text-faint);
}

.eb-card__body {
  padding: var(--eb-space-5);
}

.eb-card__meta {
  display: flex;
  align-items: center;
  gap: var(--eb-space-3);
  margin-bottom: var(--eb-space-3);
  font-size: var(--eb-text-xs);
  color: var(--eb-text-muted);
}

.eb-card__title {
  font-family: var(--eb-font-display);
  font-size: var(--eb-text-lg);
  font-weight: 400;
  color: var(--eb-text);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--eb-space-3);
}

.eb-card__excerpt {
  font-size: var(--eb-text-sm);
  color: var(--eb-text-muted);
  line-height: 1.6;
  margin-bottom: var(--eb-space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eb-card__date {
  display: block;
  font-size: var(--eb-text-xs);
  color: var(--eb-text-faint);
  font-weight: 500;
}


/* ========================================
   STICKY SUBSCRIBE BAR
   ======================================== */
.eb-subscribe {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--eb-surface);
  border-top: 1px solid var(--eb-divider);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(100%);
  transition: transform 0.4s var(--eb-ease);
}

.eb-subscribe--visible {
  transform: translateY(0);
}

.eb-subscribe--dismissed {
  transform: translateY(100%) !important;
}

.eb-subscribe__inner {
  max-width: var(--eb-max-width);
  margin: 0 auto;
  padding: var(--eb-space-4) clamp(1rem, 3vw, 1.5rem);
  display: flex;
  align-items: center;
  gap: var(--eb-space-4);
  flex-wrap: wrap;
}

.eb-subscribe__text {
  display: flex;
  align-items: center;
  gap: var(--eb-space-3);
  font-size: var(--eb-text-sm);
  font-weight: 500;
  color: var(--eb-text);
  flex: 1;
  min-width: 200px;
}

.eb-subscribe__text svg {
  flex-shrink: 0;
  color: var(--eb-primary);
}

.eb-subscribe__form {
  display: flex;
  gap: var(--eb-space-2);
  flex: 1;
  max-width: 380px;
}

.eb-subscribe__form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: var(--eb-space-2) var(--eb-space-4);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius-full);
  background: var(--eb-bg);
  font-size: var(--eb-text-sm);
  color: var(--eb-text);
  font-family: var(--eb-font-body);
}

.eb-subscribe__form input[type="email"]::placeholder {
  color: var(--eb-text-faint);
}

.eb-subscribe__form input[type="email"]:focus {
  outline: none;
  border-color: var(--eb-primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.eb-subscribe__form button {
  padding: var(--eb-space-2) var(--eb-space-5);
  background: var(--eb-primary);
  color: #fff;
  font-size: var(--eb-text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--eb-radius-full);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--eb-font-body);
  transition: background var(--eb-transition), transform var(--eb-transition);
}

.eb-subscribe__form button:hover {
  background: var(--eb-primary-hover);
}

.eb-subscribe__form button:active {
  transform: scale(0.97);
}

.eb-subscribe__dismiss {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--eb-text-faint);
  border-radius: var(--eb-radius-full);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--eb-transition), background var(--eb-transition);
}

.eb-subscribe__dismiss:hover {
  color: var(--eb-text-muted);
  background: var(--eb-surface-2);
}

@media (max-width: 640px) {
  .eb-subscribe__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--eb-space-3);
    position: relative;
    padding-right: calc(clamp(1rem, 3vw, 1.5rem) + 2.5rem);
  }
  .eb-subscribe__text span {
    font-size: var(--eb-text-xs);
  }
  .eb-subscribe__form {
    max-width: 100%;
  }
  .eb-subscribe__dismiss {
    position: absolute;
    top: var(--eb-space-2);
    right: var(--eb-space-2);
  }
}
