/*
Theme Name: EM Languages V1
Description: EM Languages video-led V1, with ACF Pro and Polylang Pro content.
Version: 1.3.3
Text Domain: emma-v1
*/

/* Layout is loaded from the original V1 stylesheets; responsive repeater rules follow. */
.plans-grid,.teacher-grid,#recursos .resource-grid,.edition-grid,.inside-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%, 260px),1fr));
}
.plans-grid[data-count="1"],.teacher-grid[data-count="1"],#recursos .resource-grid[data-count="1"],
.edition-grid[data-count="1"],.inside-grid[data-count="1"]{
  grid-template-columns:minmax(0,1fr);
}
.plans-grid[data-count="2"],.teacher-grid[data-count="2"],#recursos .resource-grid[data-count="2"],
.edition-grid[data-count="2"],.inside-grid[data-count="2"]{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.plans-grid .plan,.teacher-grid .teacher,.resource-grid .resource-card,
.edition-grid .edition,.inside-grid figure{min-width:0}
@media(max-width:760px){
  .plans-grid,.teacher-grid,.resource-grid,.edition-grid,.inside-grid,
  .plans-grid[data-count="2"],.teacher-grid[data-count="2"],#recursos .resource-grid[data-count="2"],
  .edition-grid[data-count="2"],.inside-grid[data-count="2"]{grid-template-columns:minmax(0,1fr)}
}

/* Promotional treatment is only emitted for a valid enabled sale. */
#planes .plan{position:relative;min-width:0}
#planes .plan.has-sale{padding-top:42px}
.plan-sale-ribbon{
  position:absolute;z-index:2;top:13px;right:-7px;
  display:flex;align-items:center;gap:7px;
  padding:8px 12px 8px 15px;
  background:#e4fc3c;color:#1747ed;
  font:800 10px/1.1 Inter,Arial,sans-serif;
  letter-spacing:.075em;text-transform:uppercase;
  border-radius:3px 3px 0 3px;
  box-shadow:0 7px 15px rgba(11,40,116,.16);
  transform:rotate(3deg);
}
.plan-sale-ribbon strong{font-size:13px;letter-spacing:0}
.plan-sale-ribbon:after{
  content:"";position:absolute;right:0;bottom:-7px;
  width:0;height:0;border-top:7px solid #b2cb1a;border-right:7px solid transparent;
}
#planes .price.price-on-sale{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;line-height:1.05}
#planes .price.price-on-sale del{font-size:24px;letter-spacing:-1px;font-weight:600;opacity:.55;text-decoration-thickness:2px}
#planes .price.price-on-sale .sale-price{font-size:inherit;letter-spacing:inherit;font-weight:inherit;margin:0;line-height:1}
#planes .price.price-on-sale>span:last-child{align-self:baseline}
@media(max-width:760px){
  #planes .plan-sale-ribbon{top:11px;right:-5px}
  #planes .price.price-on-sale{font-size:clamp(49px,13vw,68px)}
}

/* ACF resource cards may be added or removed without a special-case grid span. */
#recursos .resource-grid .planner-card{grid-column:auto}
.resource-art-lockup{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:20px;color:#1747ed}
.resource-art-lockup>span:first-child{font-size:10px;font-weight:800;letter-spacing:.12em}
.resource-art-lockup strong{font-size:clamp(24px,2.8vw,39px);line-height:1.05;letter-spacing:-.05em}
.resource-art-lockup small{font-size:11px}
.resource-art-badge{display:inline-flex;padding:6px 12px;border:1px solid currentColor;border-radius:100px;font-size:10px;font-weight:800}
.app-card .resource-art-lockup{transform:rotate(-5deg)}
.podcast-card .resource-art-lockup{color:white}

.story-showcase .story-image{background:transparent}
/* Vimeo previews cover the card without distortion or internal letterboxing.
   assets/js/site.js sizes each iframe to the video's actual aspect ratio, with
   portrait 9:16 as the fallback until Vimeo reports its original dimensions. */
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;white-space:nowrap}
.plan-sale-ribbon{pointer-events:none}

.footer-brand-block .social-links a:hover .spotify-waves,.footer-brand-block .social-links a:focus-visible .spotify-waves{stroke:var(--blue)}

.footer-brand-block .social-links a:focus-visible{background:var(--blue);border-color:var(--blue);color:#fff}

a.resource-card{transition:transform .2s,border-color .2s,box-shadow .2s}
a.resource-card:hover,a.resource-card:focus-visible{border-color:var(--blue);box-shadow:0 14px 32px #1747ed15;transform:translateY(-3px)}
a.resource-card:hover .resource-link .icon,a.resource-card:focus-visible .resource-link .icon{transform:translate(3px,-3px)}
@media(prefers-reduced-motion:reduce){a.resource-card{transition:none}a.resource-card:hover,a.resource-card:focus-visible{transform:none}}

.planner-spark .icon-starburst{width:1em;height:1em}
@media(max-width:760px){
 .footer-main .back-to-top{width:44px;height:44px;display:grid;place-items:center;padding:0;gap:0;border-radius:50%;background:var(--blue);color:#fff}
 .footer-main .back-to-top>span{display:none}
 .footer-main .back-to-top .icon{display:block;width:20px;height:20px;margin:0;transform:none}
}

.hero-v3-screen .hero-v3-poster{z-index:1;object-fit:cover;object-position:center;pointer-events:none;opacity:1;transition:opacity .2s ease}
.hero-v3-screen.is-playing .hero-v3-poster{opacity:0}
.hero-v3-screen .hero-v3-kicker,.hero-v3-screen .hero-v3-play{z-index:2}
@media(prefers-reduced-motion:reduce){.hero-v3-screen .hero-v3-poster{transition:none}}

.footer-bottom .dweb-credit{display:inline-flex;align-items:center;gap:4px;font-size:10px;color:#74829b;transition:color .2s}
.footer-bottom .dweb-credit strong{font-size:11px;font-weight:700;color:var(--ink);letter-spacing:-.015em}
.footer-bottom .dweb-credit .icon{width:15px;height:15px;color:var(--blue);transition:transform .2s}
.footer-bottom .dweb-credit:hover strong{text-decoration:underline;text-underline-offset:4px}
.footer-bottom .dweb-credit:hover .icon{transform:translate(2px,-2px)}
@media(min-width:761px) and (max-width:1100px){
 #recursos .resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #recursos .resource-grid[data-count="1"]{grid-template-columns:minmax(0,1fr)}
 #recursos .resource-grid[data-count="3"]>.resource-card:last-child{grid-column:1/-1}
}
.edition-image img{width:auto;height:auto;max-width:100%;max-height:380px;object-fit:contain}
@media(max-width:760px){.edition-image img{max-height:305px}}

.youtube-views{display:block;margin-top:5px;font-size:10px;color:#71809a;line-height:1.5}


/* 2026-10-15 — testimonial portraits.
   Portrait stills should remain uncropped while their background fills the
   wider card. The blurred layer replaces flat side pillars without zooming
   in on students' faces. The actual Vimeo preview covers the full frame. */
#historias .story-showcase .story-image { background:#dce8ff; isolation:isolate; }
#historias .story-showcase .story-image > img.story-poster-fill {
  position:absolute;inset:-12%;width:124%;height:124%;
  object-fit:cover;object-position:center;
  filter:blur(20px) saturate(.82);opacity:.73;
  transform:none;z-index:0;pointer-events:none;
}
#historias .story-showcase .story-image > img.story-poster-main {
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:contain;object-position:center;
  transform:none;z-index:1;pointer-events:none;
}
#historias .story-showcase .story-image:hover > img.story-poster-main,
#historias .story-showcase .story-image:hover > img.story-poster-fill { transform:none; }
#historias .story-showcase .story-preview { position:absolute;inset:0;overflow:hidden;z-index:2; }
/* The V1 base stylesheet had display:none!important. Restore the video
   preview; JS sizes and centres it to cover its container responsively. */
#historias .story-showcase .story-preview iframe {
  display:block!important;
  position:absolute;
  top:50%;left:50%;right:auto;bottom:auto;
  transform:translate(-50%,-50%);
  border:0;pointer-events:none;
  opacity:0;
  transition:opacity .25s ease;
}
#historias .story-showcase .story-preview iframe.is-playing { opacity:1; }
#historias .story-showcase .story-image:has(.story-preview iframe.is-playing) > img.story-poster-fill,
#historias .story-showcase .story-image:has(.story-preview iframe.is-playing) > img.story-poster-main { opacity:0; }
#historias .story-showcase .story-image .watch {position:absolute;z-index:4;}
@media(prefers-reduced-motion:reduce){
  #historias .story-showcase .story-preview iframe {display:none!important;}
}

.footer-bottom .dweb-credit-logo{gap:0;text-decoration:none}
.footer-bottom .dweb-credit-logo img{display:block;width:104px;height:auto}
.footer-bottom .dweb-credit-logo:hover img{text-decoration:none}

.footer-bottom .dweb-credit-logo{display:inline-flex;align-items:center;gap:8px}
.footer-bottom .dweb-credit-logo img{display:block;width:96px;height:auto}
