/*
Theme Name: Manuel Viguin
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manuel-viguin
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

:root {
	--paper: var(--wp--preset--color--background);
	--ink: var(--wp--preset--color--text);
	--amber: var(--wp--preset--color--primary);
	--ember: var(--wp--preset--color--accent);
	--gold: var(--wp--preset--color--accent);
	--surface: var(--wp--preset--color--surface);
	--muted: var(--wp--preset--color--muted);
}

/* === typography === */
.eyebrow,
.hero-eyebrow,
.sec-note,
.stat-label,
.card-link,
.who {
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.72rem;
	font-weight: 500;
}
.eyebrow { color: var(--ember); }
.lead { color: var(--muted); font-size: 1.05rem; }

/* === header === */
.site-header {
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-top: 3px solid var(--amber);
	border-bottom: 1px solid rgba(26, 24, 21, 0.1);
}
::selection { background: rgba(255, 199, 91, 0.45); color: var(--ink); }
.site-header .wp-site-title,
.site-header .wp-block-site-title a { color: var(--ink); text-decoration: none; }
.header-logo { margin: 0; line-height: 0; }
.header-logo img { display: block; height: 42px; width: auto; max-width: 200px; }
.site-nav .wp-block-navigation-item a {
	color: var(--ink);
	text-decoration: none;
	position: relative;
}
.site-nav .wp-block-navigation-item a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	height: 1px;
	width: 100%;
	background: var(--ember);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.site-nav .wp-block-navigation-item a:hover::after { transform: scaleX(1); }

/* === hero === */
.hero-cover { min-height: 88vh; }
.hero-eyebrow { color: var(--amber); margin-bottom: 1.4rem; font-size: 1.5rem !important; letter-spacing: 0.2em; }
.hero-title {
	color: #fff;
	font-size: var(--wp--preset--font-size--display);
	line-height: 1.05;
	text-wrap: balance;
}
.hero-sub {
	color: rgba(255, 255, 255, 0.88);
	max-width: 34rem;
	line-height: 1.7;
	margin: 1.6rem 0 2.2rem;
}

/* === buttons === */
.wp-element-button { transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease; }
.wp-element-button:hover { background: #f2b43f; box-shadow: 0 4px 14px rgba(28, 40, 64, 0.18); }
.is-style-hero-cta .wp-element-button { background: var(--amber); color: var(--ink); }
.is-style-hero-cta .wp-element-button:hover { background: #f2b43f; }
.is-style-outline-light .wp-element-button {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.55);
}
.is-style-outline-light .wp-element-button:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.08);
}
.is-style-newsletter .wp-element-button {
	background: transparent;
	color: var(--ink);
	border: 1px solid rgba(26, 24, 21, 0.35);
	padding: 0.6rem 1.2rem;
}
.is-style-newsletter .wp-element-button:hover {
	border-color: var(--ember);
	color: var(--ember);
}

/* === sections === */
.sec-title { font-size: var(--wp--preset--font-size--headline); }
.sec-link { margin: 0; }
.sec-link a {
	color: var(--ember);
	text-decoration: none;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 500;
}
.sec-link a:hover { text-decoration: underline; }
.sec-note { color: var(--muted); margin: 0; white-space: nowrap; }

/* === cards (block style is-style-card) === */
.is-style-card {
	background: #fff;
	border: 1px solid #e6dbc6;
	border-radius: 2px;
	padding: 2.1rem;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.card-num {
	color: var(--gold);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 2.4rem;
	font-weight: 340;
	line-height: 1;
	margin-bottom: 1.1rem;
}
.card-title { font-size: 1.6rem; margin-bottom: 0.7rem; }
.card-text { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1.4rem; }
.card-link { margin-top: auto; }
.card-link a { color: var(--ember); text-decoration: none; font-size: 0.72rem; }
.card-link a:hover { text-decoration: underline; }
.is-style-card:hover { border-color: rgba(255, 199, 91, 0.7); }

/* === method split === */
.event-socials { margin-top: 1.5rem; }
.has-background-text-color .eyebrow { color: #000; }
.has-background-text-color button.wp-block-button__link { color: #FFC067 !important; background-color: #1d1a15 !important; }
.has-background-text-color a.wp-block-button__link:not([href="/product/membresia-freemium/"]) { color: #ffffff !important; background-color: #1C2840 !important; }
.has-background-text-color a.wp-block-button__link[href="/my-account/"] { color: #ffffff !important; background-color: #1C2840 !important; }
.home-socials .wp-block-social-link-anchor svg { width: 40px; height: 40px; }
.method-split { align-items: center; }
.is-style-frame img {
	border: 1px solid rgba(26, 24, 21, 0.12);
	border-radius: 2px;
}
.mini-list .wp-block-list { padding-left: 1.1rem; color: var(--ink); font-size: 0.98rem; }
.mini-list li { margin-bottom: 0.6rem; }

/* === stats === */
.stats .wp-block-column { border-left: 1px solid rgba(26, 24, 21, 0.1); padding-left: 1.6rem; }
.stats .wp-block-column:first-child { border-left: 0; padding-left: 0; }
.stat-num {
	color: var(--gold);
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 340;
	font-size: clamp(2.4rem, 4vw, 3.4rem);
	line-height: 1;
	margin-bottom: 0.6rem;
	font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--muted); }

/* === testimonials === */
.quote {
	font-family: var(--wp--preset--font-family--fraunces);
	font-style: italic;
	font-weight: 380;
	font-size: 1.25rem;
	line-height: 1.45;
	margin-bottom: 1.4rem;
}
.who { color: var(--muted); }

/* === membership band === */
.mem-title { color: #fff; }
.mem-sub { color: rgba(245, 239, 227, 0.82); max-width: 40rem; line-height: 1.7; }

/* === footer === */
.site-footer { color: #1d1a15; }
.site-footer p { color: #1d1a15; }
.footer-label,
.site-footer .footer-label { color: #1d1a15; }
.footer-muted,
.site-footer .footer-muted { color: rgba(29, 26, 21, 0.68); }
.footer-rule { border-color: rgba(29, 26, 21, 0.22); }
.site-footer a { color: #1d1a15; }

/* === reveal on scroll (progressive enhancement: visible by default) === */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* === responsive === */
@media (max-width: 782px) {
	.site-header { padding-top: 0.8rem; padding-bottom: 0.8rem; }
	.hero-cover { min-height: auto; }
	.offer-grid, .method-split, .stats, .testimonials { gap: 1.2rem; }
	.stats .wp-block-column { border-left: 0; padding-left: 0; border-top: 1px solid rgba(26, 24, 21, 0.1); padding-top: 1.2rem; }
	.is-style-card { padding: 1.6rem; }
}

/* === interior page extras === */
.page-title { font-size: var(--wp--preset--font-size--display); line-height: 1.06; }
.course-meta { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.2rem; }
.tool-price { color: var(--ember); font-family: var(--wp--preset--font-family--fraunces); font-weight: 380; font-size: 1.35rem; margin-bottom: 0.4rem; }
.plan-label { color: var(--gold); }
.plan-price { font-family: var(--wp--preset--font-family--fraunces); font-weight: 340; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1; margin: 0.6rem 0 1.1rem; }
.plan-per { font-size: 1rem; color: var(--muted); font-family: var(--wp--preset--font-family--inter); }
.is-style-card-featured { border: 1px solid var(--ember); box-shadow: 0 0 0 4px rgba(255, 199, 91, 0.25); }
.contact-label { color: var(--gold); }
.contact-value { font-size: 1.05rem; margin-bottom: 1.1rem; }
.benefits .wp-block-list { padding-left: 1.1rem; font-size: 1rem; }
.benefits li { margin-bottom: 0.7rem; }

/* === Jetpack form styling === */
.wp-block-jetpack-contact-form input[type="text"],
.wp-block-jetpack-contact-form input[type="email"],
.wp-block-jetpack-contact-form textarea {
	border: 1px solid rgba(26, 24, 21, 0.2);
	border-radius: 2px;
	background: #fff;
	padding: 0.8rem 0.9rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 1rem;
	color: var(--ink);
}
.wp-block-jetpack-contact-form label { font-size: 0.82rem; font-weight: 500; color: var(--ink); }
.has-text-background-color .wp-block-jetpack-contact-form label { color: rgba(245, 239, 227, 0.92); }

/* === redesign extras === */
.logo-row { gap: 2rem; }
.wp-block-columns.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.5rem; }
.wp-block-columns.offer-grid > .wp-block-column { display: flex; min-width: 0; }
.wp-block-columns.offer-grid .is-style-card { width: 100%; }
.logo-name {
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.8rem;
	font-weight: 500;
	opacity: 0.75;
}
.testimonial-video {
	border-left: 3px solid var(--amber);
	padding-left: 1.5rem;
	margin-bottom: var(--wp--preset--spacing--50);
}
.is-style-card .wp-block-image { margin-bottom: 1.4rem; }
.wp-block-details.faq-item {
	border-top: 1px solid rgba(26, 24, 21, 0.12);
	padding: 1.3rem 0;
}
.wp-block-details.faq-item summary {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 380;
	font-size: 1.2rem;
	cursor: pointer;
}
.wp-block-details.faq-item[open] summary { color: var(--ember); }
.has-dark-background-color .eyebrow { color: var(--amber); }

/* === herramientas === */
.gated.is-gated .pdf-download { display: none; }
.pdf-download {
	border: 1px solid rgba(26, 24, 21, 0.12);
	border-radius: 6px;
	margin-top: 0.5rem;
}
.npl-card { border-radius: 6px; }
.npl-calc { display: grid; gap: 1rem; }
.npl-field { display: grid; gap: 0.35rem; }
.npl-field label {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ink);
}
.npl-field input {
	width: 100%;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: var(--ink);
	background: #fff;
	border: 1px solid rgba(26, 24, 21, 0.22);
	border-radius: 4px;
}
.npl-field input:focus {
	outline: none;
	border-color: var(--ember);
	box-shadow: 0 0 0 3px rgba(232, 155, 60, 0.18);
}
.npl-btn {
	justify-self: start;
	background: var(--amber);
	color: var(--ink);
	border: 0;
}
.npl-result {
	margin-top: 0.5rem;
	border-top: 1px solid rgba(26, 24, 21, 0.14);
}
.npl-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid rgba(26, 24, 21, 0.08);
	font-size: 0.95rem;
}
.npl-row strong {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 500;
	font-size: 1.1rem;
}
.npl-note { font-size: 0.82rem; color: var(--muted); }

/* Degradado ámbar→crema sutil global (adaptado de la portada de Manuel) */
body {
  background-color: #fbf8f1;
  background-image:
    radial-gradient(1300px 660px at 50% -160px, rgba(253, 210, 131, 0.4), rgba(253, 210, 131, 0) 62%),
    linear-gradient(180deg, #fff8eb 0%, #fbf8f1 36%, #fbf8f1 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* === Sobre mí === */
.sobre-cols { align-items: stretch; }
.sobre-text { justify-content: center; }
.sobre-hero h1 { max-width: 14ch; }
.sobre-photo { display: flex; }
.sobre-img { margin: 0 !important; }
.sobre-img img { width: 100%; height: auto; display: block; border-radius: 2px; }
.timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.tl-item { background: var(--wp--preset--color--surface); border-radius: 16px; padding: 1.6rem; box-shadow: 0 1px 0 rgba(29, 26, 21, 0.04); }
.tl-year { letter-spacing: 0.09em; text-transform: uppercase; color: var(--wp--preset--color--accent); font-weight: 600; margin-bottom: 0.5rem; }
.tl-title { margin-block: 0.1rem 0.4rem; }
.trayectoria-foto { margin-top: 2.5rem !important; width: min(100%, 720px); }
.trayectoria-foto img { width: 100%; height: auto; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { body { background-attachment: scroll; } }

/* === Cifras === */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-grid > .wp-block-column { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 0; }
.stat-num { font-family: var(--wp--preset--font-family--display, Fraunces, serif); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.05; color: var(--wp--preset--color--accent); margin-block: 0 0.4rem; }
.stat-label { color: var(--wp--preset--color--muted); }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.platforms-note { max-width: 660px; margin-inline: auto; color: var(--wp--preset--color--muted); font-size: 0.95rem; }
.platforms-note a { color: var(--wp--preset--color--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.payment-note { color: var(--wp--preset--color--muted); font-size: 0.9rem; max-width: 560px; margin-inline: auto; }
.registration-note { color: var(--wp--preset--color--muted); font-size: 0.92rem; max-width: 660px; margin-inline: auto; text-align: center; margin-top: 1.2rem; }

/* === cookie banner === */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--wp--preset--color--text);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  max-width: 760px;
  margin-inline: auto;
  font-size: 0.92rem;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner__text { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.cookie-banner__text a { color: var(--wp--preset--color--primary); text-decoration: underline; }
.cookie-banner .cookie-accept .wp-block-button__link,
.cookie-banner .cookie-reject .wp-block-button__link { padding: 0.6rem 1.1rem; font-size: 0.85rem; white-space: nowrap; }
.cookie-banner .cookie-accept .wp-block-button__link { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--text); }
.cookie-banner .cookie-reject .wp-block-button__link { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
}
.footer-logo { margin: 0 0 0.4rem; line-height: 0; }
.footer-logo img { display: block; height: 46px; width: auto; max-width: 240px; }
.legal-note { color: rgba(251, 248, 241, 0.6); font-size: 0.85rem; }
.has-background-text-color .legal-note { color: #ffffff !important; }
.plan-per { color: var(--wp--preset--color--muted); font-size: 0.6em; font-weight: 400; }

/* === Carrusel de medios === */
.logo-marquee { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; align-items: center; width: max-content; flex-wrap: nowrap; gap: 3.5rem; animation: logo-scroll 50s linear infinite; will-change: transform; }
.logo-track .logo-name { white-space: nowrap; margin: 0; opacity: 1; color: var(--wp--preset--color--muted); font-size: 1rem; }
.logo-track .wp-block-image { margin: 0; }
.logo-track .wp-block-image img { height: 2.5rem; width: auto; max-width: none; flex: none; opacity: .7; }
.logo-track .logo-img figure img { margin: 0; }
@keyframes logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logo-track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 1.2rem; } }

/* Enlace activo del menú de navegación */
.site-nav .wp-block-navigation-item.is-current .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}
.site-nav .wp-block-navigation-item.is-current .wp-block-navigation-item__content::after {
	content: "";
	display: block;
	height: 2px;
	background: var(--wp--preset--color--accent);
	border-radius: 2px;
	margin-top: 2px;
}
@media (prefers-reduced-motion: no-preference) {
	.site-nav .wp-block-navigation-item__content { transition: color .18s ease; }
}

/* === Reel Instagram (sección Donde he estado) === */
.reel-wrap { margin-block: 0 2.5rem; }
.reel-wrap .wp-block-embed { max-width: 480px; margin-inline: auto; }
.reel-wrap .wp-block-embed__wrapper { position: relative; aspect-ratio: 9 / 16; }
.reel-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* === Lo último que he publicado: embeds en tarjetas === */
.course-card { overflow: hidden; }
.course-card-img { margin: -2.1rem -2.1rem 1rem; }
.course-card-img img { width: 100%; height: auto; display: block; }

.pub-embed .wp-block-embed { margin-block: 0.25rem 0; width: 100%; }
.pub-embed .is-type-video iframe, .pub-embed .wp-block-embed__wrapper iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; }
.pub-embed .is-type-rich .wp-block-embed__wrapper { position: relative; aspect-ratio: 4 / 5; }
.pub-embed .is-type-rich .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* === Calendario === */
.cal-month {
	border-block-start: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 35%, transparent);
	padding-block: 1rem 1.25rem;
}
.cal-month h3 {
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-block-end: 0.4rem;
}
.cal-month:first-of-type { border-block-start: 0; padding-block-start: 0; }
.cal-month ul { margin-block: 0; }
.cal-month li + li { margin-block-start: 0.45rem; }

/* === Galería: aviso editable === */
.notice {
	border-inline-start: 3px solid var(--wp--preset--color--primary);
	background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	padding: 0.9rem 1.1rem;
	color: var(--wp--preset--color--text);
}
.wp-block-gallery { --wp--style--unstable-gallery-gap: 1rem; }

