/*
Theme Name: Argentina Portal
Theme URI: https://argentinaportal.com
Author: Argentina Portal
Description: Tema liviano y optimizado para SEO, pensado para guías prácticas, trámites y calculadoras. Sin jQuery, sin fuentes externas, con datos estructurados, migas de pan, índice automático y Open Graph incorporados.
Version: 1.2.0
Requires at least: 6.3
Tested up to: 6.8
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: argentinaportal
*/

:root {
	--ap-bg: #ffffff;
	--ap-bg-soft: #f3f7fb;
	--ap-text: #17212b;
	--ap-muted: #5a6b7b;
	--ap-line: #dde5ed;
	--ap-accent: #0f5fa8;
	--ap-accent-dark: #0a4479;
	--ap-accent-soft: #e6f1fb;
	--ap-sun: #f5b400;
	--ap-warn-bg: #fff6dd;
	--ap-warn-line: #e6b100;
	--ap-radius: 10px;
	--ap-wide: 1120px;
	--ap-content: 720px;
	--ap-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ap-bg: #10171e;
		--ap-bg-soft: #18222c;
		--ap-text: #e8eef4;
		--ap-muted: #9fb0c0;
		--ap-line: #2a3846;
		--ap-accent: #6db8f5;
		--ap-accent-dark: #9ccffa;
		--ap-accent-soft: #1a2c3d;
		--ap-warn-bg: #33290c;
		--ap-warn-line: #b88d00;
	}
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var(--ap-bg);
	color: var(--ap-text);
	font-family: var(--ap-font);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-wrap: break-word;
}

img, video, iframe, svg { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--ap-accent); text-underline-offset: 3px; }
a:hover { color: var(--ap-accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
	outline: 3px solid var(--ap-sun);
	outline-offset: 2px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 2em 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.75rem); }
h3 { font-size: 1.25rem; }
p, ul, ol, table, blockquote, figure { margin: 0 0 1.25em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }

blockquote {
	margin-left: 0;
	padding: .2em 0 .2em 1.1em;
	border-left: 4px solid var(--ap-accent);
	color: var(--ap-muted);
}

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .65em .8em; border: 1px solid var(--ap-line); text-align: left; }
th { background: var(--ap-bg-soft); }
.wp-block-table, .ap-table-wrap { overflow-x: auto; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto;
	clip: auto; clip-path: none; padding: .6em 1em; background: var(--ap-bg);
	border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.ap-wrap { width: 100%; max-width: var(--ap-wide); margin: 0 auto; padding: 0 20px; }
.ap-narrow { max-width: calc(var(--ap-content) + 40px); }

/* Cabecera */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--ap-bg);
	border-bottom: 1px solid var(--ap-line);
}
.site-header .ap-wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.site-branding { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.site-branding img { max-height: 40px; width: auto; }
.site-title {
	margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
}
.site-title a { color: var(--ap-text); text-decoration: none; }
.site-title a::before {
	content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .4em;
	border-radius: 50%; background: var(--ap-sun);
}

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; position: relative; }
.main-nav a {
	display: block; padding: .5em .8em; border-radius: 6px;
	color: var(--ap-text); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--ap-accent-soft); color: var(--ap-accent-dark); }
.main-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 220px; flex-direction: column;
	padding: 6px; background: var(--ap-bg); border: 1px solid var(--ap-line);
	border-radius: var(--ap-radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }

.nav-toggle {
	display: none; align-items: center; gap: 8px; padding: .5em .8em;
	background: none; border: 1px solid var(--ap-line); border-radius: 6px;
	color: var(--ap-text); font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 820px) {
	.nav-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: var(--ap-bg); border-bottom: 1px solid var(--ap-line); padding: 10px 20px 16px;
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; }
}

/* Buscador */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field {
	width: 100%; padding: .75em 1em; font: inherit;
	color: var(--ap-text); background: var(--ap-bg);
	border: 1px solid var(--ap-line); border-radius: 8px;
}
.ap-btn, .search-submit, .wp-block-button__link, input[type="submit"] {
	display: inline-block; padding: .75em 1.3em; font: inherit; font-weight: 700;
	color: #fff; background: #0f5fa8; border: 0; border-radius: 8px;
	text-decoration: none; cursor: pointer;
}
.ap-btn:hover, .search-submit:hover, input[type="submit"]:hover { background: #0a4479; color: #fff; }

/* Portada */
.ap-hero { background: var(--ap-bg-soft); border-bottom: 1px solid var(--ap-line); padding: 56px 0 48px; }
.ap-hero h1 { max-width: 18em; margin-bottom: .4em; }
.ap-hero p { max-width: 38em; color: var(--ap-muted); font-size: 1.15rem; }
.ap-hero .search-form { max-width: 560px; margin-top: 1.4em; }

.ap-hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 40px; align-items: center; }
.ap-hero-image img { width: 100%; border-radius: var(--ap-radius); }
@media (max-width: 820px) {
	.ap-hero-split { grid-template-columns: 1fr; gap: 24px; }
}

.ap-section { padding: 44px 0; }
.ap-section > .ap-wrap > h2 { margin-top: 0; }

.ap-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); list-style: none; margin: 0; padding: 0; }
.ap-grid > li { margin: 0; }

.ap-card {
	display: block; height: 100%; padding: 20px;
	background: var(--ap-bg); border: 1px solid var(--ap-line); border-radius: var(--ap-radius);
	color: var(--ap-text); text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}
a.ap-card:hover { border-color: var(--ap-accent); box-shadow: 0 4px 16px rgba(15,95,168,.12); color: var(--ap-text); }
.ap-card h2, .ap-card h3 { margin: 0 0 .4em; font-size: 1.12rem; }
.ap-card p { margin: 0; color: var(--ap-muted); font-size: .95rem; }
.ap-card .ap-card-meta { display: block; margin-top: .8em; font-size: .82rem; color: var(--ap-muted); }

/* Contenido */
.site-main { padding: 28px 0 56px; }

.ap-breadcrumbs { margin-bottom: 18px; font-size: .88rem; color: var(--ap-muted); }
.ap-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.ap-breadcrumbs li { margin: 0; }
.ap-breadcrumbs li + li::before { content: "›"; margin-right: 8px; }
.ap-breadcrumbs a { color: var(--ap-muted); }

.entry-header { margin-bottom: 24px; }
.entry-header h1 { margin-bottom: .35em; }
.entry-lead { font-size: 1.15rem; color: var(--ap-muted); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--ap-muted); }
.entry-thumb { margin: 0 0 28px; }
.entry-thumb img { width: 100%; border-radius: var(--ap-radius); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content .alignwide { margin-left: calc(-1 * min(120px, 8vw)); margin-right: calc(-1 * min(120px, 8vw)); max-width: none; }
.entry-content figcaption { margin-top: .5em; font-size: .85rem; color: var(--ap-muted); text-align: center; }

.archive-header { margin-bottom: 28px; }
.archive-description { color: var(--ap-muted); max-width: 42em; }

/* Índice */
.ap-toc {
	margin: 0 0 2em; padding: 16px 20px;
	background: var(--ap-bg-soft); border: 1px solid var(--ap-line); border-radius: var(--ap-radius);
}
.ap-toc summary { font-weight: 700; cursor: pointer; }
.ap-toc ol { margin: .8em 0 0; padding-left: 1.3em; }
.ap-toc ol ol { margin-top: .3em; font-size: .95em; }
.ap-toc a { text-decoration: none; }
.ap-toc a:hover { text-decoration: underline; }

/* Bloques propios */
.ap-answer {
	margin: 0 0 1.6em; padding: 18px 20px;
	background: var(--ap-accent-soft); border-left: 5px solid var(--ap-accent); border-radius: var(--ap-radius);
}
.ap-answer-title { margin: 0 0 .3em; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ap-accent-dark); }
.ap-answer > *:last-child { margin-bottom: 0; }

.ap-notice {
	margin: 0 0 1.6em; padding: 14px 18px; border-radius: var(--ap-radius);
	background: var(--ap-bg-soft); border: 1px solid var(--ap-line);
}
.ap-notice.is-alerta { background: var(--ap-warn-bg); border-color: var(--ap-warn-line); }
.ap-notice > *:last-child { margin-bottom: 0; }

.ap-faq { margin: 0 0 1.6em; }
.ap-faq details { border: 1px solid var(--ap-line); border-radius: var(--ap-radius); margin-bottom: 10px; }
.ap-faq summary { padding: 14px 18px; font-weight: 700; cursor: pointer; }
.ap-faq .ap-faq-body { padding: 0 18px 14px; }
.ap-faq .ap-faq-body > *:last-child { margin-bottom: 0; }

.ap-source { font-size: .9rem; color: var(--ap-muted); }

.ap-tool {
	margin: 0 0 1.8em; padding: 22px;
	background: var(--ap-bg-soft); border: 1px solid var(--ap-line); border-radius: var(--ap-radius);
}
.ap-tool label { display: block; margin-bottom: .3em; font-weight: 600; font-size: .95rem; }
.ap-tool input[type="number"], .ap-tool input[type="text"], .ap-tool input[type="date"], .ap-tool select {
	width: 100%; padding: .7em .9em; margin-bottom: 1em; font: inherit;
	color: var(--ap-text); background: var(--ap-bg); border: 1px solid var(--ap-line); border-radius: 8px;
}
.ap-tool-result {
	margin-top: 1em; padding: 16px 18px; background: var(--ap-bg);
	border: 2px solid var(--ap-accent); border-radius: var(--ap-radius); font-size: 1.15rem; font-weight: 700;
}

.ap-calc-fieldset { margin: 0 0 1em; padding: 0; border: 0; }
.ap-calc-fieldset legend { margin-bottom: .3em; padding: 0; font-weight: 600; font-size: .95rem; }
.ap-tool label.ap-calc-inline { display: flex; align-items: center; gap: .5em; margin-bottom: .35em; font-weight: 400; }
.ap-tool label.ap-calc-check { margin-bottom: 1.1em; }
.ap-calc-inline input { width: auto; margin: 0; }
.ap-calc-detail { font-size: .92rem; font-weight: 400; color: var(--ap-muted); }
.ap-tool-result strong { font-size: 1.4rem; }
.ap-tool [hidden] { display: none; }

.ap-updated-box {
	margin-top: 2.4em; padding: 14px 18px; font-size: .9rem; color: var(--ap-muted);
	border-top: 1px solid var(--ap-line);
}

.ap-related { margin-top: 2.4em; }
.ap-related h2 { margin-top: 0; font-size: 1.3rem; }

/* Paginación */
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-numbers {
	padding: .45em .9em; border: 1px solid var(--ap-line); border-radius: 6px;
	text-decoration: none; color: var(--ap-text);
}
.page-numbers.current { background: #0f5fa8; border-color: #0f5fa8; color: #fff; }

/* Comentarios */
.comments-area { margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--ap-line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.4em; }
.comment-body { margin-bottom: 1.4em; }
.comment-meta { font-size: .88rem; color: var(--ap-muted); }
.comment-form label { display: block; font-weight: 600; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .7em .9em; font: inherit; color: var(--ap-text);
	background: var(--ap-bg); border: 1px solid var(--ap-line); border-radius: 8px;
}

/* Pie */
.site-footer {
	padding: 40px 0 28px; background: var(--ap-bg-soft);
	border-top: 1px solid var(--ap-line); font-size: .93rem; color: var(--ap-muted);
}
.footer-widgets { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 28px; }
.footer-widgets .widget-title { margin: 0 0 .6em; font-size: 1rem; color: var(--ap-text); }
.footer-widgets ul { list-style: none; padding: 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0 0 14px; padding: 0; }
.footer-nav li { margin: 0; }
.site-footer a { color: var(--ap-muted); }
.site-info { margin: 0; }

@media print {
	.site-header, .site-footer, .ap-toc, .ap-related, .ap-breadcrumbs, .comments-area { display: none; }
}
