/*
Theme Name: Aeon Clone
Description: A pixel-perfect clone of Aeon magazine website - elegant editorial design for WordPress
Author: Your Name
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aeon-clone
Tags: blog, news, magazine, editorial, clean, modern, responsive
*/

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --aeon-red: #9b5c34;
  --aeon-dark: #3b3633;
  --aeon-light: #f9f9f7;
  --aeon-muted: #9b9c97;
  --container-width: 1200px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: white;
  color: var(--aeon-dark);
  line-height: 1.6;
  font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Crimson Text', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Utility Classes */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.aeon-red { color: var(--aeon-red); }
.aeon-dark { color: var(--aeon-dark); }
.bg-aeon-light { background-color: var(--aeon-light); }
.text-aeon-muted { color: var(--aeon-muted); }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Header Styles - Complete Rework */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: none;
}

.site-logo {
  max-height: 100%
}

/* Homepage header - starts at 100px, becomes sticky at 42px after hero */
.home .site-header {
  position: absolute;
  background: white;
  border-bottom: none;
  height: 84px;
}

.home .site-header.scrolled {
  position: fixed;
  background: white;
  border-bottom: none;
  height: 42px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Single post header - transparent with white text */
.single-post .site-header {
  position: absolute;
  background: transparent;
  border-bottom: none;
  height: 42px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.single-post .site-header.scrolled {
  position: fixed;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  height: 42px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.single-post .site-header.vignette {
  background: linear-gradient(to bottom, rgba (0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.single-article-page .site-header {
  position: absolute;
  background: transparent;
  border-bottom: none;
  height: 100px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.single-article-page .site-header.scrolled {
  position: fixed;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  height: 42px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.single-article-page .site-header.vignette {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

/* Header container */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: space-between;
}

.home .site-header.scrolled .header-container {
   height: 100%;
   justify-content: center;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.home .site-header.scrolled .header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
}

.single-post .site-header.scrolled .header-container {
	height: 100%;
	justify-content: center;
}

.single-post .site-header.scrolled .header-top {
	height: 42px;
}

.single-post .header-top {
	height: 42px;
}

/* Header text colors */
.home .site-header {
  color: #374151;
}

.single-post .site-header.scrolled {
  color: #374151;
}

.single-post .site-header.scrolled a {
  color: #374151;
}

.single-post .site-header a {
  color: white;
}

.single-post .site-header {
	color: white;
}

.single-post .site-header .logo-text {
  color: white;
  filter: brightness(0) invert(1);
}

/* Header left side */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0.5rem;
}

.menu-toggle:hover {
  opacity: 0.7;
}

.search-button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0.5rem;
  padding-top: 2px;
}

.search-button:hover {
  opacity: 0.7;
}


/* Site logo */
.site-logo img{
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  transition: all 0.3s ease;
  max-width: clamp(120px, 15vw, 240px);
  height: auto; 
  display: block;
}

.home .site-header.scrolled .site-logo a {
  font-size: 1.5rem;
}

.single-post .site-logo a {
  color: white;
}

.single-post.scrolled .site-logo a {
  font-size: 1.5rem;
}

/* Hide colour logo by default, show white logo - ONLY on non-home pages */
body:not(.home) .site-logo img.logo-white {
    display: block;
}
body:not(.home) .site-logo img.logo-colour {
    display: none;
}

/* On scroll, swap to colour logo - ONLY on non-home pages */
body:not(.home) .site-header.scrolled .site-logo img.logo-white {
    display: none;
}
body:not(.home) .site-header.scrolled .site-logo img.logo-colour {
    display: block;
}

/* Always show colour logo on homepage */
body.home .site-logo img.logo-white {
    display: none !important;
}
body.home .site-logo img.logo-colour {
    display: block !important;
    filter: none !important;
}	
body.home .site-header.scrolled .site-logo img.logo-colour {
    display: block;
}

/* Remove any filter from homepage logo */
body.home .site-logo img {
    filter: none !important;
}

/* ============================= */
/* Logo scaling rules            */
/* ============================= */

/* Default max sizing */
.site-logo img {
    height: clamp(25px, 4vw, 50px);
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

/* Header right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.social-icons a {
  color: inherit;
  transition: opacity 0.2s;
}

.social-icons a:hover {
  opacity: 0.7;
}

.social-icons img {
  width: 16px;
  height: 16px;
  filter: none;
}

.single-post .social-icons img {
  filter: brightness(0) invert(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.home .site-header.scrolled .header-actions {
  font-size: 0.75rem;
}

.header-actions a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.header-actions a:hover {
  opacity: 0.7;
}

.header-separator {
  color: rgba(255,255,255,0.5);
}

.home .header-separator {
  color: #d1d5db;
}

.single-post .header-separator {
  color: #d1d5db;
}

/* Navigation */
.main-nav {
  border-top: none;
  padding: 1rem 0;
  text-align: center;
}

.home. site-header . main-nav {
	display: none;
	
}
.home .site-header.scrolled .main-nav {
  display: none;
}

.single-post .main-nav {
  display: none;
}

.single-post .site-header.scrolled .main-nav {
  display: none;
}

.nav-menu {
  display: none;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  opacity: 0.7;
}

/* Mobile menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
  display: none;
  z-index: 999;
}

.single-post .mobile-menu {
  background: rgba(0,0,0,0.9);
}

.single-post .mobile-menu a {
  color: white;
}

.mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-menu li {
  margin-bottom: 0.75rem;
}

.mobile-nav-menu a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 660px;
  background: black;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-post .hero-section {
  height: 800px;	
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-family: 'Crimson Text', serif;
  font-weight: 400;
}

.hero-description {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 42rem;
  margin: 0 auto;
  font-weight: 300;
}

.hero-link {
  position: absolute;
  inset: 0;
  z-index: 20;
}

/* Articles Grid */
.articles-section {
  padding: 4rem 0;
  background: white;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

/* Article Card */
.article-card {
  display: block;
  color: inherit;
  transition: transform 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
}

.article-image-container {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 6px;
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-image {
  transform: scale(1.05);
}

.article-type-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.article-card:hover .play-button {
  background: white;
}

.article-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  font-family: 'Crimson Text', serif;
  font-weight: 400;
  transition: color 0.2s;
}

.article-card:hover .article-title {
  color: #6b7280;
}

.article-description {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.article-author {
  font-weight: 500;
}

/* More Button */
.more-section {
  padding: 2rem 0;
  background: white;
  text-align: center;
}

.more-button {
  background: #e5e7eb;
  color: #374151;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
}

.more-button:hover {
  background: #d1d5db;
  transform: translateY(-1px);
}

.more-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Popular Section */
.popular-section {
  padding: 4rem 0;
  background: var(--aeon-light);
}

.popular-header {
  text-align: center;
  margin-bottom: 3rem;
}

.popular-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.popular-card .article-image {
  height: 140px;
}

.popular-card .article-title {
  font-size: 1.125rem;
}

.popular-card .article-description {
  font-size: 0.75rem;
}

/* Footer */
.site-footer {
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: #374151;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #111827;
}

.footer-social h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.footer-social-icons {
  display: flex;
  gap: 1rem;
}

.footer-social-icons img {
  width: 20px;
  height: 20px;
}

.newsletter-signup h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  font-family: 'Crimson Text', serif;
  font-weight: 400;
}

.newsletter-signup p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
}

.newsletter-options {
  display: flex;
  gap: 1.5rem;
}

.newsletter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.newsletter-option label {
  font-size: 0.875rem;
  color: #374151;
}

.newsletter-submit {
  background: var(--aeon-red);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: flex-start;
  border-radius: 4px;
}

.newsletter-submit:hover {
  background: #8b5429;
}

.newsletter-privacy {
  font-size: 0.75rem;
  color: #6b7280;
}

.newsletter-privacy a {
  color: #374151;
  text-decoration: underline;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a {
  color: #374151;
  text-decoration: underline;
}

/* Single Article Page - Aeon Style */
.single-article-page {
  background: white;
}

/* Full-screen hero for single posts */
.single-article-page .hero-section {
  height: 100vh;
  position: relative;
}

.single-article-page .hero-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.single-article-page .hero-content {
  position: absolute;
  bottom: 20%;
  left: 0;
  right: 0;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.single-article-page .hero-title {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 2rem;
  max-width: 800px;
}

.single-article-page .hero-description {
  font-size: 1.5rem;
  line-height: 1.4;
  max-width: 600px;
  margin: 0;
}

/* Single post layout with sidebar */
.single-post-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: start;
}

.single-sidebar {
  position: static !important;
  top: auto !important;
  height: fit-content;
}

.author-info {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.article-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.word-count {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.syndicate-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

.syndicate-button:hover {
  background: #e5e7eb;
}

/* Main article content */
.single-main-content {
  max-width: 700px;
}

.single-main-content .entry-content {
  font-size: smaller;
  line-height: 1;
  color: #374151;
}

.single-main-content .entry-content p {
  margin-bottom: 1.5rem;
}

/* Drop caps for first paragraph */
.single-main-content .entry-content p:first-child::first-letter {
  float: left;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  line-height: 1rem;
  color: var(--aeon-dark);
  font-weight: 100;
}

.single-main-content .entry-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem;
  background: #f9fafb;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
}

.single-main-content .entry-content img {
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Archive Pages */
.archive-header {
  background: white;
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.archive-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-family: 'Crimson Text', serif;
}

.archive-description {
  font-size: 1.125rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto 1rem;
}

.archive-count {
  font-size: 0.875rem;
  color: #6b7280;
}

.archive-content {
  padding: 3rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-right .social-icons {
    display: none;
  }

  .main-nav {
    display: none;
  }

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

  .single-post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .single-sidebar {
    position: relative;
    top: auto;
    order: -1;
    display: flex;
    gap: 2rem;
    align-items: center;
  }

  .single-article-page .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .header-actions {
    font-size: 0.75rem;
    gap: 0.5rem;
  }

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

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

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .popular-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .single-article-page .hero-title {
    font-size: 2.5rem;
  }

  .single-article-page .hero-description {
    font-size: 1.25rem;
  }

  .single-article-page .hero-content {
    padding: 0 1rem;
  }

  .single-post-layout {
    padding: 2rem 1rem;
  }

  .single-main-content .entry-content {
    font-size: 1rem;
  }

  .single-main-content .entry-content p:first-child::first-letter {
    font-size: 3.5rem;
    line-height: 2.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }

  .header-top {
    padding: 0 0.75rem;
  }

  .newsletter-options {
    flex-direction: column;
    gap: 0.75rem;
  }
}
/* === Custom fix: Center logo vertically in header === */
.site-logo img {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-logo img {
  display: block;
  margin: auto 0;
}

/* Single article page: change header text color when scrolled */
.single-post .site-header.scrolled,
.single-post .site-header.scrolled a {
  color: #374151;
}

/* Single Post Header left side */
.single-post .menu-toggle.scrolled,
.single-post .search-button.scrolled a {
  color: #374151;
}

/* --- Logo sizing: responsive, never squished --- */
.site-logo { max-width: 60vw; white-space: nowrap; } /* prevents overlap on small widths */
.site-logo img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
  filter: none !important; /* ensure no accidental washout */
  opacity: 1 !important;
}

/* Homepage logo size (large, then shrink when scrolled) */
.home .site-header .site-logo img {
  max-height: clamp(32px, 5vw, 50px) !important;
}
.home .site-header.scrolled .site-logo img {
  max-height: clamp(22px, 3.4vw, 25px) !important;
}

/* Single post logo size (compact) */
.single-post .site-header .site-logo img,
.single-post .site-header.scrolled .site-logo img {
  max-height: clamp(22px, 3.4vw, 25px) !important;
}

/* Keep your color/white swap logic EXACTLY as intended */
.home .site-logo img.logo-white { display: none !important; }
.home .site-logo img.logo-colour { display: inline !important; }

body:not(.home) .site-logo img.logo-white { display: inline !important; }
body:not(.home) .site-logo img.logo-colour { display: none !important; }

body:not(.home) .site-header.scrolled .site-logo img.logo-white { display: none !important; }
body:not(.home) .site-header.scrolled .site-logo img.logo-colour { display: inline !important; }

/* Force homepage logo dead-center regardless of flex layout */
.site-header .site-logo {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  top: 50%;
  transform: translate(-50%, -50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.single-post .site-header .site-logo {
  position: absolute !important;
  left: 50% !important;
  top: 50%;
  transform: translate(-50%, -50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  z-index:1;
}
.single-post .site-header.scrolled .site-logo {
  position: absolute !important;
  left: 50% !important;
  top: 50%;
  transform: translate(-50%, -50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  z-index:1;
}

/* Keep left and right header elements at edges */
.site-header .header-left {
  position: relative;
  z-index: 2;
  margin-right: auto;
}

.site-header .header-right {
  position: relative;
  z-index: 2;
  margin-left: auto;
}

/* Responsive logo sizing */
.site-header .site-logo img {
  height: clamp(35px, 4vw, 50px);
  width: auto;
}

/* Homepage logo - smooth transition like single posts */
.home .site-header .site-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform 0.4s ease, height 0.4s ease, opacity 0.4s ease;
}

/* Default (top of page) logo size */
.home .site-header .site-logo img {
  height: 50px;
  width: auto;
  max-width: 100%;
  transition: height 0.4s ease, opacity 0.4s ease;
}

/* Sticky state — shrink logo smoothly */
.home .site-header.scrolled .site-logo img {
  height: 25px;
  width: auto;
  max-width: 100%;
}

/* Keep left/right pinned to edges */
.home .site-header .header-left {
  position: relative;
  z-index: 2;
  margin-right: auto;
}

.home .site-header .header-right {
  position: relative;
  z-index: 2;
  margin-left: auto;
}
