/*
Theme Name: Training Experience
Theme URI: https://www.trainingexperience.org
Author: Training Experience S.L.
Description: Tema a medida que reproduce el diseño de trainingexperience.org (naranja TX, Noto Sans). Al activarlo crea las páginas (Home, About, Educators, Recruitment, Erasmus+, Erasmus for Young Entrepreneurs, Supported by, Contact) y el menú.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
Text Domain: tx
*/

:root {
	--tx-orange: #ff6600;
	--tx-orange-dark: #e25a00;
	--tx-orange-soft: #fbe3d3;
	--tx-text: #333;
	--tx-muted: #666;
	--tx-bg-soft: #f7f7f7;
	--tx-border: #e4e4e4;
	--tx-dark: #222;
	--tx-green: #8bc34a;
	--tx-blue: #3f51b5;
	--tx-purple: #9c27b0;
	--tx-teal: #26a37a;
	--tx-max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--tx-text);
	background: #fff;
	line-height: 1.65;
	font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: var(--tx-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.25; margin: 0 0 .6em; color: #333; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
.tx-container { max-width: var(--tx-max); margin: 0 auto; padding: 0 20px; }
.tx-accent { color: var(--tx-orange); }
.screen-reader-text { position: absolute; left: -9999px; }

/* Buttons */
.tx-btn, .wp-block-button__link {
	display: inline-block; background: var(--tx-orange); color: #fff !important;
	border: 1px solid var(--tx-orange); padding: .55em 1.1em; border-radius: 2px;
	font-size: .95rem; text-decoration: none !important; transition: background .2s;
	cursor: pointer; font-family: inherit;
}
.tx-btn:hover, .wp-block-button__link:hover { background: var(--tx-orange-dark); }
.tx-btn--ghost { background: #fff; color: #333 !important; border-color: #333; }
.tx-btn--ghost:hover { background: #333; color: #fff !important; }
.tx-btn--outline { background: transparent; color: inherit !important; border-color: currentColor; }

/* Header */
.tx-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.tx-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.tx-logo img { height: 36px; width: auto; display: block; }
.tx-nav ul { list-style: none; margin: 0; padding: 0; }
.tx-nav > ul { display: flex; gap: 6px; align-items: center; }
.tx-nav li { position: relative; }
.tx-nav a { display: block; padding: 20px 16px; color: #333; font-size: .95rem; }
.tx-nav a:hover { color: var(--tx-orange); text-decoration: none; }
.tx-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-left: 8px; position: relative; top: -3px; }
.tx-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s; }
.tx-nav li:hover > .sub-menu, .tx-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tx-nav .sub-menu a { padding: 11px 18px; font-size: .88rem; }
.tx-nav .sub-menu a:hover { background: var(--tx-bg-soft); }
.tx-nav .tx-menu-cta > a { background: var(--tx-bg-soft); }
.tx-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: #333; }

@media (max-width: 900px) {
	.tx-toggle { display: block; }
	.tx-nav { position: absolute; top: 64px; left: 0; right: 0; background: #fff; box-shadow: 0 6px 12px rgba(0,0,0,.1); display: none; max-height: calc(100vh - 64px); overflow: auto; }
	.tx-nav.is-open { display: block; }
	.tx-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
	.tx-nav a { padding: 14px 20px; border-bottom: 1px solid var(--tx-border); }
	.tx-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: var(--tx-bg-soft); }
	.tx-nav .sub-menu a { padding-left: 36px; }
}

/* Sections */
.tx-section { padding: 80px 0; }
.tx-section--soft { background: var(--tx-bg-soft); }
.tx-section--center { text-align: center; }
.tx-scroll { display: flex; justify-content: center; margin-top: -22px; position: relative; z-index: 2; }
.tx-scroll a { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; color: #555; }
.tx-scroll a::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }

/* Hero (home) */
.tx-hero { position: relative; overflow: hidden; background: #fff; }
.tx-hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 460px; }
.tx-hero__map { align-self: stretch; background: right center / cover no-repeat; min-height: 360px; }
.tx-hero__text { padding: 40px 24px 40px 0; }
.tx-hero__text h1 { margin-bottom: 18px; }
.tx-hero__text h1::after { content: ""; display: block; width: 50px; height: 4px; background: var(--tx-orange); margin-top: 16px; }
.tx-hero__lead { font-size: 1.3rem; margin: 0 0 24px; }
.tx-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) {
	.tx-hero__inner { grid-template-columns: 1fr; }
	.tx-hero__map { min-height: 220px; }
	.tx-hero__text { padding: 30px 20px 50px; }
}

/* Audience cards */
.tx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tx-card { background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.08); border-top: 4px solid var(--c, var(--tx-orange)); padding: 20px 24px 28px; display: flex; flex-direction: column; }
.tx-card h3 { color: var(--c); font-size: 1.6rem; display: flex; justify-content: space-between; margin-bottom: 10px; }
.tx-card p { flex: 1; margin: 0 0 20px; }
.tx-card .tx-btn { align-self: center; background: #fff; color: var(--c) !important; border-color: var(--c); }
.tx-card .tx-btn:hover { background: var(--c); color: #fff !important; }
@media (max-width: 800px) { .tx-cards { grid-template-columns: 1fr; } }

/* Split (rocket) */
.tx-split { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 40px; }
.tx-split img { max-height: 280px; justify-self: center; }
.tx-split__text { text-align: center; font-size: 1.7rem; }
@media (max-width: 700px) { .tx-split { grid-template-columns: 1fr; } }

/* Testimonial */
.tx-quote { text-align: center; max-width: 820px; margin: 0 auto; }
.tx-quote blockquote { font-style: italic; font-size: 1.3rem; margin: 0 0 10px; }
.tx-quote cite { font-style: normal; color: var(--tx-muted); font-size: .9rem; }

/* Stats bar */
.tx-stats { display: grid; grid-template-columns: repeat(4, 1fr); color: #fff; text-align: center; }
.tx-stats div { padding: 18px 10px; }
.tx-stats div:nth-child(1) { background: #ff6600; }
.tx-stats div:nth-child(2) { background: #f5884a; }
.tx-stats div:nth-child(3) { background: #f7a476; }
.tx-stats div:nth-child(4) { background: #f9c1a2; }
.tx-stats span { display: block; font-size: .85rem; }
.tx-stats strong { font-size: 1.6rem; font-weight: 400; }
@media (max-width: 600px) { .tx-stats { grid-template-columns: repeat(2, 1fr); } }

/* Page header */
.tx-page-hero { background: linear-gradient(120deg, #3a3a3a, #555); color: #fff; padding: 90px 0; text-align: center; }
.tx-page-hero h1 { color: #fff; margin: 0; }
.tx-page-hero p { max-width: 760px; margin: 14px auto 0; font-size: 1.15rem; opacity: .92; }
.tx-page-title { text-align: center; padding: 60px 0 10px; }

/* Generic content */
.tx-content { padding: 30px 0 80px; }
.tx-content .tx-container { max-width: 960px; }
.tx-content > .tx-container > * + * { margin-top: 1.1em; }
.tx-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tx-content th, .tx-content td { border-bottom: 1px solid var(--tx-border); padding: 8px 10px; text-align: left; }
.tx-content th { background: var(--tx-bg-soft); font-weight: 600; }
.wp-block-group.is-style-tx-soft, .tx-box { background: var(--tx-bg-soft); padding: 30px; }

/* Accordion (details/summary) */
.tx-content details { border-top: 1px solid #555; padding: 0; }
.tx-content details:last-of-type { border-bottom: 1px solid #555; }
.tx-content summary { cursor: pointer; padding: 14px 4px; list-style: none; text-align: center; position: relative; font-weight: 500; }
.tx-content summary::-webkit-details-marker { display: none; }
.tx-content summary::after { content: "+"; position: absolute; right: 8px; color: var(--tx-orange); font-size: 1.3rem; line-height: 1; top: 13px; }
.tx-content details[open] summary::after { content: "–"; }
.tx-content details > *:not(summary) { padding: 0 4px 18px; }

/* Feature columns (values, educators, recruitment) */
.tx-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; text-align: center; }
.tx-feature__icon { width: 84px; height: 84px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: var(--tx-orange); }
.tx-feature__icon svg { width: 40px; height: 40px; }
.tx-feature h3 { margin-bottom: 10px; }
.tx-feature ul { list-style: none; padding: 0; margin: 0; }
.tx-feature li::before { content: "✔ "; color: var(--tx-teal); }
@media (max-width: 800px) { .tx-features { grid-template-columns: 1fr; } }

/* Steps timeline (educators) */
.tx-steps { display: flex; justify-content: space-between; position: relative; max-width: 820px; margin: 0 auto; }
.tx-steps::before { content: ""; position: absolute; top: 22px; left: 5%; right: 5%; height: 2px; background: var(--tx-teal); }
.tx-steps div { position: relative; text-align: center; flex: 1; font-size: .9rem; color: #555; }
.tx-steps b { display: flex; width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; border: 2px solid var(--tx-teal); background: #fff; color: var(--tx-teal); align-items: center; justify-content: center; font-weight: 400; font-size: 1.2rem; }

/* Two-column hero with image */
.tx-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.tx-duo h1, .tx-duo h2 { margin-bottom: 20px; }
@media (max-width: 800px) { .tx-duo { grid-template-columns: 1fr; } }

/* Services table */
.tx-compare { width: 100%; border-collapse: collapse; text-align: center; }
.tx-compare th, .tx-compare td { padding: 14px 10px; border-bottom: 1px solid var(--tx-border); }
.tx-compare td:first-child, .tx-compare th:first-child { text-align: left; }
.tx-compare .y { color: var(--tx-teal); font-weight: 700; }
.tx-compare .n { color: #d33; font-weight: 700; }

/* Big orange numbers */
.tx-numbers { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 20px; }
.tx-numbers strong { display: block; font-size: 2.2rem; color: var(--tx-orange); font-weight: 600; }
@media (max-width: 700px) { .tx-numbers { grid-template-columns: repeat(2, 1fr); } }

/* ===== Supported by ===== */
.tx-grants { display: grid; gap: 26px; }
.tx-grant { display: grid; grid-template-columns: 240px 1fr; gap: 28px; background: #fff; border: 1px solid var(--tx-border); border-left: 4px solid var(--tx-orange); padding: 26px; }
.tx-grant--featured { border: 2px solid var(--tx-orange); background: linear-gradient(135deg, #fff 60%, var(--tx-orange-soft)); }
.tx-grant__logos { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tx-grant__logos img { max-height: 70px; width: auto; background: #fff; }
.tx-grant__tag { display: inline-block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-orange); font-weight: 700; margin-bottom: 6px; }
.tx-grant h3 { margin: 0 0 4px; font-weight: 600; }
.tx-grant__program { color: var(--tx-muted); font-size: .9rem; margin: 0 0 14px; }
.tx-grant p { margin: 0 0 10px; }
.tx-grant small { display: block; color: var(--tx-muted); font-size: .8rem; line-height: 1.5; }
.tx-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 150px; min-height: 56px; padding: 8px 14px; border: 2px solid currentColor; font-weight: 700; letter-spacing: .03em; font-size: .9rem; line-height: 1.2; text-align: center; }
.tx-badge--ivace { color: #0072bc; }
.tx-badge--camara { color: #00539f; }
.tx-badge--ngi { color: #00a0e3; }
.tx-badge--pimatia { color: #fff; background: linear-gradient(135deg, #ff6600, #c2185b); border-color: transparent; font-size: 1.15rem; letter-spacing: .12em; }
.tx-badge small { display: block; font-weight: 400; font-size: .7rem; color: inherit; letter-spacing: 0; }
.tx-logo-wall { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; }
.tx-logo-wall img { max-height: 80px; width: auto; }
@media (max-width: 700px) { .tx-grant { grid-template-columns: 1fr; } }

/* Contact */
.tx-contact { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.tx-contact__map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.tx-contact__info { padding: 40px; }
.tx-contact__info ul { list-style: none; padding: 0; margin: 0 0 26px; }
.tx-contact__info li { margin: 6px 0; }
.tx-form fieldset { border: 1px solid #ccc; padding: 18px 24px 26px; margin: 0; }
.tx-form legend { font-size: 1.4rem; letter-spacing: .08em; padding: 0 10px; }
.tx-form label { display: block; margin: 12px 0 4px; font-size: .9rem; }
.tx-form input[type=text], .tx-form input[type=email], .tx-form textarea { width: 100%; padding: 9px 10px; border: 1px solid #ccc; font: inherit; }
.tx-form textarea { min-height: 120px; }
.tx-form .tx-check { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; margin: 14px 0; }
.tx-form .tx-hp { position: absolute; left: -9999px; }
.tx-notice { padding: 12px 16px; margin-bottom: 16px; border-left: 4px solid var(--tx-teal); background: #eaf7f1; }
.tx-notice--err { border-color: #d33; background: #fdecec; }
@media (max-width: 800px) { .tx-contact { grid-template-columns: 1fr; } }

/* Footer */
.tx-footer { background: var(--tx-dark); color: #ddd; font-size: .85rem; padding: 30px 0 24px; }
.tx-footer a { color: #fff; }
.tx-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; list-style: none; padding: 0; margin: 0 0 14px; text-transform: uppercase; }
.tx-footer__logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 0; background: #fff; max-width: 820px; margin: 0 auto 26px; }
.tx-footer__logos img { height: 64px; width: auto; display: block; }
.tx-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid #3a3a3a; padding-top: 16px; }
.tx-footer__bottom ul { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; }
.tx-footer__bottom ul li + li::before { content: "/ "; color: #888; }
