/* Off Centre Dance Co - responsive retrofit.
   The artboards are authored at a fixed 1440 desktop width with inline styles, so
   most rules here need !important to win against those. Native Elementor widgets
   carry no inline style, so they are targeted by semantic tag instead. */

/* ---------- header: desktop unchanged, compact below 1100 ---------- */
.ocdc-burger { display: none; }

@media (max-width: 1100px) {
  .ocdc-hdr-top { display: none !important; }
  .ocdc-hdr-main { padding: 12px 20px !important; }

  .ocdc-burger {
    display: flex !important; flex-direction: column; justify-content: center;
    gap: 5px; width: 44px; height: 44px; padding: 10px;
    background: none; border: 0; cursor: pointer; z-index: 70;
  }
  .ocdc-burger span { display: block; height: 2px; width: 100%; background: #ffffff; transition: transform .2s ease, opacity .2s ease; }
  .ocdc-page.is-light .ocdc-burger span { background: #1a1917; }
  .ocdc-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .ocdc-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .ocdc-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .ocdc-burger:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

  .ocdc-nav {
    position: fixed !important; top: 0; right: 0; bottom: 0;
    width: min(88vw, 380px);
    flex-direction: column !important; align-items: stretch !important;
    justify-content: flex-start !important; gap: 0 !important;
    background: #0b0b0a; color: #ffffff;
    padding: 84px 24px 40px !important; overflow-y: auto; overscroll-behavior: contain;
    display: none !important;
    z-index: 65; white-space: normal !important;
    font-size: 17px !important;
  }
  .ocdc-page.is-light .ocdc-nav { background: #ffffff; color: #1a1917; }
  .ocdc-nav.is-open { display: flex !important; }
  body.ocdc-nav-open { overflow: hidden; }

  .ocdc-nav > a, .ocdc-nav .ocdc-has-menu > a {
    display: block !important; padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.13); color: inherit !important;
  }
  .ocdc-page.is-light .ocdc-nav > a,
  .ocdc-page.is-light .ocdc-nav .ocdc-has-menu > a { border-bottom-color: rgba(26,25,23,.14); }

  /* mega menu becomes an inline disclosure, never a hover overlay */
  .ocdc-nav .ocdc-has-menu { position: static !important; display: block !important; }
  .ocdc-nav .ocdc-menu {
    position: static !important; display: none !important;
    width: auto !important; min-width: 0 !important;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    padding: 4px 0 14px !important; background: transparent !important;
    box-shadow: none !important; border: 0 !important;
  }
  .ocdc-nav .ocdc-has-menu.is-open .ocdc-menu { display: block !important; }
  .ocdc-nav .ocdc-menu [style*="display:grid"],
  .ocdc-nav .ocdc-menu [style*="display:flex"] {
    display: block !important; grid-template-columns: 1fr !important; padding: 0 !important;
  }
  .ocdc-nav .ocdc-menu a { display: block !important; padding: 11px 0 !important; }

  .ocdc-nav-cta {
    margin-top: 18px; text-align: center;
    padding: 16px 20px !important; font-size: 13px !important;
  }
}

/* ---------- layout: single column and real gutters on phones ---------- */
@media (max-width: 760px) {
  /* html-widget sections */
  .ocdc-page > div { padding-left: 20px !important; padding-right: 20px !important; }
  .ocdc-page > div > div { padding-left: 0 !important; padding-right: 0 !important; }
  .ocdc-page [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .ocdc-page [style*="display:flex"] { flex-wrap: wrap !important; }
  .ocdc-page [style*="max-width"] { max-width: 100% !important; }
  .ocdc-page [style*="position:absolute"][style*="left:72px"] { left: 20px !important; right: 20px !important; }

  /* native elementor sections */
  .elementor > .elementor-element { padding-left: 20px !important; padding-right: 20px !important; }
  .elementor .e-con, .elementor .e-flexbox { min-width: 0 !important; }
  /* native rows must wrap; they carry no inline style to match on */
  .elementor .e-flexbox, .elementor .e-con { flex-wrap: wrap !important; }
  .elementor .e-flexbox > *, .elementor .e-con > * { max-width: 100% !important; }
  .elementor [style*="grid-template-columns"],
  .elementor .e-flexbox, .elementor .e-con, .elementor .e-grid { grid-template-columns: 1fr !important; }

  /* photo tiles keep a sane height rather than their desktop one */
  .ocdc-page .im { height: auto !important; min-height: 240px !important; }
  .ocdc-hero-clip { min-height: 0 !important; }
}

/* ---------- pricing cards never stay in narrow columns ---------- */
@media (max-width: 860px) {
  .ocdc-page [style*="grid-template-columns"][style*="fr"] { grid-template-columns: 1fr !important; }
  .ocdc-page article { width: auto !important; }
}

/* ---------- typography ---------- */
@media (max-width: 900px) {
  /* inline-styled (html widget) headings */
  [style*="font-size:78px"], [style*="font-size:72px"] { font-size: 42px !important; }
  [style*="font-size:68px"], [style*="font-size:64px"],
  [style*="font-size:60px"], [style*="font-size:58px"] { font-size: 38px !important; }
  [style*="font-size:54px"], [style*="font-size:50px"] { font-size: 34px !important; }
  [style*="font-size:46px"], [style*="font-size:44px"],
  [style*="font-size:42px"] { font-size: 30px !important; }
  [style*="font-size:36px"], [style*="font-size:34px"] { font-size: 27px !important; }
  [style*="font-size:30px"], [style*="font-size:28px"],
  [style*="font-size:26px"] { font-size: 22px !important; }
  [style*="font-size:21px"], [style*="font-size:20px"],
  [style*="font-size:19px"] { font-size: 17px !important; }

  /* native elementor widgets carry no inline style */
  .elementor h1 { font-size: 42px !important; line-height: 1.1 !important; }
  .elementor h2 { font-size: 30px !important; line-height: 1.15 !important; }
  .elementor h3 { font-size: 22px !important; }
  .elementor p  { font-size: 16px !important; }

  /* desktop line breaks wrap badly on a phone */
  .ocdc-page h1 br, .ocdc-page h2 br, .elementor h1 br, .elementor h2 br { display: none; }
}

/* ---------- motion and touch ---------- */
@media (hover: none) {
  .ocdc-menu { transition: none !important; }
  .ocdc-navlink:hover { transform: none !important; }
}
.ocdc-burger:active, .btn:active, .ocdc-nav a:active { opacity: .72; }

/* ---------- skip link ---------- */
.ocdc-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #ffffff; color: #0b0b0a; padding: 12px 18px;
  font-size: 14px; font-weight: 700;
}
.ocdc-skip:focus { left: 8px; top: 8px; }
