/* ═══════════════════════════════════════════════════════════════════
   TheHackersLog Homepage PRO — homepage.css
   Clean editorial style | v2.0.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom properties ──────────────────────────────────────────── */
:root {
  --thl-ink:        #0d1117;
  --thl-ink-2:      #1e293b;
  --thl-ink-3:      #334155;
  --thl-muted:      #64748b;
  --thl-border:     #e2e8f0;
  --thl-surface:    #ffffff;
  --thl-bg:         #f8fafc;
  --thl-blue:       #2563eb;
  --thl-blue-dk:    #1d4ed8;
  --thl-accent:     #0ea5e9;
  --thl-green:      #10b981;
  --thl-red:        #ef4444;
  --thl-amber:      #f59e0b;
  --thl-radius:     10px;
  --thl-radius-lg:  16px;
  --thl-shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --thl-shadow:     0 4px 20px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --thl-shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --thl-font-sans:  'Georgia', 'Times New Roman', serif; /* intentional editorial serif */
  --thl-font-ui:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --thl-transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ── Reset helpers ──────────────────────────────────────────────── */
.thl-hero *,
.thl-stats-bar *,
.thl-section *,
.thl-sub-section * {
  box-sizing: border-box;
}

/* ── Container ──────────────────────────────────────────────────── */
.thl-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════ */
.thl-hero {
  background: var(--thl-surface);
  border-bottom: 1px solid var(--thl-border);
  padding: 100px 24px 70px;
  text-align: center;
  animation: thlFadeUp .65s ease both;
}

.thl-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* Eye-brow */
.thl-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--thl-font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--thl-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 30px;
  padding: 6px 14px;
  margin-bottom: 28px;
}

.thl-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--thl-blue);
  animation: thlPulse 1.8s ease infinite;
  flex-shrink: 0;
}

.thl-hero-title {
  font-family: var(--thl-font-sans);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--thl-ink);
  margin: 0 0 20px;
}

.thl-hero-subtitle {
  font-family: var(--thl-font-ui);
  font-size: 18px;
  color: var(--thl-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}

.thl-hero-trust {
  font-family: var(--thl-font-ui);
  font-size: 14px;
  color: var(--thl-muted);
  margin: 0 0 36px;
}

/* Hero subscribe area */
.thl-hero-subscribe {
  margin-bottom: 20px;
}

/* Override MailPoet in hero context */
.thl-hero-subscribe .thl-mp-wrap form,
.thl-hero-subscribe .mailpoet_form {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.thl-hero-subscribe .thl-mp-wrap input[type="email"],
.thl-hero-subscribe .mailpoet_text {
  padding: 13px 16px !important;
  border: 1px solid var(--thl-border) !important;
  border-radius: var(--thl-radius) !important;
  font-size: 15px !important;
  width: 300px !important;
  max-width: 100% !important;
  outline: none !important;
  font-family: var(--thl-font-ui) !important;
  transition: border-color var(--thl-transition) !important;
  background: var(--thl-surface) !important;
  color: var(--thl-ink) !important;
}

.thl-hero-subscribe .thl-mp-wrap input[type="email"]:focus,
.thl-hero-subscribe .mailpoet_text:focus {
  border-color: var(--thl-blue) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

.thl-hero-subscribe .thl-mp-wrap input[type="submit"],
.thl-hero-subscribe .mailpoet_submit {
  padding: 13px 24px !important;
  background: var(--thl-ink) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--thl-radius) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  font-family: var(--thl-font-ui) !important;
  transition: background var(--thl-transition), transform var(--thl-transition) !important;
  white-space: nowrap !important;
}

.thl-hero-subscribe .thl-mp-wrap input[type="submit"]:hover,
.thl-hero-subscribe .mailpoet_submit:hover {
  background: var(--thl-blue) !important;
  transform: translateY(-1px) !important;
}

.thl-hero-badge {
  font-family: var(--thl-font-ui);
  font-size: 13px;
  color: var(--thl-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════════ */
.thl-stats-bar {
  background: var(--thl-bg);
  border-bottom: 1px solid var(--thl-border);
  padding: 40px 0;
}

.thl-stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.thl-stat-item {
  text-align: center;
  padding: 8px 40px;
  animation: thlFadeUp .55s ease both;
}

.thl-stat-item:nth-child(1) { animation-delay: .1s; }
.thl-stat-item:nth-child(3) { animation-delay: .2s; }
.thl-stat-item:nth-child(5) { animation-delay: .3s; }
.thl-stat-item:nth-child(7) { animation-delay: .4s; }

.thl-stat-sep {
  width: 1px;
  height: 44px;
  background: var(--thl-border);
  flex-shrink: 0;
}

.thl-stat-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
}

.thl-stat-num {
  display: block;
  font-family: var(--thl-font-sans);
  font-size: 26px;
  font-weight: 700;
  color: var(--thl-ink);
  line-height: 1;
}

.thl-stat-lbl {
  display: block;
  font-family: var(--thl-font-ui);
  font-size: 12px;
  color: var(--thl-muted);
  margin-top: 5px;
  letter-spacing: .03em;
}

.thl-platform-note {
  text-align: center;
  font-family: var(--thl-font-ui);
  font-size: 14px;
  color: var(--thl-muted);
  margin: 28px 0 0;
}

.thl-platform-note a {
  color: var(--thl-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thl-platform-note a:hover {
  color: var(--thl-blue-dk);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION WRAPPERS
   ═══════════════════════════════════════════════════════════════════ */
.thl-section {
  padding: 72px 0;
}

.thl-blogs-section {
  background: var(--thl-surface);
}

.thl-news-section {
  background: var(--thl-bg);
  border-top: 1px solid var(--thl-border);
}

.thl-section-head {
  text-align: center;
  margin-bottom: 48px;
}

.thl-section-title {
  font-family: var(--thl-font-sans);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--thl-ink);
  letter-spacing: -.02em;
  margin: 0 0 10px;
}

.thl-section-sub {
  font-family: var(--thl-font-ui);
  font-size: 16px;
  color: var(--thl-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORY TABS
   ═══════════════════════════════════════════════════════════════════ */
.thl-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.thl-tab {
  font-family: var(--thl-font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 30px;
  border: 1px solid var(--thl-border);
  background: var(--thl-surface);
  color: var(--thl-ink-3);
  cursor: pointer;
  transition: all var(--thl-transition);
  white-space: nowrap;
}

.thl-tab:hover {
  border-color: #94a3b8;
  color: var(--thl-ink);
}

.thl-tab.active {
  background: var(--thl-ink);
  border-color: var(--thl-ink);
  color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════
   POST GRID
   ═══════════════════════════════════════════════════════════════════ */
.thl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ═══════════════════════════════════════════════════════════════════
   POST CARD
   ═══════════════════════════════════════════════════════════════════ */
.thl-card {
  background: var(--thl-surface);
  border: 1px solid var(--thl-border);
  border-radius: var(--thl-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--thl-transition), transform var(--thl-transition), border-color var(--thl-transition);
  display: flex;
  flex-direction: column;
  animation: thlFadeUp .5s ease both;
}

.thl-card:hover {
  box-shadow: var(--thl-shadow-lg);
  transform: translateY(-3px);
  border-color: transparent;
}

/* Card image */
.thl-card-img-link {
  display: block;
  overflow: hidden;
}

.thl-card-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.thl-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.thl-card:hover .thl-card-img {
  transform: scale(1.04);
}

/* Card body */
.thl-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Meta row */
.thl-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-family: var(--thl-font-ui);
  font-size: 12px;
  color: var(--thl-muted);
}

.thl-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #f1f5f9;
  color: var(--thl-ink-3);
}

/* Category-specific badge colours */
.thl-badge--news       { background: #fef3c7; color: #92400e; }
.thl-badge--tutorial,
.thl-badge--tutorials  { background: #d1fae5; color: #065f46; }
.thl-badge--bug-bounty,
.thl-badge--bugbounty  { background: #fee2e2; color: #991b1b; }
.thl-badge--research   { background: #ede9fe; color: #4c1d95; }
.thl-badge--tools      { background: #e0f2fe; color: #0c4a6e; }

.thl-dot { color: #cbd5e1; }

/* Card title */
.thl-card-title {
  font-family: var(--thl-font-sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  margin: 0 0 10px;
  flex: 1;
}

.thl-card-link {
  color: var(--thl-ink);
  text-decoration: none;
  transition: color var(--thl-transition);
}

.thl-card-link:hover {
  color: var(--thl-blue);
}

/* Excerpt */
.thl-card-excerpt {
  font-family: var(--thl-font-ui);
  font-size: 14px;
  color: var(--thl-ink-3);
  line-height: 1.65;
  margin: 0 0 18px;
  flex: 1;
}

/* Card footer */
.thl-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--thl-border);
}

.thl-card-author {
  font-family: var(--thl-font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--thl-muted);
}

.thl-card-cta {
  font-family: var(--thl-font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--thl-blue);
  text-decoration: none;
  transition: color var(--thl-transition), gap var(--thl-transition);
}

.thl-card-cta:hover {
  color: var(--thl-blue-dk);
}

/* ═══════════════════════════════════════════════════════════════════
   LOAD MORE
   ═══════════════════════════════════════════════════════════════════ */
.thl-load-more-wrap {
  text-align: center;
  margin-top: 48px;
}

.thl-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 32px;
  background: var(--thl-surface);
  color: var(--thl-ink);
  border: 1.5px solid var(--thl-border);
  border-radius: 8px;
  font-family: var(--thl-font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--thl-transition);
  min-width: 200px;
}

.thl-load-more:hover {
  border-color: var(--thl-ink);
  background: var(--thl-ink);
  color: #fff;
}

.thl-load-more.loading {
  pointer-events: none;
  opacity: .75;
}

.thl-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  display: none;
  animation: thlSpin .7s linear infinite;
  flex-shrink: 0;
}

.thl-load-more.loading .thl-btn-spinner {
  display: block;
}

.thl-load-more.loading .thl-btn-label {
  opacity: .6;
}

/* ═══════════════════════════════════════════════════════════════════
   DARK SUBSCRIBE BOX
   ═══════════════════════════════════════════════════════════════════ */
.thl-sub-section {
  padding: 80px 24px;
  background: var(--thl-surface);
  border-top: 1px solid var(--thl-border);
}

.thl-sub-box {
  max-width: 560px;
  margin: 0 auto;
  background: var(--thl-ink);
  border-radius: 20px;
  padding: 52px 40px;
  text-align: center;
  box-shadow: var(--thl-shadow-lg);
}

.thl-sub-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 16px;
}

.thl-sub-title {
  font-family: var(--thl-font-sans);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}

.thl-sub-desc {
  font-family: var(--thl-font-ui);
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.65;
  margin: 0 0 28px;
}

/* MailPoet override — dark box */
.thl-mp-dark form,
.thl-mp-dark .mailpoet_form {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.thl-mp-dark input[type="email"],
.thl-mp-dark .mailpoet_text {
  padding: 14px 16px !important;
  border-radius: var(--thl-radius) !important;
  border: 1px solid #334155 !important;
  background: #1e293b !important;
  color: #f1f5f9 !important;
  font-size: 15px !important;
  font-family: var(--thl-font-ui) !important;
  width: 100% !important;
  outline: none !important;
  transition: border-color var(--thl-transition) !important;
}

.thl-mp-dark input[type="email"]::placeholder,
.thl-mp-dark .mailpoet_text::placeholder {
  color: #64748b !important;
}

.thl-mp-dark input[type="email"]:focus,
.thl-mp-dark .mailpoet_text:focus {
  border-color: var(--thl-blue) !important;
}

.thl-mp-dark input[type="submit"],
.thl-mp-dark .mailpoet_submit {
  padding: 14px 20px !important;
  border-radius: var(--thl-radius) !important;
  background: var(--thl-blue) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: var(--thl-font-ui) !important;
  border: none !important;
  cursor: pointer !important;
  width: 100% !important;
  transition: background var(--thl-transition) !important;
}

.thl-mp-dark input[type="submit"]:hover,
.thl-mp-dark .mailpoet_submit:hover {
  background: var(--thl-blue-dk) !important;
}

.thl-sub-guarantee {
  font-family: var(--thl-font-ui);
  font-size: 12px;
  color: #475569;
  margin: 20px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════
   FALLBACK FORM
   ═══════════════════════════════════════════════════════════════════ */
.thl-fallback-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.thl-fallback-input {
  padding: 13px 16px;
  border: 1px solid var(--thl-border);
  border-radius: var(--thl-radius);
  font-size: 15px;
  width: 280px;
  max-width: 100%;
  font-family: var(--thl-font-ui);
  outline: none;
  transition: border-color var(--thl-transition);
}

.thl-fallback-input:focus {
  border-color: var(--thl-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.thl-fallback-btn {
  padding: 13px 24px;
  background: var(--thl-ink);
  color: #fff;
  border: none;
  border-radius: var(--thl-radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--thl-font-ui);
  transition: background var(--thl-transition);
}

.thl-fallback-btn:hover {
  background: var(--thl-blue);
}

.thl-fallback-note {
  font-family: var(--thl-font-ui);
  font-size: 12px;
  color: var(--thl-muted);
  text-align: center;
  margin: 10px 0 0;
}

.thl-fallback-form--dark .thl-fallback-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
  width: 100%;
}

.thl-fallback-form--dark .thl-fallback-input::placeholder {
  color: #64748b;
}

.thl-fallback-form--dark .thl-fallback-row {
  flex-direction: column;
  gap: 12px;
}

.thl-fallback-form--dark .thl-fallback-btn {
  width: 100%;
  background: var(--thl-blue);
}

.thl-fallback-form--dark .thl-fallback-note {
  color: #475569;
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
@keyframes thlFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes thlPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(37,99,235,0); }
}

@keyframes thlSpin {
  to { transform: rotate(360deg); }
}

/* Card stagger */
.thl-grid .thl-card:nth-child(1) { animation-delay: .05s; }
.thl-grid .thl-card:nth-child(2) { animation-delay: .10s; }
.thl-grid .thl-card:nth-child(3) { animation-delay: .15s; }
.thl-grid .thl-card:nth-child(4) { animation-delay: .20s; }
.thl-grid .thl-card:nth-child(5) { animation-delay: .25s; }
.thl-grid .thl-card:nth-child(6) { animation-delay: .30s; }

/* New cards loaded via AJAX don't stagger */
.thl-card.thl-card--loaded {
  animation: thlFadeUp .4s ease both;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .thl-hero {
    padding: 72px 20px 52px;
  }

  .thl-hero-title {
    font-size: 30px;
  }

  .thl-hero-subtitle {
    font-size: 16px;
  }

  .thl-stats-inner {
    gap: 0;
  }

  .thl-stat-item {
    padding: 14px 20px;
  }

  .thl-stat-sep {
    display: none;
  }

  .thl-section {
    padding: 52px 0;
  }

  .thl-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .thl-sub-box {
    padding: 36px 24px;
  }

  .thl-sub-title {
    font-size: 22px;
  }

  .thl-tabs {
    gap: 5px;
  }

  .thl-tab {
    padding: 6px 13px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .thl-hero {
    padding: 60px 16px 44px;
  }

  .thl-hero-title {
    font-size: 26px;
  }

  .thl-container {
    padding: 0 16px;
  }
}
