/* === TraduOficial: animaciones y ajustes === */
.wp-block-post-content > * { margin-block-start: 0 !important; }
main.wp-block-group { margin-block-start: 0 !important; }
body { overflow-x: hidden; }

/* Cabecera fija al hacer scroll */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
body.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.wp-block-template-part { top: 46px; } }

@keyframes to-fade-up { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes to-kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes to-twinkle { 0%,100% { opacity: 1; transform: rotate(0deg) scale(1); } 50% { opacity: .55; transform: rotate(45deg) scale(.85); } }
@keyframes to-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes to-underline { from { background-size: 0 2px, 250% 100%; } to { background-size: 44px 2px, 250% 100%; } }
@keyframes to-sheen { 0% { background-position: center bottom, 120% 0; } 55%,100% { background-position: center bottom, -40% 0; } }
@keyframes to-pop { 0% { opacity: 0; transform: translateY(24px) scale(.85); } 70% { transform: translateY(-4px) scale(1.04); } 100% { opacity: 1; transform: none; } }

/* Portada */
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-cover__image-background { animation: to-kenburns 18s ease-out both; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > * { animation: to-fade-up .9s cubic-bezier(.2,.7,.2,1) both; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > :nth-child(1) { animation-delay: .15s; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > :nth-child(2) { animation-delay: .35s; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > :nth-child(3) { animation-delay: .55s; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > :nth-child(4) { animation-delay: .75s; }
.home .wp-block-post-content > .wp-block-cover:first-child .wp-block-column:first-child > :nth-child(5) { animation-delay: .95s; }

/* Estrella del logo */
.to-star { display: inline-block; animation: to-twinkle 4s ease-in-out infinite; }

/* Menú: subrayado dorado */
header .wp-block-navigation-item__content { padding-bottom: 6px; background-image: linear-gradient(#d4b06a, #d4b06a); background-repeat: no-repeat; background-position: left bottom; background-size: 0 1px; transition: background-size .35s ease; }
header .wp-block-navigation-item__content:hover { background-size: 100% 1px; }

/* Botones */
.wp-block-button__link { background-image: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); background-size: 250% 100%; background-position: 130% 0; background-repeat: no-repeat; transition: transform .3s ease, box-shadow .3s ease, background-position .9s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,29,75,.28); background-position: -30% 0; }

/* Franja de datos */
.to-stats .wp-block-column { animation: to-pop 1s cubic-bezier(.2,.7,.2,1) both; transition: transform .4s ease; }
.to-stats .wp-block-column:nth-child(1) { animation-delay: .9s; }
.to-stats .wp-block-column:nth-child(2) { animation-delay: 1.1s; }
.to-stats .wp-block-column:nth-child(3) { animation-delay: 1.3s; }
.to-stats .wp-block-column:nth-child(4) { animation-delay: 1.5s; }
.to-stats .wp-block-column + .wp-block-column { border-left: 1px solid rgba(14,29,75,.14); }
@media (max-width: 781px) { .to-stats .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid rgba(14,29,75,.14); padding-top: 1rem; } }
.to-stats .to-num { padding-bottom: 16px; color: transparent !important; background-image: linear-gradient(#b8924a, #b8924a), linear-gradient(100deg, #0e1d4b 0%, #0e1d4b 42%, #d4b06a 50%, #0e1d4b 58%, #0e1d4b 100%); background-repeat: no-repeat; background-size: 0 2px, 250% 100%; background-position: center bottom, 120% 0; -webkit-background-clip: padding-box, text; background-clip: padding-box, text; animation: to-underline 1s ease 2s forwards, to-sheen 4s ease-in-out 2.4s infinite; }
.to-stats .wp-block-column:hover { transform: translateY(-6px); }

/* Tarjetas de idiomas */
#idiomas .wp-block-group.has-border-color { transition: transform .4s ease, border-color .4s ease, background-color .4s ease, box-shadow .4s ease; }
#idiomas .wp-block-group.has-border-color:hover { transform: translateY(-8px); border-color: #d4b06a !important; background-color: rgba(212,176,106,.07); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
#idiomas .wp-block-group.has-border-color:hover p:first-child { animation: to-float 1.6s ease-in-out infinite; }

/* Columnas de documentos y pasos */
.wp-block-column[style*='border-top-color'] { transition: transform .4s ease; }
.wp-block-column[style*='border-top-color']:hover { transform: translateY(-6px); }
#como-funciona .has-xx-large-font-size { display: inline-block; transition: transform .4s ease, letter-spacing .4s ease; }
#como-funciona .wp-block-column:hover > .has-xx-large-font-size { transform: translateX(6px); letter-spacing: 3px; }

/* Imágenes */
.wp-block-media-text__media, .wp-block-post-featured-image { overflow: hidden; }
.wp-block-media-text__media img, .wp-block-post-featured-image img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.wp-block-media-text:hover .wp-block-media-text__media img, .wp-block-post-featured-image:hover img { transform: scale(1.05); }

/* Tarjetas del blog */
.to-card { transition: transform .4s ease, box-shadow .4s ease; height: 100%; }
.to-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(14,29,75,.12); }

/* Preguntas frecuentes */
.wp-block-details summary { cursor: pointer; transition: color .3s ease, padding-left .3s ease; }
.wp-block-details summary:hover { color: #b8924a; padding-left: 6px; }
.wp-block-details[open] > :not(summary) { animation: to-fade-up .5s ease both; }

/* Aparición al hacer scroll (la activa assets/js/animations.js) */
.to-js .to-reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.to-js .to-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, ::before, ::after { animation: none !important; transition: none !important; }
	.to-js .to-reveal { opacity: 1; transform: none; }
}


/* === Formulario de contacto (Contact Form 7) === */
.wpcf7 form p { margin: 0 0 18px; }
.wpcf7 label { display: block; font-family: "TASA Orbiter", "Helvetica Neue", Arial, sans-serif; font-size: 13px; letter-spacing: .5px; color: inherit; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 select, .wpcf7 textarea { box-sizing: border-box; width: 100%; margin-top: 8px; padding: 13px 14px; border: 1px solid #c9ced9; border-radius: 2px; background: #fff; color: #2f2f2f; font: inherit; font-size: 16px; }
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus { outline: 2px solid #b8924a; outline-offset: 1px; }
.wpcf7 .to-acepto, .wpcf7 .wpcf7-list-item { font-size: 14px; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 input[type=submit] { cursor: pointer; border: 0; border-radius: 2px; padding: 15px 30px; background: #b8924a; color: #fff; font-family: "TASA Orbiter", "Helvetica Neue", Arial, sans-serif; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; transition: transform .3s ease, box-shadow .3s ease; }
.wpcf7 input[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,29,75,.28); }
.wpcf7-not-valid-tip { font-size: 13px; color: #b3261e; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 8px 0 0; padding: 12px 14px; border-width: 1px; border-radius: 2px; font-size: 15px; }
.wpcf7 .wpcf7-spinner { display: none; }

/* === Móvil: cabecera compacta, el botón no se parte === */
header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	header.wp-block-template-part > .wp-block-group { padding-left: 16px !important; padding-right: 16px !important; gap: 10px; }
	header.wp-block-template-part .wp-block-group { gap: 10px !important; }
	header .wp-block-button__link { padding: 10px 14px !important; font-size: 11px !important; }
	header .wp-block-site-title { font-size: 22px !important; }
}

/* === Artículos: espaciado de lectura === */
.single .wp-block-post-content > :where(p, ul, ol, blockquote) { margin-block-start: 1.1em !important; }
.single .wp-block-post-content > :where(h2, h3) { margin-block-start: 2em !important; margin-block-end: .2em; }
.single .wp-block-post-content > :where(ul, ol) { padding-left: 1.4em; }
.single .wp-block-post-content > .wp-block-group { margin-block-start: 2.5em !important; }

/* === Formulario: más claro y legible (tarjeta blanca) === */
.wpcf7 form { color: #2f2f2f; }
.wpcf7 label { color: #0e1d4b; font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.wpcf7 label .wpcf7-form-control-wrap { display: block; margin-top: 8px; font-weight: 400; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 select, .wpcf7 textarea { margin-top: 0; border: 1.5px solid #9aa3bd; padding: 14px 16px; line-height: 1.4; }
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: #8a8f9c; }
.wpcf7 .to-acepto { margin: 4px 0 20px; }
.wpcf7 .wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: #2f2f2f; }
.wpcf7 .wpcf7-acceptance input[type=checkbox] { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: #0e1d4b; }
.wpcf7 .wpcf7-acceptance a { color: #0e1d4b; text-decoration: underline; }
.wpcf7 input[type=submit] { width: 100%; padding: 17px 30px; font-size: 15px; font-weight: 600; }
.wpcf7 form .wpcf7-response-output { color: #0e1d4b; border-color: #b8924a; background: #faf6ec; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: #b3261e; background: #fdf1f0; color: #7a1a14; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #2e7d4f; background: #eef7f1; color: #1f5a37; }
