/* Enseñanzas · diseño editorial premium */
:root{--ep-bg:#f8f1e6;--ep-paper:#fffaf2;--ep-ink:#352317;--ep-muted:#78695d;--ep-gold:#b9863e;--ep-gold2:#d6aa66;--ep-line:rgba(185,134,62,.28);--ep-shadow:0 20px 48px rgba(66,39,18,.09)}
.ep-page{background:linear-gradient(180deg,#fbf6ed,#f7eee0);color:var(--ep-ink);padding-bottom:74px}.ep-container{width:min(1360px,calc(100% - 72px));margin:auto}.ep-hero{position:relative;min-height:360px;display:flex;align-items:center;color:#fff;overflow:hidden;background:url('../img/ensenanzas-hero.jpg') center 50%/cover no-repeat;border-radius:0 0 24px 24px}.ep-hero__shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(39,22,11,.88) 0%,rgba(45,25,12,.68) 38%,rgba(45,25,12,.22) 68%,rgba(30,17,8,.42) 100%)}.ep-hero__inner{position:relative;z-index:1;width:min(1360px,calc(100% - 72px));margin:auto;display:flex;align-items:center;justify-content:space-between;gap:40px}.ep-hero__copy{max-width:650px}.ep-kicker{display:inline-flex;align-items:center;gap:8px;font:700 10px/1 'DM Sans',sans-serif;letter-spacing:.24em;text-transform:uppercase;color:#d4a85f}.ep-kicker .fine-icon{width:16px;height:16px}.ep-hero .ep-kicker{color:#f0ca8a}.ep-hero h1{font:500 clamp(66px,7vw,102px)/.9 'Cormorant Garamond',Georgia,serif;margin:16px 0 10px;letter-spacing:-.035em}.ep-hero__copy>p{font:500 22px/1.35 'Cormorant Garamond',Georgia,serif;margin:0;color:#fff6e8}.ep-ornament{display:flex;align-items:center;gap:13px;color:#e7c188;margin-top:20px}.ep-ornament i{display:block;width:72px;height:1px;background:currentColor}.ep-ornament .fine-icon{width:17px;height:17px}.ep-hero__verse{max-width:320px;margin:0;text-align:center;font:italic 21px/1.28 'Cormorant Garamond',Georgia,serif;color:#f6dfbc;text-shadow:0 2px 18px rgba(0,0,0,.28)}.ep-hero__verse cite{display:block;margin-top:12px;font:700 9px/1 'DM Sans',sans-serif;letter-spacing:.22em;color:#e8bc78;text-transform:uppercase}
.ep-filters{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding:24px 0 28px}.ep-filters button{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--ep-line);background:rgba(255,253,248,.82);color:#654b36;border-radius:999px;padding:11px 18px;font:600 12px/1 'DM Sans',sans-serif;transition:.22s}.ep-filters button .fine-icon{width:15px;height:15px}.ep-filters button:hover,.ep-filters button.is-active{background:linear-gradient(100deg,#c99a50,#ad7833);color:#fff;border-color:transparent;box-shadow:0 8px 22px rgba(121,78,27,.16)}
.ep-featured{display:grid;grid-template-columns:1.08fr .92fr;min-height:360px;overflow:hidden;border:1px solid var(--ep-line);border-radius:22px;background:rgba(255,251,244,.94);box-shadow:var(--ep-shadow)}.ep-featured__media{position:relative;min-height:360px;background:#2a190f;overflow:hidden}.ep-featured__media img{width:100%;height:100%;object-fit:cover;filter:saturate(.92) contrast(.98);transition:transform .6s ease}.ep-featured:hover .ep-featured__media img{transform:scale(1.025)}.ep-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:70px;height:70px;border-radius:50%;border:1px solid rgba(255,238,205,.72);background:linear-gradient(135deg,#d3a151,#a86f2b);color:#fff;display:grid;place-items:center;box-shadow:0 12px 30px rgba(42,22,8,.28)}.ep-play .fine-icon{width:27px;height:27px;margin-left:4px}.ep-duration{position:absolute;right:12px;bottom:11px;border-radius:7px;background:rgba(28,20,15,.88);color:#fff;padding:5px 8px;font:700 10px/1 'DM Sans',sans-serif}.ep-featured__content{position:relative;padding:44px 50px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;overflow:hidden}.ep-featured__content h2{margin:12px 0 8px;font:600 clamp(42px,4vw,58px)/.98 'Cormorant Garamond',Georgia,serif;letter-spacing:-.025em}.ep-featured__content>p{margin:0;max-width:580px;color:var(--ep-muted);font-size:15px;line-height:1.55}.ep-meta{display:flex;flex-wrap:wrap;gap:14px 20px;margin:22px 0;color:#8a796b;font-size:11px}.ep-meta span{display:inline-flex;align-items:center;gap:7px}.ep-meta .fine-icon{width:15px;height:15px;color:var(--ep-gold)}.ep-primary{display:inline-flex;align-items:center;gap:13px;border:0;border-radius:999px;background:linear-gradient(100deg,#c99a50,#ad7833);color:#fff;padding:13px 20px;font:700 12px/1 'DM Sans',sans-serif}.ep-primary .fine-icon{width:15px;height:15px}.ep-coming{display:inline-block;margin-top:18px;color:#a88455;font-size:12px}.ep-featured__watermark{position:absolute;right:24px;bottom:-26px;color:#b9863e;opacity:.065}.ep-featured__watermark .fine-icon{width:150px;height:150px}
.ep-more{padding-top:44px}.ep-section-head{display:grid;grid-template-columns:auto 1fr;align-items:end;gap:18px;margin-bottom:18px}.ep-section-head>span{font:700 10px/1 'DM Sans',sans-serif;letter-spacing:.22em;text-transform:uppercase;color:#9e6c30}.ep-section-head h2{grid-column:1/2;margin:6px 0 0;font:600 38px/1 'Cormorant Garamond',Georgia,serif}.ep-head-line{height:1px;background:linear-gradient(90deg,rgba(184,134,62,.55),transparent);margin-bottom:5px}.ep-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.ep-card{overflow:hidden;border-radius:16px;border:1px solid rgba(185,134,62,.22);background:rgba(255,253,248,.9);box-shadow:0 10px 28px rgba(70,43,20,.055);transition:.25s}.ep-card:hover{transform:translateY(-5px);box-shadow:0 18px 42px rgba(70,43,20,.11);border-color:rgba(185,134,62,.46)}.ep-card__media{position:relative;aspect-ratio:16/9;overflow:hidden;background:#eadcc7}.ep-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;filter:saturate(.9)}.ep-card:hover .ep-card__media img{transform:scale(1.04)}.ep-card__play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:50px;height:50px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(255,255,255,.75);background:rgba(177,122,51,.9);color:#fff;opacity:0;transition:.22s}.ep-card:hover .ep-card__play{opacity:1}.ep-card__play .fine-icon{width:20px;height:20px;margin-left:3px}.ep-card__body{padding:16px 17px 17px}.ep-card__category{font:700 9px/1 'DM Sans',sans-serif;letter-spacing:.18em;text-transform:uppercase;color:#b27c37}.ep-card h3{margin:7px 0 6px;font:600 25px/1.02 'Cormorant Garamond',Georgia,serif}.ep-card p{margin:0;color:#7d6e62;font-size:12px;line-height:1.45;min-height:52px}.ep-card__footer{display:flex;gap:11px;flex-wrap:wrap;margin-top:13px;padding-top:12px;border-top:1px solid rgba(185,134,62,.16);color:#8c7b6e;font-size:9.5px}.ep-card__footer span{display:inline-flex;align-items:center;gap:5px}.ep-card__footer .fine-icon{width:12px;height:12px;color:#b17b37}.ep-empty{text-align:center;padding:48px;color:#8a796b}
.ep-modal{position:fixed;inset:0;z-index:120;background:rgba(29,17,10,.72);backdrop-filter:blur(7px);display:grid;place-items:center;padding:24px}.ep-modal[hidden]{display:none}.ep-modal__panel{position:relative;width:min(980px,100%);border-radius:22px;background:#fffaf2;padding:26px;box-shadow:0 30px 90px rgba(24,12,5,.36)}.ep-modal__panel h2{margin:8px 46px 16px 0;font:600 38px/1 'Cormorant Garamond',Georgia,serif}.ep-modal__close{position:absolute;right:16px;top:14px;width:38px;height:38px;border:1px solid var(--ep-line);border-radius:50%;background:#fffaf2;color:#5d4430;font-size:26px}.ep-modal__video{aspect-ratio:16/9;background:#1c120c;border-radius:14px;overflow:hidden}.ep-modal__video iframe,.ep-modal__video video{width:100%;height:100%;border:0;display:block;background:#000}
@media(max-width:1100px){.ep-grid{grid-template-columns:repeat(3,1fr)}.ep-featured{grid-template-columns:1fr 1fr}.ep-featured__content{padding:36px}.ep-container,.ep-hero__inner{width:min(100% - 46px,1360px)}}
@media(max-width:820px){.ep-hero{min-height:390px;background-position:58% center}.ep-hero__inner{align-items:flex-end;padding:44px 0}.ep-hero__verse{display:none}.ep-hero__shade{background:linear-gradient(180deg,rgba(36,21,11,.22),rgba(36,21,11,.74))}.ep-featured{grid-template-columns:1fr}.ep-featured__media{min-height:300px}.ep-featured__content{padding:30px}.ep-grid{grid-template-columns:repeat(2,1fr)}.ep-filters{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:20px;scrollbar-width:none}.ep-filters::-webkit-scrollbar{display:none}.ep-filters button{white-space:nowrap}.ep-card__play{opacity:1}.ep-section-head{grid-template-columns:1fr}.ep-head-line{display:none}}
@media(max-width:560px){.ep-container,.ep-hero__inner{width:calc(100% - 28px)}.ep-hero{min-height:340px;border-radius:0 0 18px 18px}.ep-hero h1{font-size:62px}.ep-hero__copy>p{font-size:18px}.ep-featured__media{min-height:230px}.ep-featured__content{padding:24px 20px}.ep-featured__content h2{font-size:38px}.ep-meta{display:grid;gap:8px}.ep-grid{grid-template-columns:1fr}.ep-card p{min-height:0}.ep-modal{padding:12px}.ep-modal__panel{padding:18px;border-radius:18px}.ep-modal__panel h2{font-size:30px}}


/* ============================================================
   REFINAMIENTO VISUAL · VERSIÓN 10/10
   Más compacta, uniforme y editorial sin perder la línea actual
   ============================================================ */

/* 1. Ritmo vertical más fino */
.ep-page{padding-bottom:58px}
.ep-filters{padding:20px 0 18px;gap:10px}
.ep-more{padding-top:24px}
.ep-section-head{margin-bottom:16px}
.ep-section-head h2{font-size:36px;letter-spacing:-.018em}

/* 2. Tarjetas más compactas y proporcionadas */
.ep-grid{gap:16px}
.ep-card{
  border-radius:18px;
  background:rgba(255,253,248,.94);
  box-shadow:0 10px 26px rgba(70,43,20,.05);
  border-color:rgba(185,134,62,.20);
}
.ep-card:hover{
  transform:translateY(-4px);
  box-shadow:0 17px 38px rgba(70,43,20,.10);
}
.ep-card__media{
  aspect-ratio:16/8.55;
  position:relative;
}
.ep-card__media::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(43,23,10,.02) 0%,rgba(43,23,10,.02) 62%,rgba(43,23,10,.16) 100%),
    linear-gradient(90deg,rgba(188,137,63,.035),rgba(255,255,255,0) 45%,rgba(80,42,17,.035));
}
.ep-card__media img{
  filter:saturate(.86) contrast(.98) brightness(.98);
}
.ep-card:hover .ep-card__media img{transform:scale(1.028)}

/* 3. Botón play más ligero y coherente */
.ep-card__play{
  width:46px;
  height:46px;
  background:rgba(183,132,62,.88);
  border:1px solid rgba(255,246,226,.88);
  box-shadow:0 8px 20px rgba(39,22,10,.18);
  opacity:.96;
  backdrop-filter:blur(2px);
}
.ep-card__play .fine-icon{width:18px;height:18px}
.ep-card:hover .ep-card__play{
  transform:translate(-50%,-50%) scale(1.05);
  background:#b98239;
}
.ep-duration{
  right:10px;
  bottom:9px;
  padding:4px 7px;
  border-radius:6px;
  background:rgba(31,22,16,.82);
  font-size:9px;
}

/* 4. Cuerpo más corto y consistente */
.ep-card__body{padding:14px 15px 15px}
.ep-card__category{font-size:8.5px;letter-spacing:.19em}
.ep-card h3{
  margin:6px 0 5px;
  font-size:23px;
  line-height:1.02;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.ep-card p{
  font-size:11.5px;
  line-height:1.4;
  min-height:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.ep-card__footer{
  margin-top:11px;
  padding-top:10px;
  gap:9px;
  font-size:9px;
}

/* 5. Filtros un poco más finos */
.ep-filters button{
  padding:10px 16px;
  font-size:11.5px;
  box-shadow:none;
}
.ep-filters button:hover,
.ep-filters button.is-active{
  box-shadow:0 7px 18px rgba(121,78,27,.13);
}

/* 6. Cierre visual antes del footer */
.ep-closing-ornament{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:34px auto 2px;
  color:#b9863e;
  opacity:.72;
}
.ep-closing-ornament i{
  width:92px;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(185,134,62,.5));
}
.ep-closing-ornament i:last-child{
  transform:scaleX(-1);
}
.ep-closing-ornament span{
  font-size:14px;
  line-height:1;
}

/* 7. Afinado del hero para que no domine demasiado */
.ep-hero{min-height:342px}
.ep-hero h1{font-size:clamp(62px,6.6vw,94px)}
.ep-hero__copy>p{font-size:21px}
.ep-hero__verse{font-size:20px}

@media(max-width:1100px){
  .ep-grid{gap:15px}
  .ep-card h3{font-size:22px}
}

@media(max-width:820px){
  .ep-filters{padding-top:18px;padding-bottom:14px}
  .ep-more{padding-top:18px}
  .ep-card__play{opacity:1}
  .ep-closing-ornament{margin-top:28px}
}

@media(max-width:560px){
  .ep-page{padding-bottom:46px}
  .ep-hero{min-height:326px}
  .ep-section-head h2{font-size:32px}
  .ep-grid{gap:14px}
  .ep-card__media{aspect-ratio:16/9}
  .ep-card__body{padding:14px}
  .ep-card h3{font-size:22px}
  .ep-card p{-webkit-line-clamp:3}
  .ep-closing-ornament i{width:62px}
}


/* Corrección móvil: elimina la franja clara que venía integrada en biblia.jpg */
@media(max-width:820px){
  .ep-hero{background-image:url('../img/ensenanzas-hero.jpg');background-position:center 52%;background-size:cover;}
}
@media(max-width:560px){
  .ep-hero{background-position:55% 52%;}
}


/* ============================================================
   FILTROS DE ENSEÑANZAS EN MÓVIL SIN DESLIZAMIENTO HORIZONTAL
   ============================================================ */
@media(max-width:820px){
  .ep-filters{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    width:100%;
    overflow:visible;
    flex-wrap:unset;
    justify-content:stretch;
    padding:18px 0 16px;
  }
  .ep-filters button{
    width:100%;
    min-width:0;
    min-height:44px;
    padding:10px 12px;
    justify-content:center;
    white-space:normal;
    text-align:center;
    line-height:1.15;
  }
}

@media(max-width:560px){
  .ep-filters{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 9px;
    padding:18px 0 16px;
  }
  .ep-filters button{
    min-height:46px;
    padding:10px 9px;
    font-size:11px;
    letter-spacing:0;
  }
  .ep-filters button .fine-icon{
    width:14px;
    height:14px;
    flex:0 0 auto;
  }
}


/* ============================================================
   AJUSTE FINAL MÓVIL · ENSEÑANZAS
   Título más compacto, menos aire, miniaturas uniformes y borde fino
   ============================================================ */
@media (max-width:560px){
  /* Menos espacio entre categorías y videoteca */
  .ep-filters{
    padding-top:16px;
    padding-bottom:8px;
    gap:9px 8px;
  }
  .ep-more{
    padding-top:10px;
  }
  .ep-section-head{
    margin-bottom:14px;
  }
  .ep-section-head>span{
    font-size:9.5px;
    letter-spacing:.20em;
  }
  .ep-section-head h2{
    font-size:29px;
    line-height:.96;
    letter-spacing:-.015em;
    max-width:310px;
  }

  /* Tarjetas más compactas en teléfono */
  .ep-grid{
    gap:13px;
  }
  .ep-card{
    border-radius:17px;
  }
  .ep-card__media{
    aspect-ratio:16/7.6;
    min-height:0;
  }
  .ep-card__media img{
    object-fit:cover;
    object-position:center 50%;
  }
  .ep-card__body{
    padding:13px 14px 14px;
  }
  .ep-card h3{
    margin:6px 0 5px;
    font-size:21px;
    line-height:1.02;
  }
  .ep-card p{
    font-size:11px;
    line-height:1.38;
    -webkit-line-clamp:2;
  }
  .ep-card__footer{
    margin-top:10px;
    padding-top:9px;
  }
  .ep-card__play{
    width:43px;
    height:43px;
  }
  .ep-card__play .fine-icon{
    width:17px;
    height:17px;
  }
  .ep-duration{
    right:8px;
    bottom:8px;
    font-size:8.5px;
  }

  /* En móvil el borde conserva presencia sin verse pesado */
  .ep-card,
  .ep-featured,
  .ep-modal__dialog{
    border-width:2px !important;
    border-color:rgba(184,132,65,.40) !important;
  }
}
