/* EPT Gestor de Cursos 2.0 — Frontal */
.ept-course-manager {
  --ept-primary: #145c7d;
  --ept-secondary: #f0a43b;
  --ept-text: #1e293b;
  --ept-muted: #64748b;
  --ept-bg: #fff;
  --ept-surface: #f7f9fb;
  --ept-border: #dbe4ea;
  --ept-radius: 18px;
  color: var(--ept-text);
  font: inherit;
}
.ept-course-manager *, .ept-course-manager *::before, .ept-course-manager *::after { box-sizing: border-box; }
.ept-course-manager a { color: inherit; }
.ept-course-manager h1, .ept-course-manager h2, .ept-course-manager h3, .ept-course-manager p { margin-top: 0; }
.ept-course-manager h1, .ept-course-manager h2, .ept-course-manager h3 { color: var(--ept-text); line-height: 1.13; letter-spacing: -.025em; }
.ept-course-manager img { max-width: 100%; }
.ept-eyebrow { margin-bottom: 9px !important; color: var(--ept-primary); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

.ept-filters { display: grid; grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(150px, .7fr)) auto; gap: 11px; align-items: end; margin-bottom: 28px; padding: 18px; border: 1px solid var(--ept-border); border-radius: calc(var(--ept-radius) + 2px); background: var(--ept-bg); box-shadow: 0 12px 40px rgba(22,52,68,.06); }
.ept-filter label { display: block; margin-bottom: 6px; color: var(--ept-muted); font-size: 11px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.ept-filter input, .ept-filter select { width: 100%; height: 45px; margin: 0; padding: 0 12px; border: 1px solid var(--ept-border); border-radius: 10px; color: var(--ept-text); background: #fff; font: inherit; font-size: 14px; }
.ept-filter input:focus, .ept-filter select:focus { border-color: var(--ept-primary); outline: 3px solid color-mix(in srgb, var(--ept-primary) 14%, transparent); }
.ept-filter-actions { display: flex; align-items: center; gap: 10px; }
.ept-filter-reset { color: var(--ept-muted) !important; font-size: 13px; font-weight: 700; text-decoration: none; }

.ept-course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ept-course-card { --ept-course-accent: var(--ept-primary); display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: var(--ept-bg); box-shadow: 0 12px 40px rgba(20,49,65,.06); transition: transform .23s ease, box-shadow .23s ease, border-color .23s ease; }
.ept-course-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--ept-course-accent) 35%, var(--ept-border)); box-shadow: 0 22px 55px rgba(20,49,65,.12); }
.ept-course-card__media { position: relative; display: block; height: 220px; overflow: hidden; background: #eaf0f3; text-decoration: none; }
.ept-course-card__media::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(to top, rgba(9,29,39,.34), transparent); pointer-events: none; }
.ept-course-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ept-course-card:hover .ept-course-card__media img { transform: scale(1.035); }
.ept-course-card__placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: var(--ept-course-accent); background: linear-gradient(145deg, #eef5f8, #dce9ef); font-size: 37px; font-weight: 900; letter-spacing: .12em; }
.ept-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .035em; line-height: 1; text-transform: uppercase; }
.ept-badge--status { position: absolute; z-index: 2; left: 14px; top: 14px; color: #fff; background: var(--ept-course-accent); box-shadow: 0 5px 15px rgba(0,0,0,.13); }
.ept-badge--custom { position: absolute; z-index: 2; right: 14px; top: 14px; color: #51380f; background: #ffdc9f; }
.ept-badge--subsidized { color: #145c3a; background: #ddf5e8; }
.ept-status-last_places { --ept-course-accent: #b06a08; }
.ept-status-full, .ept-status-waiting_list, .ept-status-closed { --ept-course-accent: #a84b2b; }
.ept-status-coming_soon { --ept-course-accent: #7a5ca8; }
.ept-status-ongoing { --ept-course-accent: #2b66a8; }
.ept-status-completed { --ept-course-accent: #65727a; }
.ept-status-cancelled { --ept-course-accent: #a82f37; }
.ept-course-card__body { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.ept-course-card__title { margin-bottom: 11px; font-size: clamp(20px, 2.1vw, 26px); }
.ept-course-card__title a { text-decoration: none; }
.ept-course-card__excerpt { margin-bottom: 17px; color: var(--ept-muted); font-size: 14px; line-height: 1.65; }
.ept-facts { display: grid; gap: 8px; margin: 0 0 17px; padding: 0; list-style: none; }
.ept-facts li { display: flex; align-items: center; gap: 9px; color: #4f5e68; font-size: 13px; }
.ept-facts li > span { width: 23px; height: 23px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 7px; color: var(--ept-course-accent); background: color-mix(in srgb, var(--ept-course-accent) 10%, white); font-weight: 900; }
.ept-places { margin: auto 0 15px; padding-top: 14px; border-top: 1px solid var(--ept-border); color: var(--ept-muted); font-size: 12px; }
.ept-places strong { margin-right: 3px; color: var(--ept-text); font-size: 18px; }
.ept-course-card__footer { margin-top: auto; }
.ept-button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 10px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; line-height: 1; text-decoration: none !important; transition: .18s ease; }
.ept-button--primary { color: white !important; background: var(--ept-course-accent, var(--ept-primary)); }
.ept-button--primary:hover { color: white !important; filter: brightness(.91); transform: translateY(-1px); }
.ept-button--secondary { color: var(--ept-primary) !important; border-color: var(--ept-border); background: white; }
.ept-button--secondary:hover { border-color: var(--ept-primary); background: #f5fafc; }
.ept-button--large { width: 100%; min-height: 51px; }
.ept-pagination { margin-top: 31px; }
.ept-pagination .page-numbers { display: flex; justify-content: center; gap: 7px; padding: 0; list-style: none; }
.ept-pagination a, .ept-pagination span { min-width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--ept-border); border-radius: 9px; color: var(--ept-text); background: white; text-decoration: none; }
.ept-pagination .current { color: white; border-color: var(--ept-primary); background: var(--ept-primary); }
.ept-empty { padding: 54px 25px; border: 1px dashed var(--ept-border); border-radius: var(--ept-radius); text-align: center; background: var(--ept-surface); }
.ept-empty__icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 14px; border-radius: 16px; color: var(--ept-primary); background: #e6f1f5; font-size: 25px; }
.ept-empty h3 { margin-bottom: 6px; font-size: 22px; }
.ept-empty p { margin: 0; color: var(--ept-muted); }


/* Single course page: full-width and independent from the theme sidebar. */
.ept-single-course-page { width: 100%; padding: clamp(42px, 6vw, 82px) 20px clamp(65px, 8vw, 110px); background: var(--ept-bg, #fff); }
.ept-single-course-page__inner { width: min(1280px, 100%); margin: 0 auto; }

/* Divi fallback when a child theme forces its own single template. */
body.ept-cm-single-fullwidth #main-content .container::before,
body.ept-cm-single-fullwidth #main-content .container:before { display: none !important; content: none !important; }
body.ept-cm-single-fullwidth #left-area { width: 100% !important; padding-right: 0 !important; float: none !important; }
body.ept-cm-single-fullwidth #sidebar { display: none !important; }
body.ept-cm-single-fullwidth #content-area { width: 100% !important; }
body.ept-cm-single-fullwidth article.ept_course { margin-bottom: 0 !important; }
body.ept-cm-single-fullwidth article.ept_course > .entry-title,
body.ept-cm-single-fullwidth article.ept_course > .post-meta,
body.ept-cm-single-fullwidth article.ept_course > .et_post_meta_wrapper,
body.ept-cm-single-fullwidth article.ept_course > img,
body.ept-cm-single-fullwidth article.ept_course > a > img { display: none !important; }

/* Detail */
.ept-course-detail { --ept-course-accent: var(--ept-primary); }
.ept-course-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); min-height: 470px; border-radius: calc(var(--ept-radius) + 8px); color: white; background: linear-gradient(135deg, color-mix(in srgb, var(--ept-course-accent) 94%, black), var(--ept-course-accent)); box-shadow: 0 24px 65px rgba(19,49,65,.15); }
.ept-course-hero::before { content: ""; position: absolute; width: 440px; height: 440px; left: -280px; bottom: -280px; border: 85px solid rgba(255,255,255,.07); border-radius: 50%; }
.ept-course-hero__content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 70px); }
.ept-course-hero__content h1 { max-width: 790px; margin: 10px 0 14px; color: white; font-size: clamp(35px, 5vw, 66px); line-height: 1.02; }
.ept-course-hero__content .ept-eyebrow { margin: 18px 0 0 !important; color: #ffda98; }
.ept-course-hero__subtitle { max-width: 700px; margin-bottom: 24px; color: rgba(255,255,255,.82); font-size: clamp(17px, 2vw, 22px); line-height: 1.45; }
.ept-course-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ept-course-hero__badges .ept-badge--status { position: static; color: var(--ept-course-accent); background: white; }
.ept-course-hero__facts { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 8px; }
.ept-hero-fact { display: flex; align-items: center; gap: 8px; min-height: 32px; color: rgba(255,255,255,.9); font-size: 13px; }
.ept-hero-fact > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.12); }
.ept-course-hero__media { min-width: 0; }
.ept-course-hero__media img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.ept-course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 30px; align-items: start; margin-top: 36px; }
.ept-course-main { min-width: 0; }
.ept-tabs { display: flex; gap: 7px; overflow-x: auto; margin-bottom: 18px; padding: 6px; border: 1px solid var(--ept-border); border-radius: 13px; background: var(--ept-surface); scrollbar-width: thin; }
.ept-tab { flex: 0 0 auto; min-height: 39px; padding: 0 13px; border: 0; border-radius: 9px; color: var(--ept-muted); background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.ept-tab.is-active { color: white; background: var(--ept-course-accent); box-shadow: 0 6px 15px color-mix(in srgb, var(--ept-course-accent) 18%, transparent); }
.ept-tab-panels { display: grid; gap: 18px; }
.ept-tab-panel { display: block; padding: clamp(24px, 4vw, 42px); border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: white; box-shadow: 0 12px 42px rgba(18,47,62,.05); }
.ept-js .ept-tab-panel { display: none; }
.ept-js .ept-tab-panel.is-active { display: block; animation: eptPanel .22s ease; }
@keyframes eptPanel { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ept-tab-panel h2 { margin-bottom: 20px; font-size: clamp(26px, 3vw, 36px); }
.ept-tab-panel p, .ept-tab-panel li { color: #4f5d67; line-height: 1.75; }
.ept-tab-panel ul, .ept-tab-panel ol { padding-left: 22px; }
.ept-tab-panel a { color: var(--ept-primary); font-weight: 700; }
.ept-course-sidebar { min-width: 0; }
.ept-sticky-card { position: sticky; top: 30px; padding: 25px; border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: white; box-shadow: 0 18px 55px rgba(18,47,62,.09); }
.ept-sticky-card h2 { margin-bottom: 15px; font-size: 25px; }
.ept-sticky-card .ept-button { margin-top: 9px; }
.ept-availability { display: flex; align-items: flex-end; gap: 9px; margin-bottom: 14px; padding: 15px; border-radius: 12px; background: var(--ept-surface); }
.ept-availability strong { color: var(--ept-course-accent); font-size: 35px; line-height: .9; }
.ept-availability span { color: var(--ept-muted); font-size: 12px; }
.ept-deadline { margin: 15px 0 0; color: var(--ept-muted); font-size: 12px; text-align: center; }
.ept-documents { margin-top: 25px; padding: 28px; border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: var(--ept-surface); }
.ept-document-list { display: grid; gap: 9px; }
.ept-document-list a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--ept-border); border-radius: 10px; background: white; color: var(--ept-text); font-weight: 700; text-decoration: none; }
.ept-document-list a span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--ept-primary); background: #e7f1f5; }


.ept-badge--hero-custom { color: #51380f; background: #ffdc9f; }
.ept-structured-list { display: grid; gap: 9px; margin: 0; padding-left: 21px; }
.ept-structured-list ul { margin-top: 8px; }
.ept-sidebar-contact { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ept-border); }
.ept-sidebar-contact h3 { margin: 0 0 11px; font-size: 16px; }
.ept-sidebar-contact p { margin: 0 0 7px; color: var(--ept-muted); font-size: 12px; line-height: 1.5; }
.ept-sidebar-contact a { color: var(--ept-primary); font-weight: 750; text-decoration: none; }
.ept-gallery { margin-top: 25px; padding: 28px; border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: white; }
.ept-gallery h2 { margin-bottom: 18px; }
.ept-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ept-gallery-grid a { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--ept-surface); }
.ept-gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ept-gallery-grid a:hover img { transform: scale(1.035); }
.ept-funders { margin-top: 25px; padding: 24px 28px; border: 1px solid var(--ept-border); border-radius: var(--ept-radius); background: var(--ept-surface); }
.ept-funders > p { margin-bottom: 14px; color: var(--ept-muted); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.ept-funder-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 30px; }
.ept-funder-logos img { width: auto; max-width: 150px; max-height: 58px; object-fit: contain; filter: grayscale(1); opacity: .84; }

/* Registration */
.ept-registration { margin-top: 12px; }
.ept-registration-form { display: grid; gap: 17px; }
.ept-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.ept-field--full { grid-column: 1 / -1; }
.ept-registration .ept-field label { display: block; margin-bottom: 6px; color: #41505a; font-size: 11px; font-weight: 800; }
.ept-registration input:not([type="checkbox"]), .ept-registration select, .ept-registration textarea { width: 100%; min-height: 43px; margin: 0; padding: 9px 11px; border: 1px solid var(--ept-border); border-radius: 9px; color: var(--ept-text); background: white; font: inherit; font-size: 13px; }
.ept-registration textarea { min-height: 90px; resize: vertical; }
.ept-registration input:focus, .ept-registration select:focus, .ept-registration textarea:focus { border-color: var(--ept-primary); outline: 3px solid color-mix(in srgb, var(--ept-primary) 13%, transparent); }
.ept-consent { display: flex; align-items: flex-start; gap: 9px; color: var(--ept-muted); font-size: 11px; line-height: 1.5; }
.ept-consent input { margin-top: 2px; }
.ept-consent a { color: var(--ept-primary); font-weight: 700; }
.ept-hp { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.ept-field.has-error input, .ept-field.has-error select, .ept-consent.has-error { border-color: #ba2e2e; }
.ept-alert { margin-bottom: 14px; padding: 13px 15px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.ept-alert--success { color: #185f3c; background: #e6f6ed; }
.ept-alert--error { color: #8b2929; background: #fdecec; }
.ept-form-notice { padding: 14px; border-radius: 10px; color: var(--ept-muted); background: var(--ept-surface); text-align: center; font-size: 13px; font-weight: 700; }

.ept-plugin-archive { padding: 65px 20px 90px; }
.ept-plugin-archive__inner { max-width: 1260px; margin: 0 auto; }
.ept-plugin-archive__header { max-width: 760px; margin-bottom: 35px; }
.ept-plugin-archive__header h1 { margin: 0 0 12px; font-size: clamp(40px, 6vw, 72px); }
.ept-plugin-archive__header > p:last-child { color: var(--ept-muted); font-size: 18px; }

@media (max-width: 1120px) {
  .ept-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ept-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ept-filter--search { grid-column: span 2; }
  .ept-course-hero { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .7fr); }
  .ept-course-layout { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 850px) {
  .ept-course-hero { grid-template-columns: 1fr; }
  .ept-course-hero__media { order: -1; height: 310px; }
  .ept-course-hero__media img { min-height: 310px; }
  .ept-course-layout { grid-template-columns: 1fr; }
  .ept-sticky-card { position: static; }
}
@media (max-width: 700px) {
  .ept-course-grid { grid-template-columns: 1fr; }
  .ept-course-card__media { height: 240px; }
  .ept-filters { grid-template-columns: 1fr; }
  .ept-filter--search { grid-column: auto; }
  .ept-filter-actions { justify-content: space-between; }
  .ept-course-hero__content { padding: 28px 23px 34px; }
  .ept-course-hero__content h1 { font-size: 38px; }
  .ept-course-hero__facts { display: grid; }
  .ept-form-grid { grid-template-columns: 1fr; }
  .ept-field--full { grid-column: auto; }
  .ept-tab-panel { padding: 23px; }
  .ept-gallery-grid { grid-template-columns: 1fr 1fr; }
  .ept-gallery, .ept-funders { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ept-course-manager *, .ept-course-manager *::before, .ept-course-manager *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ========================================================================
   EPT Gestor de Cursos 2.0.5 — Refinament corporatiu monocrom
   Paleta Eines per Tothom: negre, blanc i gris.
   Canvis exclusivament visuals al frontal. No afecta lògica ni dades.
   ======================================================================== */
.ept-course-detail {
  --ept-brand-black: #000000;
  --ept-brand-charcoal: #2f2f2f;
  --ept-brand-dark-gray: #4f4f4f;
  --ept-brand-gray: #777777;
  --ept-brand-mid-gray: #cfcfcf;
  --ept-brand-line: #dedede;
  --ept-brand-soft: #f5f5f5;
  --ept-brand-surface: #fafafa;
  --ept-brand-white: #ffffff;
  --ept-course-accent: var(--ept-brand-black);
  color: var(--ept-brand-charcoal);
}

.ept-single-course-page {
  background:
    radial-gradient(circle at 9% 4%, rgba(0, 0, 0, .035), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

/* Capçalera del curs */
.ept-course-detail .ept-course-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  min-height: 440px;
  border: 1px solid #202020;
  border-radius: 28px;
  background: linear-gradient(135deg, #000000 0%, #242424 62%, #3a3a3a 100%);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .16);
}
.ept-course-detail .ept-course-hero::before {
  width: 500px;
  height: 500px;
  left: -320px;
  bottom: -330px;
  border-width: 92px;
  border-color: rgba(255, 255, 255, .07);
}
.ept-course-detail .ept-course-hero::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ffffff, #bdbdbd 55%, #ffffff);
}
.ept-course-detail .ept-course-hero__content {
  padding: clamp(38px, 5vw, 72px);
}
.ept-course-detail .ept-course-hero__content h1 {
  max-width: 780px;
  margin: 15px 0 16px;
  color: #ffffff;
  font-size: clamp(38px, 4.7vw, 64px);
  font-weight: 800;
  line-height: 1.015;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.ept-course-detail .ept-course-hero__content .ept-eyebrow {
  margin: 19px 0 0 !important;
  color: #d7d7d7;
  font-size: 13px;
  letter-spacing: .08em;
}
.ept-course-detail .ept-course-hero__subtitle {
  max-width: 670px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(16px, 1.8vw, 21px);
}
.ept-course-detail .ept-course-hero__badges {
  gap: 9px;
}
.ept-course-detail .ept-course-hero__badges .ept-badge {
  min-height: 29px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 10px;
  letter-spacing: .05em;
  box-shadow: none;
}
.ept-course-detail .ept-course-hero__badges .ept-badge--status {
  color: #000000;
  background: #ffffff;
}
.ept-course-detail .ept-badge--subsidized,
.ept-course-detail .ept-badge--hero-custom {
  color: #ffffff;
  border-color: #666666;
  background: #353535;
}
.ept-course-detail .ept-course-hero__facts {
  gap: 12px 20px;
  margin-top: 11px;
}
.ept-course-detail .ept-hero-fact {
  min-height: 34px;
  color: rgba(255, 255, 255, .94);
  font-size: 13px;
  font-weight: 650;
}
.ept-course-detail .ept-hero-fact > span {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}
.ept-course-detail .ept-course-hero__media {
  position: relative;
  overflow: hidden;
  background: #111111;
}
.ept-course-detail .ept-course-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 25%);
  pointer-events: none;
}
.ept-course-detail .ept-course-hero__media img {
  min-height: 440px;
  object-position: center center;
  transition: transform .45s ease;
}
.ept-course-detail .ept-course-hero:hover .ept-course-hero__media img {
  transform: scale(1.015);
}

/* Distribució principal */
.ept-course-detail .ept-course-layout {
  grid-template-columns: minmax(0, 1fr) minmax(350px, 390px);
  gap: 32px;
  margin-top: 32px;
}

/* Pestanyes */
.ept-course-detail .ept-tabs {
  gap: 4px;
  margin-bottom: 18px;
  padding: 7px;
  border-color: var(--ept-brand-line);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}
.ept-course-detail .ept-tab {
  position: relative;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  color: #626262;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ept-course-detail .ept-tab:hover {
  color: #000000;
  background: #f1f1f1;
}
.ept-course-detail .ept-tab:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .22);
  outline-offset: 2px;
}
.ept-course-detail .ept-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #000000, #333333);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .20);
  transform: translateY(-1px);
}
.ept-course-detail .ept-tab.is-active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

/* Contingut de les pestanyes */
.ept-course-detail .ept-tab-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4vw, 48px);
  border-color: var(--ept-brand-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .065);
}
.ept-course-detail .ept-tab-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #000000, #bdbdbd);
}
.ept-course-detail .ept-tab-panel h2 {
  position: relative;
  margin-bottom: 24px;
  padding-left: 18px;
  color: #000000;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.ept-course-detail .ept-tab-panel h2::before {
  content: "";
  position: absolute;
  top: .14em;
  bottom: .12em;
  left: 0;
  width: 5px;
  border-radius: 999px;
  background: #000000;
}
.ept-course-detail .ept-tab-panel h3,
.ept-course-detail .ept-tab-panel h4 {
  margin-top: 1.55em;
  color: #1f1f1f;
}
.ept-course-detail .ept-tab-panel p,
.ept-course-detail .ept-tab-panel li {
  color: #4f4f4f;
  font-size: 15px;
  line-height: 1.82;
}
.ept-course-detail .ept-tab-panel p {
  max-width: 84ch;
  margin-bottom: 1.05em;
}
.ept-course-detail .ept-tab-panel ul,
.ept-course-detail .ept-tab-panel ol {
  padding-left: 24px;
}
.ept-course-detail .ept-tab-panel li + li {
  margin-top: .48em;
}
.ept-course-detail .ept-tab-panel li::marker {
  color: #000000;
  font-weight: 800;
}
.ept-course-detail .ept-tab-panel a {
  color: #000000;
  text-decoration-color: rgba(0, 0, 0, .35);
  text-underline-offset: 3px;
}
.ept-course-detail .ept-tab-panel a:hover {
  color: #626262;
}
.ept-course-detail .ept-tab-panel table {
  width: 100%;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--ept-brand-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
}
.ept-course-detail .ept-tab-panel th,
.ept-course-detail .ept-tab-panel td {
  padding: 13px 15px;
  border-right: 1px solid var(--ept-brand-line);
  border-bottom: 1px solid var(--ept-brand-line);
  text-align: left;
}
.ept-course-detail .ept-tab-panel th {
  color: #000000;
  background: #f2f2f2;
}
.ept-course-detail .ept-tab-panel tr:last-child td,
.ept-course-detail .ept-tab-panel tr:last-child th {
  border-bottom: 0;
}
.ept-course-detail .ept-tab-panel th:last-child,
.ept-course-detail .ept-tab-panel td:last-child {
  border-right: 0;
}

/* Targeta d'inscripció */
.ept-course-detail .ept-sticky-card {
  position: sticky;
  top: 28px;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--ept-brand-line);
  border-top: 6px solid #000000;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .10);
}
.ept-course-detail .ept-sticky-card::before {
  content: "";
  position: absolute;
  top: -95px;
  right: -95px;
  width: 190px;
  height: 190px;
  border: 35px solid rgba(0, 0, 0, .035);
  border-radius: 50%;
  pointer-events: none;
}
.ept-course-detail .ept-sticky-card h2 {
  position: relative;
  margin-bottom: 18px;
  color: #000000;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.025em;
}
.ept-course-detail .ept-availability {
  position: relative;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 17px;
  border: 1px solid #dddddd;
  border-radius: 13px;
  background: #f3f3f3;
}
.ept-course-detail .ept-availability strong {
  color: #000000;
  font-size: 34px;
}
.ept-course-detail .ept-availability span {
  color: #666666;
  font-size: 12px;
  font-weight: 700;
}
.ept-course-detail .ept-registration {
  position: relative;
  margin-top: 8px;
}
.ept-course-detail .ept-registration-form {
  gap: 15px;
}
.ept-course-detail .ept-form-grid {
  gap: 14px 12px;
}
.ept-course-detail .ept-registration .ept-field label {
  margin-bottom: 7px;
  color: #202020;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .015em;
}
.ept-course-detail .ept-registration input:not([type="checkbox"]),
.ept-course-detail .ept-registration select,
.ept-course-detail .ept-registration textarea {
  min-height: 47px;
  padding: 10px 12px;
  border-color: #d2d2d2;
  border-radius: 10px;
  color: #2f2f2f;
  background: #ffffff;
  font-size: 13px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .025);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.ept-course-detail .ept-registration textarea {
  min-height: 105px;
}
.ept-course-detail .ept-registration input:hover,
.ept-course-detail .ept-registration select:hover,
.ept-course-detail .ept-registration textarea:hover {
  border-color: #a9a9a9;
}
.ept-course-detail .ept-registration input:focus,
.ept-course-detail .ept-registration select:focus,
.ept-course-detail .ept-registration textarea:focus {
  border-color: #000000;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .10);
}
.ept-course-detail .ept-consent {
  gap: 10px;
  color: #676767;
  font-size: 11px;
}
.ept-course-detail .ept-consent input {
  accent-color: #000000;
}
.ept-course-detail .ept-consent a {
  color: #000000;
}
.ept-course-detail .ept-button--primary {
  min-height: 50px;
  color: #ffffff !important;
  border-color: #000000;
  background: linear-gradient(135deg, #000000, #2f2f2f);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}
.ept-course-detail .ept-button--primary:hover {
  color: #ffffff !important;
  filter: none;
  border-color: #3d3d3d;
  background: linear-gradient(135deg, #292929, #4a4a4a);
  box-shadow: 0 13px 26px rgba(0, 0, 0, .23);
}
.ept-course-detail .ept-button--primary:focus-visible,
.ept-course-detail .ept-button--secondary:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .23);
  outline-offset: 3px;
}
.ept-course-detail .ept-button--secondary {
  width: 100%;
  min-height: 45px;
  margin-top: 10px;
  color: #000000 !important;
  border-color: #bdbdbd;
  background: #ffffff;
}
.ept-course-detail .ept-button--secondary:hover {
  color: #ffffff !important;
  border-color: #000000;
  background: #000000;
}
.ept-course-detail .ept-deadline {
  margin-top: 15px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #686868;
  background: #f4f4f4;
  line-height: 1.5;
}
.ept-course-detail .ept-deadline strong {
  color: #000000;
}
.ept-course-detail .ept-sidebar-contact {
  margin-top: 22px;
  padding-top: 20px;
  border-top-color: var(--ept-brand-line);
}
.ept-course-detail .ept-sidebar-contact h3 {
  color: #000000;
  font-size: 17px;
}
.ept-course-detail .ept-sidebar-contact p {
  color: #666666;
  font-size: 12.5px;
}
.ept-course-detail .ept-sidebar-contact a {
  color: #000000;
}

/* Documents, galeria i entitats col·laboradores */
.ept-course-detail .ept-documents,
.ept-course-detail .ept-gallery,
.ept-course-detail .ept-funders {
  margin-top: 22px;
  border-color: var(--ept-brand-line);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .04);
}
.ept-course-detail .ept-documents,
.ept-course-detail .ept-funders {
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f4 100%);
}
.ept-course-detail .ept-documents h2,
.ept-course-detail .ept-gallery h2 {
  color: #000000;
}
.ept-course-detail .ept-document-list a {
  border-color: var(--ept-brand-line);
  color: #111111;
}
.ept-course-detail .ept-document-list a:hover {
  border-color: #000000;
}
.ept-course-detail .ept-document-list a span {
  color: #000000;
  background: #ededed;
}
.ept-course-detail .ept-funders > p {
  color: #333333;
}
.ept-course-detail .ept-funder-logos {
  gap: 20px 32px;
}
.ept-course-detail .ept-funder-logos img {
  max-width: 170px;
  max-height: 62px;
  filter: none;
  opacity: 1;
}

/* Responsiu */
@media (max-width: 1180px) {
  .ept-course-detail .ept-course-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
  }
  .ept-course-detail .ept-course-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
  }
  .ept-course-detail .ept-sticky-card {
    padding: 24px;
  }
}
@media (max-width: 930px) {
  .ept-course-detail .ept-course-hero {
    grid-template-columns: 1fr;
  }
  .ept-course-detail .ept-course-hero__media {
    order: -1;
    height: 330px;
  }
  .ept-course-detail .ept-course-hero__media img {
    min-height: 330px;
  }
  .ept-course-detail .ept-course-layout {
    grid-template-columns: 1fr;
  }
  .ept-course-detail .ept-sticky-card {
    position: static;
  }
  .ept-course-detail .ept-course-sidebar {
    max-width: 680px;
  }
}
@media (max-width: 700px) {
  .ept-single-course-page {
    padding: 24px 14px 65px;
  }
  .ept-course-detail .ept-course-hero {
    border-radius: 20px;
  }
  .ept-course-detail .ept-course-hero__media {
    height: 250px;
  }
  .ept-course-detail .ept-course-hero__media img {
    min-height: 250px;
  }
  .ept-course-detail .ept-course-hero__content {
    padding: 30px 23px 34px;
  }
  .ept-course-detail .ept-course-hero__content h1 {
    font-size: clamp(34px, 10vw, 45px);
  }
  .ept-course-detail .ept-course-hero__facts {
    gap: 9px;
  }
  .ept-course-detail .ept-tabs {
    margin-right: -2px;
    margin-left: -2px;
  }
  .ept-course-detail .ept-tab-panel,
  .ept-course-detail .ept-sticky-card {
    padding: 24px 20px;
    border-radius: 16px;
  }
  .ept-course-detail .ept-tab-panel h2 {
    padding-left: 14px;
    font-size: 29px;
  }
  .ept-course-detail .ept-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================
   EPT Gestor de Cursos 2.0.6 — Fons geomètric corporatiu
   Únic canvi visual: patró gris a les fitxes individuals dels cursos.
   ======================================================================== */
body.ept-cm-single-course .ept-single-course-page {
  background-color: #f1f1f1;
  background-image: url("../images/ept-course-pattern.svg");
  background-repeat: repeat;
  background-position: top center;
  background-size: 960px 640px;
}

@media (max-width: 767px) {
  body.ept-cm-single-course .ept-single-course-page {
    background-size: 720px 480px;
  }
}

/* EPT Gestor de Cursos 2.0.7 — Llistes dels apartats */
.ept-course-detail .ept-tab-panel ul,
.ept-course-detail .ept-tab-panel ol {
  display: block !important;
  margin: 0 0 1.35em !important;
  padding-left: 1.55em !important;
  list-style-position: outside !important;
}
.ept-course-detail .ept-tab-panel ul { list-style-type: disc !important; }
.ept-course-detail .ept-tab-panel ol { list-style-type: decimal !important; }
.ept-course-detail .ept-tab-panel ul ul { list-style-type: circle !important; }
.ept-course-detail .ept-tab-panel ol ol { list-style-type: lower-alpha !important; }
.ept-course-detail .ept-tab-panel li {
  display: list-item !important;
  margin: 0 0 .55em !important;
  padding-left: .18em;
  color: var(--ept-brand-charcoal, #2f2f2f);
  line-height: 1.65;
}
.ept-course-detail .ept-tab-panel li:last-child { margin-bottom: 0 !important; }
.ept-course-detail .ept-tab-panel li::marker {
  color: var(--ept-brand-black, #000000);
  font-weight: 800;
}
.ept-course-detail .ept-tab-panel li > p { margin: 0; }


/* 2.0.8 — Icones semàntiques del resum principal del curs. */
.ept-course-detail .ept-hero-fact__icon svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ========================================================================
   EPT Gestor de Cursos 2.0.11 — CTA de novetats sota la inscripció
   ======================================================================== */
.ept-course-detail .ept-newsletter-box {
  position: relative;
  margin-top: 10px;
}
.ept-course-detail .ept-button--newsletter {
  width: 100%;
  min-height: 70px;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 0;
  padding: 10px 13px;
  overflow: hidden;
  text-align: left;
  color: #000000 !important;
  border: 1.5px solid #000000;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f3f3 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .09);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background .18s ease;
}
.ept-course-detail .ept-button--newsletter:hover {
  color: #000000 !important;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(0, 0, 0, .15);
  transform: translateY(-1px);
}
.ept-course-detail .ept-button--newsletter[aria-expanded="true"] {
  color: #ffffff !important;
  border-color: #000000;
  background: linear-gradient(135deg, #000000, #303030);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .21);
}
.ept-course-detail .ept-button--newsletter:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .23);
  outline-offset: 3px;
}
.ept-course-detail .ept-newsletter-button__icon {
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #000000;
  box-shadow: 0 5px 13px rgba(0, 0, 0, .18);
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.ept-course-detail .ept-button--newsletter:hover .ept-newsletter-button__icon {
  transform: scale(1.04);
}
.ept-course-detail .ept-button--newsletter[aria-expanded="true"] .ept-newsletter-button__icon {
  color: #000000;
  background: #ffffff;
}
.ept-course-detail .ept-newsletter-button__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ept-course-detail .ept-newsletter-button__copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 4px;
}
.ept-course-detail .ept-newsletter-button__copy strong {
  color: inherit;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .015em;
  line-height: 1.1;
}
.ept-course-detail .ept-newsletter-button__copy small {
  color: #676767;
  font-size: 9.8px;
  font-weight: 650;
  line-height: 1.35;
}
.ept-course-detail .ept-button--newsletter[aria-expanded="true"] .ept-newsletter-button__copy small {
  color: rgba(255, 255, 255, .72);
}
.ept-course-detail .ept-newsletter-button__arrow {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  color: inherit;
  font-size: 17px;
  line-height: 1;
  transition: transform .18s ease;
}
.ept-course-detail .ept-button--newsletter:hover .ept-newsletter-button__arrow {
  transform: translateX(3px);
}
.ept-course-detail .ept-button--newsletter[aria-expanded="true"] .ept-newsletter-button__arrow {
  transform: rotate(90deg);
}
.ept-js .ept-course-detail .ept-newsletter-panel:not(.is-open) {
  display: none;
}
.ept-course-detail .ept-newsletter-panel[hidden] {
  display: none !important;
}
.ept-course-detail .ept-newsletter-panel {
  margin-top: 10px;
  padding: 17px;
  border: 1px solid #d4d4d4;
  border-radius: 13px;
  background: #f5f5f5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.ept-course-detail .ept-newsletter-panel h3 {
  margin: 0 0 5px;
  color: #000000;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
}
.ept-course-detail .ept-newsletter-panel > p {
  margin: 0 0 14px;
  color: #656565;
  font-size: 12px;
  line-height: 1.55;
}
.ept-course-detail .ept-newsletter-form {
  display: grid;
  gap: 12px;
}
.ept-course-detail .ept-newsletter-form .ept-field {
  min-width: 0;
}
.ept-course-detail .ept-newsletter-form .ept-field label {
  display: block;
  margin-bottom: 6px;
  color: #202020;
  font-size: 11px;
  font-weight: 800;
}
.ept-course-detail .ept-newsletter-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 45px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cccccc;
  border-radius: 9px;
  color: #2f2f2f;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
}
.ept-course-detail .ept-newsletter-form input:not([type="checkbox"]):focus {
  border-color: #000000;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(0,0,0,.10);
}
.ept-course-detail .ept-newsletter-consent {
  color: #626262;
  font-size: 10.5px;
}
.ept-course-detail .ept-newsletter-consent input {
  accent-color: #000000;
}
.ept-course-detail .ept-newsletter-consent a {
  color: #000000;
  font-weight: 750;
}
.ept-course-detail .ept-newsletter-panel .ept-alert {
  margin: 0 0 12px;
}
.ept-course-detail .ept-newsletter-admin-notice {
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px dashed #a8a8a8;
  border-radius: 10px;
  color: #555555;
  background: #f3f3f3;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 430px) {
  .ept-course-detail .ept-button--newsletter {
    min-height: 66px;
    gap: 10px;
    padding: 9px 11px;
  }
  .ept-course-detail .ept-newsletter-button__icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .ept-course-detail .ept-newsletter-button__copy strong {
    font-size: 11px;
  }
  .ept-course-detail .ept-newsletter-button__copy small {
    font-size: 9.2px;
  }
}
