/*
Theme Name: Dinero Sin Dinero
Theme URI: https://dinerosindinero.com/
Author: Dinero Sin Dinero
Author URI: https://dinerosindinero.com/
Description: Tema editorial rápido, accesible y optimizado para una publicación de finanzas personales.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
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: dinero-sin-dinero
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --dsd-ink: #102a2d;
  --dsd-ink-soft: #40585a;
  --dsd-teal: #067a6b;
  --dsd-teal-dark: #045e54;
  --dsd-mint: #bdeed8;
  --dsd-mint-pale: #eaf8f2;
  --dsd-gold: #f2bd54;
  --dsd-paper: #fbfbf7;
  --dsd-white: #ffffff;
  --dsd-line: #dfe8e4;
  --dsd-danger: #9b3131;
  --dsd-radius-sm: 10px;
  --dsd-radius: 18px;
  --dsd-radius-lg: 28px;
  --dsd-shadow: 0 16px 44px rgba(16, 42, 45, 0.09);
  --dsd-content: 760px;
  --dsd-wide: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dsd-ink);
  background: var(--dsd-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

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

iframe,
video {
  max-width: 100%;
}

a {
  color: var(--dsd-teal-dark);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--dsd-ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.68rem 1.08rem;
  border: 1px solid var(--dsd-teal);
  border-radius: 999px;
  color: var(--dsd-white);
  background: var(--dsd-teal);
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover,
.wp-element-button:hover {
  color: var(--dsd-white);
  background: var(--dsd-teal-dark);
}

:focus-visible {
  outline: 3px solid var(--dsd-gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.72em;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.13;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.35rem, 6vw, 5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }

p,
ul,
ol,
blockquote {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

blockquote {
  margin-inline: 0;
  padding: 1.15rem 1.35rem;
  border-left: 5px solid var(--dsd-gold);
  border-radius: 0 var(--dsd-radius-sm) var(--dsd-radius-sm) 0;
  background: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--dsd-white);
  box-shadow: var(--dsd-shadow);
}

.container {
  width: min(calc(100% - 2rem), var(--dsd-wide));
  margin-inline: auto;
}

.content-width {
  width: min(calc(100% - 2rem), var(--dsd-content));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(223, 232, 228, 0.9);
  background: rgba(251, 251, 247, 0.94);
  backdrop-filter: blur(14px);
}

.admin-bar .site-header { top: 32px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1.4rem;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: max-content;
  gap: 0.75rem;
}

.custom-logo-link img {
  width: auto;
  max-height: 48px;
}

.site-title {
  color: var(--dsd-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.site-title-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-right: 0.55rem;
  border-radius: 50%;
  place-items: center;
  color: var(--dsd-ink);
  background: var(--dsd-gold);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 900;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  gap: 1.1rem;
  list-style: none;
}

.primary-nav a {
  color: var(--dsd-ink);
  font-size: 0.94rem;
  font-weight: 720;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--dsd-teal);
}

.menu-drawer summary {
  display: none;
  min-width: 46px;
  min-height: 46px;
  border: 1px solid var(--dsd-line);
  border-radius: 50%;
  place-items: center;
  background: var(--dsd-white);
  cursor: pointer;
  list-style: none;
}

.menu-drawer summary::-webkit-details-marker { display: none; }

.hero {
  overflow: hidden;
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(circle at 84% 18%, rgba(242, 189, 84, 0.44), transparent 17rem),
    linear-gradient(145deg, #0b4943 0%, #086f63 58%, #0a8d78 100%);
  color: var(--dsd-white);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 850px;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  gap: 0.75rem;
}

.hero .button {
  border-color: var(--dsd-gold);
  color: var(--dsd-ink);
  background: var(--dsd-gold);
}

.hero .button-secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--dsd-white);
  background: transparent;
}

.hero-note {
  position: relative;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: var(--dsd-radius-lg);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 20px 60px rgba(0, 20, 18, 0.2);
  backdrop-filter: blur(8px);
}

.hero-note::before {
  display: block;
  width: 54px;
  height: 8px;
  margin-bottom: 1.35rem;
  border-radius: 99px;
  background: var(--dsd-gold);
  content: "";
}

.hero-note h2 {
  font-size: 1.55rem;
}

.hero-note ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
}

.section {
  padding: clamp(3.8rem, 8vw, 7rem) 0;
}

.section-alt {
  background: var(--dsd-mint-pale);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.section-heading h2 { margin-bottom: 0; }
.section-heading p { max-width: 610px; margin-bottom: 0.3rem; color: var(--dsd-ink-soft); }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.topic-card {
  position: relative;
  min-height: 175px;
  padding: 1.45rem;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius);
  background: var(--dsd-white);
  box-shadow: 0 8px 28px rgba(16, 42, 45, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dsd-shadow);
}

.topic-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.42rem;
}

.topic-card p {
  margin-bottom: 0;
  color: var(--dsd-ink-soft);
  font-size: 0.94rem;
}

.topic-card a::after,
.post-card-title a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.topic-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 12px;
  place-items: center;
  color: var(--dsd-teal-dark);
  background: var(--dsd-mint);
  font-weight: 900;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius);
  background: var(--dsd-white);
}

.post-card-image {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, var(--dsd-teal), var(--dsd-ink));
}

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

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

.post-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255,255,255,.7);
  font-family: Georgia, serif;
  font-size: 2.7rem;
  font-weight: 900;
}

.post-card-body { padding: 1.3rem; }

.post-card-title {
  margin-bottom: 0.65rem;
  font-size: 1.38rem;
  text-wrap: balance;
}

.post-card-title a {
  color: var(--dsd-ink);
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.72rem;
  gap: 0.45rem 0.8rem;
  color: var(--dsd-ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.category-label {
  display: inline-flex;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  color: var(--dsd-teal-dark);
  background: var(--dsd-mint-pale);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.post-card-excerpt {
  margin-bottom: 0;
  color: var(--dsd-ink-soft);
  font-size: 0.94rem;
}

.featured-story {
  display: grid;
  overflow: hidden;
  grid-template-columns: 1.1fr 0.9fr;
  border-radius: var(--dsd-radius-lg);
  color: var(--dsd-white);
  background: var(--dsd-ink);
}

.featured-story-media { min-height: 420px; }
.featured-story-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-story-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4.2rem); }
.featured-story h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
.featured-story h2 a { color: inherit; text-decoration: none; }
.featured-story p { color: rgba(255,255,255,.78); }

.ad-slot {
  padding: 1.1rem;
  border: 1px dashed #bccbc5;
  border-radius: var(--dsd-radius-sm);
  color: #647673;
  background: #f4f6f4;
  font-size: 0.78rem;
  text-align: center;
}

.ad-slot::before {
  display: block;
  margin-bottom: 0.55rem;
  content: "Publicidad";
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-main { min-height: 56vh; }

.page-header,
.article-header {
  padding: clamp(3.6rem, 8vw, 7rem) 0 2.5rem;
}

.page-header h1,
.article-header h1 {
  max-width: 980px;
  margin-bottom: 1rem;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  text-wrap: balance;
}

.archive-description,
.article-deck {
  max-width: 740px;
  color: var(--dsd-ink-soft);
  font-size: 1.1rem;
}

.breadcrumbs {
  margin-bottom: 1.5rem;
  color: var(--dsd-ink-soft);
  font-size: 0.82rem;
}

.breadcrumbs a { color: inherit; }

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
  gap: 0.65rem 1rem;
  color: var(--dsd-ink-soft);
  font-size: 0.88rem;
}

.article-byline a { font-weight: 800; }

.article-featured {
  width: min(calc(100% - 2rem), var(--dsd-wide));
  margin: 0 auto 2.8rem;
}

.article-featured img {
  width: 100%;
  max-height: 700px;
  border-radius: var(--dsd-radius-lg);
  object-fit: cover;
}

.article-layout {
  display: grid;
  width: min(calc(100% - 2rem), 1080px);
  margin: 0 auto;
  grid-template-columns: minmax(0, var(--dsd-content)) 230px;
  gap: 4.2rem;
}

.entry-content {
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
}

.entry-content > * {
  max-width: 100%;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  scroll-margin-top: 105px;
}

.entry-content h2 { margin-top: 2.4em; }
.entry-content h3 { margin-top: 1.8em; }
.entry-content a { overflow-wrap: anywhere; }

.entry-content .alignwide {
  width: min(100vw - 2rem, 1040px);
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.entry-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.94rem;
}

.entry-content th,
.entry-content td {
  padding: 0.85rem;
  border: 1px solid var(--dsd-line);
  text-align: left;
}

.entry-content th { background: var(--dsd-mint-pale); }

.article-sidebar {
  align-self: start;
  position: sticky;
  top: 108px;
}

.toc {
  padding: 1.2rem;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius-sm);
  background: var(--dsd-white);
}

.toc-title {
  margin-bottom: 0.8rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol {
  padding-left: 1.1rem;
  margin-bottom: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.toc li + li { margin-top: 0.55rem; }
.toc a { color: var(--dsd-ink-soft); text-decoration: none; }
.toc a:hover { color: var(--dsd-teal); }

.financial-disclaimer {
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  border: 1px solid #ead9ab;
  border-radius: var(--dsd-radius-sm);
  color: #5c4b23;
  background: #fff9e8;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
}

.article-footer {
  width: min(calc(100% - 2rem), var(--dsd-content));
  padding: 2rem 0 5rem;
  margin-inline: auto;
}

.author-box {
  display: grid;
  grid-template-columns: 88px 1fr;
  padding: 1.5rem;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius);
  background: var(--dsd-white);
  gap: 1.2rem;
}

.author-box img { border-radius: 50%; }
.author-box h2 { margin-bottom: 0.3rem; font-size: 1.45rem; }
.author-box p { margin-bottom: 0; color: var(--dsd-ink-soft); font-size: 0.91rem; }

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.5rem;
  gap: 1rem;
}

.post-navigation .nav-links a {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius-sm);
  background: var(--dsd-white);
  font-weight: 720;
  text-decoration: none;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination a,
.pagination span { padding: 0.48rem 0.78rem; border-radius: 8px; background: var(--dsd-white); text-decoration: none; }
.pagination .current { color: var(--dsd-white); background: var(--dsd-teal); }

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form label { flex: 1; }
.search-field {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #aebfba;
  border-radius: 999px;
  background: var(--dsd-white);
}

.empty-state {
  padding: 4rem 1.5rem;
  border: 1px solid var(--dsd-line);
  border-radius: var(--dsd-radius);
  background: var(--dsd-white);
  text-align: center;
}

.newsletter-band {
  color: var(--dsd-white);
  background: var(--dsd-ink);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.newsletter-band h2 { margin-bottom: 0.6rem; }
.newsletter-band p { margin-bottom: 0; color: rgba(255,255,255,.75); }
.newsletter-widget .widget { margin: 0; }

.site-footer {
  padding: 4rem 0 2rem;
  color: rgba(255,255,255,.78);
  background: #081f21;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 3rem;
}

.site-footer h2,
.site-footer h3,
.site-footer .widget-title {
  color: var(--dsd-white);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer ul { padding: 0; list-style: none; }
.site-footer a { color: rgba(255,255,255,.82); }
.footer-brand { color: var(--dsd-white); font-family: Georgia, serif; font-size: 1.7rem; font-weight: 800; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 2rem; margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.12); gap: 1rem; font-size: 0.78rem; }

.comments-area {
  width: min(calc(100% - 2rem), var(--dsd-content));
  padding-bottom: 5rem;
  margin-inline: auto;
}

.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 1.2rem; margin-bottom: 1rem; border: 1px solid var(--dsd-line); border-radius: var(--dsd-radius-sm); background: var(--dsd-white); }
.comment-form input:not([type="submit"]),
.comment-form textarea { width: 100%; padding: 0.75rem; border: 1px solid #aebfba; border-radius: 8px; }

@media (max-width: 900px) {
  .admin-bar .site-header { top: 46px; }
  .primary-nav { display: none; }
  .menu-drawer summary { display: grid; }
  .menu-drawer[open] .primary-nav {
    display: block;
    position: absolute;
    inset: 78px 0 auto;
    padding: 1rem;
    border-bottom: 1px solid var(--dsd-line);
    background: var(--dsd-paper);
  }
  .menu-drawer[open] .primary-nav ul { align-items: stretch; flex-direction: column; width: min(calc(100% - 2rem), var(--dsd-wide)); margin-inline: auto; }
  .menu-drawer[open] .primary-nav a { display: block; padding: 0.6rem 0; }
  .hero-grid,
  .featured-story,
  .newsletter-inner,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-note { max-width: 560px; }
  .topic-grid,
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-story-media { min-height: 320px; }
  .article-layout { display: block; }
  .article-sidebar { position: static; margin-bottom: 2rem; }
  .toc { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container,
  .content-width,
  .article-layout,
  .article-featured,
  .article-footer,
  .comments-area { width: min(calc(100% - 1.25rem), var(--dsd-wide)); }
  .topic-grid,
  .posts-grid,
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .section-heading,
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .featured-story-media { min-height: 230px; }
  .author-box { grid-template-columns: 62px 1fr; }
  .site-title-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header,
  .site-footer,
  .article-sidebar,
  .ad-slot,
  .newsletter-band,
  .post-navigation,
  .comments-area { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  .article-layout,
  .content-width { width: 100%; max-width: none; }
  a { color: #000; }
}
