/* 
 * Editorial Journal - Design System 
 * Based on "Editorial Precision" Reference
 */

:root {
  /* Editorial Palette */
  --ed-primary: #6941c6;
  --ed-primary-hover: #5225af;
  --ed-primary-bg: rgba(105, 65, 198, 0.08);
  --ed-surface: #f8f9fa;
  --ed-surface-low: #f3f4f5;
  --ed-surface-lowest: #ffffff;
  --ed-text-main: #101828;
  --ed-text-secondary: #344054;
  --ed-text-meta: #667085;
  --ed-outline: #eaecf0;
  
  /* Typography */
  --ed-font: 'Manrope', sans-serif;
}

/* Base Styles for Editorial Layout */
.editorial-body {
  background-color: var(--ed-surface);
  color: var(--ed-text-main);
  font-family: var(--ed-font);
  overflow-x: hidden;
}

/* Editorial Container */
.ed-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Sections */
.ed-section {
  padding: 80px 0;
}

/* Typography Hierarchy */
.display-lg {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ed-text-main);
}

.headline-lg {
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.headline-sm {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.title-md {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.body-lg {
  font-size: 16px;
  line-height: 1.7;
}

.label-md {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ed-primary);
}

/* Layout Components */
.ed-main-wrap {
  padding-top: 140px; /* Offset for fixed header */
}

/* Hero Section */
.ed-hero {
  max-width: 800px;
  margin-bottom: 96px;
}

.ed-text-gradient {
  color: var(--ed-primary);
}

/* Category Navigation */
.ed-category-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0 25px; /* Adicionado respiro para as sombras */
  margin-top: -10px;
  margin-bottom: 54px;
  scrollbar-width: none;
}
.ed-category-nav::-webkit-scrollbar { display: none; }

.ed-cat-btn {
  padding: 10px 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: var(--ed-surface-lowest);
  color: var(--ed-text-secondary);
  border: 1px solid var(--ed-outline);
}
.ed-cat-btn:hover {
  background: var(--ed-surface-low);
}
.ed-cat-btn.active {
  background: var(--ed-primary);
  color: #fff;
  border-color: var(--ed-primary);
  box-shadow: 0 10px 20px rgba(105, 65, 198, 0.2);
}

/* Featured Post Card */
.ed-featured-card {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr; /* Slimmer cover (approx 35%) */
  align-items: stretch;
  background: linear-gradient(135deg, #fdfcf7 0%, #ffffff 50%, #f5f3ff 100%) !important;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 96px;
  transition: all 0.5s ease;
  border: 1px solid var(--ed-outline);
}
.ed-featured-card:hover {
  box-shadow: 0 40px 80px -12px rgba(105, 65, 198, 0.12);
}

.ed-featured-content {
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ed-featured-thumb {
  position: relative;
  aspect-ratio: 1/1; /* More square-ish inside the grid */
  overflow: hidden;
}
/* Removed blend mode as it was causing 'buggy' background feel */
.ed-featured-thumb::after {
  display: none;
}
.ed-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

/* Blog Post Grid */
.ed-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}

.ed-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  background: var(--ed-surface-lowest);
  border-radius: 10px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.ed-post-card:hover {
  box-shadow: 0 20px 40px -12px rgba(105, 65, 198, 0.1);
  border-bottom-color: var(--ed-primary);
  transform: translateY(-4px);
}

.ed-post-thumb {
  position: relative;
  aspect-ratio: 16/10; /* Slimmer look */
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 8px;
}
.ed-post-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ed-primary);
  opacity: 0.12;
  mix-blend-mode: multiply;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.ed-post-card:hover .ed-post-thumb::after {
  opacity: 0.05;
}
.ed-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.ed-post-card:hover .ed-post-thumb img {
  transform: scale(1.05);
}

.ed-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ed-post-card h3 {
  flex: 1;
  transition: color 0.2s ease;
}
.ed-post-card:hover h3 {
  color: var(--ed-primary);
}

.ed-read-more {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ed-primary);
  margin-top: auto;
  padding-top: 24px;
}

/* Newsletter Section */
.ed-newsletter {
  background: var(--ed-surface-low);
  padding: 96px 0;
}

.ed-newsletter-box {
  background: var(--ed-surface-lowest);
  border-radius: 20px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.ed-newsletter-form {
  display: flex;
  gap: 12px;
}
.ed-newsletter-form input {
  flex: 1;
  padding: 16px 24px;
  background: var(--ed-surface);
  border: 1px solid var(--ed-outline);
  border-radius: 10px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.ed-newsletter-form input:focus {
  border-color: var(--ed-primary);
  box-shadow: 0 0 0 4px var(--ed-primary-bg);
}

.ed-btn-primary {
  background: var(--ed-primary);
  color: #fff;
  padding: 16px 32px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 20px rgba(105, 65, 198, 0.2);
}
.ed-btn-primary:hover {
  background: var(--ed-primary-hover);
  transform: translateY(-1px);
}

/* Header Override for Blog */
.site-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.site-header .header-nav, .site-header .header-logo {
    color: var(--ed-text-main) !important;
}
.site-header .header-nav a {
    color: var(--ed-text-secondary) !important;
}
.site-header .header-nav a:hover {
    color: var(--ed-primary) !important;
}
.site-header .btn--ghost {
    color: var(--ed-primary) !important;
    border: 1px solid var(--ed-primary-bg) !important;
    background: var(--ed-primary-bg) !important;
    border-radius: 8px;
}
.site-header.is-sticky {
    background: white !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

/* Pagination */
.ed-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 80px;
    margin-bottom: 100px;
}

.ed-page-num {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid var(--ed-outline);
}

.ed-page-num.active {
    background: var(--ed-primary);
    color: white;
    border-color: var(--ed-primary);
}

.ed-page-num:hover:not(.active) {
    background: var(--ed-surface-low);
}

/* Breadcrumbs */
.ed-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 48px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ed-text-meta);
}
.ed-breadcrumbs a {
    color: inherit;
    transition: color 0.2s ease;
}
.ed-breadcrumbs a:hover {
    color: var(--ed-primary);
}
.ed-breadcrumbs span {
    font-size: 12px;
}
.ed-breadcrumbs .current {
    color: var(--ed-text-main);
}

/* Article View Layout */
.ed-article-wrap {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    align-items: flex-start;
}

/* Article Header */
.ed-article-header {
    margin-bottom: 48px;
}
.ed-article-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    font-size: 14px;
    color: var(--ed-text-meta);
}
.ed-author-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ed-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ed-surface-low);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ed-author-avatar i {
    font-size: 18px;
    color: var(--ed-primary);
    opacity: 0.5;
}
.ed-author-name {
    font-weight: 700;
    color: var(--ed-text-main);
}

/* Feature Image Single */
.ed-article-thumb {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 21/9;
    background: var(--ed-surface-low);
    margin-bottom: 64px;
    border: 1px solid var(--ed-outline);
}
.ed-article-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ed-primary);
    opacity: 0.08;
    mix-blend-mode: multiply;
    pointer-events: none;
}
.ed-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}

/* Typography for Article Content */
.ed-article-content {
    font-size: 15px;
    color: var(--ed-text-main);
}
.ed-article-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}
.ed-article-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
.ed-article-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.4;
}
.ed-article-content ul, .ed-article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}
.ed-article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}
.ed-article-content blockquote {
    margin: 40px 0;
    padding: 28px 32px;
    background: var(--ed-surface-low);
    border-left: 4px solid var(--ed-primary);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
    font-style: italic;
    color: var(--ed-text-secondary);
    border-radius: 0 16px 16px 0;
}

/* Sidebar Widgets */
.ed-article-sidebar {
    display: grid;
    gap: 48px;
}

.ed-sidebar-widget {
    background: white;
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--ed-outline);
}
.ed-sidebar-widget .widget-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ed-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ed-outline);
}

/* Light Newsletter Widget (Styleguide standard) */
.ed-widget-newsletter-light {
    background: #ffffff;
    color: #101828;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    overflow: hidden;
    padding: 0;
}
.ed-nl-accent-bar {
    height: 4px;
    background: linear-gradient(90deg, #6941c6, #9b6dff);
}
.ed-nl-body {
    padding: 28px 32px 32px;
}
.ed-nl-body h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: #101828;
}
.ed-nl-body p {
    color: #475467;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.ed-newsletter-light-form {
    display: grid;
    gap: 12px;
}
.ed-newsletter-light-form input {
    width: 100%;
    background: #fff;
    border: 1px solid #d0d5dd;
    padding: 14px 16px;
    border-radius: 10px;
    color: #101828;
    outline: none;
    transition: all 0.2s ease;
    font-size: 14px;
}
.ed-newsletter-light-form input:focus {
    border-color: #6941c6;
    box-shadow: 0 0 0 3px rgba(105,65,198,.12);
}
.ed-newsletter-light-form .btn-submit {
    width: 100%;
    background: #6941c6;
    color: #fff;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ed-newsletter-light-form .btn-submit:hover {
    background: #5835b0;
    transform: translateY(-1px);
}

/* Recent Posts List Widget */
.ed-sidebar-recent-list {
    display: grid;
    gap: 24px;
}
.ed-recent-item-small {
    display: block;
    text-decoration: none;
}
.ed-recent-item-small .meta {
    font-size: 12px;
    color: var(--ed-text-meta);
    margin-bottom: 8px;
}
.ed-recent-item-small .title {
    font-weight: 700;
    color: var(--ed-text-main);
    line-height: 1.4;
    transition: color 0.2s ease;
}
.ed-recent-item-small:hover .title {
    color: var(--ed-primary);
}

/* Topic Chips */
.ed-topic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ed-topic-chip {
    padding: 8px 16px;
    background: var(--ed-surface-low);
    color: var(--ed-text-secondary);
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.ed-topic-chip:hover {
    border-color: var(--ed-primary);
    background: white;
    color: var(--ed-primary);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .ed-newsletter-box, .ed-featured-card, .ed-article-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .ed-article-sidebar {
      position: static;
  }
}

@media (max-width: 768px) {
  .ed-container { padding: 0 20px; }
  .ed-section { padding: 64px 0; }
  .ed-main-wrap { padding-top: 100px; }
  .ed-post-grid { grid-template-columns: 1fr; }
  .ed-newsletter-form { flex-direction: column; }
  .display-lg { font-size: 40px; }
  .ed-article-thumb { aspect-ratio: 16/9; }
  .ed-featured-card { grid-template-columns: 1fr !important; }
  .ed-featured-thumb { aspect-ratio: 16/9 !important; }
}

/* Typographic Cover System (Clean Editorial Pattern) */
.ed-typo-cover {
    position: absolute;
    inset: 0;
    background: transparent !important; /* Inherit from unified card background */
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 64px 48px;
    overflow: hidden;
    color: #6941c6 !important; /* Brand Purple */
    text-align: center;
    border-top: none !important;
    box-sizing: border-box;
    z-index: 5;
    border: 1px solid #f0f0f5; /* Very subtle outer edge */
}

/* No blobs/gradients for cleanup (v2) */
.ed-typo-cover::before,
.ed-typo-cover::after {
    display: none !important;
}

.ed-typo-cover h1,
.ed-typo-cover h2,
.ed-typo-cover h3 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.05em;
    font-family: 'Manrope', sans-serif;
    color: #6941c6 !important;
    z-index: 2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Small card variant */
.ed-post-thumb .ed-typo-cover {
    padding: 32px;
}
.ed-post-thumb .ed-typo-cover h3 {
    font-size: 20px;
}

/* Featured large variant */
.ed-featured-thumb .ed-typo-cover {
    padding: 64px;
}
.ed-featured-thumb .ed-typo-cover h2 {
    font-size: 48px;
}
/* ══════════════════════════════════════════════════════════
   Visual Enhancements - Animated Backgrounds
   ══════════════════════════════════════════════════════════ */
/* Visual Enhancements - Hidden for cleanup */
.ed-hero-visuals, 
.ed-header-visuals,
.ed-blob {
    display: none !important;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -50px) rotate(10deg) scale(1.1); }
    66% { transform: translate(-20px, 20px) rotate(-10deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
