/* Extensiones para cursos con cabecera configurable / bloques extra.
   Sin cambios visuales para los cursos que no usen los nuevos campos. */
.baf-single>.baf-extra:first-child{margin-top:104px}
.baf-single__hero--after-extra{margin-top:24px}
.baf-single__hero--custom-height{min-height:var(--baf-hero-height,400px)}
.baf-single__hero--custom-image .baf-single__hero-bg img{opacity:var(--baf-hero-opacity,.35);object-position:var(--baf-hero-position,center)}
.baf-single__hero--center .baf-single__hero-content{width:100%;text-align:center}
.baf-single__hero--center .baf-single__meta-row{justify-content:center}
.baf-single__hero-intro{color:#f3ede6;font-size:17px;line-height:1.55;max-width:680px;margin:15px 0 0}
.baf-single__hero--center .baf-single__hero-intro{margin-left:auto;margin-right:auto}
.baf-extra{margin:24px 0 44px;min-width:0}
.baf-extra__heading{font-family:var(--baf-fn);font-size:clamp(20px,2.5vw,28px);font-weight:800;line-height:1.2;color:var(--baf-cream);margin:0 0 18px}
.baf-extra__text{font-size:16px;line-height:1.7}
.baf-extra__text p:last-child{margin-bottom:0}
.baf-extra__gallery{width:100%;max-width:100%;display:grid;grid-template-columns:repeat(var(--baf-cols,3),minmax(0,1fr));gap:14px}
.baf-extra__gallery--small{max-width:300px}.baf-extra__gallery--medium{max-width:480px}.baf-extra__gallery--large{max-width:720px}
.baf-extra__gallery--left{margin-right:auto}.baf-extra__gallery--right{margin-left:auto}.baf-extra__gallery--center{margin-left:auto;margin-right:auto}
.baf-extra__photo{margin:0;min-width:0;width:100%;overflow:hidden;border-radius:12px;background:#eee9e2;border:1px solid var(--baf-line);box-shadow:var(--baf-card-shadow)}
.baf-extra__img{display:block;width:100%;height:auto;max-width:100%;object-fit:contain;box-shadow:none;border-radius:0!important;margin:0!important}
.baf-extra__photo--portrait{aspect-ratio:3/4}.baf-extra__photo--square{aspect-ratio:1/1}.baf-extra__photo--landscape{aspect-ratio:16/9}.baf-extra__photo--wide{aspect-ratio:21/9}
.baf-extra__photo:not(.baf-extra__photo--auto) .baf-extra__img{width:100%;height:100%;object-fit:contain}
.baf-extra__photo--cover:not(.baf-extra__photo--auto) .baf-extra__img{object-fit:cover}
.baf-extra__mixed{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:center}
.baf-extra__mixed .baf-extra__gallery{grid-row:1;grid-column:1}
.baf-extra__mixed .baf-extra__text{grid-row:1;grid-column:2}
.baf-extra--reverse .baf-extra__mixed .baf-extra__gallery{grid-column:2}
.baf-extra--reverse .baf-extra__mixed .baf-extra__text{grid-column:1}
.baf-single__sidebar .baf-extra{margin:0 0 20px}
.baf-single__sidebar .baf-extra__gallery{grid-template-columns:repeat(min(var(--baf-cols,3),2),minmax(0,1fr))}
.baf-single>.baf-extra--full,.baf-single>.baf-extra{width:min(1140px,calc(100% - 48px));margin:32px auto 0}
.baf-single>.baf-extra:last-child{margin-bottom:48px}
.baf-section>.baf-extra{margin-top:15px;margin-bottom:20px}
@media(max-width:860px){
  .baf-extra__gallery{grid-template-columns:repeat(min(var(--baf-cols,3),2),minmax(0,1fr))}
}
@media(max-width:600px){
  .baf-single__hero--custom-height{min-height:min(var(--baf-hero-height,400px),360px)}
  .baf-single__hero-intro{font-size:15px}
  .baf-single>.baf-extra{width:min(100% - 24px,1140px)}
  .baf-extra__gallery{grid-template-columns:repeat(min(var(--baf-cols,3),2),minmax(0,1fr));gap:9px}
  .baf-extra__mixed{grid-template-columns:1fr;gap:15px}
  .baf-extra__mixed .baf-extra__gallery,.baf-extra__mixed .baf-extra__text,.baf-extra--reverse .baf-extra__mixed .baf-extra__gallery,.baf-extra--reverse .baf-extra__mixed .baf-extra__text{grid-column:1;grid-row:auto}
  .baf-extra__heading{font-size:22px}
}
