/*
Theme Name: Passionate Marketers
Theme URI: https://passionatemarketers.com
Author: Passionate Marketers / Propel
Author URI: https://passionatemarketers.com
Description: Editorial precision theme for Passionate Marketers — SEO, AI and Growth for Small Businesses. Designed for use with Elementor Free.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: passionate-marketers
Tags: blog, news, editorial, elementor, one-column, two-columns, custom-header, custom-menu, featured-images, post-formats, sticky-post, threaded-comments
*/

/* =============================================================
   DESIGN TOKENS
   ============================================================= */
:root {
  --pm-red:        #DC2626;
  --pm-red-dark:   #B91C1C;
  --pm-dark:       #111827;
  --pm-gray-900:   #1F2937;
  --pm-gray-700:   #374151;
  --pm-gray-500:   #6B7280;
  --pm-gray-300:   #D1D5DB;
  --pm-gray-100:   #F3F4F6;
  --pm-bg:         #F9FAFB;
  --pm-white:      #FFFFFF;

  --pm-font-serif: 'Playfair Display', Georgia, serif;
  --pm-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --pm-radius:     8px;
  --pm-shadow:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --pm-shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* =============================================================
   RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--pm-bg);
  color: var(--pm-dark);
  font-family: var(--pm-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--pm-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--pm-red); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pm-font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--pm-dark);
  margin-top: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; font-family: var(--pm-font-sans); font-weight: 700; }
h4 { font-size: 1.1rem; font-family: var(--pm-font-sans); font-weight: 600; }

p { margin-top: 0; margin-bottom: 1.25rem; }

/* =============================================================
   LAYOUT
   ============================================================= */
.pm-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.pm-grid-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .pm-grid-main { grid-template-columns: 1fr; }
  .pm-sidebar { display: none; }
}

/* =============================================================
   HEADER
   ============================================================= */
.pm-header {
  background: var(--pm-white);
  border-bottom: 1px solid var(--pm-gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.pm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.pm-logo img {
  height: 40px;
  width: auto;
}

.pm-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pm-nav a {
  font-family: var(--pm-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pm-gray-700);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.pm-nav a:hover,
.pm-nav a.current-menu-item {
  color: var(--pm-dark);
  background: var(--pm-gray-100);
}

.pm-header-cta {
  background: var(--pm-red);
  color: var(--pm-white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.15s ease !important;
}
.pm-header-cta:hover { background: var(--pm-red-dark) !important; color: var(--pm-white) !important; }

/* Promo band */
.pm-promo-band {
  background: var(--pm-dark);
  color: var(--pm-white);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  letter-spacing: 0.01em;
}
.pm-promo-band a {
  color: var(--pm-white);
  text-decoration: none;
  display: block;
}
.pm-promo-band a:hover { opacity: 0.9; }
.pm-promo-band strong { color: var(--pm-red); margin-right: 0.5rem; }
.pm-promo-band .pm-cta-link {
  color: var(--pm-red);
  font-weight: 700;
  margin-left: 0.75rem;
}

/* =============================================================
   HERO SECTION
   ============================================================= */
.pm-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .pm-hero { grid-template-columns: 1fr; }
}

.pm-hero-main {
  position: relative;
  border-radius: var(--pm-radius);
  overflow: hidden;
  aspect-ratio: 16/10;
}

.pm-hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s linear;
}
.pm-hero-main:hover img { transform: scale(1.03); }

.pm-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.pm-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  color: var(--pm-white);
}

.pm-hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pm-hero-secondary-item {
  display: flex;
  gap: 1rem;
  background: var(--pm-white);
  border-radius: var(--pm-radius);
  overflow: hidden;
  box-shadow: var(--pm-shadow);
  transition: box-shadow 0.2s ease;
}
.pm-hero-secondary-item:hover { box-shadow: var(--pm-shadow-md); }

.pm-hero-secondary-item img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.pm-hero-secondary-content {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =============================================================
   CATEGORY BADGE
   ============================================================= */
.pm-category-badge {
  display: inline-block;
  font-family: var(--pm-font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm-red);
  margin-bottom: 0.375rem;
}

/* =============================================================
   ARTICLE CARD (list view)
   ============================================================= */
.pm-article-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--pm-gray-100);
  transition: opacity 0.15s ease;
}
.pm-article-card:hover { opacity: 0.85; }

.pm-article-card-content { flex: 1; min-width: 0; }

.pm-article-card-thumb {
  width: 140px;
  height: 100px;
  border-radius: var(--pm-radius);
  overflow: hidden;
  flex-shrink: 0;
}
.pm-article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.pm-article-card:hover .pm-article-card-thumb img { transform: scale(1.05); }

.pm-article-title {
  font-family: var(--pm-font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pm-dark);
  margin: 0.25rem 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-article-title a:hover { color: var(--pm-red); }

.pm-article-meta {
  font-size: 0.8125rem;
  color: var(--pm-gray-500);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pm-article-excerpt {
  font-size: 0.9375rem;
  color: var(--pm-gray-700);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.5rem 0;
}

/* =============================================================
   SINGLE ARTICLE
   ============================================================= */
.pm-single-header { margin-bottom: 2rem; }

.pm-single-title {
  font-family: var(--pm-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
}

.pm-single-hero-img {
  width: 100%;
  border-radius: var(--pm-radius);
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 2rem;
}

.pm-reading-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: var(--pm-gray-100);
  border-radius: var(--pm-radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--pm-gray-700);
}

.pm-article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--pm-gray-700);
}

.pm-article-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.pm-article-body h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.pm-article-body p { margin-bottom: 1.25rem; }

.pm-article-body a { color: var(--pm-red); text-decoration: underline; }

.pm-article-body blockquote {
  border-left: 4px solid var(--pm-red);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--pm-gray-100);
  border-radius: 0 var(--pm-radius) var(--pm-radius) 0;
  font-style: italic;
  color: var(--pm-gray-700);
}

/* Lead magnet banner */
.pm-lead-magnet {
  background: linear-gradient(135deg, #1a1f2e 0%, #111827 100%);
  border-radius: var(--pm-radius);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pm-lead-magnet-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-red);
  margin-bottom: 0.25rem;
}

.pm-lead-magnet-title {
  font-family: var(--pm-font-serif);
  font-size: 1.125rem;
  color: var(--pm-white);
  margin: 0 0 0.25rem;
}

.pm-lead-magnet-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.pm-lead-magnet-cta {
  background: var(--pm-red);
  color: var(--pm-white);
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.pm-lead-magnet-cta:hover { background: var(--pm-red-dark); color: var(--pm-white); }

/* Share buttons */
.pm-share-bar {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pm-gray-100);
}

.pm-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}
.pm-share-btn:hover { opacity: 0.85; }
.pm-share-btn--twitter { background: #000; color: #fff; }
.pm-share-btn--linkedin { background: #0A66C2; color: #fff; }
.pm-share-btn--copy { background: var(--pm-gray-100); color: var(--pm-dark); }

/* =============================================================
   SIDEBAR
   ============================================================= */
.pm-sidebar {
  position: sticky;
  top: 80px;
}

.pm-widget {
  background: var(--pm-white);
  border-radius: var(--pm-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--pm-shadow);
}

.pm-widget-title {
  font-family: var(--pm-font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-gray-500);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pm-gray-100);
}

.pm-newsletter-heading {
  font-family: var(--pm-font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pm-newsletter-form input[type="email"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--pm-gray-300);
  border-radius: 6px;
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.pm-newsletter-form input[type="email"]:focus { border-color: var(--pm-red); }

.pm-newsletter-form button {
  width: 100%;
  background: var(--pm-red);
  color: var(--pm-white);
  border: none;
  padding: 0.625rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pm-newsletter-form button:hover { background: var(--pm-red-dark); }

/* Trending list */
.pm-trending-list { list-style: none; margin: 0; padding: 0; }
.pm-trending-list li {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--pm-gray-100);
}
.pm-trending-list li:last-child { border-bottom: none; }
.pm-trending-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pm-gray-300);
  flex-shrink: 0;
  width: 1.5rem;
}
.pm-trending-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

/* =============================================================
   RELATED ARTICLES
   ============================================================= */
.pm-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--pm-dark);
}

.pm-related-heading {
  font-family: var(--pm-font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-gray-500);
  margin-bottom: 1.5rem;
}

.pm-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .pm-related-grid { grid-template-columns: 1fr; }
}

.pm-related-card {
  background: var(--pm-white);
  border-radius: var(--pm-radius);
  overflow: hidden;
  box-shadow: var(--pm-shadow);
  transition: box-shadow 0.2s ease;
}
.pm-related-card:hover { box-shadow: var(--pm-shadow-md); }

.pm-related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.pm-related-card-body { padding: 1rem; }

.pm-related-card-title {
  font-family: var(--pm-font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.25rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================================
   FOOTER
   ============================================================= */
.pm-footer {
  background: var(--pm-dark);
  color: var(--pm-white);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.pm-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .pm-footer-grid { grid-template-columns: 1fr 1fr; }
}

.pm-footer-logo { height: 36px; filter: brightness(0) invert(1); margin-bottom: 1rem; }

.pm-footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.pm-footer-social {
  display: flex;
  gap: 0.75rem;
}

.pm-footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.15s ease;
}
.pm-footer-social a:hover { background: var(--pm-red); color: var(--pm-white); }

.pm-footer-col-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}

.pm-footer-links { list-style: none; margin: 0; padding: 0; }
.pm-footer-links li { margin-bottom: 0.5rem; }
.pm-footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s ease;
}
.pm-footer-links a:hover { color: var(--pm-white); }

.pm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* =============================================================
   PAGINATION
   ============================================================= */
.pm-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pm-pagination a,
.pm-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--pm-gray-300);
  color: var(--pm-gray-700);
  transition: all 0.15s ease;
}

.pm-pagination a:hover { background: var(--pm-gray-100); border-color: var(--pm-gray-500); }

.pm-pagination .current {
  background: var(--pm-red);
  border-color: var(--pm-red);
  color: var(--pm-white);
}

/* =============================================================
   BREADCRUMBS
   ============================================================= */
.pm-breadcrumb {
  font-size: 0.8125rem;
  color: var(--pm-gray-500);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.pm-breadcrumb a { color: var(--pm-gray-500); }
.pm-breadcrumb a:hover { color: var(--pm-red); }
.pm-breadcrumb .sep { color: var(--pm-gray-300); }

/* =============================================================
   READING PROGRESS BAR
   ============================================================= */
#pm-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--pm-red);
  z-index: 9999;
  width: 0%;
  transition: width 80ms linear;
}

/* =============================================================
   BACK TO TOP
   ============================================================= */
#pm-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--pm-red);
  color: var(--pm-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  border: none;
  box-shadow: var(--pm-shadow-md);
}
#pm-back-top.visible { opacity: 1; pointer-events: auto; }
#pm-back-top:hover { transform: translateY(-3px); }

/* =============================================================
   UTILITY
   ============================================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.pm-section-label {
  font-family: var(--pm-font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pm-gray-500);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--pm-dark);
}

@media (max-width: 640px) {
  .pm-article-card-thumb { width: 100px; height: 80px; }
  .pm-article-title { font-size: 1rem; }
}
