/*
Theme Name:        The Juicy Marketeer
Theme URI:         https://thejuicymarketeer.com
Author:            The Juicy Marketeer
Description:       A clean, editorial magazine theme for The Juicy Marketeer — built for students and junior marketers who want marketing simplified.
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       juicy-marketeer
Tags:              blog, magazine, news, full-site-editing, custom-colors, custom-logo
*/

/* ─── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ─── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
  --juicy-orange:  #ff7a2a;
  --juicy-yellow:  #ffd42f;
  --juicy-pink:    #ff4db8;
  --juicy-green:   #7de85e;
  --ink:           #0f0f0f;
  --ink-soft:      #1e1e1e;
  --smoke:         #555555;
  --fog:           #999999;
  --mist:          #e8e5e0;
  --off-white:     #fafaf8;
  --white:         #ffffff;

  --font-sans:     'DM Sans', sans-serif;
  --font-mono:     'DM Mono', monospace;

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-pill:   100px;

  --transition:    all 0.2s ease;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.10);

  --content-width: 720px;
  --wide-width:    1200px;
  --site-padding:  clamp(16px, 4vw, 40px);
}

/* ─── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; transition: color var(--transition); }

/* ─── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h1 { font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 600; }
h4 { font-size: 20px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }

p { margin-bottom: 1.5em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; }
em { font-style: italic; }

/* ─── Layout Utilities ────────────────────────────────────────────────────── */
.site-container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--site-padding);
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--site-padding);
}

/* ─── Site Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1.5px solid var(--ink);
}

.header-top-bar {
  background: var(--ink);
  color: var(--white);
  padding: 6px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.header-top-bar .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-top-bar a { color: var(--juicy-orange); }
.header-top-bar a:hover { color: var(--juicy-yellow); }

.header-main {
  padding: 16px 0;
}

.header-main .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--juicy-orange);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.site-logo-tagline {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fog);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--smoke);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--ink);
  background: var(--off-white);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--white) !important;
  border-radius: var(--radius-pill) !important;
}

.nav-cta:hover {
  background: var(--juicy-orange) !important;
  color: var(--ink) !important;
}

/* ─── Category Pills ──────────────────────────────────────────────────────── */
.cat-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: var(--transition);
}

.cat-pill:hover { background: var(--ink); color: var(--white); }
.cat-pill.educate  { border-color: var(--juicy-orange); color: var(--juicy-orange); }
.cat-pill.educate:hover  { background: var(--juicy-orange); color: var(--ink); }
.cat-pill.news     { border-color: var(--juicy-pink); color: var(--juicy-pink); }
.cat-pill.news:hover     { background: var(--juicy-pink); color: var(--ink); }
.cat-pill.career   { border-color: var(--juicy-green); color: var(--juicy-green); }
.cat-pill.career:hover   { background: var(--juicy-green); color: var(--ink); }
.cat-pill.ai       { border-color: var(--juicy-yellow); color: var(--ink); background: var(--juicy-yellow); }

/* ─── Post Card ───────────────────────────────────────────────────────────── */
.post-card {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--mist);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  transition: var(--transition);
}

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

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--off-white);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img { transform: scale(1.03); }

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-card-date {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fog);
}

.post-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title:hover { color: var(--juicy-orange); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--smoke);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.post-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--off-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-time {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fog);
}

.read-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--juicy-orange);
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-link:hover { gap: 8px; }

/* ─── Post Card — Hero size ───────────────────────────────────────────────── */
.post-card-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.post-card-hero .post-card-image {
  aspect-ratio: unset;
  height: 100%;
}

.post-card-hero .post-card-body {
  padding: 32px;
  justify-content: flex-end;
}

.post-card-hero .post-card-title {
  font-size: clamp(22px, 3vw, 32px);
  -webkit-line-clamp: 4;
}

/* ─── Homepage Magazine Grid ──────────────────────────────────────────────── */
.magazine-grid {
  display: grid;
  gap: 20px;
}

.magazine-grid-hero {
  grid-template-columns: 1fr;
}

.magazine-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.magazine-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 960px) {
  .magazine-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .post-card-hero { grid-template-columns: 1fr; }
  .post-card-hero .post-card-image { aspect-ratio: 16/9; }
}

@media (max-width: 640px) {
  .magazine-grid-3,
  .magazine-grid-2 { grid-template-columns: 1fr; }
}

/* ─── Section Headers ─────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 24px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--juicy-orange);
}

.section-label.pink::before   { background: var(--juicy-pink); }
.section-label.green::before  { background: var(--juicy-green); }
.section-label.yellow::before { background: var(--juicy-yellow); }

.section-view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--smoke);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-view-all:hover { color: var(--juicy-orange); }

/* ─── Single Post ─────────────────────────────────────────────────────────── */
.post-header {
  padding: 60px 0 40px;
  border-bottom: 1.5px solid var(--mist);
  margin-bottom: 48px;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.post-header-date {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--fog);
}

.post-featured-image {
  margin: 0 0 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--mist);
}

.post-featured-image img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
}

.post-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.post-content h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 2.5em 0 0.75em;
  padding-top: 1.5em;
  border-top: 1.5px solid var(--mist);
}

.post-content h3 {
  font-size: clamp(18px, 2.5vw, 22px);
  margin: 2em 0 0.5em;
}

.post-content p { margin-bottom: 1.6em; }

.post-content a {
  color: var(--juicy-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.post-content a:hover { text-decoration-thickness: 2px; }

.post-content ul, .post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.6em;
}

.post-content li { margin-bottom: 0.4em; }

.post-content blockquote {
  border-left: 4px solid var(--juicy-orange);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--off-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--off-white);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--mist);
}

.post-content strong { font-weight: 700; color: var(--ink); }

/* ─── Newsletter CTA Block ────────────────────────────────────────────────── */
.newsletter-inline {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.newsletter-inline::before {
  content: '◆';
  position: absolute;
  right: -20px;
  top: -20px;
  font-size: 160px;
  color: rgba(255,255,255,0.03);
  line-height: 1;
}

.newsletter-inline h3 {
  color: var(--white);
  font-size: 24px;
  margin-bottom: 8px;
}

.newsletter-inline p {
  color: var(--fog);
  font-size: 15px;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input[type="email"]::placeholder { color: var(--fog); }
.newsletter-form input[type="email"]:focus { border-color: var(--juicy-orange); }

.newsletter-form button {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--juicy-orange);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover { background: var(--juicy-yellow); }

/* ─── Ticker / Breaking bar ───────────────────────────────────────────────── */
.news-ticker {
  background: var(--juicy-orange);
  color: var(--ink);
  padding: 10px 0;
  overflow: hidden;
  border-bottom: 1.5px solid var(--ink);
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: var(--ink);
  color: var(--juicy-orange);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  margin-right: 24px;
}

.ticker-item {
  font-size: 13px;
  font-weight: 500;
  padding: 0 24px;
  border-right: 1.5px solid rgba(0,0,0,0.15);
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Related Posts ───────────────────────────────────────────────────────── */
.related-posts {
  padding: 48px 0;
  border-top: 2px solid var(--ink);
  margin-top: 60px;
}

/* ─── Category Archive ────────────────────────────────────────────────────── */
.archive-header {
  padding: 48px 0 32px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 40px;
}

.archive-header-eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 8px;
}

.archive-header h1 {
  margin-bottom: 12px;
}

.archive-header-desc {
  font-size: 16px;
  color: var(--smoke);
  max-width: 560px;
}

/* ─── About Page ──────────────────────────────────────────────────────────── */
.about-hero {
  padding: 80px 0 64px;
  border-bottom: 1.5px solid var(--mist);
}

.about-intro {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 640px;
}

.about-intro em { font-style: normal; color: var(--juicy-orange); }

/* ─── Newsletter Page ─────────────────────────────────────────────────────── */
.newsletter-hero {
  padding: 80px 0;
  background: var(--ink);
  text-align: center;
}

.newsletter-hero h1 { color: var(--white); margin-bottom: 16px; }

.newsletter-hero p {
  color: var(--fog);
  font-size: 18px;
  max-width: 480px;
  margin: 0 auto 40px;
}

/* ─── Site Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 60px 0 32px;
  margin-top: 96px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

@media (max-width: 840px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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

.footer-brand .site-logo-name { color: var(--white); }
.footer-brand .site-logo-tagline { color: var(--fog); }

.footer-brand-desc {
  font-size: 14px;
  color: var(--fog);
  margin-top: 16px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--fog);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

.footer-col a:hover { color: var(--juicy-orange); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.3);
}

.footer-accent-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.footer-accent-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 48px 0;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--mist);
  transition: var(--transition);
}

.pagination a:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.pagination .current { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.accent-orange { color: var(--juicy-orange); }
.accent-pink   { color: var(--juicy-pink);   }
.accent-green  { color: var(--juicy-green);  }
.accent-yellow { color: var(--juicy-yellow); }

/* ─── WordPress Core Alignments ───────────────────────────────────────────── */
.alignwide  { max-width: var(--wide-width); margin-left: auto; margin-right: auto; }
.alignfull  { max-width: 100vw; margin-left: calc(-1 * var(--site-padding)); margin-right: calc(-1 * var(--site-padding)); }
