/*
Theme Name: Adrián Herranz
Theme URI: https://adrianherranz.com/
Author: Adrián Herranz
Description: Tema de bloques ligero para adrianherranz.com. Recrea la web actual (inicio, podcast «Un café con Adrián», blog y contacto) sin Elementor ni plugins.
Version: 1.2.0
Requires at least: 6.4
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: adrianherranz
*/

a { text-underline-offset: 0.2em; }
.wp-block-navigation a { text-decoration: none; }
.wp-block-navigation a:hover { text-decoration: underline; }
.ah-card { transition: transform .15s ease, box-shadow .15s ease; }
.ah-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.ah-eyebrow { letter-spacing: .12em; text-transform: uppercase; }
.wp-block-navigation .wp-block-navigation__submenu-container { border-radius: 8px; padding: .25rem 0; }
.ah-platforms .wp-block-button__link { min-width: 9rem; text-align: center; }

/* ---------- Dinámica ---------- */
html { scroll-behavior: smooth; }
.wp-site-blocks > header, .wp-site-blocks > .wp-block-template-part:first-child { position: sticky; top: 0; z-index: 50; }
.wp-site-blocks > .wp-block-template-part:first-child > header { background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow .25s ease; }
.ah-scrolled .wp-site-blocks > .wp-block-template-part:first-child > header { box-shadow: 0 4px 24px rgba(0,0,0,.07); }
.admin-bar .wp-site-blocks > .wp-block-template-part:first-child { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > .wp-block-template-part:first-child { top: 0; } }

/* Fondo animado de la portada */
.ah-hero { position: relative; overflow: hidden; isolation: isolate; }
.ah-hero::before, .ah-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .35; animation: ah-float 14s ease-in-out infinite alternate; }
.ah-hero::before { width: 420px; height: 420px; background: #5270FF; top: -120px; right: -80px; }
.ah-hero::after { width: 360px; height: 360px; background: #C9A27E; bottom: -160px; left: -100px; animation-delay: -7s; }
@keyframes ah-float { from { transform: translate(0,0) scale(1); } to { transform: translate(-40px,30px) scale(1.12); } }

.ah-rotate { display: inline-block; color: var(--wp--preset--color--accent-dark); transition: opacity .3s ease, transform .3s ease; }
.ah-rotate.is-out { opacity: 0; transform: translateY(-6px); }

/* Aparición al hacer scroll (solo si hay JS) */
.ah-js .ah-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.ah-js .ah-reveal.is-visible { opacity: 1; transform: none; }

/* Botones y tarjetas */
.wp-element-button { transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.wp-element-button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.ah-btn-big .wp-element-button { font-size: 1.05rem; padding: 1rem 2rem; }

/* Bloque Guadarrama */
.ah-coffee { position: relative; overflow: hidden; isolation: isolate; }
.ah-coffee::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,126,.35), transparent 70%); animation: ah-float 16s ease-in-out infinite alternate; }
.ah-coffee a:not(.wp-element-button) { color: #F6EEE3; }
.ah-feature { border-top: 2px solid rgba(201,162,126,.5); padding-top: 1rem; transition: border-color .2s ease; }
.ah-feature:hover { border-top-color: #C9A27E; }

.ah-stat { color: var(--wp--preset--color--contrast); font-variant-numeric: tabular-nums; }
.ah-stats .wp-block-column { border-left: 3px solid var(--wp--preset--color--accent); padding-left: 1rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ah-hero::before, .ah-hero::after, .ah-coffee::before { animation: none; }
	.ah-js .ah-reveal { opacity: 1; transform: none; transition: none; }
	.wp-element-button:hover, .ah-card:hover { transform: none; }
}
