/*
Theme Name: IA Español
Theme URI: https://ia-espanol.chat/
Description: Blocksy child theme for ia-espanol.chat. Design tokens, section colors, header/footer configuration, block patterns and the layouts for the chat pages, the Portada and single posts.
Author: iaespañol
Template: blocksy
Version: 1.0.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: ia-espanol-child
*/

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
	--iae-papel: #FBF9F4;
	--iae-papel-2: #F3EFE6;
	--iae-blanco: #FFFFFF;
	--iae-linea: #E4DED2;
	--iae-tinta: #1C2A24;
	--iae-tinta-suave: #4C5B53;
	--iae-meta: #6B7A72;
	--iae-selva: #1E5A44;
	--iae-selva-oscuro: #143D2E;
	--iae-mango: #F0A93B;
	--iae-footer-text: #C9D9D1;
	--iae-chatgpt: #2F7A5B;
	--iae-gemini: #3B67B5;
	--iae-deepseek: #2E5F8C;
	--iae-grok: #B85C3A;
	--iae-claude: #8A5A2B;
	--section: var(--iae-selva);
	--iae-font-heading: "Bricolage Grotesque", "Bricolage Fallback", "Helvetica Neue", Arial, sans-serif;
	--iae-font-body: "Instrument Sans", "Instrument Fallback", "Helvetica Neue", Arial, sans-serif;
	--iae-radius: 12px;
	--iae-radius-sm: 10px;
	--iae-radius-lg: 14px;
	--iae-radius-pill: 999px;
	--iae-shadow-chat: 0 24px 60px rgba(28, 42, 36, 0.10);
	--iae-measure: 68ch;
	--iae-header-h: 72px;
}
body.section-chatgpt, .section-chatgpt { --section: var(--iae-chatgpt); }
body.section-gemini, .section-gemini { --section: var(--iae-gemini); }
body.section-deepseek, .section-deepseek { --section: var(--iae-deepseek); }
body.section-grok, .section-grok { --section: var(--iae-grok); }
body.section-claude, .section-claude { --section: var(--iae-claude); }

/* Size-adjusted local fallbacks so text does not shift when the web fonts arrive. */
@font-face {
	font-family: "Bricolage Fallback";
	src: local("Helvetica Neue Bold"), local("Arial Bold"), local("Arial");
	font-weight: 700 800;
	size-adjust: 97%;
	ascent-override: 92%;
	descent-override: 24%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "Instrument Fallback";
	src: local("Helvetica Neue"), local("Arial");
	size-adjust: 100.5%;
	ascent-override: 94%;
	descent-override: 24%;
	line-gap-override: 0%;
}

/* ============================================================
   2. Base typography and colors
   ============================================================ */
body {
	background: var(--iae-papel);
	color: var(--iae-tinta);
	font-family: var(--iae-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .iae-h {
	font-family: var(--iae-font-heading);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--iae-tinta);
	font-variation-settings: "opsz" 96;
	text-wrap: balance;
}
h1 { font-size: clamp(44px, 3.2vw + 1.5rem, 60px); line-height: 1.05; font-weight: 800; }
h2 { font-size: 30px; line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.25; }
h4 { font-size: 18px; line-height: 1.3; }
a { color: var(--iae-selva); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--iae-selva-oscuro); }
.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content > h2, .entry-content > h3, .entry-content > h4, .entry-content > blockquote,
.iae-longform__body > p, .iae-longform__body > ul, .iae-longform__body > ol, .iae-longform__body > h2, .iae-longform__body > h3 { max-width: var(--iae-measure); }
.entry-content h2 { margin-top: 2.2em; margin-bottom: .6em; }
.entry-content h3 { margin-top: 1.6em; margin-bottom: .5em; }
.iae-label, .ct-post-meta, .entry-meta { font-size: 14px; color: var(--iae-meta); }
.iae-kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--section); margin-bottom: 14px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--iae-selva) 55%, #fff); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--iae-mango) 45%, #fff); }
img { height: auto; max-width: 100%; }

/* Buttons */
.iae-btn, .wp-block-button__link, .ct-button, button.ct-button, .entry-content .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--iae-font-body); font-weight: 600; font-size: 16px; line-height: 1.2;
	padding: 13px 22px; border-radius: var(--iae-radius-pill); border: 1px solid transparent;
	text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.iae-btn--brand, .wp-block-button__link, .ct-button, .entry-content .wp-element-button { background: var(--iae-selva); color: #fff; }
.iae-btn--brand:hover, .wp-block-button__link:hover, .ct-button:hover, .entry-content .wp-element-button:hover { background: var(--iae-selva-oscuro); color: #fff; }
.iae-btn--cta { background: var(--iae-mango); color: var(--iae-tinta); }
.iae-btn--cta:hover { background: #e79a26; color: var(--iae-tinta); }
.iae-btn--outline { background: transparent; color: var(--iae-tinta); border-color: var(--iae-tinta); }
.iae-btn--outline:hover { background: var(--iae-papel-2); color: var(--iae-tinta); }
.iae-btn--section { background: var(--section); color: #fff; }
.iae-btn--section:hover { filter: brightness(.9); color: #fff; }
.iae-btn--sm { padding: 9px 16px; font-size: 14px; }
.iae-btn:active { transform: translateY(1px); }

/* ============================================================
   3. Header
   ============================================================ */
header#header [data-row="middle"] > div { min-height: var(--iae-header-h); }
header#header .ct-header .site-logo-container img, header#header .site-logo-container img { max-height: 34px; width: auto; }
header#header [data-id="menu"] .menu > li > a {
	font-family: var(--iae-font-body); font-weight: 600; font-size: 15px; color: var(--iae-tinta);
	position: relative; padding-inline: 12px;
}
header#header [data-id="menu"] .menu > li > a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 2px;
	background: var(--item-color, var(--section)); transform: scaleX(0); transform-origin: left; transition: transform .18s;
}
header#header [data-id="menu"] .menu > li > a:hover::after,
header#header [data-id="menu"] .menu > li.current-menu-item > a::after,
header#header [data-id="menu"] .menu > li.current-menu-ancestor > a::after,
header#header [data-id="menu"] .menu > li.is-section-active > a::after { transform: scaleX(1); }
header#header .menu > li.menu-item-chatgpt { --item-color: var(--iae-chatgpt); }
header#header .menu > li.menu-item-gemini { --item-color: var(--iae-gemini); }
header#header .menu > li.menu-item-deepseek { --item-color: var(--iae-deepseek); }
header#header .menu > li.menu-item-grok { --item-color: var(--iae-grok); }
header#header .menu > li.menu-item-claude { --item-color: var(--iae-claude); }
header#header .menu > li.iae-divider > a { pointer-events: none; padding: 0 8px; font-size: 0; color: transparent; }
header#header .menu > li.iae-divider > a::before { content: ""; display: block; width: 1px; height: 22px; background: var(--iae-linea); }
header#header .menu > li.iae-divider > a::after { display: none; }
header#header [data-id="button"] .ct-button, header#header [data-id="button"] .ct-button-ghost {
	background: var(--iae-selva); color: #fff; border-radius: var(--iae-radius-pill); font-weight: 600; font-size: 15px; padding: 10px 18px; border: 0;
}
header#header [data-id="button"] .ct-button:hover { background: var(--iae-selva-oscuro); }
.iae-pill { display: inline-flex; align-items: center; background: var(--iae-selva); color: #fff !important; border-radius: var(--iae-radius-pill); font-weight: 600; font-size: 14px; padding: 8px 14px; text-decoration: none; }
.iae-pill:hover { background: var(--iae-selva-oscuro); }
header#header [data-id="text"] { margin-inline-end: 6px; }
#offcanvas .ct-panel-content .mobile-menu > li > a { font-family: var(--iae-font-heading); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; padding-inline-start: 18px; position: relative; }
#offcanvas .ct-panel-content .mobile-menu > li > a::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; border-radius: 2px; background: var(--item-color, var(--iae-linea)); }
#offcanvas .mobile-menu > li.menu-item-chatgpt { --item-color: var(--iae-chatgpt); }
#offcanvas .mobile-menu > li.menu-item-gemini { --item-color: var(--iae-gemini); }
#offcanvas .mobile-menu > li.menu-item-deepseek { --item-color: var(--iae-deepseek); }
#offcanvas .mobile-menu > li.menu-item-grok { --item-color: var(--iae-grok); }
#offcanvas .mobile-menu > li.menu-item-claude { --item-color: var(--iae-claude); }
#offcanvas .mobile-menu > li.iae-divider { display: none; }

/* Section band: 5px section-colored top border on chat pages */
body.iae-chat-page header#header { border-top: 5px solid var(--section); }

/* ============================================================
   4. Footer
   ============================================================ */
footer#footer, footer.ct-footer { background: var(--iae-selva-oscuro); color: var(--iae-footer-text); }
footer#footer a { color: #fff; text-decoration: none; }
footer#footer a:hover { color: var(--iae-mango); }
footer#footer .widget-title, footer#footer h3, footer#footer h4 { color: #fff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-family: var(--iae-font-body); font-weight: 700; margin-bottom: 14px; }
footer#footer .ct-widget ul { list-style: none; margin: 0; padding: 0; }
footer#footer .ct-widget li { margin: 0 0 8px; font-size: 15px; }
footer#footer .iae-footer-brand img { max-height: 32px; width: auto; margin-bottom: 14px; }
footer#footer .iae-footer-brand p { font-size: 15px; line-height: 1.6; margin: 0 0 10px; color: var(--iae-footer-text); }
footer#footer .iae-footer-brand .iae-footer-note { font-size: 13px; color: color-mix(in srgb, var(--iae-footer-text) 75%, transparent); }
footer#footer [data-row="bottom"] { border-top: 1px solid rgba(255,255,255,.12); }
footer#footer [data-row="bottom"] .ct-container, footer#footer [data-row="bottom"] .ct-container-fluid { font-size: 13px; }
footer#footer .ct-footer-copyright { font-size: 13px; color: var(--iae-footer-text); }
footer#footer .iae-footer-right { text-align: right; font-size: 13px; color: var(--iae-footer-text); }
@media (max-width: 689px) { footer#footer .iae-footer-right { text-align: left; } }

/* ============================================================
   5. Article cards (guías listing, related, recent)
   ============================================================ */
.iae-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); list-style: none; margin: 0; padding: 0; }
.iae-card {
	position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--iae-blanco);
	border: 1px solid var(--iae-linea); border-top: 4px solid var(--section); border-radius: var(--iae-radius); padding: 18px 20px 20px;
	transition: transform .15s, border-color .15s;
}
.iae-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--section) 40%, var(--iae-linea)); }
.iae-card__section { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--section); }
.iae-card__title { font-family: var(--iae-font-heading); font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.iae-card__title a { color: var(--iae-tinta); text-decoration: none; }
.iae-card__title a::after { content: ""; position: absolute; inset: 0; }
.iae-card__title a:hover { color: var(--section); }
.iae-card__excerpt { font-size: 15px; color: var(--iae-tinta-suave); margin: 0; }
.iae-card__meta { font-size: 13px; color: var(--iae-meta); margin-top: auto; }
.iae-card--model { border-top-width: 4px; }
.iae-card--model .iae-card__cta { font-weight: 600; color: var(--section); text-decoration: none; margin-top: 4px; }
.iae-card--model .iae-card__cta:hover { text-decoration: underline; }
.iae-card__image { display: block; border-radius: 8px; overflow: hidden; margin: -4px 0 4px; aspect-ratio: 16/9; background: var(--iae-papel-2); }
.iae-card__image img { width: 100%; height: 100%; object-fit: cover; }

/* Core query loop on /guias/ */
.iae-guias .wp-block-post-template { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.iae-guias .wp-block-post { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--iae-blanco); border: 1px solid var(--iae-linea); border-top: 4px solid var(--section); border-radius: var(--iae-radius); padding: 18px 20px 20px; }
.iae-guias .wp-block-post .taxonomy-category { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--section); }
.iae-guias .wp-block-post .taxonomy-category a { color: inherit; text-decoration: none; }
.iae-guias .wp-block-post .wp-block-post-title { font-family: var(--iae-font-heading); font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; margin: 0; }
.iae-guias .wp-block-post .wp-block-post-title a { color: var(--iae-tinta); text-decoration: none; }
.iae-guias .wp-block-post .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.iae-guias .wp-block-post .wp-block-post-excerpt { font-size: 15px; color: var(--iae-tinta-suave); }
.iae-guias .wp-block-post .wp-block-post-excerpt__more-text { display: none; }
.iae-guias .wp-block-post .wp-block-post-date { font-size: 13px; color: var(--iae-meta); margin-top: auto; }
.iae-guias .wp-block-post-featured-image { border-radius: 8px; overflow: hidden; margin: -4px 0 4px; }
.iae-guias .wp-block-query-pagination { margin-top: 28px; }
.iae-guias .wp-block-query-pagination a, .iae-guias .wp-block-query-pagination .page-numbers { font-weight: 600; }
.iae-guias .wp-block-query-no-results p { color: var(--iae-tinta-suave); }
.iae-guias__filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.iae-guias__filters a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--iae-radius-pill); border: 1px solid var(--iae-linea); background: var(--iae-blanco); color: var(--iae-tinta-suave); font-size: 14px; font-weight: 600; text-decoration: none; }
.iae-guias__filters a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--section); }
.iae-guias__filters a.is-active, .iae-guias__filters a:hover { border-color: var(--section); color: var(--iae-tinta); }

/* ============================================================
   6. Content blocks and patterns
   ============================================================ */
.iae-table table, .entry-content .wp-block-table.iae-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--iae-papel-2); border: 1px solid var(--iae-linea); border-radius: var(--iae-radius-sm); overflow: hidden; font-size: 15px; }
.iae-table th, .iae-table td { padding: 12px 14px; border-bottom: 1px solid var(--iae-linea); text-align: left; vertical-align: top; }
.iae-table thead th { background: var(--iae-blanco); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--iae-tinta-suave); font-weight: 700; }
.iae-table tbody tr:last-child td { border-bottom: 0; }
.entry-content .wp-block-table.iae-table { overflow-x: auto; }
.iae-verified { font-size: 13px; color: var(--iae-meta); margin-top: -.6em !important; }
.iae-verified::before { content: "✓ "; color: var(--section); font-weight: 700; }
.iae-note, .entry-content .wp-block-group.iae-note { background: var(--iae-papel-2); border: 1px solid var(--iae-linea); border-left: 4px solid var(--section); border-radius: var(--iae-radius-sm); padding: 16px 20px; margin: 1.5em 0; max-width: var(--iae-measure); }
.iae-note > :last-child { margin-bottom: 0; }
.iae-image-placeholder, .entry-content p.iae-image-placeholder { display: flex; align-items: center; justify-content: center; min-height: 160px; background: repeating-linear-gradient(135deg, var(--iae-papel-2) 0 10px, #ede7da 10px 20px); border: 2px dashed color-mix(in srgb, var(--iae-mango) 70%, #fff); border-radius: var(--iae-radius); color: var(--iae-tinta-suave); font-weight: 600; font-size: 15px; text-align: center; padding: 20px; max-width: var(--iae-measure); }
.entry-content ol.iae-steps, .iae-steps { list-style: none; counter-reset: iae-step; padding: 0; margin: 1.2em 0 1.8em; max-width: var(--iae-measure); }
.iae-steps > li { position: relative; padding-left: 52px; margin-bottom: 16px; counter-increment: iae-step; }
.iae-steps > li::before { content: counter(iae-step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--section); color: #fff; font-family: var(--iae-font-heading); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.entry-content .wp-block-code.copiable, .wp-block-code.copiable { position: relative; background: #1C2A24; color: #F3EFE6; border-radius: var(--iae-radius-sm); padding: 18px 20px; padding-right: 96px; font-size: 14.5px; line-height: 1.55; border: 0; overflow-x: auto; white-space: pre-wrap; max-width: var(--iae-measure); }
.wp-block-code.copiable code { color: inherit; background: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.iae-copy-btn { position: absolute; top: 10px; right: 10px; font: inherit; font-family: var(--iae-font-body); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--iae-radius-pill); border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.iae-copy-btn:hover { background: rgba(255,255,255,.2); }
.iae-copy-btn.is-copied { background: var(--iae-mango); color: var(--iae-tinta); border-color: transparent; }
.iae-section-card { display: flex; flex-direction: column; gap: 10px; background: var(--iae-blanco); border: 1px solid var(--iae-linea); border-top: 4px solid var(--section); border-radius: var(--iae-radius); padding: 20px 22px; margin: 1.5em 0; max-width: var(--iae-measure); }
.iae-section-card__kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--section); }
.iae-section-card__title { font-family: var(--iae-font-heading); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.iae-section-card p { margin: 0; color: var(--iae-tinta-suave); font-size: 15px; }
.iae-section-card .iae-btn { align-self: flex-start; margin-top: 4px; }
.rank-math-block, .wp-block-rank-math-faq-block { background: var(--iae-papel-2); border: 1px solid var(--iae-linea); border-radius: var(--iae-radius); padding: 8px 24px; max-width: var(--iae-measure); }
.wp-block-rank-math-faq-block .rank-math-faq-item { padding: 16px 0; border-bottom: 1px solid var(--iae-linea); }
.wp-block-rank-math-faq-block .rank-math-faq-item:last-child { border-bottom: 0; }
.wp-block-rank-math-faq-block .rank-math-question { font-family: var(--iae-font-heading); font-size: 19px; margin: 0 0 6px; letter-spacing: -0.02em; }
.wp-block-rank-math-faq-block .rank-math-answer { font-size: 16px; color: var(--iae-tinta-suave); }

/* ============================================================
   7. Sidebar (content blocks) and single post
   ============================================================ */
.ct-sidebar .iae-widget { background: var(--iae-blanco); border: 1px solid var(--iae-linea); border-radius: var(--iae-radius); padding: 20px 22px; margin-bottom: 20px; }
.ct-sidebar .iae-widget__title { font-family: var(--iae-font-body); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--iae-meta); margin: 0 0 12px; }
.iae-toc ol, .iae-toc ul { list-style: none; margin: 0; padding: 0; }
.iae-toc li { margin: 0; }
.iae-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--iae-linea); color: var(--iae-tinta-suave); font-size: 14px; line-height: 1.35; text-decoration: none; }
.iae-toc a:hover, .iae-toc a.is-active { color: var(--iae-tinta); border-left-color: var(--section); }
.iae-toc li.iae-toc__h3 a { padding-left: 24px; font-size: 13px; }
.iae-widget--section { border-top: 4px solid var(--section); }
.iae-widget--section .iae-widget__heading { font-family: var(--iae-font-heading); font-size: 20px; letter-spacing: -0.02em; margin: 0 0 6px; }
.iae-widget--section p { font-size: 15px; color: var(--iae-tinta-suave); margin: 0 0 14px; }
.iae-list { list-style: none; margin: 0; padding: 0; }
.iae-list li { padding: 9px 0; border-bottom: 1px solid var(--iae-linea); font-size: 15px; line-height: 1.35; }
.iae-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.iae-list a { color: var(--iae-tinta); text-decoration: none; font-weight: 500; }
.iae-list a:hover { color: var(--section); }
.iae-list__more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--section); text-decoration: none; }
.ad-slot-sidebar { width: 300px; max-width: 100%; height: 250px; margin: 0 auto 20px; border-radius: var(--iae-radius-sm); }
body.logged-in.iae-editor .ad-slot-sidebar { border: 2px dashed var(--iae-linea); display: flex; align-items: center; justify-content: center; color: var(--iae-meta); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.iae-editor-card { display: flex; gap: 14px; align-items: center; }
.iae-editor-card img { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.iae-editor-card__name { font-weight: 600; font-size: 15px; margin: 0; }
.iae-editor-card__meta { font-size: 13px; color: var(--iae-meta); margin: 0; }

/* Single post layout: 760px content + 360px sidebar on desktop */
body.single-post .ct-container[data-sidebar], body.single-post .ct-container[data-sidebar="right"] { --sidebar-width: 360px; --sidebar-gap: 48px; }
body.single-post .ct-container[data-sidebar="right"] > article { max-width: 760px; }
body.single-post .entry-content > * { max-width: 100%; }
body.single-post .entry-content > p, body.single-post .entry-content > ul, body.single-post .entry-content > ol, body.single-post .entry-content > h2, body.single-post .entry-content > h3 { max-width: var(--iae-measure); }
.iae-authorline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0 24px; padding: 0 0 18px; border-bottom: 1px solid var(--iae-linea); font-size: 14px; color: var(--iae-meta); }
.iae-authorline img { width: 36px; height: 36px; border-radius: 50%; }
.iae-authorline__name { font-weight: 600; color: var(--iae-tinta); }
.iae-authorline__section { color: var(--section); font-weight: 600; }
.iae-authorline span + span::before { content: "·"; margin-right: 12px; color: var(--iae-linea); }
.iae-authorline img + span::before { content: none; }
body.single-post .ct-related-posts .related-entry-card, body.single-post .ct-related-posts article { background: var(--iae-blanco); border: 1px solid var(--iae-linea); border-top: 4px solid var(--section); border-radius: var(--iae-radius); padding: 16px 18px; }
body.single-post .ct-related-posts .related-entry-card .ct-media-container, body.single-post .ct-related-posts .ct-media-container { border-radius: 8px; margin-bottom: 10px; }
body.single-post .ct-related-posts .related-entry-card h4 a, body.single-post .ct-related-posts h4 a { font-family: var(--iae-font-heading); font-size: 17px; letter-spacing: -0.02em; color: var(--iae-tinta); }
body.single-post .ct-related-posts .ct-block-title, body.single-post .ct-related-posts-container > h3 { font-size: 22px; }
body.single-post .author-box, body.single-post .ct-author-box { background: var(--iae-blanco); border: 1px solid var(--iae-linea); border-radius: var(--iae-radius); }
.ct-breadcrumbs, .rank-math-breadcrumb { font-size: 13px; color: var(--iae-meta); }
.ct-breadcrumbs a, .rank-math-breadcrumb a { color: var(--iae-tinta-suave); text-decoration: none; }
.ct-breadcrumbs a:hover, .rank-math-breadcrumb a:hover { color: var(--section); }
.rank-math-breadcrumb .separator { margin: 0 8px; }

/* Chat pages: sidebar + full-width chat */
body.iae-chat-page .ct-container[data-sidebar="right"] { --sidebar-width: 360px; --sidebar-gap: 48px; }
body.iae-chat-page .entry-content > .iae-chat { max-width: 100%; }
body.iae-chat-page .entry-content .iae-chat .iae-chat__send { background: var(--section); }

/* ============================================================
   8. Portada
   ============================================================ */
.iae-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; padding: 40px 0 56px; }
.iae-hero__title { margin: 0 0 16px; }
.iae-hero__sub { font-size: 19px; color: var(--iae-tinta-suave); max-width: 52ch; margin: 0 0 26px; }
.iae-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.iae-hero__trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--iae-tinta-suave); }
.iae-hero__trust li { display: flex; align-items: center; gap: 8px; }
.iae-hero__trust svg { flex: none; color: var(--iae-selva); }
.iae-hero__chat .iae-chat { box-shadow: var(--iae-shadow-chat); margin: 0; }
.iae-models { padding: 8px 0 40px; }
.iae-models__title { font-size: 30px; margin: 0 0 20px; }
.iae-models .iae-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.iae-longform { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding: 24px 0 40px; border-top: 1px solid var(--iae-linea); }
.iae-longform__toc { position: sticky; top: calc(var(--iae-header-h) + 24px); }
.iae-longform__toc .iae-widget__title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--iae-meta); margin: 0 0 12px; }
.iae-longform__body > h2:first-child { margin-top: 0; }
.iae-recent { padding: 8px 0 48px; border-top: 1px solid var(--iae-linea); margin-top: 8px; }
.iae-recent__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 32px 0 20px; }
.iae-recent__head h2 { margin: 0; }
.iae-recent__head a { font-weight: 600; text-decoration: none; }
.iae-recent .iae-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.page-template-default.home .entry-content > *, body.home .entry-content > * { max-width: 100%; }
body.home .site-main .entry-content { max-width: none; }

/* ============================================================
   9. Responsive
   ============================================================ */
@media (max-width: 1100px) {
	.iae-models .iae-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.iae-recent .iae-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 999px) {
	.iae-hero { grid-template-columns: 1fr; gap: 28px; padding: 24px 0 36px; }
	.iae-longform { grid-template-columns: 1fr; gap: 24px; }
	.iae-longform__toc { position: static; }
	.iae-longform__toc .iae-toc { display: flex; flex-wrap: wrap; gap: 6px; }
	.iae-longform__toc .iae-toc li.iae-toc__h3 { display: none; }
	.iae-longform__toc .iae-toc a { border: 1px solid var(--iae-linea); border-radius: var(--iae-radius-pill); padding: 5px 11px; font-size: 13px; background: var(--iae-blanco); }
}
@media (max-width: 689px) {
	:root { --iae-header-h: 64px; }
	h1 { font-size: clamp(34px, 9vw, 44px); }
	h2 { font-size: 26px; }
	h3 { font-size: 20px; }
	body { font-size: 16px; }
	.iae-models .iae-cards, .iae-recent .iae-cards { grid-template-columns: 1fr; }
	.iae-hero__sub { font-size: 17px; }
	.iae-hero__actions .iae-btn { width: 100%; }
	.iae-steps > li { padding-left: 46px; }
	.iae-steps > li::before { width: 32px; height: 32px; font-size: 15px; }
	.wp-block-code.copiable { padding-right: 20px; padding-top: 44px; }
}
@media (max-width: 400px) {
	.iae-hero__trust { flex-direction: column; gap: 6px; }
	.iae-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--iae-header-h) + 16px); }

/* Print */
@media print { header#header, footer#footer, .ct-sidebar, .iae-chat { display: none !important; } }

/* Contact form */
.iae-contact { max-width: 560px; }
.iae-contact label { display: block; font-size: 14px; font-weight: 600; color: var(--iae-tinta-suave); margin-bottom: 6px; }
.iae-contact input[type="text"], .iae-contact input[type="email"], .iae-contact select, .iae-contact textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--iae-linea); border-radius: var(--iae-radius-sm); background: var(--iae-blanco); font: inherit; color: var(--iae-tinta); }
.iae-contact input:focus, .iae-contact select:focus, .iae-contact textarea:focus { outline: none; border-color: var(--iae-selva); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iae-selva) 18%, transparent); }
.iae-contact__note { font-size: 13px; color: var(--iae-meta); }
.iae-note--ok { border-left-color: var(--iae-selva); }
.iae-featured { margin: 0 0 28px; }
.iae-featured img { width: 100%; height: auto; border-radius: var(--iae-radius); }
.iae-crumbs { margin: 0 0 16px; }
.wp-block-rank-math-faq-block .rank-math-faq-item .rank-math-question, .rank-math-faq-item .rank-math-question { scroll-margin-top: 90px; }
.iae-guias .category-chatgpt { --section: var(--iae-chatgpt); }
.iae-guias .category-gemini { --section: var(--iae-gemini); }
.iae-guias .category-deepseek { --section: var(--iae-deepseek); }
.iae-guias .category-grok { --section: var(--iae-grok); }
.iae-guias .category-claude { --section: var(--iae-claude); }

/* Alignment and font fixes */
.ct-container-full > article > .iae-crumbs, .ct-container-full > .iae-crumbs { width: var(--theme-container-width, 90vw); max-width: var(--theme-normal-container-max-width, 1290px); margin-inline: auto; }
footer#footer, footer#footer .ct-widget, footer#footer .ct-footer-copyright, footer#footer p, footer#footer li { font-family: var(--iae-font-body); }
footer#footer [data-row="bottom"] .ct-widget p, footer#footer [data-row="bottom"] .ct-widget { margin: 0; }
footer#footer [data-row="bottom"] > div > div { align-items: center; }
#offcanvas .ct-panel-content, #offcanvas { font-family: var(--iae-font-body); }
body.single-post .author-box, body.single-post .ct-author-box, .author-box .author-box-name, .author-box .author-box-bio { font-family: var(--iae-font-body); }
.author-box .author-box-name, .ct-author-box .author-box-name { font-family: var(--iae-font-heading); letter-spacing: -0.02em; }
