/*
Theme Name: MagnetPress
Theme URI: https://magnetpress.co.uk
Author: MagnetPress
Author URI: https://magnetpress.co.uk
Description: A playful, colorful magazine blog theme — Stories That Stick. Bold typography, vibrant colors, and editorial flair for modern content creators.
Version: 1.0.0
Requires at least: 6.0
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: magnetpress
Tags: blog, magazine, two-columns, grid-layout, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready

MagnetPress — Stories That Stick.
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --mp-coral: #FF6B5A;
  --mp-lemon: #FFE14D;
  --mp-sky: #5AC8FA;
  --mp-mint: #6FEBB5;
  --mp-grape: #9B72F0;
  --mp-ink: #1A1A2E;
  --mp-cream: #FFFDF5;
  --mp-peach: #FFD6CC;
  --mp-blush: #FFF0ED;
  --mp-font-display: 'Fraunces', Georgia, serif;
  --mp-font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   GRAIN OVERLAY
   ============================================= */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* =============================================
   NAVBAR
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: var(--mp-cream);
  border-bottom: 2.5px solid var(--mp-ink);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-branding a {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-branding .custom-logo {
  max-height: 34px;
  width: auto;
}

.magnet-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--mp-coral);
  border-radius: 8px;
  color: white;
  font-size: 18px;
  transform: rotate(-12deg);
  transition: transform 0.3s;
}

.site-branding a:hover .magnet-icon {
  transform: rotate(12deg) scale(1.1);
}

/* Navigation Menu */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-navigation ul li a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.2s;
}

.main-navigation ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--mp-coral);
  border-radius: 2px;
  transition: width 0.3s;
}

.main-navigation ul li a:hover::after {
  width: 100%;
}

.main-navigation ul li.menu-item-subscribe a {
  background: var(--mp-ink);
  color: var(--mp-cream);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.2s;
}

.main-navigation ul li.menu-item-subscribe a::after {
  display: none;
}

.main-navigation ul li.menu-item-subscribe a:hover {
  background: var(--mp-coral);
  transform: scale(1.05);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--mp-ink);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--mp-ink);
}

/* =============================================
   HERO
   ============================================= */
.hero-section {
  margin-top: 68px;
  padding: 80px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  position: relative;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mp-lemon);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.hero-title {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--mp-coral), var(--mp-grape));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .squiggle {
  position: relative;
  display: inline-block;
}

.hero-title .squiggle::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg width='120' height='8' viewBox='0 0 120 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.5C10 1.5 20 1.5 30 5.5C40 9.5 50 9.5 60 5.5C70 1.5 80 1.5 90 5.5C100 9.5 110 9.5 119 5.5' stroke='%23FFE14D' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 60px 8px;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #555;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mp-coral);
  color: white;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(255,107,90,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(255,107,90,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--mp-ink);
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  border: 2.5px solid var(--mp-ink);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  background: var(--mp-lemon);
  transform: translateY(-2px);
}

/* Hero Visual — Card Stack */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-card {
  position: absolute;
  width: clamp(220px, 25vw, 320px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26,26,46,0.12);
  border: 2.5px solid var(--mp-ink);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-card:nth-child(1) {
  background: var(--mp-sky);
  transform: rotate(-6deg) translateY(20px);
  z-index: 3;
}

.hero-card:nth-child(2) {
  background: var(--mp-mint);
  transform: rotate(4deg) translate(40px, -10px);
  z-index: 2;
}

.hero-card:nth-child(3) {
  background: var(--mp-grape);
  transform: rotate(-2deg) translate(-30px, -40px);
  z-index: 1;
}

.hero-visual:hover .hero-card:nth-child(1) { transform: rotate(-12deg) translateY(10px) scale(1.02); }
.hero-visual:hover .hero-card:nth-child(2) { transform: rotate(8deg) translate(60px, -20px) scale(1.02); }
.hero-visual:hover .hero-card:nth-child(3) { transform: rotate(-6deg) translate(-50px, -50px) scale(1.02); }

.hero-card-img {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-inner {
  padding: 28px;
}

.hero-card-tag {
  display: inline-block;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--mp-ink);
}

.hero-card h3 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--mp-ink);
  margin-bottom: 12px;
}

.hero-card p {
  font-size: 0.85rem;
  color: rgba(26,26,46,0.7);
  line-height: 1.5;
}

/* =============================================
   TICKER / MARQUEE
   ============================================= */
.ticker-wrap {
  background: var(--mp-ink);
  padding: 14px 0;
  overflow: hidden;
  border-top: 2.5px solid var(--mp-ink);
  border-bottom: 2.5px solid var(--mp-ink);
}

.ticker {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker span {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--mp-cream);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 24px;
}

.ticker .dot {
  color: var(--mp-coral);
  font-size: 1.3rem;
  line-height: 1;
}

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

/* =============================================
   SECTION HEADER
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 40px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header h2 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.section-header a {
  color: var(--mp-coral);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.section-header a:hover {
  gap: 12px;
}

/* =============================================
   FEATURED GRID
   ============================================= */
.featured-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  padding: 0 40px 60px;
  max-width: 1280px;
  margin: 0 auto;
}

.featured-main {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 2.5px solid var(--mp-ink);
  background: var(--mp-peach);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform 0.3s;
}

.featured-main:hover {
  transform: translateY(-4px);
}

.featured-main-thumbnail {
  position: absolute;
  inset: 0;
}

.featured-main-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-main-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  opacity: 0.15;
}

.featured-main-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  background: linear-gradient(to top, rgba(255,214,204,0.95) 60%, transparent);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid var(--mp-ink);
  margin-bottom: 14px;
}

.tag-culture { background: var(--mp-lemon); }
.tag-tech, .tag-technology { background: var(--mp-sky); }
.tag-lifestyle { background: var(--mp-mint); }
.tag-opinion { background: var(--mp-grape); color: white; }
.tag-travel { background: var(--mp-coral); color: white; }
.tag-design { background: var(--mp-peach); }
.tag-wellness { background: var(--mp-mint); }
.tag-music { background: var(--mp-lemon); }

.featured-main h3 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.featured-main .meta {
  font-size: 0.85rem;
  color: #777;
}

.featured-side {
  display: grid;
  gap: 24px;
}

.featured-card {
  border-radius: 20px;
  border: 2.5px solid var(--mp-ink);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: white;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26,26,46,0.08);
}

.featured-card-color {
  width: 120px;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.featured-card-color img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card h4 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.featured-card .meta {
  font-size: 0.8rem;
  color: #999;
}

/* =============================================
   CATEGORIES STRIP
   ============================================= */
.categories-section {
  background: var(--mp-ink);
  padding: 60px 40px;
}

.categories-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.categories-inner h2 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--mp-cream);
  margin-bottom: 36px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.cat-card {
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  border: 2.5px solid rgba(255,255,255,0.1);
  transition: transform 0.3s, border-color 0.3s;
  display: block;
}

.cat-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(255,255,255,0.3);
}

.cat-card .cat-emoji {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
  transition: transform 0.3s;
}

.cat-card:hover .cat-emoji {
  transform: scale(1.2) rotate(-8deg);
}

.cat-card h3 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--mp-cream);
  margin-bottom: 6px;
}

.cat-card p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* =============================================
   POST CARDS GRID
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 40px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.post-card {
  border-radius: 20px;
  border: 2.5px solid var(--mp-ink);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: white;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26,26,46,0.1);
}

.post-card a {
  display: block;
}

.post-card-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.08) 8px,
    rgba(255,255,255,0.08) 16px
  );
  pointer-events: none;
}

.post-card-body {
  padding: 24px;
}

.post-card-body h4,
.post-card-body h2 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-card-body p {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.6;
  margin-bottom: 16px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 20px;
}

.author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info span {
  display: block;
}

.author-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.author-date {
  font-size: 0.72rem;
  color: #aaa;
}

.read-time {
  font-size: 0.75rem;
  color: #aaa;
  font-weight: 500;
}

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-section {
  margin: 0 40px 80px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, var(--mp-coral) 0%, var(--mp-grape) 100%);
  border-radius: 32px;
  padding: 72px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2.5px solid var(--mp-ink);
}

.newsletter-section::before {
  content: '\01F4EE';
  position: absolute;
  font-size: 12rem;
  opacity: 0.08;
  top: -20px;
  right: -20px;
  transform: rotate(15deg);
}

.newsletter-section h2 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2.6rem;
  color: white;
  margin-bottom: 12px;
  position: relative;
}

.newsletter-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 36px;
  position: relative;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 16px 24px;
  border-radius: 100px;
  border: 2.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  font-family: var(--mp-font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-form input[type="email"]:focus {
  border-color: white;
}

.newsletter-form button {
  padding: 16px 32px;
  border-radius: 100px;
  background: var(--mp-ink);
  color: var(--mp-cream);
  font-family: var(--mp-font-body);
  font-weight: 700;
  font-size: 1rem;
  border: 2.5px solid var(--mp-ink);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: scale(1.05);
  background: var(--mp-lemon);
  color: var(--mp-ink);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--mp-ink);
  color: var(--mp-cream);
  padding: 60px 40px 32px;
  border-top: 2.5px solid var(--mp-ink);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 300px;
}

.footer-widget h4,
.footer-nav h4 {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-widget ul,
.footer-nav ul {
  list-style: none;
}

.footer-widget ul li a,
.footer-nav ul li a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-widget ul li a:hover,
.footer-nav ul li a:hover {
  color: var(--mp-coral);
  padding-left: 6px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.footer-socials a:hover {
  background: var(--mp-coral);
  border-color: var(--mp-coral);
  transform: translateY(-3px);
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-header {
  margin-top: 68px;
  padding: 60px 40px 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.single-post-header .tag {
  margin-bottom: 20px;
}

.single-post-header h1 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 40px;
}

.single-post-featured {
  max-width: 1000px;
  margin: 0 auto 48px;
  padding: 0 40px;
}

.single-post-featured img {
  width: 100%;
  border-radius: 24px;
  border: 2.5px solid var(--mp-ink);
}

.single-post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px 80px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-post-content h2 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.8rem;
  margin: 48px 0 20px;
}

.single-post-content h3 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 36px 0 16px;
}

.single-post-content p {
  margin-bottom: 24px;
}

.single-post-content a {
  color: var(--mp-coral);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-content blockquote {
  border-left: 4px solid var(--mp-coral);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--mp-blush);
  border-radius: 0 16px 16px 0;
  font-style: italic;
  font-family: var(--mp-font-display);
  font-size: 1.2rem;
  line-height: 1.6;
}

.single-post-content img {
  border-radius: 16px;
  margin: 32px 0;
}

.single-post-content ul,
.single-post-content ol {
  margin: 0 0 24px 24px;
}

.single-post-content li {
  margin-bottom: 8px;
}

.single-post-content pre {
  background: var(--mp-ink);
  color: var(--mp-cream);
  padding: 24px;
  border-radius: 16px;
  overflow-x: auto;
  margin: 32px 0;
  font-size: 0.9rem;
}

.single-post-content code {
  background: rgba(26,26,46,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-post-content pre code {
  background: none;
  padding: 0;
}

/* Gutenberg alignments */
.single-post-content .alignwide {
  max-width: min(1000px, 90vw);
  width: min(1000px, 90vw);
  margin-left: 50%;
  transform: translateX(-50%);
}

.single-post-content .alignfull {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

/* Post navigation */
.post-navigation {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 2px solid rgba(26,26,46,0.08);
}

.post-navigation a {
  font-weight: 700;
  color: var(--mp-coral);
  transition: gap 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-navigation a:hover {
  gap: 12px;
}

/* =============================================
   ARCHIVE / SEARCH PAGES
   ============================================= */
.archive-header,
.search-header {
  margin-top: 68px;
  padding: 60px 40px 20px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.archive-header h1,
.search-header h1 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.archive-header p,
.search-header p {
  font-size: 1.1rem;
  color: #777;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 40px 80px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--mp-ink);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.pagination .page-numbers.current {
  background: var(--mp-ink);
  color: var(--mp-cream);
}

.pagination .page-numbers:hover:not(.current) {
  background: var(--mp-lemon);
}

/* =============================================
   404 PAGE
   ============================================= */
.error-404-section {
  margin-top: 68px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
}

.error-404-content .error-emoji {
  font-size: 6rem;
  margin-bottom: 24px;
  display: block;
}

.error-404-content h1 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 3rem;
  margin-bottom: 16px;
}

.error-404-content p {
  font-size: 1.15rem;
  color: #777;
  margin-bottom: 32px;
  max-width: 480px;
}

.error-404-content .search-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.error-404-content .search-form input[type="search"] {
  flex: 1;
  padding: 14px 20px;
  border-radius: 100px;
  border: 2.5px solid var(--mp-ink);
  font-family: var(--mp-font-body);
  font-size: 1rem;
  background: white;
  outline: none;
}

.error-404-content .search-form button {
  padding: 14px 24px;
  border-radius: 100px;
  background: var(--mp-coral);
  color: white;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--mp-font-body);
  transition: transform 0.2s;
}

.error-404-content .search-form button:hover {
  transform: scale(1.05);
}

/* Search form in general */
.search-form {
  display: flex;
  gap: 12px;
}

.search-form label {
  flex: 1;
}

.search-form .search-field {
  width: 100%;
  padding: 14px 20px;
  border-radius: 100px;
  border: 2.5px solid var(--mp-ink);
  font-family: var(--mp-font-body);
  font-size: 1rem;
  background: white;
  outline: none;
}

.search-form .search-submit {
  padding: 14px 24px;
  border-radius: 100px;
  background: var(--mp-coral);
  color: white;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--mp-font-body);
  transition: transform 0.2s;
}

/* =============================================
   PAGE TEMPLATE
   ============================================= */
.page-content-wrap {
  margin-top: 68px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 60px 40px 80px;
}

.page-content-wrap h1 {
  font-family: var(--mp-font-display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 32px;
}

.page-content-wrap .entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.page-content-wrap .entry-content p {
  margin-bottom: 24px;
}

/* =============================================
   COMMENTS
   ============================================= */
.comments-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.comments-area h2 {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 32px;
}

.comment-list {
  list-style: none;
}

.comment-body {
  padding: 24px;
  background: white;
  border-radius: 16px;
  border: 2px solid rgba(26,26,46,0.08);
  margin-bottom: 16px;
}

.comment-respond .comment-form input,
.comment-respond .comment-form textarea {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: 2.5px solid rgba(26,26,46,0.12);
  font-family: var(--mp-font-body);
  font-size: 1rem;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.comment-respond .comment-form input:focus,
.comment-respond .comment-form textarea:focus {
  border-color: var(--mp-coral);
}

.comment-respond .comment-form .submit {
  padding: 14px 30px;
  border-radius: 100px;
  background: var(--mp-coral);
  color: white;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--mp-font-body);
  font-size: 1rem;
  transition: transform 0.2s;
}

/* =============================================
   WIDGETS
   ============================================= */
.widget {
  margin-bottom: 40px;
}

.widget-title {
  font-family: var(--mp-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--mp-cream);
  border-radius: 8px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--mp-ink);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--mp-coral);
  outline-offset: 2px;
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }

  .ticker {
    animation: none;
  }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  .site-header,
  .ticker-wrap,
  .hero-visual,
  .hero-cta,
  .newsletter-section,
  .categories-section,
  .footer-socials,
  .menu-toggle,
  .main-navigation {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .single-post-content {
    max-width: 100%;
    padding: 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 60px 24px 40px;
  }

  .hero-visual {
    height: 300px;
  }

  .hero-card {
    width: clamp(180px, 50vw, 240px);
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-main {
    min-height: 360px;
  }

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

  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-header {
    padding: 14px 24px;
  }

  .main-navigation ul {
    gap: 20px;
  }

  .single-post-content .alignwide {
    max-width: 100%;
    margin-left: 0;
    transform: none;
    width: 100%;
  }

  .newsletter-section {
    margin-left: 24px;
    margin-right: 24px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--mp-cream);
    border-bottom: 2.5px solid var(--mp-ink);
    flex-direction: column;
    padding: 20px 24px;
    gap: 12px;
  }

  .main-navigation.toggled ul {
    display: flex;
  }
}

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

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .newsletter-section {
    padding: 48px 24px;
    margin: 0 16px 60px;
    border-radius: 24px;
  }

  .newsletter-section h2 {
    font-size: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .section-header,
  .featured-grid,
  .posts-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .single-post-header,
  .single-post-content,
  .single-post-featured {
    padding-left: 16px;
    padding-right: 16px;
  }

  .single-post-header h1 {
    font-size: 1.8rem;
  }

  .single-post-meta {
    flex-direction: column;
    gap: 8px;
  }

  .hero-visual {
    height: 260px;
  }

  .hero-card {
    width: clamp(160px, 55vw, 200px);
  }

  .hero-card-inner {
    padding: 16px;
  }

  .hero-card h3 {
    font-size: 1rem;
  }

  .hero-card-img {
    height: 100px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    justify-content: center;
    width: 100%;
  }

  .featured-main {
    min-height: 300px;
  }

  .featured-main h3 {
    font-size: 1.5rem;
  }

  .featured-card {
    flex-direction: column;
  }

  .featured-card-color {
    width: 100%;
    height: 120px;
    min-height: auto;
  }

  .categories-section {
    padding: 40px 16px;
  }

  .categories-inner h2 {
    font-size: 1.8rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .post-navigation {
    flex-direction: column;
    padding: 24px 16px;
    gap: 16px;
  }

  .error-404-content h1 {
    font-size: 2rem;
  }

  .page-content-wrap {
    padding: 40px 16px 60px;
  }

  .page-content-wrap h1 {
    font-size: 2rem;
  }

  .archive-header,
  .search-header {
    padding: 40px 16px 16px;
  }

  .archive-header h1,
  .search-header h1 {
    font-size: 2rem;
  }
}

/* Ultra-small screens (< 380px) */
@media (max-width: 380px) {
  .site-header {
    padding: 12px 12px;
  }

  .site-branding a {
    font-size: 1.3rem;
  }

  .hero-section {
    padding: 40px 12px 24px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-visual {
    height: 220px;
  }

  .hero-card {
    width: 150px;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2,
  .categories-inner h2 {
    font-size: 1.5rem;
  }

  .newsletter-section {
    margin: 0 8px 40px;
    padding: 32px 16px;
  }

  .newsletter-section h2 {
    font-size: 1.6rem;
  }

  .site-footer {
    padding: 40px 16px 24px;
  }
}
