/*
Theme Name: SXZBest Hogar
Theme URI: https://sxzbest.xyz/
Author: SXZBest
Description: Tema editorial ligero para hogar práctico y organización de espacios pequeños.
Version: 1.1.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: sxzbest-home
*/

:root {
  --ink: #26332f;
  --muted: #65736d;
  --paper: #fffdf9;
  --soft: #f3f5ef;
  --sage: #4f7465;
  --sage-dark: #36584b;
  --terracotta: #d57555;
  --sand: #efdcc8;
  --line: #dfe5df;
  --white: #fff;
  --shadow: 0 18px 45px rgba(38, 51, 47, .09);
  --radius: 22px;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.72 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--sage-dark); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--terracotta); }
button, input { font: inherit; }
.screen-reader-text { position: absolute; 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 { width: auto; height: auto; clip: auto; margin: 8px; padding: 12px; background: var(--white); z-index: 9999; }
.wrap { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(79,116,101,.14); background: rgba(255,253,249,.94); backdrop-filter: blur(14px); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--white); background: var(--sage); box-shadow: 0 7px 18px rgba(79,116,101,.2); }
.brand-mark svg { width: 25px; }
.brand-copy { line-height: 1.05; }
.brand-name { display: block; font-weight: 850; letter-spacing: -.035em; font-size: 1.28rem; }
.brand-tagline { display: block; margin-top: 5px; color: var(--muted); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 5px; list-style: none; padding: 0; margin: 0; }
.main-nav a { display: block; padding: 10px 11px; border-radius: 10px; color: var(--ink); font-weight: 650; font-size: .88rem; text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--sage-dark); background: var(--soft); }
.search-toggle, .menu-toggle { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink); background: var(--soft); cursor: pointer; }
.menu-toggle { display: none; }
.search-panel { display: none; padding: 0 0 18px; }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; max-width: 680px; margin-left: auto; }
.search-field { width: 100%; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 11px 18px; color: var(--ink); }
.search-submit, .button { border: 0; border-radius: 999px; padding: 11px 21px; color: var(--white); background: var(--sage); font-weight: 750; text-decoration: none; cursor: pointer; }
.search-submit:hover, .button:hover { color: var(--white); background: var(--sage-dark); }

.hero { padding: clamp(58px, 8vw, 105px) 0 54px; overflow: hidden; background: linear-gradient(135deg, #f4f4e9 0%, #fffaf4 58%, #f4e6dc 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(34px, 6vw, 80px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--sage-dark); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--terracotta); }
h1, h2, h3 { color: var(--ink); line-height: 1.16; letter-spacing: -.035em; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(2.65rem, 6vw, 5.1rem); }
.hero-copy { max-width: 650px; margin: 23px 0 29px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.text-link { padding: 10px 3px; font-weight: 750; text-decoration: none; border-bottom: 2px solid var(--sand); }
.hero-visual { position: relative; min-height: 440px; }
.room-card { position: absolute; overflow: hidden; border: 8px solid rgba(255,255,255,.72); border-radius: 28px; box-shadow: var(--shadow); }
.room-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room-card.main { inset: 0 9% 11% 0; transform: rotate(-2deg); }
.room-card.small { width: 46%; height: 45%; right: 0; bottom: 0; transform: rotate(4deg); }
.tip-badge { position: absolute; top: 9%; right: 0; max-width: 185px; padding: 14px 17px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); font-size: .84rem; line-height: 1.35; font-weight: 700; }

.section { padding: clamp(58px, 8vw, 92px) 0; }
.section.soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 32px; }
.section-head h2 { max-width: 690px; margin: 0; font-size: clamp(2rem, 4vw, 3.05rem); }
.section-head p { max-width: 530px; margin: 10px 0 0; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.category-tile { min-height: 230px; display: flex; flex-direction: column; justify-content: end; padding: 22px; border-radius: var(--radius); color: var(--white); text-decoration: none; background-position: center; background-size: cover; overflow: hidden; position: relative; }
.category-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,28,.04), rgba(20,32,28,.82)); }
.category-tile > * { position: relative; }
.category-tile strong { font-size: 1.1rem; line-height: 1.25; }
.category-tile span { margin-top: 6px; color: rgba(255,255,255,.83); font-size: .77rem; }
.category-tile:hover { color: var(--white); transform: translateY(-3px); transition: transform .2s ease; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 28px rgba(38,51,47,.05); }
.post-card-media { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--soft); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.post-card-body { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.post-card-category { color: var(--terracotta); font-size: .74rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.post-card h3 { margin: 10px 0 10px; font-size: 1.35rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card p { margin: 0 0 20px; color: var(--muted); font-size: .95rem; }
.card-meta { margin-top: auto; color: var(--muted); font-size: .79rem; }
.newsletter-box { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: clamp(28px,5vw,55px); border-radius: 28px; color: var(--white); background: var(--sage-dark); }
.newsletter-box h2 { color: var(--white); margin: 0 0 8px; font-size: clamp(1.8rem,3vw,2.6rem); }
.newsletter-box p { max-width: 670px; margin: 0; color: rgba(255,255,255,.77); }

.breadcrumbs { padding: 22px 0 0; color: var(--muted); font-size: .82rem; }
.breadcrumbs a { color: var(--muted); }
.archive-header { padding: 56px 0 35px; }
.archive-header h1 { max-width: 800px; margin: 0 0 14px; font-size: clamp(2.4rem,5vw,4.3rem); }
.archive-description { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.pagination { margin: 40px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 14px; border-radius: 9px; background: var(--soft); text-decoration: none; }
.page-numbers.current { color: var(--white); background: var(--sage); }

.article-header { max-width: 940px; margin: 0 auto; padding: 48px 0 30px; text-align: center; }
.article-header h1 { margin: 12px 0 18px; font-size: clamp(2.35rem, 5.5vw, 4.6rem); }
.article-deck { max-width: 760px; margin: 0 auto 22px; color: var(--muted); font-size: 1.17rem; }
.article-byline { margin-bottom: 7px; color: var(--ink); font-size: .88rem; font-weight: 700; }
.article-byline a { color: var(--sage-dark); }
.article-meta { color: var(--muted); font-size: .83rem; }
.article-hero { width: min(calc(100% - 40px), 1120px); margin: 0 auto 48px; overflow: hidden; border-radius: 28px; background: var(--soft); }
.article-hero img { display: block; width: 100%; height: auto; }
.article-layout { max-width: 900px; }
.article-content { width: 100%; font-size: 1.06rem; }
.article-content > p:first-child { font-size: 1.18rem; color: #3c4b45; }
.article-content h2 { margin: 2.15em 0 .7em; font-size: clamp(1.75rem,3vw,2.45rem); }
.article-content h3 { margin: 1.75em 0 .55em; font-size: 1.35rem; }
.article-content ul, .article-content ol { padding-left: 1.25em; }
.article-content li { margin: .42em 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: .92rem; }
.article-content th, .article-content td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-content th { background: var(--soft); }
.article-content blockquote, .practical-box { margin: 30px 0; padding: 22px 25px; border-left: 4px solid var(--terracotta); border-radius: 0 16px 16px 0; background: #fbf3ec; }
.article-content blockquote p:last-child, .practical-box p:last-child { margin-bottom: 0; }
.article-share { max-width: 900px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 38px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); font-size: .84rem; }
.article-share-copy { min-width: 0; }
.article-share strong { display: block; margin-bottom: 2px; font-size: .92rem; }
.article-share-copy > span { display: block; color: var(--muted); line-height: 1.45; }
.share-links { display: flex; flex: 0 0 auto; gap: 8px; }
.share-links a { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 11px; color: var(--white); background: var(--sage); font-weight: 700; line-height: 1.15; text-decoration: none; }
.share-links a:hover { background: var(--sage-dark); }
.share-links .share-pinterest { background: var(--terracotta); }
.share-links .share-pinterest:hover { background: #b94e30; }
.share-icon { width: 22px; height: 22px; display: grid; flex: 0 0 22px; place-items: center; border: 1px solid rgba(255,255,255,.56); border-radius: 50%; font-family: Arial, sans-serif; font-weight: 800; }
.guide-visual { margin: 38px 0 44px; }
.guide-visual img { display: block; width: 100%; height: auto; border-radius: 20px; background: var(--soft); box-shadow: 0 12px 32px rgba(38,51,47,.08); }
.guide-visual figcaption { margin-top: 10px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.guide-visual-panel { overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, #f5f6f0, #fffaf5); }
.guide-visual-title { display: block; margin: 0 0 16px; font-size: 1.13rem; line-height: 1.3; }
.guide-visual-grid { display: grid; grid-template-columns: repeat(var(--visual-columns, 3), minmax(0,1fr)); gap: 12px; }
.guide-visual-card { min-height: 116px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.88); box-shadow: 0 6px 20px rgba(38,51,47,.05); }
.guide-visual-card strong { display: block; margin-bottom: 6px; color: var(--sage-dark); line-height: 1.25; }
.guide-visual-card span { display: block; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.guide-visual-step { width: 28px; height: 28px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; color: var(--white); background: var(--terracotta); font-size: .78rem; font-weight: 850; }
.guide-visual--compare .guide-visual-card:first-child { border-top: 4px solid var(--terracotta); }
.guide-visual--compare .guide-visual-card:last-child { border-top: 4px solid var(--sage); }
.guide-visual--check .guide-visual-card { position: relative; padding-left: 42px; }
.guide-visual--check .guide-visual-card::before { content: "✓"; position: absolute; top: 15px; left: 15px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--sage); font-size: .72rem; font-weight: 900; }
.article-content .code-block.is-empty-ad-slot { display: none !important; }
.related { margin-top: 70px; padding-top: 45px; border-top: 1px solid var(--line); }
.related h2 { font-size: 2rem; }
.article-sources { max-width: 760px; margin-top: 45px; padding: 25px 28px; border-radius: 18px; background: var(--soft); }
.article-sources h2 { margin: 0 0 10px; font-size: 1.35rem; }
.article-sources ul { margin: 0; padding-left: 1.2em; }
.article-sources li { margin: 6px 0; }
.page-shell { max-width: 830px; margin: 0 auto; padding: 50px 0 80px; }
.page-shell h1 { font-size: clamp(2.35rem,5vw,4rem); }
.empty-state { padding: 70px 0; text-align: center; }

.site-footer { margin-top: 70px; padding: 60px 0 24px; color: rgba(255,255,255,.76); background: #26332f; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 55px; }
.site-footer .brand { color: var(--white); }
.site-footer .brand-mark { background: var(--terracotta); }
.footer-about { max-width: 430px; margin-top: 18px; }
.footer-title { margin: 0 0 15px; color: var(--white); font-size: .83rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin: 8px 0; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .78rem; }

@media (max-width: 1050px) {
  .main-nav { position: absolute; inset: 78px 0 auto; display: none; padding: 12px 20px 22px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .main-nav.is-open { display: block; }
  .main-nav ul { display: block; max-width: var(--content); margin: auto; }
  .main-nav a { padding: 11px 3px; }
  .menu-toggle { display: grid; margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .article-share { align-items: flex-start; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: min(calc(100% - 28px), var(--content)); }
  .brand-tagline { display: none; }
  .header-inner { min-height: 68px; gap: 9px; }
  .main-nav { top: 68px; }
  .hero { padding-top: 50px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 350px; }
  .section-head { display: block; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .category-tile { min-height: 200px; }
  .post-grid { grid-template-columns: 1fr; }
  .newsletter-box { grid-template-columns: 1fr; }
  .article-hero { width: calc(100% - 28px); border-radius: 20px; }
  .article-header { padding-top: 36px; }
  .article-share { display: block; margin-bottom: 30px; padding: 14px; }
  .share-links { margin-top: 12px; }
  .share-links a { flex: 1 1 0; justify-content: center; }
  .guide-visual { margin: 30px 0 36px; }
  .guide-visual-panel { padding: 18px; }
  .guide-visual-grid { grid-template-columns: 1fr; }
  .guide-visual-card { min-height: 0; }
  .article-content table { display: block; overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { display: block; }
}

@media (max-width: 460px) {
  .brand-name { font-size: 1.08rem; }
  .brand-mark { width: 37px; height: 37px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-tile { min-height: 185px; }
  .hero-visual { min-height: 300px; }
  .tip-badge { font-size: .72rem; max-width: 145px; }
  .share-links { display: grid; }
}

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