/*
Theme Name: Sabor y Hábitos
Author: Sabor y Hábitos
Description: Revista de alimentos, cocina cotidiana y hábitos sencillos. Tema clásico con estilos para el editor de bloques.
Version: 1.0.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sabor-y-habitos
*/

:root {
	--paper: var(--wp--preset--color--crema);
	--ink: var(--wp--preset--color--tinta);
	--olive: var(--wp--preset--color--oliva);
	--clay: var(--wp--preset--color--terracota);
	--oat: var(--wp--preset--color--avena);
	--muted: #59594e;
	--rule: #c8c3b7;
	--serif: var(--wp--preset--font-family--editorial);
	--sans: var(--wp--preset--font-family--lectura);
	--gutter: clamp(1.1rem, 4.6vw, 4.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.125rem/1.65 var(--sans); }
body, button, input, textarea { text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--olive); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
[hidden] { display: none !important; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus { position: fixed; z-index: 20; top: .75rem; left: .75rem; padding: .6rem 1rem; background: var(--paper); }
#contenido:focus { outline: none; }
.frame, .wide-frame, .reading-frame {
	width: min(calc(100% - 2 * var(--gutter)), 82rem);
	margin-inline: auto;
}
.wide-frame { max-width: 1060px; }
.reading-frame { max-width: 68ch; }
.masthead { border-bottom: 1px solid var(--ink); }
.masthead-inner { display: flex; align-items: center; gap: clamp(1rem, 2.25vw, 2.4rem); min-height: 5rem; padding-block: .75rem; }
.wordmark { flex: none; max-width: 100%; color: var(--ink); font: 730 clamp(1.95rem, 3.1vw, 3.05rem)/1 var(--serif); letter-spacing: -.073em; text-decoration: none; }
.wordmark i { margin-inline: .025em; color: var(--clay); font-weight: 580; }
.primary-nav { margin-inline-start: auto; min-width: 0; }
.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.primary-nav > .menu, .site-footer .menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem clamp(.7rem, 1.25vw, 1.4rem); }
.menu a { color: var(--ink); font: 400 .9rem/1.3 var(--sans); text-decoration: none; }
.menu a:hover, .menu a:focus-visible, .menu .current-menu-item > a { text-decoration: underline; }
.primary-nav li { position: relative; }
.primary-nav li > a { display: inline-block; padding-block: .5rem; }
.sub-menu { padding-inline-start: 1rem; }
.submenu-toggle, .menu-toggle { background: transparent; color: var(--ink); border: 0; }
.submenu-toggle { min-width: 1.6rem; min-height: 2rem; vertical-align: middle; }
.submenu-toggle::after { content: ""; width: .43rem; height: .43rem; display: inline-block; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.15rem) rotate(45deg); }
.submenu-toggle[aria-expanded="true"]::after { transform: translateY(.1rem) rotate(225deg); }
.menu-disclosure { display: none; }
.menu-toggle { min-height: 44px; padding: .4rem .25rem .4rem .6rem; display: inline-flex; gap: .6rem; align-items: center; font-size: .9rem; list-style: none; cursor: pointer; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-icon { display: block; width: 1.15rem; height: .58rem; border-block: 1.5px solid currentColor; }
.search-form { flex: 0 1 11.2rem; min-width: 8.5rem; display: flex; align-items: center; border: 1px solid #817e70; border-radius: 2px; }
.search-form label { flex: 1; min-width: 0; }
.search-form input { width: 100%; min-width: 0; height: 2.5rem; padding-inline: .7rem .1rem; background: transparent; border: 0; color: var(--ink); font-size: .875rem; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form button { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.5rem; padding: 0; background: transparent; border: 0; color: var(--ink); }
.search-icon { display: block; position: relative; width: .85rem; height: .85rem; margin: -.15rem .15rem 0 0; border: 1.7px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: .49rem; height: 1.7px; background: currentColor; bottom: -.15rem; right: -.36rem; transform: rotate(47deg); }

.feature { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4vw, 4.5rem); padding-block: clamp(2rem, 3.5vw, 3.75rem); }
.feature-media, .row-media { min-width: 0; }
.cover-image { display: block; width: 100%; height: auto; object-fit: contain; }
.feature-copy { min-width: 0; }
.category-line, .section-title { display: flex; align-items: center; gap: 1rem; }
.category-line::after, .section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.category-line:empty { display: none; }
.category-line::after { background: #a78372; }
.category-link, .error-code { color: var(--clay); font: 600 .84rem/1.4 var(--sans); letter-spacing: .07em; text-transform: uppercase; text-decoration: none; }
.category-link:hover, .category-link:focus-visible { text-decoration: underline; }
.feature-title, .story-header h1, .archive-header h1, .not-found h1 { margin: .25em 0; font: 670 clamp(2.4rem, 4.45vw, 4.6rem)/1.035 var(--serif); letter-spacing: -.054em; overflow-wrap: anywhere; text-wrap: pretty; }
.feature-title a, .story-row :is(h2, h3) a { color: inherit; text-decoration: none; }
.feature-title a:hover, .story-row :is(h2, h3) a:hover { text-decoration: underline; text-decoration-thickness: .045em; }
.summary { max-width: 59ch; margin: 0; color: #46463d; line-height: 1.52; overflow-wrap: anywhere; }
.feature-copy .summary { font-size: clamp(1.05rem, 1.45vw, 1.25rem); }
.read-link { display: inline-block; margin-top: clamp(1.05rem, 1.8vw, 1.6rem); padding: .62rem 1.55rem .69rem; border: 1px solid var(--olive); border-radius: 2px; background: var(--olive); color: var(--paper); font: 600 1.16rem/1.35 var(--serif); text-decoration: none; }
.read-link:hover, .read-link:focus-visible { background: var(--ink); border-color: var(--ink); }
.feature-text { display: block; }
.feature-text .feature-copy { max-width: 60rem; padding-inline-start: clamp(1.05rem, 2.4vw, 2.4rem); border-inline-start: 4px solid var(--clay); }
.feature-text .feature-title { max-width: 24ch; }
.feature-text .category-line { max-width: 32rem; }
.topic-band { background: var(--oat); border-block: 1px solid var(--rule); padding-block: clamp(1.6rem, 2.8vw, 2.65rem); }
.section-title { margin: 0 0 clamp(1.2rem, 2.2vw, 2rem); font: 640 clamp(1.95rem, 3.2vw, 3.1rem)/1.12 var(--serif); letter-spacing: -.05em; overflow-wrap: anywhere; }
.topic-index { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; overflow-wrap: anywhere; }
.topic-index li { --topic-ink: var(--clay); padding-inline: clamp(1rem, 1.9vw, 2rem); border-inline-start: 1px solid var(--rule); }
.topic-index li:first-child { padding-inline-start: 0; border: 0; }
.topic-index li:last-child { padding-inline-end: 0; }
.topic-index li:nth-child(2) { --topic-ink: #53613d; }
.topic-index li:nth-child(3) { --topic-ink: #785720; }
.topic-index li:nth-child(4) { --topic-ink: #794655; }
.topic-number { display: block; margin-bottom: .5rem; color: var(--topic-ink); font: italic 560 clamp(1.5rem, 2.15vw, 2.15rem)/1 var(--serif); letter-spacing: -.045em; }
.topic-index h3 { margin: 0; font: 630 clamp(1.35rem, 1.85vw, 1.75rem)/1.12 var(--serif); letter-spacing: -.035em; }
.topic-index h3 a { color: var(--ink); text-decoration-color: var(--topic-ink); text-decoration-thickness: 1px; }
.topic-index h3 a:hover { color: var(--topic-ink); }
.topic-index p { max-width: 32ch; margin: .55rem 0 0; color: #474638; font-size: 1rem; line-height: 1.43; }

.listings, .archive-layout, .related, .not-found { padding-block: clamp(2rem, 4.2vw, 4.25rem); }
.story-row { min-width: 0; padding-block: clamp(1.2rem, 2vw, 1.8rem); border-top: 1px solid var(--rule); }
.story-row.with-photo { display: grid; grid-template-columns: minmax(0, min(32%, 22.5rem)) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 3vw, 3rem); }
.row-copy { min-width: 0; max-width: 62rem; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.story-meta > * + * { padding-inline-start: .8rem; border-inline-start: 1px solid #aaa494; }
.story-row :is(h2, h3) { margin: .27em 0; font: 620 clamp(1.6rem, 2.55vw, 2.45rem)/1.12 var(--serif); letter-spacing: -.04em; overflow-wrap: anywhere; }
.story-row .summary { font-size: 1.04rem; }
.pagination, .page-links, .comment-navigation { margin-top: 2rem; }
.nav-links, .page-links { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.page-numbers, .post-page-numbers { padding: .36rem .78rem; font-size: 1rem; }
.page-numbers.current, .post-page-numbers.current { background: var(--olive); color: var(--paper); }
.archive-header { margin-bottom: 2rem; }
.archive-header h1, .not-found h1 { max-width: 26ch; margin-top: 0; }
.archive-intro, .empty-state, .not-found > p { max-width: 64ch; }
.empty-state { padding-block: 1.3rem 2.6rem; }
.empty-state > :first-child { margin-top: 0; }
.frame.empty-state { padding-block: 3rem; }
.text-link { font-weight: 600; }
.not-found { min-height: 46vh; }
.not-found .error-code { margin: 0 0 1.15rem; }

.single-story { padding-block: clamp(2rem, 4.5vw, 4.75rem) 2rem; }
.story-header { margin-bottom: 2rem; }
.story-header h1 { margin-block: .28em .35em; }
.single-cover { margin-block: 2rem; }
.single-cover figcaption, .story-body figcaption { margin-block: .5rem 0; text-align: start; font: 400 .875rem/1.5 var(--sans); color: var(--muted); }
.story-body { display: flow-root; font-size: 1.125rem; line-height: 1.72; overflow-wrap: break-word; }
.story-body > :first-child { margin-top: 0; }
.story-body p { margin-block: 0 1.2em; }
.story-body h2, .story-body h3 { margin-block: 1.3em .45em; }
.story-body h2 { font-size: clamp(1.9rem, 3.5vw, 2.65rem); }
.story-body h3 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); }
.story-body :where(ul, ol) { padding-inline-start: 1.55em; }
.story-body :where(li + li) { margin-top: .24em; }
.story-body a { text-decoration-thickness: .075em; }
.story-body :where(blockquote) { margin: 1.7em 0; padding-inline-start: 1.25rem; border-inline-start: 3px solid var(--clay); font: 450 1.5rem/1.45 var(--serif); }
.story-body blockquote p { margin-block-end: .45em; }
.story-body cite { color: var(--muted); font: 400 .92rem/1.4 var(--sans); }
.story-body :where(figure) { margin-inline: 0; }
.story-body :where(img, video, iframe, embed, object, svg), .comments-area img { max-width: 100%; }
.story-body :where(img, video) { height: auto; }
.story-body :where(pre) { overflow-x: auto; max-width: 100%; }
.story-body :where(table) { border-collapse: collapse; font-size: 1rem; }
.story-body :where(table, .wp-block-table) { max-width: 100%; overflow-x: auto; }
.story-body table:not(.wp-block-table table) { display: block; }
.story-body :where(th, td) { padding: .6rem .8rem; border: 1px solid var(--rule); text-align: start; }
.story-body :where(th) { background: var(--oat); }
.story-body > .alignwide, .story-body > .alignfull {
	position: relative; left: 50%; transform: translateX(-50%);
	width: min(calc(100vw - 2 * var(--gutter)), 1060px); max-width: none; margin-inline: 0;
}
.story-body > .alignfull { width: min(calc(100vw - 2 * var(--gutter)), 82rem); }
.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: .25rem 1.25rem 1rem 0; }
.alignright { float: right; margin: .25rem 0 1rem 1.25rem; }
.wp-caption { max-width: 100%; }
.related { padding-top: 1.5rem; }
.comments-area { padding-block: 1rem 2.5rem; overflow-wrap: anywhere; }
.comments-area :where(input, textarea) { max-width: 100%; }
.comments-area input[type="submit"] { white-space: normal; }
.comments-area label { display: block; }
.comments-area .comment-form-cookies-consent label { display: inline; }
.comments-area .children { padding-inline-start: min(3vw, 1.5rem); }
.site-footer { border-top: 1px solid var(--ink); }
.footer-inner { padding-block: clamp(1.6rem, 3vw, 3rem); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 2.5rem; }
.footer-inner .wordmark { font-size: 1.85rem; }
.site-footer .menu { align-items: flex-start; }
.site-footer .sub-menu { padding-inline-start: .65rem; }

@media (min-width: 68em) {
	.primary-nav .sub-menu { position: absolute; top: 100%; inset-inline-start: 0; z-index: 5; min-width: 11rem; max-width: min(19rem, 40vw); padding: .4rem .8rem; background: var(--paper); border: 1px solid var(--rule); }
	.primary-nav .sub-menu .sub-menu { position: static; min-width: 0; max-width: 100%; padding-inline: .65rem 0; border: 0; }
	.primary-nav > .menu > li:last-child .sub-menu { inset-inline-start: auto; inset-inline-end: 0; }
	.primary-nav li:not(:hover):not(:focus-within) > .sub-menu:not([id]) { display: none; }
}
@media (max-width: 67.99em) {
	.masthead-inner { flex-wrap: wrap; gap: .4rem 1rem; min-height: 4.5rem; }
	.masthead-inner .wordmark { margin-inline-end: auto; }
	.menu-disclosure { display: block; }
	.menu-disclosure:not([open]) + .primary-nav { display: none; }
	.primary-nav { order: 4; width: 100%; margin: 0; }
	.primary-nav > .menu { display: block; border-top: 1px solid var(--rule); padding-block: .45rem; }
	.primary-nav .menu li > a { padding-block: .65rem; }
	.submenu-toggle { min-width: 44px; min-height: 44px; }
	.search-form { flex: 0 1 12rem; }
}
@media (max-width: 61.99em) and (min-width: 37.5em) {
	.topic-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 0; }
	.topic-index li:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}
@media (max-width: 49.99em) {
	.feature { grid-template-columns: minmax(0, 1fr); gap: 1.35rem; padding-block: 1.6rem 2rem; }
	.feature-title { font-size: clamp(2.4rem, 6.8vw, 3.4rem); }
	.feature-copy .summary { max-width: 58ch; }
}
@media (max-width: 37.49em) {
	.masthead-inner { gap: .4rem .7rem; padding-block: .6rem .75rem; }
	.masthead-inner .wordmark { font-size: clamp(1.8rem, 8.3vw, 2.55rem); }
	.primary-nav { order: 0; }
	.search-form { flex: 0 0 100%; min-width: 0; }
	.search-form button { width: 44px; }
	.search-form input, .search-form button { height: 2.5rem; }
	.feature { padding-top: 1.1rem; gap: 1.15rem; }
	.feature-title { font-size: clamp(2.12rem, 8.4vw, 3rem); }
	.topic-index { display: block; }
	.topic-index li, .topic-index li:first-child { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr); gap: .18rem .45rem; padding: .95rem 0; border: 0; border-top: 1px solid var(--rule); }
	.topic-index li:last-child { padding-bottom: 0; }
	.topic-index h3 { align-self: center; }
	.topic-index p { grid-column: 2; max-width: none; margin: 0; }
	.topic-number { grid-row: 1 / 3; margin: .05rem 0 0; }
	.story-row.with-photo { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
	.story-row .summary { font-size: 1rem; }
	.footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 18em) {
	:root { --gutter: 4.6vw; }
	.search-form input { padding-inline-start: min(.7rem, 12px); }
	.topic-index li, .topic-index li:first-child { display: block; }
	.topic-number { margin-bottom: .25em; }
	.topic-index p { margin-top: .35em; }
}
