/*
Theme Name: Markelly Editorial
Theme URI: https://markelly.co.uk
Author: Markelly Associates
Author URI: https://markelly.co.uk
Description: A premium light editorial newspaper theme for Markelly.co.uk — covering Cyber Security, AI and GTA6
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: markelly-editorial
Tags: news, magazine, light, editorial, newspaper, cybersecurity, gaming, ai, adsense
*/

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #faf8f3;
  --paper: #f4f1ea;
  --ink: #1a1612;
  --ink2: #3d3830;
  --muted: #8a8278;
  --rule: #d4cfc6;
  --rule-light: #e8e4dc;

  --cyber: #0a5c44;
  --cyber-bg: #edf7f3;
  --cyber-accent: #12a674;

  --ai: #2d1e6b;
  --ai-bg: #f0eeff;
  --ai-accent: #6c4de6;

  --gta: #8b2500;
  --gta-bg: #fff4ef;
  --gta-accent: #e04e1a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--cyber-accent); }

/* === MASTHEAD === */
.site-header {
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.masthead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px 12px;
  border-bottom: 1px solid var(--rule);
  max-width: 1400px;
  margin: 0 auto;
}

.masthead-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.site-branding { text-align: center; flex: 1; }

.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.masthead-issue {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-align: right;
}

.main-nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 01.5 rem !important;
  font-weight: 1000 !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 9px 18px;
  color: var(--muted);
  border-right: 1px solid var(--rule);
  transition: color 0.2s;
}

.main-nav a:first-child { padding-left: 0; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.nav-cyber { color: var(--cyber); font-weight: 500; }
.main-nav a.nav-ai { color: var(--ai); font-weight: 500; }
.main-nav a.nav-gta { color: var(--gta); font-weight: 500; }

/* === TICKER === */
.news-ticker {
  background: var(--ink);
  color: var(--cream);
  padding: 8px 0;
  overflow: hidden;
  position: relative;
  height: 64px;
}

.ticker-label {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--cyber-accent);
  color: white ;
  font-family: var(--font-mono);
  font-size: 1.00rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  padding: 0 14px;
  display: flex;
  align-items: center;
  z-index: 2;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  animation: ticker 30s linear infinite;
  padding-left: 110px;
  align-items: center;
  height: 100%;
}

.ticker-track span {
  font-family: var(--font-mono);
  font-size: 1.0rem;
  color: rgba(250,248,243,0.65);
  white-space: nowrap;
  padding: 0 22px;
}

.ticker-track span::before {
  content: '◆';
  color: var(--cyber-accent);
  margin-right: 10px;
  font-size: 0.22 rem;
}

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

/* === FRONT PAGE HERO === */
.front-hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1px 1.8fr 1px 1fr;
  gap: 0;
  align-items: start;
  border-bottom: 2px solid var(--ink);
}

.col-divider { background: var(--rule); align-self: stretch; }

.hero-col-left { padding-right: 24px; }
.hero-col-center { padding: 0 24px; }
.hero-col-right { padding-left: 24px; }

/* === KICKER / META === */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kicker::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
}

.kicker-cyber { color: var(--cyber-accent); }
.kicker-cyber::before { background: var(--cyber-accent); }
.kicker-ai { color: var(--ai-accent); }
.kicker-ai::before { background: var(--ai-accent); }
.kicker-gta { color: var(--gta-accent); }
.kicker-gta::before { background: var(--gta-accent); }

/* === POST CARDS === */
.post-title-xl {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.post-title-lg {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.post-title-md {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.post-title-sm {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
  transition: color 0.2s;
}

a:hover .post-title-xl,
a:hover .post-title-lg,
a:hover .post-title-md,
a:hover .post-title-sm { color: var(--cyber); }

.cyber-hover:hover .post-title-xl,
.cyber-hover:hover .post-title-lg,
.cyber-hover:hover .post-title-md,
.cyber-hover:hover .post-title-sm { color: var(--cyber); }

.ai-hover:hover .post-title-xl,
.ai-hover:hover .post-title-lg,
.ai-hover:hover .post-title-md,
.ai-hover:hover .post-title-sm { color: var(--ai); }

.gta-hover:hover .post-title-xl,
.gta-hover:hover .post-title-lg,
.gta-hover:hover .post-title-md,
.gta-hover:hover .post-title-sm { color: var(--gta); }

.post-excerpt {
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.7;
  margin-bottom: 12px;
}

.read-more {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.read-more:hover { gap: 10px; }
.read-more-cyber { color: var(--cyber); border-bottom: 1px solid var(--cyber-accent); }
.read-more-ai { color: var(--ai); border-bottom: 1px solid var(--ai-accent); }
.read-more-gta { color: var(--gta); border-bottom: 1px solid var(--gta-accent); }

/* === FEATURED IMAGE === */
.feat-img-wrap { overflow: hidden; margin-bottom: 14px; }

.feat-img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

.feat-img-wrap:hover img { transform: scale(1.03); }

.feat-img-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.placeholder-cyber { background: linear-gradient(135deg, var(--cyber-bg), #c8ead8); }
.placeholder-ai { background: linear-gradient(135deg, var(--ai-bg), #d8d0f8); }
.placeholder-gta { background: linear-gradient(135deg, var(--gta-bg), #ffd0b8); }

/* === AD ZONES === */
.ad-zone {
  background: var(--paper);
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
}

.ad-leaderboard { width: 100%; height: 70px; margin: 16px 0; }
.ad-rectangle { width: 300px; height: 250px; }
.ad-sidebar { width: 300px; height: 600px; }

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 32px 16px;
  border-top: 3px solid;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header-cyber { border-color: var(--cyber); }
.section-header-ai { border-color: var(--ai); }
.section-header-gta { border-color: var(--gta); }

.section-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid;
  white-space: nowrap;
}

.badge-cyber { background: var(--cyber-bg); color: var(--cyber); border-color: var(--cyber-accent); }
.badge-ai { background: var(--ai-bg); color: var(--ai); border-color: var(--ai-accent); }
.badge-gta { background: var(--gta-bg); color: var(--gta); border-color: var(--gta-accent); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
}

.title-cyber { color: var(--cyber); }
.title-ai { color: var(--ai); }
.title-gta { color: var(--gta); }

.section-rule { flex: 1; height: 1px; opacity: 0.25; }
.rule-cyber { background: var(--cyber-accent); }
.rule-ai { background: var(--ai-accent); }
.rule-gta { background: var(--gta-accent); }

/* === CYBER SECTION === */
.cyber-section { background: var(--cream); padding-bottom: 32px; }

.cyber-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1px 1fr;
  gap: 0;
}

.cyber-featured { padding-right: 28px; }
.cyber-stack { padding-left: 28px; }

.stack-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-light);
  cursor: pointer;
  transition: padding-left 0.2s;
}

.stack-item:first-child { padding-top: 0; }
.stack-item:last-child { border-bottom: none; }
.stack-item:hover { padding-left: 6px; }

/* === AI SECTION === */
.ai-section { background: var(--ai-bg); padding-bottom: 32px; }

.ai-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(108,77,230,0.12);
}

.ai-card {
  background: white;
  padding: 20px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.ai-card:hover { background: #fcfaff; }

.ai-card-bar {
  height: 3px;
  margin: -20px -20px 16px;
  background: var(--rule-light);
  transition: background 0.3s;
}

.ai-card:hover .ai-card-bar { background: var(--ai-accent); }

.ai-icon {
  width: 40px;
  height: 40px;
  background: var(--ai-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* === GTA SECTION === */
.gta-section { background: var(--gta-bg); padding-bottom: 32px; }

.gta-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.6fr 1px 1fr;
  gap: 0;
}

.gta-featured { padding-right: 28px; }
.gta-stack { padding-left: 28px; }

.gta-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: var(--gta-accent);
  color: white;
  font-weight: 500;
  margin-bottom: 8px;
}

.gta-stack-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(139,37,0,0.1);
  cursor: pointer;
  transition: padding-left 0.2s;
}

.gta-stack-item:first-child { padding-top: 0; }
.gta-stack-item:last-child { border-bottom: none; }
.gta-stack-item:hover { padding-left: 6px; }

/* === SINGLE POST === */
.post-hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 4rem 32px 2rem;
  border-bottom: 1px solid var(--rule);
}

.post-hero .kicker { margin-bottom: 16px; }

.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.post-hero-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-body-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 32px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink2);
}

.post-body h2, .post-body h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 2.5rem 0 1rem;
}

.post-body h2 { font-size: 1.8rem; }
.post-body h3 { font-size: 1.3rem; }
.post-body p { margin-bottom: 1.5rem; }
.post-body a { color: var(--cyber); text-decoration: underline; text-underline-offset: 3px; }

.post-body blockquote {
  border-left: 3px solid var(--cyber-accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--cyber-bg);
  font-style: italic;
  color: var(--cyber);
}

/* === SIDEBAR === */
.sidebar { position: sticky; top: 100px; align-self: start; }

.sidebar-widget {
  margin-bottom: 2rem;
  border: 1px solid var(--rule);
  padding: 1.5rem;
  background: var(--paper);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyber);
  margin-bottom: 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

/* === ARCHIVE === */
.archive-header {
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
  padding: 3rem 32px;
  text-align: center;
}

.archive-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1px;
  background: var(--rule);
}

.archive-card {
  background: var(--cream);
  padding: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.archive-card:hover { background: var(--paper); }

/* === FOOTER === */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3rem 32px 2rem;
}

.footer-inner { max-width: 1400px; margin: 0 auto; }

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

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--cream);
  margin-bottom: 10px;
}

.footer-about p {
  font-size: 0.82rem;
  color: rgba(250,248,243,0.5);
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250,248,243,0.35);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(250,248,243,0.5);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--cream); }

.footer-bottom {
  border-top: 1px solid rgba(250,248,243,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(250,248,243,0.3);
  letter-spacing: 0.05em;
}

/* === RESPONSIVE === */
@media (max-width: 1000px) {
  .front-hero { grid-template-columns: 1fr; }
  .col-divider { display: none; }
  .hero-col-left, .hero-col-center, .hero-col-right { padding: 0 0 24px; border-bottom: 1px solid var(--rule); }
  .cyber-inner, .gta-inner { grid-template-columns: 1fr; }
  .cyber-featured, .gta-featured { padding-right: 0; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
  .cyber-stack, .gta-stack { padding-left: 0; padding-top: 16px; }
  .ai-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-body-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .masthead-top { flex-direction: column; gap: 8px; }
  .masthead-date, .masthead-issue { display: none; }
  .main-nav { overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-header { padding: 16px; }
  .front-hero { padding: 16px; }
  .cyber-inner, .gta-inner { padding: 0 16px; }
}
