/*
Theme Name:  AdGenisPro Blog
Theme URI:   https://adgeniuspro.com/blog
Description: Custom theme matching AdGenisPro brand identity
Version:     1.0
Author:      AdGenisPro
Text Domain: adgenispro-blog
*/

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background-color: #0d0d0d;
  color: #f5f0eb;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #0d0d0d; }
::-webkit-scrollbar-thumb { background: #fb7926; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── WordPress Admin Bar Fix ── */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }
@media screen and (min-width: 600px) {
  body.admin-bar { margin-top: 0 !important; }
}

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; background: #fb7926;
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 200; will-change: transform;
}

/* ── Utility Classes ── */
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #fb7926;
}
.o-rule {
  width: 40px; height: 3px;
  background: #fb7926; border-radius: 2px; flex-shrink: 0;
}
.text-brand-gradient {
  background: linear-gradient(135deg, #fb7926 0%, #ff9a56 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dot-grid {
  background-image: radial-gradient(circle, rgba(251,121,38,0.10) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ════════════════════════════════════════
   NAVIGATION STYLES
════════════════════════════════════════ */
.nav-glass {
  background: rgba(13,13,13,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: #fb7926;
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Services dropdown */
.nav-services-group { position: relative; display: flex; align-items: center; }
.nav-services-trigger { display: flex; align-items: center; gap: 3px; }
.nav-chevron {
  background: none; border: none; cursor: pointer;
  padding: 2px 3px; color: #9a9088;
  display: flex; align-items: center;
  transition: color 0.2s ease, transform 0.25s ease;
}
.nav-services-group:hover .nav-chevron { color: #fb7926; }
.nav-services-group.open  .nav-chevron { color: #fb7926; transform: rotate(180deg); }
.nav-services-group::after {
  content: ''; position: absolute; top: 100%;
  left: -16px; right: -16px; height: 12px;
  background: transparent; z-index: 99;
}
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #141414; border: 1px solid #252525;
  border-radius: 4px; padding: 8px; min-width: 260px;
  z-index: 100; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s ease 0.2s, transform 0.2s ease 0.2s, visibility 0s linear 0.4s;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
}
.nav-dropdown::before {
  content: ''; position: absolute; top: -5px; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #252525;
}
.nav-services-group:hover .nav-dropdown,
.nav-services-group.open  .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 3px;
  text-decoration: none; transition: background 0.15s ease;
}
.dd-item:hover { background: #1c1c1c; }
.dd-item:hover .dd-item-name { color: #fb7926; }
.dd-item-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: rgba(251,121,38,0.10); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.dd-item-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600;
  color: #f5f0eb; transition: color 0.15s ease;
  display: block; line-height: 1.2;
}
.dd-item-desc {
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: #9a9088;
  display: block; line-height: 1.3; margin-top: 1px;
}
.dd-divider { height: 1px; background: #252525; margin: 6px 0; }
.dd-all {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 3px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600;
  color: #fb7926; text-decoration: none;
  transition: background 0.15s ease;
}
.dd-all:hover { background: rgba(251,121,38,0.08); }

/* Mobile menu */
.mob-services-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px;
  color: #9a9088; padding: 0 4px; transition: color 0.2s ease;
}
.mob-services-btn:hover,
.mob-services-btn.open { color: #fb7926; }
.mob-services-btn svg { transition: transform 0.25s ease; }
.mob-services-btn.open svg { transform: rotate(180deg); }
.mob-services-sub { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.mob-services-sub.open { max-height: 200px; }
#mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
#mobile-menu.open { max-height: 500px; }

/* ════════════════════════════════════════
   BLOG LISTING — Article Cards
════════════════════════════════════════ */
.article-card {
  background: #141414;
  border: 1px solid #1c1c1c;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.article-card:hover {
  border-color: #fb7926;
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(251,121,38,0.10);
}
.article-card-image {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
}
.article-card-image-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1c1c1c 0%, #252525 100%);
  display: flex; align-items: center; justify-content: center;
}
.article-card-body {
  padding: 24px; flex: 1;
  display: flex; flex-direction: column;
}
.article-category {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fb7926;
  background: rgba(251,121,38,0.10);
  border: 1px solid rgba(251,121,38,0.20);
  padding: 3px 10px; border-radius: 100px;
  margin-bottom: 12px;
}
.article-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; color: #f5f0eb;
  line-height: 1.3; letter-spacing: -0.02em;
  margin-bottom: 10px; transition: color 0.2s ease;
}
.article-card:hover .article-title { color: #fb7926; }
.article-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: #9a9088;
  line-height: 1.7; flex: 1; margin-bottom: 16px;
}
.article-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: #9a9088;
  border-top: 1px solid #1c1c1c;
  padding-top: 14px; margin-top: auto;
}
.article-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%; background: #333333; flex-shrink: 0;
}
.article-read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600;
  color: #fb7926; margin-top: 14px;
  transition: gap 0.2s ease;
}
.article-card:hover .article-read-more { gap: 10px; }

/* ════════════════════════════════════════
   SINGLE POST — Article Body Content
════════════════════════════════════════ */
.post-content {
  font-family: 'Inter', sans-serif;
  font-size: 17px; line-height: 1.85; color: #374151;
}
.post-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.6rem; color: #0d0d0d;
  margin: 2.5rem 0 1rem; letter-spacing: -0.02em; line-height: 1.2;
}
.post-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1.25rem; color: #111827;
  margin: 2rem 0 0.75rem; letter-spacing: -0.01em;
}
.post-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1.05rem; color: #111827;
  margin: 1.5rem 0 0.5rem;
}
.post-content p { margin-bottom: 1.4rem; }
.post-content a { color: #fb7926; text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: #e06520; }
.post-content ul,
.post-content ol { margin: 1rem 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 6px; }
.post-content li { line-height: 1.7; }
.post-content strong { color: #111827; font-weight: 600; }
.post-content blockquote {
  border-left: 3px solid #fb7926;
  margin: 2rem 0; padding: 16px 24px;
  background: #fff7f2;
  border-radius: 0 4px 4px 0;
  font-style: italic; color: #4b5563;
}
.post-content blockquote p { margin-bottom: 0; }
.post-content pre {
  background: #0d0d0d; border: 1px solid #252525;
  border-radius: 4px; padding: 20px 24px;
  overflow-x: auto; margin: 1.5rem 0;
  font-size: 14px; line-height: 1.6; color: #f5f0eb;
}
.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.88em; background: #f3f4f6;
  color: #e06520; padding: 2px 6px; border-radius: 3px;
}
.post-content pre code {
  background: none; color: #f5f0eb; padding: 0; font-size: inherit;
}
.post-content img {
  width: 100%; border-radius: 4px;
  margin: 1.5rem 0; border: 1px solid #e5e7eb;
}
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px; }
.post-content th {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6b7280; padding: 10px 14px; text-align: left;
  border-bottom: 2px solid #f3f4f6; background: #f9fafb;
}
.post-content td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: top; }
.post-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 2.5rem 0; }

/* Related post cards */
.related-card {
  background: #141414; border: 1px solid #1c1c1c;
  border-radius: 4px; overflow: hidden; text-decoration: none;
  transition: border-color 0.3s ease, transform 0.25s ease;
  display: block;
}
.related-card:hover { border-color: #fb7926; transform: translateY(-3px); }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.related-card-body { padding: 16px; }
.related-card-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 14px; color: #f5f0eb; line-height: 1.4;
  transition: color 0.2s ease;
}
.related-card:hover .related-card-title { color: #fb7926; }

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
}
.page-numbers {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid #252525; border-radius: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 500;
  color: #9a9088; text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.page-numbers:hover,
.page-numbers.current { border-color: #fb7926; color: #fb7926; }
.page-numbers.current { background: rgba(251,121,38,0.10); }

/* ── Scroll Reveal Animation ── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.10s; }
.d2 { transition-delay: 0.20s; }
.d3 { transition-delay: 0.30s; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   POST CONTENT TYPOGRAPHY
   Mirrors Neil Patel's .entry-content system exactly.
   Add this block to your theme's style.css
═══════════════════════════════════════════════════════════ */

/* ── Core body text ─────────────────────────────────────── */
.post-content {
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6666666667;
    letter-spacing: inherit;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* ── Paragraphs ─────────────────────────────────────────── */
.post-content p {
    margin-bottom: 1.6666667em;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* ── H2 — primary section heading (NP's core heading) ───── */
.post-content h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 1.25em;
    padding: 0;
    color: inherit;
}

/* H2 that immediately follows an image gets breathing room */
.post-content .wp-block-image + h2,
.post-content figure + h2,
.post-content img + h2 {
    padding-top: 1.6666667em;
}

/* ── H3 ─────────────────────────────────────────────────── */
.post-content h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
    color: inherit;
}

/* ── H4 ─────────────────────────────────────────────────── */
.post-content h4 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: inherit;
}

/* ── Strong / Bold ──────────────────────────────────────── */
/*
   CRITICAL: Neil Patel uses font-weight 500 (medium) — NOT 700.
   This is why his bold text looks "professional subtle" rather
   than heavy. This single rule has outsized visual impact.
*/
.post-content strong,
.post-content b {
    font-weight: 500;
}

/* ── Lists ──────────────────────────────────────────────── */
/*
   Tailwind Preflight strips all list styles.
   These rules restore them, then add NP-style spacing.
*/
.post-content ul,
.post-content ol,
.post-content .wp-block-list {
    margin-bottom: 1.6666667em;
    padding-left: 1.75em;
}

.post-content ul,
.post-content .wp-block-list {
    list-style: disc;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 0.5em;
    line-height: 1.6666667;
    padding-left: 0.25em;
}

.post-content li:last-child {
    margin-bottom: 0;
}

/* Nested lists */
.post-content li > ul,
.post-content li > ol {
    margin-top: 0.5em;
    margin-bottom: 0.25em;
    padding-left: 1.5em;
}

/* ── Figures & Images ───────────────────────────────────── */
.post-content figure,
.post-content .wp-block-image {
    margin-bottom: 1.6666667em;
}

.post-content figure img,
.post-content .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px; /* NP's np-hero-image style */
}

.post-content figcaption {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5em;
    line-height: 1.5;
}

/* ── Links ──────────────────────────────────────────────── */
.post-content a {
    color: var(--color-brand, #e04f16);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

/* ── Tables ─────────────────────────────────────────────── */
.post-content .wp-block-table,
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.6666667em;
    font-size: 16px;
    overflow-x: auto;
    display: block;
}

.post-content .wp-block-table table {
    display: table;
    width: 100%;
}

.post-content th,
.post-content td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

.post-content th {
    font-weight: 700;
    background-color: #f8fafc;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-content tr:nth-child(even) td {
    background-color: #f9fafb;
}

/* ── Blockquotes ────────────────────────────────────────── */
.post-content blockquote {
    border-left: 4px solid var(--color-brand, #e04f16);
    margin: 1.6666667em 0;
    padding: 0.75em 1.5em;
    background-color: #fafaf9;
    border-radius: 0 4px 4px 0;
}

.post-content blockquote p {
    font-style: italic;
    color: #374151;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ── Inline code ────────────────────────────────────────── */
.post-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    background-color: #f1f5f9;
    color: #1e293b;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

/* ── Code blocks ────────────────────────────────────────── */
.post-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.25em 1.5em;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.6666667em;
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875em;
    white-space: pre;
}

/* ── Horizontal rule ────────────────────────────────────── */
.post-content hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 2.5em 0;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {
    .post-content {
        font-size: 16px;
        line-height: 1.75;
    }

    .post-content h2 {
        font-size: 22px;
        margin-bottom: 1em;
    }

    .post-content h3 {
        font-size: 19px;
    }

    .post-content h4 {
        font-size: 16px;
    }
}

@media only screen and (max-width: 479px) {
    .post-content th,
    .post-content td {
        padding: 8px 10px;
    }

    .post-content table {
        font-size: 14px;
    }
}