/*
Theme Name: Mango
Theme URI: https://tulbrand.com/mango
Author: Tulbrand
Author URI: https://tulbrand.com
Description: Tema ligero y neutro pensado para construir con Mango Builder. Sin Gutenberg, sin estilos que estorben: solo una base limpia sobre la que diseñar.
Version: 1.0.1
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mango-theme
Tags: one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* --------------------------------------------------------------------
 * Variables
 * ----------------------------------------------------------------- */

:root {
	--mt-text: #1d1f26;
	--mt-muted: #6b6f7a;
	--mt-border: #e6e6ea;
	--mt-bg: #ffffff;
	--mt-bg-soft: #f7f7f9;
	--mt-accent: #ff8a2b;
	--mt-radius: 10px;
	--mt-content: 1140px;
	--mt-narrow: 760px;
	--mt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------
 * Base
 * ----------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--mt-bg);
	color: var(--mt-text);
	font-family: var(--mt-font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

/* Los iframes conservan su alto: con height:auto se quedarían en 150 px. */
iframe { max-width: 100%; }
img { display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--mt-accent); }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	line-height: 1.2;
	font-weight: 650;
	letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
h3 { font-size: 1.4rem; }

p, ul, ol, blockquote, figure, table { margin: 0 0 1.2em; }

blockquote {
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--mt-accent);
	color: var(--mt-muted);
	font-style: italic;
}

code, pre {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.9em;
	background: var(--mt-bg-soft);
	border-radius: 6px;
}

code { padding: 2px 6px; }
pre { padding: 16px; overflow: auto; }

hr { border: none; border-top: 1px solid var(--mt-border); margin: 2.5em 0; }

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

.skip-link:focus {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------
 * Estructura
 * ----------------------------------------------------------------- */

.mt-container {
	width: 100%;
	max-width: var(--mt-content);
	margin-inline: auto;
	padding-inline: 20px;
}

.mt-narrow { max-width: var(--mt-narrow); }

.mt-site { display: flex; flex-direction: column; min-height: 100vh; }
.mt-main { flex: 1 1 auto; }

.mt-section { padding-block: 56px; }

/* Cabecera --------------------------------------------------------- */

.mt-header {
	border-bottom: 1px solid var(--mt-border);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	position: sticky;
	top: 0;
	z-index: 50;
}

.mt-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 68px;
}

.mt-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
	letter-spacing: -0.02em;
}

.mt-brand img { max-height: 40px; width: auto; }
.mt-tagline { display: block; font-size: 0.75rem; font-weight: 400; color: var(--mt-muted); }

.mt-nav ul {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mt-nav a {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 0.95rem;
}

.mt-nav a:hover { background: var(--mt-bg-soft); color: var(--mt-text); }
.mt-nav .current-menu-item > a { font-weight: 600; }

.mt-nav ul ul {
	position: absolute;
	display: none;
	flex-direction: column;
	align-items: stretch;
	min-width: 200px;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--mt-border);
	border-radius: 10px;
	box-shadow: 0 12px 30px rgba(17, 17, 20, 0.12);
	z-index: 10;
}

.mt-nav li { position: relative; }
.mt-nav li:hover > ul { display: flex; }

.mt-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--mt-border);
	border-radius: 10px;
	background: none;
	cursor: pointer;
}

.mt-toggle span {
	position: relative;
	display: block;
	width: 18px;
	height: 2px;
	background: var(--mt-text);
}

.mt-toggle span::before,
.mt-toggle span::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: var(--mt-text);
}

.mt-toggle span::before { top: -6px; }
.mt-toggle span::after { top: 6px; }

@media (max-width: 860px) {
	.mt-toggle { display: inline-flex; }

	.mt-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 20px;
		right: 20px;
		padding: 10px;
		background: #fff;
		border: 1px solid var(--mt-border);
		border-radius: 12px;
		box-shadow: 0 16px 40px rgba(17, 17, 20, 0.14);
	}

	.mt-header.is-open .mt-nav { display: block; }
	.mt-nav ul { flex-direction: column; align-items: stretch; }
	.mt-nav ul ul { position: static; display: flex; box-shadow: none; border: none; padding-left: 12px; }
}

/* Contenido -------------------------------------------------------- */

.mt-entry-header { margin-bottom: 28px; }

.mt-entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: var(--mt-muted);
	font-size: 0.875rem;
}

.mt-featured { margin-bottom: 28px; }
.mt-featured img { width: 100%; border-radius: var(--mt-radius); }

.mt-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 34px;
}

.mt-card-thumb img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--mt-radius);
}

.mt-card-title { margin: 14px 0 8px; font-size: 1.25rem; }
.mt-card-title a { text-decoration: none; }
.mt-card-excerpt { color: var(--mt-muted); font-size: 0.95rem; margin: 0; }

.mt-pagination {
	display: flex;
	gap: 6px;
	margin-top: 40px;
}

.mt-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--mt-border);
	border-radius: 10px;
	text-decoration: none;
	font-size: 0.95rem;
}

.mt-pagination .current,
.mt-pagination .page-numbers:hover { background: var(--mt-text); border-color: var(--mt-text); color: #fff; }

/* Formularios y botones -------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--mt-border);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
}

input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--mt-accent);
	box-shadow: 0 0 0 3px rgba(255, 138, 43, 0.16);
}

button,
.mt-button,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: none;
	border-radius: 8px;
	background: var(--mt-text);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.2s;
}

button:hover, .mt-button:hover, input[type="submit"]:hover { opacity: 0.9; color: #fff; }

.mt-search-form { display: flex; gap: 8px; }

/* Comentarios ------------------------------------------------------ */

.mt-comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--mt-border); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { padding: 18px 0; border-bottom: 1px solid var(--mt-border); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-size: 0.85rem; color: var(--mt-muted); margin-bottom: 6px; }

/* Pie de página ---------------------------------------------------- */

.mt-footer {
	margin-top: 64px;
	padding-block: 40px;
	border-top: 1px solid var(--mt-border);
	color: var(--mt-muted);
	font-size: 0.9rem;
}

.mt-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.mt-footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mt-footer a { text-decoration: none; }

/* Páginas construidas con Mango ------------------------------------ */

body.mango-page .mt-main > .mt-container { max-width: none; padding-inline: 0; }
body.mango-page .mt-section { padding-block: 0; }
body.mango-page .mt-entry-header { display: none; }
