/* Fixes on top of the Webflow export (assets/css/*.webflow.*.css), which is no longer edited in Webflow. */

/* Home hero: the title enters with a 3D rotation (perspective on .header-ttl) that is briefly wider than
   the screen; clip it so phones never get a horizontal scroll. */
.header-ttl { overflow-x: clip; }

/* Home hero background: resized AVIF copies of the 1920px original, mobile first. Keep these media queries in
   step with the <link rel="preload" as="image"> hints in index.html and es/index.html. */
.header-ttl { background-image: url(/assets/66c856911c8471c4c9d1b870_IMG_9031-hero-800.avif); }
@media screen and (min-width: 800px) {
  .header-ttl { background-image: url(/assets/66c856911c8471c4c9d1b870_IMG_9031-hero-1600.avif); }
}

/* Home hero: the image bleeds -30px into a header that only has 10px padding on phones,
   which made every page 20px wider than the screen. */
@media screen and (max-width: 479px) {
  .header-ttl { margin-left: -10px; margin-right: -10px; }
}

/* Timetables: the table scrolls horizontally (white-space: nowrap), but without a width limit
   its flex parents grew to the table width and pushed the whole section off screen. */
@media screen and (max-width: 767px) {
  .horaris-table { max-width: calc(100vw - 60px); }
}
@media screen and (max-width: 479px) {
  .horaris-table { max-width: calc(100vw - 20px); }
}

/* Legal pages: the school e-mail address is one long word and widened the text column on small phones. */
.rich-text { overflow-wrap: anywhere; }

/* Home course list: "NARRACIÓN Y ORATORIA" does not fit 320px screens at 64px. */
@media screen and (max-width: 359px) {
  .heading-categ { font-size: 56px; }
}

/* Cookie policy (avis-legal / aviso-legal). The fixed navigation is 60px tall. */
#galetes, #cookies { scroll-margin-top: 90px; }
.cookie-table-wrap { overflow-x: auto; margin: 25px 0; }
.cookie-table { width: 100%; min-width: 520px; border-collapse: collapse; font-family: Lato, sans-serif; font-size: 14px; line-height: 1.5; }
.cookie-table th { padding: 10px; text-align: left; color: #f02635; background: #101010; font-weight: 700; }
.cookie-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid #101010; overflow-wrap: normal; }
.cookie-table td:first-child { font-weight: 700; white-space: nowrap; }
@media screen and (max-width: 767px) {
  .cookie-table-wrap { max-width: calc(100vw - 60px); }
}
@media screen and (max-width: 479px) {
  .cookie-table-wrap { max-width: calc(100vw - 20px); }
}

/* ---------------------------------------------------------------------------------------------
   Accessibility and UX audit (2026-12). Everything below sits on top of the Webflow export.
   --------------------------------------------------------------------------------------------- */

/* Skip link: first focusable element, only visible while focused. */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 10000;
  padding: 12px 18px; border-radius: 8px;
  font-family: "Libre Franklin", sans-serif; font-size: 16px; font-weight: 600; line-height: 24px;
  color: #101010; background: #fff; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main:focus { outline: 0; }

/* Keyboard focus: a dark ring inside a white ring reads on black, red and white backgrounds alike. */
:focus-visible {
  outline: 3px solid #101010;
  outline-offset: 0;
  box-shadow: 0 0 0 6px #fff;
}
.w-nav-button:focus-visible { outline: 3px solid #101010 !important; }
/* The checkbox input is invisible: show the focus on its visual box. */
label:has(> input:focus-visible) > .w-checkbox-input { outline: 3px solid #101010; box-shadow: 0 0 0 6px #fff; }
.w-checkbox-input.w--redirected-focus { box-shadow: 0 0 0 6px #fff; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* Heading tags changed for a correct outline keep the look of the tag they replace. */
.lg-h2 { margin-top: 20px; margin-bottom: 10px; font-size: 32px; font-weight: 700; line-height: 36px; }
.lg-h3, .rich-text .lg-h3 {
  color: #000; margin-top: 20px; margin-bottom: 10px;
  font-family: "Libre Franklin", sans-serif; font-size: 18px; font-weight: 600; line-height: 24px;
}
.lg-h4, .rich-text .lg-h4 {
  color: #000; margin-top: 10px; margin-bottom: 10px;
  font-family: Lato, sans-serif; font-size: 32px; font-weight: 700; line-height: 24px;
}
.rich-text .lg-h4 { font-size: 16px; }
.lg-h4b {
  color: #000; margin-top: 10px; margin-bottom: 10px;
  font-family: Lato, sans-serif; font-size: 32px; font-weight: 700; line-height: 24px;
}
.lg-lh { line-height: 24px; }
/* Home hero: one h1 holding the two animated lines (the wrapper does not generate a box). */
.lg-hero-title { display: contents; }
.lg-hero-title > .h1 { display: block; }

/* Privacy link in the form and contact details. */
.link-2 { color: #000; text-decoration: underline; text-underline-offset: 2px; }
.lg-req { font-weight: 400; }
.lg-noscript { margin: 0 0 1rem; font-family: Lato, sans-serif; font-size: 16px; line-height: 24px; color: #fff; }
.lg-noscript a { color: #fff; text-decoration: underline; }
.lg-contact-link, .lg-contact-address { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.rl-error-text a { color: inherit; text-decoration: underline; }

/* Current language is shown as well as announced. */
.lang[aria-current="true"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* Anchors land below the fixed 60px navigation. */
[id] { scroll-margin-top: 90px; }

/* The banner was 100vw wide, which includes the scrollbar and made the page scroll sideways. */
.premium-banner { width: 100%; }
/* A rotated block on formacio still overflowed by a few px around 1024px. */
body { overflow-x: clip; }

/* Contrast. */
.nav-link.w--current { color: #f02635; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.footer-legal-link, .text-footer-credits { color: #9a9a9a; }
.footer-legal-link:hover { color: #f02635; }

/* Tap targets: each control gets an invisible hit area of at least 44x44 px centred on it (a pseudo-element),
   so the layout stays as it was. Where controls are stacked closer than 44px the later one wins the overlap. */
.footer-link-three, .footer-social-link-three, .footer-legal-link, .button-2.lang, a.link, .link-block { position: relative; }
.footer-link-three::after, .footer-social-link-three::after, .footer-legal-link::after,
.button-2.lang::after, a.link::after, .link-block::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}
/* The consent checkbox row: the whole label toggles it; the pseudo-element stays behind the privacy link. */
.rl-form-checkbox { position: relative; isolation: isolate; }
.rl-form-checkbox::after { content: ""; display: block; position: absolute; z-index: -1; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }

/* Schedule table on phones: cue that it scrolls sideways (a11y.js toggles .is-scrollable / .at-end). */
.lg-scroll-hint { display: none; margin: 0 0 8px; font-family: Lato, sans-serif; font-size: 14px; line-height: 20px; font-style: italic; color: #000; }
@media (max-width: 767px) {
  .code-embed.is-scrollable { position: relative; }
  .code-embed.is-scrollable .lg-scroll-hint { display: block; }
  .code-embed.is-scrollable::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 40px; pointer-events: none;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(16, 16, 16, .35));
    transition: opacity .2s;
  }
  .code-embed.is-scrollable.at-end::after { opacity: 0; }
}

/* Reduced motion: no CSS transitions or animations (the scripted hero rotation is overridden here too). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  /* The hero lines enter with a scripted 3D rotation (Webflow IX2 inline styles): show the end state at once. */
  .lg-hero-title > .h1 { transform: none !important; opacity: 1 !important; }
}

/* Heading to paragraph spacing: the h1/h2 line-height equals the font size, so descenders (the cedilla in
   CONFIANÇA) touched the paragraph below. A small consistent gap, only where a paragraph follows directly. */
.h1 + .paragraph, .h2 + .paragraph, .h2 + .text-block { margin-top: 12px; }

/* Images carry width/height attributes (reserves space, avoids layout shift). Keep the old behaviour of a
   proportional height unless a class sets one: :where() adds no specificity, so classes still win. */
:where(img[width][height]) { height: auto; }

/* Formació banner: AVIF copy (17 KB) of the 292 KB background that the Webflow CSS declares. */
.premium-banner { background-image: url(/assets/689df2451237c9c58c546df1_IMG_2843-banner-1600.avif); }

/* Footer NAP (address, phone, e-mail), between the footer links/social icons and the legal row. */
.footer-nap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 30px; color: #fff; font-style: normal; font-size: 14px; line-height: 22px; text-align: center; overflow-wrap: anywhere; }
.footer-nap-link { color: #fff; text-decoration: none; transition: color .2s; display: inline-block; padding: 4px 2px; }
.footer-nap-link:hover { color: var(--medium-sea-green); }

/* Heading semantics without a visual change. The Webflow CSS styles bare h2/h3 elements (colour, line-height);
   these rules keep the look of elements that used to be a div/h3 with the same classes. */
h3.h2 { color: inherit; }      /* discipline names on formacio/formacion (were divs) */
h2.h3 { line-height: 24px; }   /* "Cursos per a tots els nivells" on the home (was an h3) */

/* Home: age-group line under the intro text. */
.txt-destacat + .paragraph { margin-top: 20px; }

/* Pricing cards: the "Inscriu-te a <disciplina>" buttons are longer than "Som-hi"; let them wrap inside the 60px bar. */
.button-pricing { text-align: center; padding: 0 10px; }
