/*
Theme Name: Elcio
Theme URI: https://elcio.com.br
Author: Elcio
Author URI: https://elcio.com.br
Description: Tema exclusivo para elcio.com.br — editorial, sofisticado, com dark mode.
Version: 2.1.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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elcio
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
  /* Warm editorial palette — paper & ink */
  --bg: #F6F3ED;
  --surface: #FFFFFF;
  --text: #1C1917;
  --text-secondary: #78716C;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --accent-soft: rgba(194, 65, 12, 0.08);
  --border: #E7E5E4;
  --code-bg: #EDEBE6;
  --shadow: rgba(28, 25, 23, 0.06);

  /* Layout */
  --header-height: 64px;
  --content-width: 800px;
  --wide-width: 1200px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s var(--ease);

  /* Type scale */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="dark"] {
  --bg: #171412;
  --surface: #231F1C;
  --text: #E7E5E4;
  --text-secondary: #A8A29E;
  --accent: #EA580C;
  --accent-hover: #FB923C;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --border: #2E2A25;
  --code-bg: #1E1B18;
  --shadow: rgba(0, 0, 0, 0.2);
}

/* WordPress Preset Variables (used by Gutenberg blocks) */
:root {
  --wp--preset--color--primary: #C2410C;
  --wp--preset--color--secondary: #00385b;
  --wp--preset--color--foreground: #1C1917;
  --wp--preset--color--background: #F6F3ED;
  --wp--preset--spacing--20: 0.5rem;
  --wp--preset--spacing--30: 2rem;
  --wp--preset--spacing--40: 2rem;
  --wp--preset--spacing--50: 3rem;
  --wp--preset--spacing--60: 4.5rem;
}

/* Gutenberg color utility classes */
.has-primary-color { color: var(--wp--preset--color--primary) !important; }
.has-secondary-color { color: var(--wp--preset--color--secondary) !important; }
.has-foreground-color { color: var(--wp--preset--color--foreground) !important; }
.has-background-color { color: var(--wp--preset--color--background) !important; }

.has-primary-background-color { background-color: var(--wp--preset--color--primary) !important; }
.has-secondary-background-color { background-color: var(--wp--preset--color--secondary) !important; }
.has-foreground-background-color { background-color: var(--wp--preset--color--foreground) !important; }
.has-background-background-color { background-color: var(--wp--preset--color--background) !important; }

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 2rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  transition: color var(--transition), background-color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Grain texture overlay — subtle tactile quality */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

main {
  flex: 1;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.75rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.25rem;
}

strong { font-weight: 600; }

/* ==========================================================================
   Animations
   ========================================================================== */

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-reveal base */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 5rem;
  animation: fadeUp 0.6s var(--ease) both;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(246, 243, 237, 0.92);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 1px 0 var(--border);
  transition: background var(--transition), box-shadow var(--transition);
  animation: slideDown 0.5s var(--ease) both;
}

/* WordPress admin bar offset */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

[data-theme="dark"] .site-header {
  background: rgba(23, 20, 18, 0.92);
}

.site-header .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.site-brand:hover {
  color: var(--text);
}

.site-brand img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}

.site-brand:hover img {
  border-color: var(--accent);
}

.site-brand span {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 1rem;
  right: 1rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after,
.main-nav .current_page_item a::after {
  transform: scaleX(1);
}

.main-nav .current-menu-item a,
.main-nav .current_page_item a {
  color: var(--text);
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease);
}

.theme-toggle:hover svg {
  transform: rotate(25deg);
}

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }

[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.menu-toggle:hover {
  color: var(--text);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Reading Progress Bar (single posts)
   ========================================================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1001;
  width: 0;
  transition: width 0.1s linear;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.footer-inner {
  font-size: 0.813rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-social a {
  color: var(--text-secondary);
  transition: color var(--transition), transform var(--transition);
  display: block;
}

.footer-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.site-footer p {
  font-size: 0.813rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}

/* ==========================================================================
   Front Page
   ========================================================================== */

.front-page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.front-page-content ul,
.front-page-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5rem;
}

.front-page-content li {
  margin-bottom: 0.5rem;
}

.front-page-content li::marker {
  color: var(--accent);
}

/* Hero heading on front page — editorial scale */
.front-page-content > .wp-block-heading:first-child,
.front-page-content > h1:first-child,
.front-page-content > h2:first-child {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Blog Cards (home.php, archive.php, search.php)
   ========================================================================== */

.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: flex;
  gap: 1.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
  position: relative;
  cursor: pointer;
}

.post-card:first-child {
  padding-top: 0;
}

.post-card__thumb {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  filter: grayscale(15%);
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.post-card__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.post-card__title a {
  color: var(--text);
  transition: color var(--transition);
}

.post-card__title a:hover {
  color: var(--accent);
}

/* Full-card click overlay via title link */
.post-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card__excerpt {
  font-size: 0.938rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Staggered reveal for cards */
.post-card.reveal:nth-child(1) { transition-delay: 0s; }
.post-card.reveal:nth-child(2) { transition-delay: 0.06s; }
.post-card.reveal:nth-child(3) { transition-delay: 0.12s; }
.post-card.reveal:nth-child(4) { transition-delay: 0.18s; }
.post-card.reveal:nth-child(5) { transition-delay: 0.24s; }
.post-card.reveal:nth-child(6) { transition-delay: 0.3s; }
.post-card.reveal:nth-child(7) { transition-delay: 0.36s; }
.post-card.reveal:nth-child(8) { transition-delay: 0.42s; }

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.625rem;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .page-numbers.current {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Archive header */
.archive-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.archive-header h1 {
  font-size: 2.5rem;
  font-weight: 400;
}

.archive-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.single-header {
  margin-bottom: 2.5rem;
}

.single-header__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.single-header__meta a {
  color: var(--accent);
  font-weight: 600;
}

.single-header__meta .sep {
  color: var(--border);
}

.single-header h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0;
}

.single-featured {
  margin: 0 -1.5rem 2.5rem;
}

.single-featured img {
  width: 100%;
}

.single-tags {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-tags a {
  display: inline-block;
  padding: 0.3rem 0.875rem;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.single-tags a:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Drop cap on single posts */
.single-post .entry-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 4.25rem;
  line-height: 0.78;
  padding-right: 0.6rem;
  padding-top: 0.1rem;
  color: var(--accent);
  font-weight: 400;
}

/* ==========================================================================
   Gutenberg Block Styles
   ========================================================================== */

.entry-content > * {
  margin-bottom: 1.5rem;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

/* Headings in content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child {
  margin-top: 0;
}

/* Links in content — animated underline */
.entry-content a:not(.wp-block-button__link) {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--transition), color var(--transition);
}

.entry-content a:not(.wp-block-button__link):hover {
  background-size: 100% 2px;
}

/* Lists */
.entry-content ul,
.entry-content ol {
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content li::marker {
  color: var(--accent);
}

/* Code */
.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

.entry-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  transition: background var(--transition), border-color var(--transition);
}

.entry-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.65;
}

/* wp-block-code (Gutenberg) */
.wp-block-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  transition: background var(--transition), border-color var(--transition);
}

.wp-block-code code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.65;
  font-family: var(--font-mono);
}

/* Blockquote — editorial pull quote */
.entry-content blockquote,
.wp-block-quote {
  position: relative;
  border: none;
  border-left: none;
  padding: 1.5rem 0 1.5rem 2.5rem;
  margin: 2.5rem 0;
  background: none;
}

.entry-content blockquote::before,
.wp-block-quote::before {
  content: '\201C';
  position: absolute;
  left: -0.1rem;
  top: -0.5rem;
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
}

.entry-content blockquote p,
.wp-block-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--text);
}

.entry-content blockquote p:last-child,
.wp-block-quote p:last-child {
  margin-bottom: 0;
}

.wp-block-quote cite,
.entry-content blockquote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.813rem;
  font-style: normal;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Buttons */
.wp-block-button .wp-block-button__link {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.938rem;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
  background: var(--accent);
  color: #fff;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
  color: var(--accent);
  border: 2px solid var(--accent);
  background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover {
  background: var(--accent);
  color: #fff;
}

/* Images */
.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-image figcaption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Separator */
.wp-block-separator,
hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem auto;
  max-width: 120px;
  transition: background var(--transition);
}

.wp-block-separator.is-style-wide {
  max-width: 100%;
}

.wp-block-separator.is-style-dots {
  background: none;
  text-align: center;
  color: var(--text-secondary);
  max-width: 100%;
}

/* Tables */
.wp-block-table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.938rem;
}

.wp-block-table td,
.wp-block-table th,
.entry-content table td,
.entry-content table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  transition: border-color var(--transition);
}

.wp-block-table th,
.entry-content table th {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Columns */
.wp-block-columns {
  gap: 2rem;
}

/* Gallery */
.wp-block-gallery {
  gap: 0.5rem !important;
}

/* Embed / Video */
.wp-block-embed {
  margin-bottom: 1.5rem;
}

.wp-block-embed .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.wp-block-embed .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Wide & Full width */
.entry-content .alignwide {
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
}

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

.entry-content .aligncenter {
  text-align: center;
}

/* Gutenberg blocks with background — padding, text inheritance */
.wp-block-group.has-background {
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
}

.has-text-color,
.has-text-color h1,
.has-text-color h2,
.has-text-color h3,
.has-text-color h4,
.has-text-color h5,
.has-text-color h6,
.has-text-color p,
.has-text-color li {
  color: inherit;
}

.has-text-color li::marker {
  color: inherit;
}

.has-link-color a:not(.wp-block-button__link) {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  background-image: none;
}

.has-link-color a:not(.wp-block-button__link):hover {
  opacity: 0.8;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.comments-area .comments-title {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

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

.comment-list .comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-list .comment:last-child {
  border-bottom: none;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
  margin-top: 0;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author .avatar {
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.comment-author .fn {
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--text);
}

.comment-metadata {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-content {
  font-size: 0.938rem;
  line-height: 1.65;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-reply-link {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: inline-block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Comment form */
.comment-respond {
  margin-top: 2.5rem;
}

.comment-respond .comment-reply-title {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.comment-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
  margin-bottom: 1.25rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-form .form-submit .submit {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.75rem 2.5rem;
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.comment-form .form-submit .submit:hover {
  background: var(--accent);
  color: #fff;
}

/* ==========================================================================
   Search
   ========================================================================== */

.search-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.search-header h1 {
  font-size: 2rem;
  font-weight: 400;
}

.search-header p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.938rem;
}

/* Search form */
.search-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--accent);
}

.search-form .search-submit {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.search-form .search-submit:hover {
  background: var(--accent);
  color: #fff;
}

/* ==========================================================================
   404
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 6rem 0;
}

.error-404 h1 {
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 400;
  color: var(--border);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-404 h2 {
  font-weight: 400;
  margin-bottom: 1rem;
}

.error-404 p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.error-404 .search-form {
  margin: 0 auto;
}

/* ==========================================================================
   Blank Template
   ========================================================================== */

body.page-template-template-blank {
  display: block;
}

body.page-template-template-blank::after {
  display: none;
}

/* ==========================================================================
   Mentoria Page
   ========================================================================== */

/* Reset site-main padding for full-bleed sections */
body.page-template-template-mentoria .site-main {
  padding-top: var(--header-height);
  padding-bottom: 0;
}

.mentoria-page {
  overflow: hidden;
}

/* ---------- Hero ---------- */
.mentoria-hero {
  background:
    radial-gradient(900px 500px at 20% 30%, rgba(194, 65, 12, 0.15), transparent 60%),
    radial-gradient(700px 400px at 80% 10%, rgba(234, 88, 12, 0.10), transparent 55%),
    #171412;
  color: #E7E5E4;
  padding: 5rem 1.5rem 4rem;
}

.mentoria-hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.mentoria-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.813rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #A8A29E;
  margin-bottom: 1.25rem;
}

.mentoria-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.2);
}

.mentoria-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #F6F3ED;
  margin-bottom: 1rem;
}

.mentoria-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #A8A29E;
  max-width: 58ch;
  margin-bottom: 2rem;
}

.mentoria-subtitle strong {
  color: #F6F3ED;
}

.mentoria-hero__banner {
  width: calc(100% + 3rem);
  margin: 2rem -1.5rem;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

.mentoria-quote {
  position: relative;
  border: none;
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.3;
  color: #F6F3ED;
}

.mentoria-hero p {
  color: #A8A29E;
  margin-bottom: 1.25rem;
}

.mentoria-hero strong {
  color: #F6F3ED;
}

/* ---------- Shared list style ---------- */
.mentoria-list {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.mentoria-list li {
  margin-bottom: 0.625rem;
  line-height: 1.6;
}

.mentoria-list li::marker {
  color: var(--accent);
}

.mentoria-hero .mentoria-list {
  color: #A8A29E;
}

.mentoria-hero .mentoria-list strong {
  color: #F6F3ED;
}

/* ---------- CTA buttons ---------- */
.mentoria-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.5rem;
  align-items: center;
}

.mentoria-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.938rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}

.mentoria-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(194, 65, 12, 0.25);
}

.mentoria-cta--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.mentoria-cta--outline:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.mentoria-hero .mentoria-cta--outline {
  color: #E7E5E4;
  border-color: rgba(255, 255, 255, 0.15);
}

.mentoria-hero .mentoria-cta--outline:hover {
  background: #E7E5E4;
  color: #171412;
  border-color: #E7E5E4;
}

/* ---------- Sections ---------- */
.mentoria-section {
  padding: 4.5rem 1.5rem;
}

.mentoria-section__inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.mentoria-section h2 {
  font-family: var(--font-serif);
  color: var(--text);
}

.mentoria-section h3 {
  font-family: var(--font-serif);
  color: var(--text);
  margin-top: 2rem;
}

.mentoria-section p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.mentoria-section strong {
  color: var(--text);
}

.mentoria-section--alt {
  background: var(--surface);
}

/* Dark section variant */
.mentoria-section--dark {
  background:
    radial-gradient(600px 400px at 80% 50%, rgba(194, 65, 12, 0.08), transparent 60%),
    #171412;
  color: #E7E5E4;
}

.mentoria-section--dark h2,
.mentoria-section--dark h3,
.mentoria-section--dark strong {
  color: #F6F3ED;
}

.mentoria-section--dark p,
.mentoria-section--dark .mentoria-list {
  color: #A8A29E;
}

.mentoria-section--dark .mentoria-list strong {
  color: #F6F3ED;
}

/* ---------- Image + content sections ---------- */
.mentoria-img-section__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: center;
}

.mentoria-img-section__inner--reverse {
  grid-template-columns: 1.4fr 1fr;
}

.mentoria-img-section__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- Modules grid ---------- */
.mentoria-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.mentoria-module {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.mentoria-module:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--shadow);
}

.mentoria-module h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.mentoria-module p {
  font-size: 0.938rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.65;
}

.mentoria-module strong {
  color: var(--text);
}

/* ---------- Callout ---------- */
.mentoria-callout {
  padding: 1.75rem;
  border-radius: 8px;
  border: 1px solid rgba(194, 65, 12, 0.25);
  background: var(--accent-soft);
  margin-bottom: 1.5rem;
}

.mentoria-callout__price {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.mentoria-callout__price strong {
  font-size: 1.375rem;
}

.mentoria-callout__installment {
  color: var(--text-secondary);
  font-size: 0.938rem;
}

.mentoria-callout .mentoria-list {
  margin-bottom: 0;
}

.mentoria-callout .mentoria-list ul {
  padding-left: 1.25rem;
  margin-top: 0.375rem;
}

/* ---------- Form (expandable) ---------- */
.mentoria-form {
  margin: 1.5rem 0;
  border-radius: 8px;
  background: var(--accent-soft);
  overflow: hidden;
  max-height: 0;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  transition: max-height 0.6s var(--ease), padding 0.6s var(--ease), border-color 0.3s var(--ease);
}

.mentoria-form.active {
  padding: 1.75rem;
  border-color: rgba(194, 65, 12, 0.25);
  max-height: 700px;
}

.mentoria-form label {
  display: block;
  margin-bottom: 1.25rem;
}

.mentoria-form label span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.mentoria-form input[type="text"],
.mentoria-form input[type="email"],
.mentoria-form input[type="tel"],
.mentoria-form textarea {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border);
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.mentoria-form input:focus,
.mentoria-form textarea:focus {
  border-bottom-color: var(--accent);
}

.mentoria-form textarea {
  min-height: 80px;
  resize: vertical;
}

.mentoria-form .mentoria-cta {
  margin-top: 0.5rem;
}

/* ---------- Final image ---------- */
.mentoria-final-img {
  width: calc(100% + 3rem);
  margin: 2rem -1.5rem 1.5rem;
  display: block;
  object-fit: cover;
  max-height: 420px;
  border-radius: 0;
}

/* ---------- Fineprint ---------- */
.mentoria-fineprint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Mobile Overlay
   ========================================================================== */

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  html {
    font-size: 93.75%;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.625rem; }

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

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease), background var(--transition);
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 1.5rem;
    box-shadow: -8px 0 30px rgba(28, 25, 23, 0.08);
  }

  [data-theme="dark"] .main-nav {
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.875rem 0;
    font-size: 0.938rem;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a::after {
    display: none;
  }

  /* Post cards stack */
  .post-card {
    flex-direction: column;
    gap: 1rem;
  }

  .post-card__thumb {
    width: 100%;
    height: 200px;
  }

  .single-featured {
    margin: 0 -1.5rem 2rem;
  }

  .container,
  .container--wide {
    padding: 0 1rem;
  }

  .comment-list .children {
    padding-left: 1rem;
  }

  .front-page-content > .wp-block-heading:first-child,
  .front-page-content > h1:first-child,
  .front-page-content > h2:first-child {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  /* Mentoria responsive */
  .mentoria-hero {
    padding: 3.5rem 1rem 3rem;
  }

  .mentoria-hero__banner,
  .mentoria-final-img {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .mentoria-section {
    padding: 3rem 1rem;
  }

  .mentoria-img-section__inner,
  .mentoria-img-section__inner--reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mentoria-img-section__media {
    order: -1;
  }

  .mentoria-img-section__media img {
    min-height: 200px;
    max-height: 280px;
  }

  .mentoria-modules {
    grid-template-columns: 1fr;
  }

  .mentoria-cta {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.875rem; }

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

  .post-card__thumb {
    height: 160px;
  }

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

  .single-post .entry-content > p:first-of-type::first-letter {
    font-size: 3.5rem;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .menu-toggle,
  .comments-area,
  .pagination,
  .reading-progress {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  body::after {
    display: none;
  }

  .site-main {
    padding-top: 0;
    animation: none;
  }
}
