/*
Theme Name: EasyCo DIY
Theme URI: https://easy-co.de
Author: easy-co.de
Author URI: https://easy-co.de
Description: Modernes DIY-Portal Theme für easy-co.de – einfach selber machen. Inklusive Newsletter-System, Anleitungen-Kategorie und Blog.
Version: 1.0.6
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: easyco
Tags: blog, diy, custom-menu, featured-images, custom-logo
*/

/* ══════════════════════════════════════
   CSS VARIABLES & RESET
   ══════════════════════════════════════ */

:root {
  --ec-green: #497649;
  --ec-green-dark: #3A6639;
  --ec-green-light: rgba(73,118,73,0.1);
  --ec-orange: #E8985A;
  --ec-purple: #9C6BAE;
  --ec-slate: #6B7B8D;
  --ec-rust: #C67353;
  --ec-teal: #5A9E8F;
  --ec-bg: #FAFAF7;
  --ec-bg-alt: #F5F5F0;
  --ec-dark: #2D2D2D;
  --ec-text: #2D2D2D;
  --ec-text-light: #6B6B6B;
  --ec-text-muted: #999999;
  --ec-border: rgba(0,0,0,0.06);
  --ec-white: #FFFFFF;
  --ec-radius-sm: 12px;
  --ec-radius-md: 20px;
  --ec-radius-lg: 24px;
  --ec-radius-xl: 32px;
  --ec-radius-full: 100px;
  --ec-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --ec-shadow-md: 0 8px 24px rgba(0,0,0,0.06);
  --ec-shadow-lg: 0 16px 48px rgba(0,0,0,0.08);
  --ec-shadow-xl: 0 24px 64px rgba(0,0,0,0.1);
  --ec-font-display: 'Fraunces', Georgia, serif;
  --ec-font-body: 'DM Sans', -apple-system, sans-serif;
  --ec-transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --ec-max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

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

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

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  50% { transform: translate(12%, 9%); }
  90% { transform: translate(-1%, 7%); }
}

.ec-animate {
  opacity: 1;
  transform: none;
}

/* Only animate below-fold elements (JS adds is-visible immediately for above-fold) */
@media (prefers-reduced-motion: no-preference) {
  .ec-animate:not(.is-visible) {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.ec-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ec-animate.is-visible.ec-delay-1 { transition-delay: 0.1s; }
.ec-animate.is-visible.ec-delay-2 { transition-delay: 0.2s; }
.ec-animate.is-visible.ec-delay-3 { transition-delay: 0.3s; }
.ec-animate.is-visible.ec-delay-4 { transition-delay: 0.4s; }
.ec-animate.is-visible.ec-delay-5 { transition-delay: 0.5s; }
.ec-animate.is-visible.ec-delay-6 { transition-delay: 0.6s; }

/* Grain overlay */
.ec-grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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");
  animation: grain 8s steps(10) infinite;
  will-change: transform;
  contain: strict;
  pointer-events: none;
}

/* ══════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════ */

.ec-container {
  max-width: var(--ec-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.ec-section {
  padding: 100px 0;
}

.ec-section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ec-green);
  display: block;
  margin-bottom: 12px;
}

.ec-section-title {
  font-family: var(--ec-font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
}

.ec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ec-green);
  color: var(--ec-white);
  border: none;
  padding: 16px 36px;
  border-radius: var(--ec-radius-full);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--ec-font-body);
  cursor: pointer;
  transition: all var(--ec-transition);
  white-space: nowrap;
}

.ec-btn:hover {
  background: var(--ec-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(91,140,90,0.35);
  color: var(--ec-white);
}

.ec-btn-outline {
  background: transparent;
  color: var(--ec-green);
  border: 2px solid var(--ec-green);
  padding: 14px 34px;
  border-radius: var(--ec-radius-full);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--ec-font-body);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ec-btn-outline:hover {
  background: var(--ec-green);
  color: var(--ec-white);
}

.ec-btn-sm {
  padding: 10px 24px;
  font-size: 14px;
}

.ec-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--ec-radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ec-white);
}

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */

.ec-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
  padding: 0 40px;
}

.ec-navbar.is-scrolled {
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--ec-border);
}

.ec-navbar-inner {
  max-width: var(--ec-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.ec-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.ec-logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ec-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  font-family: var(--ec-font-display);
}

.ec-logo-text {
  font-family: var(--ec-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ec-text);
}

.ec-logo-text span {
  color: var(--ec-green);
}

.ec-nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.ec-nav-links a {
  position: relative;
  font-weight: 500;
  font-size: 15px;
  color: var(--ec-text);
  padding: 4px 0;
}

.ec-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--ec-green);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.ec-nav-links a:hover::after,
.ec-nav-links a.current-menu-item::after,
.ec-nav-links .current-menu-item > a::after {
  width: 100%;
}

/* Mobile menu */
.ec-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.ec-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ec-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.ec-mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--ec-bg);
  padding: 40px;
  z-index: 999;
}

.ec-mobile-menu.is-open {
  display: block;
}

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

.ec-mobile-menu a {
  display: block;
  font-size: 24px;
  font-family: var(--ec-font-display);
  font-weight: 600;
  padding: 16px 0;
  border-bottom: 1px solid var(--ec-border);
}

/* Skip Link */
.ec-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ec-green);
  color: #fff;
  padding: 8px 16px;
  z-index: 100000;
  font-size: 14px;
  border-radius: 0 0 4px 0;
  transition: top 0.3s;
  text-decoration: none;
}
.ec-skip-link:focus {
  top: 0;
  outline: 2px solid var(--ec-green);
  outline-offset: 2px;
}

/* ══════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════ */

.ec-hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

.ec-hero-blob-1 {
  position: absolute;
  top: 60px; right: 10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,90,0.08) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
  will-change: transform;
  contain: strict;
}

.ec-hero-blob-2 {
  position: absolute;
  bottom: 0; left: 5%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,152,90,0.06) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite 2s;
  will-change: transform;
  contain: strict;
}

.ec-hero-content {
  max-width: 780px;
  position: relative;
  z-index: 2;
}

.ec-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.92);
  border-radius: var(--ec-radius-full);
  padding: 8px 20px;
  margin-bottom: 28px;
}

.ec-hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ec-green);
  animation: pulse 2s infinite;
  will-change: transform;
}

.ec-hero-badge span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ec-green);
}

.ec-hero h1 {
  font-family: var(--ec-font-display);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.ec-hero h1 em {
  color: var(--ec-green);
  font-style: italic;
  position: relative;
}

.ec-hero h1 em svg {
  position: absolute;
  bottom: -6px; left: 0;
  width: 100%; height: 12px;
}

.ec-hero-sub {
  font-size: 20px;
  line-height: 1.65;
  color: var(--ec-text-light);
  max-width: 560px;
  margin-bottom: 40px;
}

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

.ec-hero-social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.ec-avatars {
  display: flex;
}

.ec-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid var(--ec-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  font-weight: 600;
}

.ec-avatar + .ec-avatar {
  margin-left: -10px;
}

/* ══════════════════════════════════════
   MARQUEE
   ══════════════════════════════════════ */

.ec-marquee {
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--ec-border);
  border-bottom: 1px solid var(--ec-border);
  background: var(--ec-bg-alt);
}

.ec-marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.ec-marquee-item {
  font-family: var(--ec-font-display);
  font-size: 18px;
  font-weight: 500;
  color: #6E6E69;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 48px;
}

.ec-marquee-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #D5D5CF;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   CATEGORIES
   ══════════════════════════════════════ */

.ec-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.ec-cat-card {
  background: var(--ec-white);
  border-radius: var(--ec-radius-md);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--ec-border);
  cursor: pointer;
  transition: all var(--ec-transition);
}

.ec-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(91,140,90,0.15);
}

.ec-cat-card.is-active {
  background: var(--ec-green);
  color: var(--ec-white);
  border-color: var(--ec-green);
}

.ec-cat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.ec-cat-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.ec-cat-count {
  font-size: 13px;
  opacity: 0.6;
}

/* ══════════════════════════════════════
   POST CARDS (Blog + Anleitungen)
   ══════════════════════════════════════ */

.ec-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ec-post-card {
  background: var(--ec-white);
  border-radius: var(--ec-radius-lg);
  overflow: hidden;
  border: 1px solid var(--ec-border);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.ec-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--ec-shadow-xl);
}

.ec-post-card-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

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

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

.ec-post-card-image .ec-tag {
  position: absolute;
  top: 16px; left: 16px;
}

.ec-post-card-placeholder {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.ec-post-card-cat {
  font-size: 13px;
  color: var(--ec-text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.ec-post-card-title {
  font-family: var(--ec-font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

.ec-post-card-title a:hover {
  color: var(--ec-green);
}

.ec-post-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ec-text-muted);
  font-weight: 500;
}

.ec-post-card-meta .ec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ══════════════════════════════════════
   HOW IT WORKS (Steps)
   ══════════════════════════════════════ */

.ec-steps-section {
  background: var(--ec-dark);
  color: var(--ec-white);
}

.ec-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ec-step-card {
  background: rgba(255,255,255,0.06);
  border-radius: var(--ec-radius-lg);
  padding: 36px 28px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.4s ease;
}

.ec-step-card:hover {
  background: var(--ec-green);
}

.ec-step-num {
  font-family: var(--ec-font-display);
  font-size: 48px;
  font-weight: 700;
  color: rgba(255,255,255,0.12);
  margin-bottom: 20px;
  transition: color 0.4s ease;
}

.ec-step-card:hover .ec-step-num {
  color: rgba(255,255,255,0.3);
}

.ec-step-title {
  font-family: var(--ec-font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  transition: color 0.4s ease;
}

.ec-step-desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  transition: color 0.4s ease;
}

.ec-step-card:hover .ec-step-desc {
  color: rgba(255,255,255,0.8);
}

/* ══════════════════════════════════════
   TESTIMONIAL
   ══════════════════════════════════════ */

.ec-testimonial {
  background: var(--ec-bg-alt);
  text-align: center;
}

.ec-testimonial-inner {
  max-width: 800px;
  margin: 0 auto;
}

.ec-testimonial blockquote {
  font-family: var(--ec-font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
  color: #3D3D3D;
  margin-bottom: 32px;
}

/* ══════════════════════════════════════
   NEWSLETTER
   ══════════════════════════════════════ */

.ec-newsletter-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--ec-white);
  border-radius: var(--ec-radius-xl);
  padding: 64px 48px;
  border: 1px solid var(--ec-border);
  box-shadow: 0 16px 64px rgba(0,0,0,0.04);
  text-align: center;
}

.ec-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.ec-newsletter-input {
  border: 2px solid #E0E0D8;
  background: white;
  padding: 16px 20px;
  border-radius: var(--ec-radius-full);
  font-size: 16px;
  font-family: var(--ec-font-body);
  outline: none;
  width: 100%;
  transition: border-color 0.3s;
  flex: 1;
}

.ec-newsletter-input:focus {
  border-color: var(--ec-green);
}

.ec-newsletter-msg {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

.ec-newsletter-msg.success { color: var(--ec-green); }
.ec-newsletter-msg.error { color: #D64545; }

.ec-newsletter-privacy {
  font-size: 12px;
  color: #BBB;
  margin-top: 16px;
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */

.ec-footer {
  background: var(--ec-dark);
  color: var(--ec-white);
  padding: 80px 0 40px;
}

.ec-footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  margin-bottom: 64px;
}

.ec-footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  line-height: 1.7;
  margin-top: 20px;
}

.ec-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.ec-footer-nav h4,
.ec-footer-nav h2 {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
}

.ec-footer-nav a {
  display: block;
  color: rgba(255,255,255,0.65);
  font-size: 15px;
  margin-bottom: 14px;
  transition: color 0.2s;
}

.ec-footer-nav a:hover {
  color: var(--ec-white);
}

.ec-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ec-footer-copy {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

.ec-footer-social {
  display: flex;
  gap: 24px;
}

.ec-footer-social a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

.ec-footer-social a:hover {
  color: var(--ec-green);
}

/* ══════════════════════════════════════
   BLOG PAGE
   ══════════════════════════════════════ */

.ec-page-header {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
}

.ec-page-header h1 {
  font-family: var(--ec-font-display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.ec-page-header p {
  font-size: 20px;
  color: var(--ec-text-light);
  max-width: 560px;
  margin: 0 auto;
}

/* Blog filter bar */
.ec-filter-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.ec-filter-pill {
  padding: 10px 20px;
  border-radius: var(--ec-radius-full);
  background: var(--ec-white);
  border: 1px solid var(--ec-border);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--ec-font-body);
  color: var(--ec-text);
}

.ec-filter-pill:hover,
.ec-filter-pill.is-active {
  background: var(--ec-green);
  color: var(--ec-white);
  border-color: var(--ec-green);
}

/* Pagination */
.ec-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
}

.ec-pagination a,
.ec-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--ec-border);
  transition: all 0.3s ease;
}

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

/* Single post */
.ec-single-header {
  padding: 140px 0 40px;
  text-align: center;
}

.ec-single-header h1 {
  font-family: var(--ec-font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.ec-single-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  color: var(--ec-text-muted);
  font-size: 14px;
}

.ec-single-featured {
  max-width: 900px;
  margin: 40px auto;
  border-radius: var(--ec-radius-lg);
  overflow: hidden;
}

.ec-single-content {
  max-width: 100%;
  margin: 0;
  padding: 0 0 80px;
}

.ec-single-content h2 {
  font-family: var(--ec-font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 48px 0 16px;
  letter-spacing: -0.5px;
}

.ec-single-content h3 {
  font-family: var(--ec-font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 36px 0 12px;
}

.ec-single-content p {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 24px;
  color: #444;
}

.ec-single-content img {
  border-radius: var(--ec-radius-sm);
  margin: 32px 0;
}

.ec-single-content ul,
.ec-single-content ol {
  margin: 16px 0 24px 24px;
  font-size: 18px;
  line-height: 1.75;
  color: #444;
}

.ec-single-content blockquote {
  border-left: 4px solid var(--ec-green);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--ec-green-light);
  border-radius: 0 var(--ec-radius-sm) var(--ec-radius-sm) 0;
  font-style: italic;
  font-size: 18px;
}

/* ══════════════════════════════════════
   WORDPRESS ADMIN: NEWSLETTER
   ══════════════════════════════════════ */

.ec-admin-wrap {
  max-width: 900px;
}

.ec-admin-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}

.ec-admin-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.ec-admin-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.ec-admin-stat {
  background: #f8f8f6;
  border-radius: 8px;
  padding: 20px;
  flex: 1;
  text-align: center;
}

.ec-admin-stat .num {
  font-size: 32px;
  font-weight: 700;
  color: #497649;
}

.ec-admin-stat .label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* ══════════════════════════════════════
   SIDEBAR LAYOUT
   ══════════════════════════════════════ */

.ec-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 40px 0 80px;
}

.ec-main-content {
    min-width: 0;
}

.ec-sidebar {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ec-border) transparent;
}

.ec-sidebar::-webkit-scrollbar { width: 4px; }
.ec-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Sidebar Author Box */
.ec-sb-author {
    background: var(--ec-white);
    border-radius: var(--ec-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--ec-border);
    border-top: 4px solid var(--ec-green);
}

.ec-sb-author-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.ec-sb-avatar,
.ec-sb-author-header img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(91,140,90,0.15);
    flex-shrink: 0;
}

.ec-sb-author-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ec-green);
    font-weight: 700;
    margin-bottom: 2px;
}

.ec-sb-author-name {
    font-size: 16px;
    font-weight: 800;
    font-family: var(--ec-font-display);
    color: var(--ec-text);
    margin: 0;
    line-height: 1.2;
}

.ec-sb-author-count {
    font-size: 12px;
    color: var(--ec-text-muted);
}

.ec-sb-author-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ec-text-light);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-sb-author-more {
    padding-top: 12px;
    border-top: 1px solid var(--ec-border);
    margin-bottom: 14px;
}

.ec-sb-author-more-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ec-text-muted);
    margin-bottom: 8px;
}

.ec-sb-author-more ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-sb-author-more li {
    padding: 6px 0;
    border-bottom: 1px solid var(--ec-border);
}

.ec-sb-author-more li:last-child { border-bottom: none; }

.ec-sb-author-more a {
    font-size: 13px;
    font-weight: 600;
    color: var(--ec-text-light);
    transition: color 0.2s;
    line-height: 1.4;
    display: block;
}

.ec-sb-author-more a:hover { color: var(--ec-green); }

.ec-sb-author-link {
    display: block;
    text-align: center;
    padding: 10px 16px;
    background: rgba(91,140,90,0.08);
    color: var(--ec-green);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--ec-radius-sm);
    transition: all 0.2s;
    border: 1px solid rgba(91,140,90,0.15);
}

.ec-sb-author-link:hover {
    background: var(--ec-green);
    color: var(--ec-white);
    border-color: var(--ec-green);
}

/* Sidebar Widget */
.ec-sb-widget {
    background: var(--ec-white);
    border-radius: var(--ec-radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--ec-border);
}

.ec-sb-widget-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ec-text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--ec-green);
}

/* Sidebar list (categories) */
.ec-sb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-sb-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--ec-border);
}

.ec-sb-list li:last-child { border-bottom: none; }

.ec-sb-list a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ec-text-light);
    transition: color 0.2s;
}

.ec-sb-list a:hover { color: var(--ec-green); }

.ec-sb-count {
    font-size: 12px;
    color: var(--ec-text-muted);
}

/* Sidebar Popular Posts */
.ec-sb-popular {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ec-sb-pop-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--ec-border);
}

.ec-sb-pop-item:last-child { border-bottom: none; }

.ec-sb-pop-rank {
    font-family: var(--ec-font-display);
    font-size: 20px;
    font-weight: 700;
    opacity: 0.3;
    line-height: 1;
    flex-shrink: 0;
    min-width: 28px;
    padding-top: 2px;
}

.ec-sb-pop-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ec-text);
    line-height: 1.4;
    display: block;
    transition: color 0.2s;
}

.ec-sb-pop-title:hover { color: var(--ec-green); }

.ec-sb-pop-meta {
    font-size: 11px;
    color: var(--ec-text-muted);
    margin-top: 2px;
    display: block;
}

/* Sidebar Ad Slots */
.ec-sb-ad {
    margin-bottom: 20px;
    border-radius: var(--ec-radius-lg);
    overflow: hidden;
}

.ec-sb-ad img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--ec-radius-lg);
}

.ec-sb-ad iframe { max-width: 100%; }

.ec-ad-empty {
    background: var(--ec-bg-alt);
    border: 2px dashed #ddd;
    border-radius: var(--ec-radius-lg);
    padding: 32px 16px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.ec-ad-empty span {
    font-size: 14px;
    font-weight: 600;
    color: var(--ec-text-muted);
}

.ec-ad-empty small {
    font-size: 11px;
    color: #ccc;
}

/* Sidebar Tags */
.ec-sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ec-sb-tag {
    padding: 5px 12px;
    border-radius: var(--ec-radius-full);
    background: var(--ec-bg-alt);
    font-size: 12px;
    font-weight: 600;
    color: var(--ec-text-light);
    transition: all 0.2s;
}

.ec-sb-tag:hover {
    background: var(--ec-green);
    color: var(--ec-white);
}

/* Tag link in content */
.ec-tag-link {
    padding: 6px 16px;
    border-radius: var(--ec-radius-full);
    background: var(--ec-bg-alt);
    font-size: 13px;
    font-weight: 600;
    color: var(--ec-text-light);
    transition: all 0.3s ease;
}

.ec-tag-link:hover {
    background: var(--ec-green);
    color: var(--ec-white);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) {
  .ec-layout { grid-template-columns: 1fr; }
  .ec-sidebar { position: static; max-height: none; order: 2; }
  .ec-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-categories-grid { grid-template-columns: repeat(3, 1fr); }
  .ec-footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .ec-container { padding: 0 20px; }
  .ec-navbar { padding: 0 20px; }
  .ec-section { padding: 60px 0; }
  
  .ec-nav-links { display: none; }
  .ec-mobile-toggle { display: flex; }
  
  .ec-hero { padding: 120px 0 60px; }
  .ec-hero h1 { font-size: 42px; letter-spacing: -1px; }
  .ec-hero-sub { font-size: 17px; }
  
  .ec-section-title { font-size: 32px; }
  
  .ec-categories-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-posts-grid { grid-template-columns: 1fr; }
  .ec-steps-grid { grid-template-columns: 1fr; }
  .ec-footer-nav { grid-template-columns: 1fr; }
  
  .ec-newsletter-box { padding: 40px 24px; }
  .ec-newsletter-form { flex-direction: column; }
  
  .ec-page-header h1 { font-size: 36px; }
  .ec-single-header h1 { font-size: 32px; }

  .ec-blog-hero-title { font-size: 36px; }
  .ec-cat-grid { grid-template-columns: 1fr; }
  .ec-cat-card--featured .ec-cat-card-image { height: 220px; }
  .ec-cat-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ec-cat-card--small { flex-direction: column; }
  .ec-cat-card-image-sm { width: 100%; height: 180px; }
}

/* ══════════════════════════════════════
   BLOG PAGE – Category Sections
   ══════════════════════════════════════ */

.ec-blog-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.ec-blog-hero-title {
  font-family: var(--ec-font-display);
  font-size: 52px;
  font-weight: 800;
  color: var(--ec-dark);
  margin: 12px 0 16px;
  letter-spacing: -1px;
}

.ec-blog-hero-sub {
  font-size: 18px;
  color: var(--ec-text-light);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Sticky Category Navigation */
.ec-cat-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ec-border);
  padding: 16px 0;
  margin-bottom: 20px;
}

.ec-cat-nav-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 4px;
}

.ec-cat-nav-scroll::-webkit-scrollbar { display: none; }

.ec-cat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--ec-radius-full);
  background: var(--ec-white);
  border: 1.5px solid var(--ec-border);
  font-size: 14px;
  font-weight: 500;
  color: var(--ec-text);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--ec-transition);
  flex-shrink: 0;
}

.ec-cat-pill:hover {
  border-color: var(--ec-green);
  color: var(--ec-green);
  background: var(--ec-green-light);
  transform: translateY(-1px);
  box-shadow: var(--ec-shadow-sm);
}

.ec-cat-pill.is-active {
  background: var(--ec-green);
  color: var(--ec-white);
  border-color: var(--ec-green);
}

.ec-cat-pill-icon { font-size: 16px; line-height: 1; }

.ec-cat-pill-count {
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.ec-cat-pill.is-active .ec-cat-pill-count {
  background: rgba(255,255,255,0.25);
}

/* Category Sections */
.ec-blog-sections {
  padding-bottom: 40px;
}

.ec-cat-section {
  padding: 48px 0 56px;
  border-bottom: 1px solid var(--ec-border);
}

.ec-cat-section:nth-child(even) {
  background: var(--ec-bg-alt);
}

.ec-cat-section:last-child {
  border-bottom: none;
}

/* Section Header */
.ec-cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.ec-cat-section-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ec-cat-section-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.ec-cat-section-title {
  font-family: var(--ec-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ec-dark);
  margin: 0;
  line-height: 1.2;
}

.ec-cat-section-desc {
  font-size: 14px;
  color: var(--ec-text-light);
  margin: 4px 0 0;
  line-height: 1.5;
}

.ec-cat-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: var(--ec-radius-full);
  background: var(--ec-white);
  border: 1.5px solid var(--ec-border);
  transition: var(--ec-transition);
}

.ec-cat-section-link:hover {
  transform: translateX(4px);
  box-shadow: var(--ec-shadow-sm);
}

.ec-cat-section-link span {
  transition: transform 0.3s ease;
}

.ec-cat-section-link:hover span {
  transform: translateX(4px);
}

/* Category Grid: 1 featured + 2 small stacked */
.ec-cat-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.ec-cat-grid-small {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Featured Card */
.ec-cat-card--featured {
  background: var(--ec-white);
  border-radius: var(--ec-radius-lg);
  overflow: hidden;
  box-shadow: var(--ec-shadow-sm);
  transition: var(--ec-transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ec-border);
}

.ec-cat-card--featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--ec-shadow-lg);
}

.ec-cat-card--featured .ec-cat-card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.ec-cat-card--featured .ec-cat-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.ec-cat-card--featured:hover .ec-cat-card-image img {
  transform: scale(1.04);
}

.ec-cat-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--ec-radius-full);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ec-cat-card--featured .ec-cat-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ec-cat-card-title--lg {
  font-family: var(--ec-font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.ec-cat-card-title--lg a {
  color: var(--ec-dark);
  text-decoration: none;
}

.ec-cat-card-title--lg a:hover {
  color: var(--ec-green);
}

/* Small Cards */
.ec-cat-card--small {
  background: var(--ec-white);
  border-radius: var(--ec-radius-md);
  overflow: hidden;
  box-shadow: var(--ec-shadow-sm);
  transition: var(--ec-transition);
  display: flex;
  flex-direction: row;
  border: 1px solid var(--ec-border);
  flex: 1;
}

.ec-cat-card--small:hover {
  transform: translateY(-3px);
  box-shadow: var(--ec-shadow-md);
}

.ec-cat-card-image-sm {
  width: 200px;
  min-height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.ec-cat-card-image-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.ec-cat-card--small:hover .ec-cat-card-image-sm img {
  transform: scale(1.05);
}

.ec-cat-card--small .ec-cat-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.ec-cat-card-title {
  font-family: var(--ec-font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}

.ec-cat-card-title a {
  color: var(--ec-dark);
  text-decoration: none;
}

.ec-cat-card-title a:hover {
  color: var(--ec-green);
}

/* Excerpt */
.ec-cat-card-excerpt {
  font-size: 14px;
  color: var(--ec-text-light);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-cat-card-excerpt--sm {
  -webkit-line-clamp: 2;
  margin-bottom: 12px;
}

/* Footer */
.ec-cat-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.ec-cat-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ec-text);
}

.ec-cat-card-author img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.ec-cat-card-date {
  font-size: 12px;
  color: var(--ec-text-muted);
}

/* Placeholder Images */
.ec-cat-card-ph {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.ec-cat-card-ph span { font-size: 56px; opacity: 0.5; }

.ec-cat-card-ph--sm {
  min-height: 100%;
}

.ec-cat-card-ph--sm span { font-size: 36px; }

/* Post card excerpt for archive views */
.ec-post-card-excerpt {
  font-size: 14px;
  color: var(--ec-text-light);
  line-height: 1.6;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══════════════════════════════════════
   BLOG PAGE RESPONSIVE
   ══════════════════════════════════════ */

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

  .ec-cat-card--featured .ec-cat-card-image {
    height: 220px;
  }

  .ec-cat-card--small {
    flex-direction: column;
  }

  .ec-cat-card-image-sm {
    width: 100%;
    height: 180px;
  }

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

  .ec-blog-hero-title {
    font-size: 36px;
  }

  .ec-cat-section-title {
    font-size: 22px;
  }

  .ec-cat-section {
    padding: 32px 0 40px;
  }
}

@media (max-width: 600px) {
  .ec-blog-hero {
    padding: 60px 0 28px;
  }

  .ec-blog-hero-title {
    font-size: 28px;
  }

  .ec-blog-hero-sub {
    font-size: 15px;
  }

  .ec-cat-nav {
    padding: 12px 0;
  }

  .ec-cat-pill {
    padding: 8px 14px;
    font-size: 13px;
  }

  .ec-cat-card-title--lg {
    font-size: 18px;
  }

  .ec-cat-card-title {
    font-size: 15px;
  }

  .ec-cat-section-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

/* ══════════════════════════════════════
   WCAG ACCESSIBILITY OVERRIDES
   ══════════════════════════════════════ */

/* Fix inline #999 color (social proof, meta text) → 7:1 on white */
[style*="color:#999"],
[style*="color: #999"],
[style*="color:#767676"],
[style*="color: #767676"] {
  color: #595959 !important;
}

/* Marquee dot - decorative, mark as presentational */
.ec-marquee-dot {
  role: presentation;
}

/* Ensure hero text has enough contrast on image backgrounds */
.ec-hero h1,
.ec-hero-sub,
.ec-hero-buttons .ec-btn,
.ec-hero-social-proof {
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Footer: lighter green for logo on dark background */
.ec-footer .ec-logo-text span {
  color: #7AB07A;
}

/* Footer: ensure body text on dark bg has AA contrast */
.ec-footer .ec-logo-text {
  color: rgba(255,255,255,0.9);
}