/* Optomentors Core: course cards, filters, details card, forms. Uses theme tokens with fallbacks. */
:root {
	--omc-navy: var(--wp--preset--color--navy, #063a51);
	--omc-deep: var(--wp--preset--color--navy-deep, #03202e);
	--omc-teal: var(--wp--preset--color--teal, #4cbfc8);
	--omc-teal-dark: var(--wp--preset--color--teal-dark, #1b7a84);
	--omc-ink: var(--wp--preset--color--ink, #0d2633);
	--omc-muted: var(--wp--preset--color--muted, #55707e);
	--omc-line: var(--wp--preset--color--line, #dbe7eb);
	--omc-mist: var(--wp--preset--color--mist, #eef6f8);
	--omc-heading: var(--wp--preset--font-family--heading, inherit);
}

/* ---------- Cards ---------- */
.om-cards { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.om-cards--1 { grid-template-columns: 1fr; }
.om-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.om-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .om-cards--3, .om-cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .om-cards { grid-template-columns: 1fr !important; } }

.om-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--omc-line); border-radius: 6px; overflow: hidden; transition: border-color .15s; }
.om-card:hover { border-color: #b9cfd6; }
.om-card[hidden] { display: none; }
.om-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--omc-navy); }
.om-card__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0 !important; }
.om-card__badge, .om-card__state {
	position: absolute; z-index: 1; top: 14px; left: 14px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: 5px 8px; border-radius: 3px; background: rgba(255,255,255,.94); color: var(--omc-navy);
}
.om-card__state { left: auto; right: 14px; background: rgba(3,32,46,.8); color: #fff; }
.om-card__state--soon { background: var(--omc-teal); color: var(--omc-deep); }
.om-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.4rem; }
.om-card__area { margin: 0 0 .45rem; font-size: .85rem; font-weight: 600; color: var(--omc-teal-dark); }
.om-card__title { margin: 0 0 .55rem; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
.om-card__title a { color: var(--omc-navy); text-decoration: none; }
.om-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.om-card { position: relative; }
.om-card__text { margin: 0 0 1rem; color: var(--omc-muted); font-size: .95rem; line-height: 1.55; }
.om-card__meta { list-style: none; margin: auto 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--omc-ink); }
.om-card__meta li { display: inline-flex; align-items: center; gap: 6px; }
.om-card__meta svg { width: 16px; height: 16px; color: var(--omc-teal-dark); }
.om-card__link { font-weight: 600; text-decoration: underline !important; font-size: .92rem; color: var(--omc-navy); text-decoration: none; }
.om-card:hover .om-card__link { color: var(--omc-teal-dark); }

/* ---------- Filters ---------- */
.om-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 1.75rem; }
.om-filters__sep { width: 1px; height: 22px; background: var(--omc-line); margin: 0 6px; }
.om-chip { font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; padding: .5rem 1rem; border-radius: 4px; border: 1px solid var(--omc-line); background: #fff; color: var(--omc-ink); transition: all .2s; }
.om-chip:hover { border-color: var(--omc-navy); }
.om-chip.is-active { background: var(--omc-navy); border-color: var(--omc-navy); color: #fff; }
.om-chip--soft.is-active { background: var(--omc-teal); border-color: var(--omc-teal); color: var(--omc-deep); }
.om-empty { color: var(--omc-muted); }

/* ---------- Course details card ---------- */
.om-facts { background: #fff; border: 1px solid var(--omc-line); border-radius: 6px; padding: 1.5rem; }
.om-facts ul { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.om-facts li { display: flex; gap: 12px; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--omc-line); }
.om-facts li:last-child { border-bottom: 0; }
.om-facts li svg { flex: none; width: 20px; height: 20px; color: var(--omc-teal-dark); margin-top: 2px; }
.om-facts li span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--omc-muted); }
.om-facts li strong { display: block; color: var(--omc-navy); font-weight: 600; line-height: 1.4; }
.om-facts__cta, .om-facts__wa { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: .95rem 1.2rem; border-radius: 4px; font-weight: 600; text-decoration: none; transition: all .2s; }
.om-facts__cta { background: var(--omc-navy); color: #fff !important; }
.om-facts__cta:hover { background: var(--omc-deep); }
.om-facts__wa { margin-top: .6rem; color: var(--omc-navy) !important; border: 1.5px solid var(--omc-line); }
.om-facts__wa:hover { border-color: #25d366; color: #128c4b !important; }
.om-facts__wa svg { width: 18px; height: 18px; }
.om-facts__past { margin: 0; color: var(--omc-muted); }
@media (min-width: 900px) { .om-sticky { position: sticky; top: 110px; } }

/* ---------- Forms ---------- */
.om-form { --f-bg: #fff; --f-line: var(--omc-line); --f-text: var(--omc-ink); --f-label: var(--omc-navy); }
.om-form--dark { --f-bg: rgba(255,255,255,.06); --f-line: rgba(255,255,255,.18); --f-text: #fff; --f-label: #fff; }
.om-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.om-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.om-field--half { grid-column: span 1; }
@media (max-width: 640px) { .om-form__grid { grid-template-columns: 1fr; } .om-field--half { grid-column: 1 / -1; } }
.om-field label { font-size: .84rem; font-weight: 600; color: var(--f-label); }
.om-req { color: var(--omc-teal-dark); }
.om-form--dark .om-req { color: var(--omc-teal); }
.om-field input, .om-field select, .om-field textarea {
	font: inherit; font-size: 1rem; color: var(--f-text); background: var(--f-bg); width: 100%; box-sizing: border-box;
	border: 1.5px solid var(--f-line); border-radius: 4px; padding: .8rem .95rem; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.om-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355707e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px; padding-right: 2.4rem; }
.om-form--dark .om-field select option { color: #0d2633; }
.om-field textarea { resize: vertical; min-height: 120px; }
.om-field input::placeholder { color: #9fb2bb; }
.om-field input:focus, .om-field select:focus, .om-field textarea:focus { outline: none; border-color: var(--omc-teal); box-shadow: 0 0 0 2px rgba(76,191,200,.35); }
.om-field.is-invalid input, .om-field.is-invalid select, .om-field.is-invalid textarea { border-color: #d64545; }
.om-field__msg { font-size: .78rem; color: #c03b3b; min-height: 0; }
.om-form--dark .om-field__msg { color: #ffb4b4; }
.om-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.om-consent { display: flex; gap: 10px; align-items: flex-start; margin: .6rem 0 .6rem; font-size: .86rem; color: var(--omc-muted); line-height: 1.5; cursor: pointer; }
.om-form--dark .om-consent { color: rgba(255,255,255,.75); }
.om-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--omc-navy); flex: none; }
.om-consent.is-invalid { color: #c03b3b; }
.om-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.om-form__submit {
	font-weight: 600; font-size: 1rem; cursor: pointer; border: 0; border-radius: 4px; padding: 1rem 2rem;
	background: var(--omc-navy); color: #fff; transition: background .15s; position: relative;
}
.om-form__submit:hover { background: var(--omc-deep); }
.om-form--dark .om-form__submit { background: var(--omc-teal); color: var(--omc-deep); }
.om-form--dark .om-form__submit:hover { background: #6fd3da; }
.om-form__submit[disabled] { opacity: .7; cursor: progress; }
.om-form__submit.is-loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: omc-spin .7s linear infinite; }
@keyframes omc-spin { to { transform: rotate(360deg); } }
.om-form__note { margin: 0; font-size: .82rem; color: var(--omc-muted); }
.om-form__success { display: flex; gap: 14px; align-items: flex-start; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; border-radius: 4px; background: #e8f8f5; border: 1px solid #b7e7dd; color: #0d4b40; }
.om-form__success[hidden], .om-form__error[hidden] { display: none; }
.om-form__success p { margin: .25rem 0 0; font-size: .92rem; color: #2a5f55; }
.om-form__check { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #1f9d84 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 60% no-repeat; }
.om-form__error { padding: .9rem 1.1rem; margin-bottom: 1.25rem; border-radius: 4px; background: #fdecec; border: 1px solid #f3c1c1; color: #8a1f1f; font-size: .92rem; }
.om-form.is-sent .om-form__grid, .om-form.is-sent .om-consent, .om-form.is-sent .om-privacy-short, .om-form.is-sent .om-form__actions { display: none; }

/* ---------- Contact block ---------- */
.om-contact .om-contact-item a { text-decoration: none; }
.om-contact .om-contact-item a:hover { text-decoration: underline; }

/* Empty course list: "Nuevas fechas muy pronto" */
.om-empty-state {
	display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
	padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--omc-line, #dbe7eb); border-radius: 6px;
	background: #fff;
}
.om-empty-state > div { flex: 1 1 280px; }
.om-empty-state p { margin: 0; color: var(--omc-muted, #55707e); }
.om-empty-state p.om-empty-state__title { color: #063a51; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.3rem; margin-bottom: .25rem; }
.om-empty-state__icon { display: none; }
.om-empty-state__btn {
	flex: none; display: inline-block; padding: .85rem 1.5rem; border-radius: 4px; background: #063a51; color: #fff !important;
	font-weight: 600; font-size: .9375rem; text-decoration: none !important;
}
.om-empty-state__btn:hover { background: #03202e; }
.om-consent--optional { margin-bottom: 1.25rem; }
.om-privacy-short { font-size: .78rem; line-height: 1.5; color: var(--omc-muted); margin: 1.1rem 0 .4rem; }
.om-form--dark .om-privacy-short { color: rgba(255,255,255,.65); }
.om-form--dark .om-privacy-short a { color: inherit; }
.om-facts__legal { font-size: .74rem; line-height: 1.5; color: var(--omc-muted); margin: 1rem 0 0; }
.om-cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 16px 20px; border-radius: 6px; background: #062b3c; color: #fff; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); font-size: .85rem; line-height: 1.5; }
.om-cookies[hidden] { display: none; }
.om-cookies p { margin: 0; flex: 1 1 360px; }
.om-cookies a { color: #7fd6dd; }
.om-cookies__btns { display: flex; gap: 10px; }
.om-cookies button { cursor: pointer; border-radius: 4px; padding: .55rem 1.1rem; font: inherit; font-weight: 600; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; }
.om-cookies button.is-primary { background: #4cbfc8; border-color: #4cbfc8; color: #062b3c; }

/* ---------- Pricing table: talleres con tecnología (2026-11-20) ---------- */
.om-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 1.5rem; }
@media (max-width: 1080px) { .om-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .om-prices { grid-template-columns: minmax(0, 1fr); } }
.om-price { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--omc-line); border-radius: 6px; padding: 1.4rem; min-width: 0; }
.om-price__title { margin: 0 0 .5rem; font-size: 1.15rem; line-height: 1.3; }
.om-price__title a { color: var(--omc-navy); text-decoration: none; }
.om-price__text { margin: 0 0 1rem; color: var(--omc-muted); font-size: .95rem; line-height: 1.55; }
.om-price__facts { list-style: none; margin: 0 0 1.1rem; padding: 0; font-size: .86rem; color: var(--omc-ink); }
.om-price__facts li { padding: .35rem 0; border-top: 1px solid var(--omc-line); overflow-wrap: anywhere; }
.om-price__amount { margin: auto 0 1rem; font-size: 1.6rem; font-weight: 700; color: var(--omc-navy); }
.om-price__amount.is-pending { font-size: 1.05rem; color: var(--omc-muted); }
.om-price__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.om-price__cta { display: inline-flex; justify-content: center; padding: .8rem 1.3rem; border-radius: 4px; background: var(--omc-navy); color: #fff !important; font-weight: 600; text-decoration: none; }
.om-price__cta:hover { background: var(--omc-deep); }
.om-price__more { font-weight: 600; font-size: .92rem; color: var(--omc-navy); text-decoration: underline; }
