/* Ehtesham Law — phone fixes for every front page (loaded LAST in front/layout, so it wins; desktop is untouched).
   From a 375 px audit (2026-11-23): announcement bar, home results links + tabs, course page, small text, tap targets,
   heading sizes, section spacing and lighter scroll animations on phones. */

/* ---------- Announcement bar: one compact line + a button ---------- */
.el-announce__short { display: none; }
@media (max-width: 640px) {
    .el-announce { font-size: 12.5px; }
    .el-announce__inner { flex-wrap: nowrap; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 14px 6px 20px; text-align: left; }   /* lines up with the header */
    .el-announce__text { min-width: 0; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    .el-announce__inner:has(.el-announce__short) .el-announce__long { display: none; }
    .el-announce__short { display: -webkit-box; font-weight: 600; }
    .el-announce a.el-announce__cta { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px;
        background: var(--el-gold-500); color: var(--el-navy-950) !important; font-size: 12.5px; font-weight: 800; text-decoration: none !important; white-space: nowrap; }
}

/* ---------- Home: results — university tabs + year links ---------- */
@media (max-width: 767.98px) {
    .el-tabs { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 28px; }
    .el-tabs.is-end { -webkit-mask-image: none; mask-image: none; }
    /* Other swipe rows (course section menu, blog categories): the same “more →” fade */
    .cl-tabs__row, .el-blogbar__cats { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .cl-tabs__row.is-end, .el-blogbar__cats.is-end { -webkit-mask-image: none; mask-image: none; }
    .el-tab { scroll-snap-align: start; min-height: 40px; padding: 11px 16px; font-size: 14px; }
}
@media (max-width: 575.98px) {
    .el-results-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
    .el-results-links .el-chip { justify-content: center; min-height: 44px; padding: 8px 10px; font-size: 13px; text-align: center; white-space: nowrap; }
    .el-results-links .el-chip:last-child { grid-column: 1 / -1; background: var(--el-navy-900, #0b2236); border-color: transparent; color: #fff !important; }
    .el-results-links .el-chip:last-child i { color: var(--el-gold-400, #f5b942); }
}

/* ---------- Course page ---------- */
@media (max-width: 575.98px) {
    /* Hero facts (starts · language · access · mode): an even 2-column grid */
    .el-page-hero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
    .el-page-hero__meta span { min-width: 0; padding: 8px 12px; justify-content: flex-start; }
    .el-page-hero__meta span:last-child:nth-child(odd) { grid-column: 1 / -1; }
    /* Course facts: compact rows (icon beside the text), the odd last one full width */
    .cl-facts { gap: 8px; }
    .cl-facts li { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
    .cl-facts li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .cl-facts__icon { flex: none; width: 34px; height: 34px; }
    .cl-facts strong { font-size: 14px; }
}
@media (max-width: 767.98px) {
    .cb-seg button, .cp-pick .cp-opt { min-height: 42px; }
}

/* ---------- Small text: never under 12px on phones (labels, tags, badges, prices) ---------- */
@media (max-width: 767.98px) {
    .el-ccard__plans span, .el-ccard__tags span, .el-ccard__was em, .cb-price em, .cp-opt__badge,
    .cl-facts small, .hp-res__rank, .cap-dow, .pq-tag, .pq-card__status, .rs-card__roll,
    .s6-status__split span, .s6-count span { font-size: 12px; }
    .cb-bar__plan, .el-tree__kind, .cap-test__tag, .pq-btn--soon em, .s6-fact span { font-size: 11.5px; }   /* small uppercase tags */
    .s6-seat__n span { font-size: 10.5px; }   /* inside the seat circles */
    .el-cat__t { font-size: 11.5px; }          /* the category stamp on photos */
    .cap-day span { font-size: 10.5px; }       /* calendar cells are ~44px wide */
}

/* ---------- Tap targets ---------- */
@media (max-width: 767.98px) {
    .el-slider__seg { height: 40px; }          /* same thin bar, bigger touch area */
    .hl__ctrl > button { flex: none; width: 40px; height: 40px; }   /* home photo slider arrows only (not the dots) */
    .hl__dots { gap: 2px; }
    .hl__dots button { position: relative; }
    .hl__dots button::after { content: ""; position: absolute; inset: -14px -6px; }   /* dots look the same, easier to tap */
}

/* ---------- Headings and spacing ---------- */
@media (max-width: 575.98px) {
    .s6-hero__title { font-size: clamp(32px, 10vw, 40px) !important; }   /* el-super60.css sets it with !important */
    .s6-nav + .s6-sec { padding-top: 96px; }   /* sticky Super 30 menu overlaps by 64px; this still clears it */
}

/* ---------- Motion on phones: quick and light (no blur), started just before a block comes into view ---------- */
@media (max-width: 767.98px) {
    html.el-motion .el-reveal:not(.is-settled) { translate: 0 12px; filter: none;
        transition: opacity .45s var(--m-ease, ease), translate .45s var(--m-ease, ease); transition-delay: calc(var(--d, 0ms) * .5); }
    .el-js .el-reveal { transform: translateY(10px); transition-duration: .45s; }
    .el-js .el-reveal.is-in { transform: none; }
}
/* Touch screens: a press feels like a press; no “stuck” hover lifts. */
@media (hover: none) {
    .el-btn:active, .el-chip:active, .el-tab:active { transform: scale(.97); }
    html.el-motion .el-reveal.is-settled:is(.el-card, .el-res, .el-program, .el-step, .el-feature):hover, .cl-facts li:hover { transform: none; }
}
