/*
Theme Name: Fraterk Cozy Pastel Blog
Theme URI: https://fraterk.cl
Author: FTK Tech
Author URI: https://ftk.cl
Description: Tema editorial Lo-Fi Cozy con paleta pastel orgánica (Sage, Terracotta, Nectarine, Menthe) y modo cromático minimalista personalizable.
Version: 1.1.2609
Text Domain: fraterk-blog
*/

/* ==========================================================================
   COLOR PALETTES: PASTEL COZY (DEFAULT) & CROMÁTICO (MONOCHROME)
   ========================================================================== */

:root, [data-theme="pastel"] {
  --bg-cozy: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-sidebar: #F4EFEA;
  
  --text-main: #2D2B28;
  --text-muted: #6E6862;
  --text-subtle: #9E968F;
  
  /* Paleta Pastel Orgánica (Nectarine, Pêche, Menthe, Lagune, Terracotta, Sage) */
  --pastel-nectarine: #D7897F;
  --pastel-peche: #F9B95C;
  --pastel-menthe: #96C7B3;
  --pastel-lagune: #6398A9;
  --pastel-terracotta: #C86446;
  --pastel-sage: #93A28C;
  --pastel-mist: #B8C4C2;
  --pastel-linen: #E8DFD5;

  --accent-primary: var(--pastel-terracotta);
  --border-cozy: rgba(45, 43, 40, 0.08);
  --border-cozy-hover: rgba(45, 43, 40, 0.18);
  
  --shadow-card: 0 4px 16px rgba(45, 43, 40, 0.04), 0 1px 3px rgba(45, 43, 40, 0.02);
  --shadow-card-hover: 0 12px 32px rgba(45, 43, 40, 0.08), 0 2px 6px rgba(45, 43, 40, 0.04);

  /* Valores por defecto de Cabecera */
  --header-pastel-bg: linear-gradient(135deg, #F6E6DF 0%, #E8DFD5 50%, #DDE7E4 100%);
  --header-pastel-size: auto;
  --header-pastel-repeat: repeat;
  --header-pastel-pos: center center;
}

/* Modo Cromático (100% Monocromático Negro y Blanco Ultra Limpio) */
[data-theme="chromatic"] {
  --bg-cozy: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #F5F5F5;
  
  --text-main: #000000;
  --text-muted: #444444;
  --text-subtle: #777777;
  
  --pastel-nectarine: #000000;
  --pastel-peche: #000000;
  --pastel-menthe: #000000;
  --pastel-lagune: #000000;
  --pastel-terracotta: #000000;
  --pastel-sage: #000000;
  --pastel-mist: #333333;
  --pastel-linen: #EEEEEE;

  --accent-primary: #000000;
  --border-cozy: #E0E0E0;
  --border-cozy-hover: #000000;
  
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 14px rgba(0,0,0,0.12);

  --header-chromatic-bg: #000000;
}

/* Typography & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-cozy);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header & Cover */
.blog-cover {
  height: 200px;
  background-color: #E8DFD5;
  background-image: var(--header-pastel-bg);
  background-size: var(--header-pastel-size);
  background-position: var(--header-pastel-pos);
  background-repeat: var(--header-pastel-repeat);
  position: relative;
  transition: background 0.4s ease, background-color 0.4s ease;
  border-bottom: 1px solid var(--border-cozy);
}

[data-theme="chromatic"] .blog-cover {
  background-image: none !important;
  background-color: var(--header-chromatic-bg, #000000) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-header-container {
  max-width: 960px;
  margin: -50px auto 40px;
  padding: 0 24px;
  position: relative;
}

.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.notion-icon-avatar {
  font-size: 3.8rem;
  line-height: 1;
  display: inline-block;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
}

.chromatic-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-cozy);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.chromatic-toggle-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.blog-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.blog-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Nav Badges */
.nav-tags-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-cozy);
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.nav-tag-pill:hover {
  transform: translateY(-2px);
  border-color: var(--border-cozy-hover);
}

.nav-tag-pill.tag-nectarine { border-left: 4px solid var(--pastel-nectarine); }
.nav-tag-pill.tag-peche { border-left: 4px solid var(--pastel-peche); }
.nav-tag-pill.tag-menthe { border-left: 4px solid var(--pastel-menthe); }
.nav-tag-pill.tag-lagune { border-left: 4px solid var(--pastel-lagune); }

/* Main Post Feed (Grid con Miniaturas y Stickers) */
.feed-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Welcome Callout Banner */
.cozy-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-cozy);
  border-left: 5px solid var(--pastel-peche);
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}

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

/* Article Card (Con Imagen Destacada) */
.article-cozy-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-cozy);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.article-cozy-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-cozy-hover);
}

.card-media-wrapper {
  width: 100%;
  height: 190px;
  background: var(--pastel-linen);
  overflow: hidden;
  position: relative;
}

.card-media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-cozy-card:hover .card-media-wrapper img {
  transform: scale(1.05);
}

.card-placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--pastel-linen) 0%, var(--bg-sidebar) 100%);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

.category-sticker-pill {
  background: var(--bg-sidebar);
  color: var(--text-main);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
}

.card-post-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-post-excerpt {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-read-action {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pastel-terracotta);
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="chromatic"] .card-read-action {
  color: #000000;
}

/* Footer */
.blog-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border-cozy);
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.875rem;
}

/* ==========================================================================
   SINGLE POST EDITORIAL EXPERIENCE (APPLE / NOTION / LINEAR STANDARD)
   ========================================================================== */

.single-post-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.single-article {
  background: transparent;
}

/* Header del Post */
.single-header {
  margin-bottom: 36px;
}

.single-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.single-category-badge {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-cozy);
  box-shadow: var(--shadow-card);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.single-category-badge a {
  color: inherit;
  text-decoration: none;
}

.single-date-author {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.single-post-title {
  font-size: clamp(2.2rem, 4.8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-main);
  margin: 0 0 20px;
}

/* Imagen Destacada */
.single-featured-wrap {
  width: 100%;
  margin: 0 0 44px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-cozy);
  box-shadow: var(--shadow-card-hover);
  background: var(--pastel-linen);
}

.single-featured-wrap img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Contenido del Artículo: Columnas y Lectura Óptima */
.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-main);
}

/* Párrafos */
.article-body p {
  margin: 0 0 24px;
  max-width: 100%;
  word-break: break-word;
}

/* Encabezados internos: Mayor anchura, presencia y separación visual */
.article-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-main);
  margin: 48px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-cozy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-body h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text-main);
  margin: 36px 0 16px;
}

.article-body h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
}

/* LISTAS: Corrección milimétrica de márgenes y bullets centrados */
.article-body ul,
.article-body ol {
  margin: 0 0 28px;
  padding-left: 28px;
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.75;
  padding-left: 6px;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li::marker {
  color: var(--pastel-terracotta);
  font-weight: 700;
}

[data-theme="chromatic"] .article-body li::marker {
  color: #000000;
}

/* Listas anidadas */
.article-body ul ul,
.article-body ol ol,
.article-body ul ol,
.article-body ol ul {
  margin: 8px 0 12px;
  padding-left: 24px;
}

/* Enlaces dentro del contenido */
.article-body a {
  color: var(--pastel-terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

[data-theme="chromatic"] .article-body a {
  color: #000000;
  text-decoration: underline;
}

.article-body a:hover {
  opacity: 0.75;
}

/* Citas y Blockquotes Modernos */
.article-body blockquote {
  margin: 32px 0;
  padding: 18px 24px;
  background: var(--bg-card);
  border-left: 4px solid var(--pastel-peche);
  border-radius: 4px 14px 14px 4px;
  border-top: 1px solid var(--border-cozy);
  border-right: 1px solid var(--border-cozy);
  border-bottom: 1px solid var(--border-cozy);
  box-shadow: var(--shadow-card);
  font-style: italic;
  color: var(--text-muted);
}

[data-theme="chromatic"] .article-body blockquote {
  border-left-color: #000000;
  background: #F8F8F8;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Callout CTA del artículo */
.article-cta-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-cozy);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  margin: 56px 0 32px;
  border-left: 5px solid var(--pastel-lagune);
}

[data-theme="chromatic"] .article-cta-box {
  border-left-color: #000000;
}

/* Navegación entre posts */
.single-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-cozy);
  font-size: 0.95rem;
  font-weight: 600;
}

.single-post-nav a {
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.single-post-nav a:hover {
  color: var(--pastel-terracotta);
  transform: translateX(2px);
}

[data-theme="chromatic"] .single-post-nav a:hover {
  color: #000000;
}

.single-post-nav .nav-next {
  text-align: right;
  justify-self: end;
}

