.elementor-12694 .elementor-element.elementor-element-521ddb5{--display:flex;}body.elementor-page-12694:not(.elementor-motion-effects-element-type-background), body.elementor-page-12694 > .elementor-motion-effects-container > .elementor-motion-effects-layer{background-image:url("https://pdotuitionservices.com/wp-content/uploads/2025/08/ChatGPT-Image-Aug-14-2025-11_00_39-AM-1.png");}:root{--page-title-display:none;}/* Start custom CSS for html, class: .elementor-element-bda9a63 *//* ==========================================================================
   ONTARIO PHYSICS ONLINE TUITION — PREMIUM STYLESHEET
   Concept: "The Control Panel" — graphite/PCB surface, phosphor-green
   CRT accent, circuit-trace structure. Deliberately distinct from the
   Mathematics page's warm drafting-table look: Physics gets a dark,
   instrument-panel identity instead.

   SCOPING NOTE
   Every rule is anchored to this page's own classes via
   [class*="ontario-physics-"] (section wrappers) or [class*="physics-"]
   (card/grid/note components). No bare tag or utility-class .elementor-12694 .elementor-element.elementor-element-bda9a63s
   (<a>, <section>, .container, .btn) are left unscoped, and alternating
   section backgrounds are assigned by explicit class name rather than
   :nth-of-type, so nothing here can bleed into a header, footer, or any
   other page. No HTML changes required.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Literata:ital,opsz,wght@0,18..144,400;0,18..144,500;1,18..144,500&family=IBM+Plex+Mono:wght@500;600&display=swap');

/* ---------- Tokens ---------- */
:root{
  --op-bg:        #12171C;
  --op-bg-alt:    #171D23;
  --op-panel:     #1E262C;
  --op-panel-hi:  #232C33;
  --op-ink:       #E7ECEE;
  --op-ink-soft:  #A9B4BA;
  --op-phosphor:  #6FE7B7;
  --op-phosphor-dim: rgba(111,231,183,0.12);
  --op-amber:     #F2A65A;
  --op-rule:      #2A333A;
  --op-rule-soft: rgba(111,231,183,0.09);

  --op-font-display: 'Space Grotesk', 'Archivo', sans-serif;
  --op-font-body:    'Literata', Georgia, serif;
  --op-font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --op-measure: 66ch;
  --op-radius: 4px;
}

/* ---------- Scoped reset & base ---------- */
[class*="ontario-physics-"],
[class*="ontario-physics-"] *{
  box-sizing: border-box;
}

[class*="ontario-physics-"]{
  background: var(--op-bg);
  color: var(--op-ink);
  font-family: var(--op-font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* perforated-board texture, applied per section (never to <body>) */
section[class*="ontario-physics-"]{
  background-image: radial-gradient(circle, var(--op-rule-soft) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: 12px 12px;
}

[class*="ontario-physics-"] h1,
[class*="ontario-physics-"] h2,
[class*="ontario-physics-"] h3,
[class*="ontario-physics-"] h4{
  font-family: var(--op-font-display);
  color: var(--op-ink);
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}

[class*="ontario-physics-"] h1{ font-size: clamp(2.3rem, 4vw, 3.2rem); font-weight: 700; }
[class*="ontario-physics-"] h2{ font-size: clamp(1.6rem, 2.5vw, 2.15rem); }
[class*="ontario-physics-"] h3{ font-size: 1.18rem; font-weight: 600; }
[class*="ontario-physics-"] h4{ font-size: 1.02rem; font-weight: 600; }

[class*="ontario-physics-"] p{ margin: 0 0 1em; max-width: var(--op-measure); color: var(--op-ink-soft); }

[class*="ontario-physics-"] ul{ margin: 0 0 1em; padding-left: 0; list-style: none; max-width: var(--op-measure); }

/* links inside this page's copy only */
[class*="ontario-physics-"] p a,
[class*="ontario-physics-"] li a{
  color: var(--op-phosphor);
  text-decoration-color: rgba(111,231,183,0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
[class*="ontario-physics-"] p a:hover,
[class*="ontario-physics-"] li a:hover{
  color: var(--op-amber);
  text-decoration-color: var(--op-amber);
}

section[class*="ontario-physics-"] > .container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

section[class*="ontario-physics-"]{
  padding: 88px 0;
  border-bottom: 1px solid var(--op-rule);
  position: relative;
}

section[class*="ontario-physics-"] .section-intro{
  max-width: 58ch;
  font-size: 1.05rem;
  margin-bottom: 3rem;
  color: var(--op-ink-soft);
}

/* explicit alternating panel tone — assigned by section name, never by
   sibling position */
.ontario-physics-curriculum,
.ontario-physics-learning-areas,
.ontario-physics-benefits,
.ontario-physics-assessment,
.ontario-physics-why-pdo,
.ontario-physics-outcomes,
.ontario-physics-student-needs,
.ontario-physics-faq{
  background-color: var(--op-bg-alt);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
[class*="ontario-physics-"] .btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--op-font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: var(--op-radius);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

[class*="ontario-physics-"] .btn-primary{
  background: var(--op-phosphor);
  color: #0D1310;
  box-shadow: 0 0 0 rgba(111,231,183,0);
}
[class*="ontario-physics-"] .btn-primary:hover{
  background: #8CF0C8;
  box-shadow: 0 0 22px rgba(111,231,183,0.4);
  transform: translateY(-1px);
}
[class*="ontario-physics-"] .btn-primary:active{ transform: translateY(0); }

[class*="ontario-physics-"] .btn-secondary{
  background: transparent;
  color: var(--op-ink);
  border-color: var(--op-rule);
}
[class*="ontario-physics-"] .btn-secondary:hover{
  border-color: var(--op-amber);
  color: var(--op-amber);
}

[class*="ontario-physics-"] .btn:focus-visible{
  outline: 2px solid var(--op-phosphor);
  outline-offset: 3px;
}

/* ==========================================================================
   HERO — oscilloscope trace
   ========================================================================== */
.ontario-physics-hero{
  padding: 108px 0 100px;
  background-color: var(--op-bg);
  overflow: hidden;
}

.ontario-physics-hero > .container{
  position: relative;
  max-width: 740px;
}

.ontario-physics-hero h1{
  position: relative;
  padding-left: 22px;
  border-left: 3px solid var(--op-phosphor);
}

.ontario-physics-hero h2{
  font-family: var(--op-font-body);
  font-style: italic;
  font-size: 1.14rem;
  font-weight: 500;
  color: var(--op-phosphor);
  margin-bottom: 1.6rem;
}

.ontario-physics-hero p{ font-size: 1.04rem; }

/* the trace: a single clip-path ribbon shaped like a zigzag waveform */
.ontario-physics-hero::after{
  content: "";
  position: absolute;
  top: 8%;
  right: -70px;
  width: 480px;
  height: 260px;
  background: linear-gradient(100deg, var(--op-phosphor), var(--op-amber));
  opacity: 0.16;
  clip-path: polygon(
    0% 45%, 12.5% 10%, 25% 80%, 37.5% 10%, 50% 80%,
    62.5% 10%, 75% 80%, 87.5% 10%, 100% 45%,
    100% 55%, 87.5% 20%, 75% 90%, 62.5% 20%, 50% 90%,
    37.5% 20%, 25% 90%, 12.5% 20%, 0% 55%
  );
  filter: drop-shadow(0 0 18px rgba(111,231,183,0.25));
  pointer-events: none;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.2rem;
}

/* ==========================================================================
   SHARED CARD-GRID SYSTEM
   ========================================================================== */
[class*="physics-"][class$="-grid"]{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 2.6rem;
}

.physics-stage-grid{ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.physics-course-grid{ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

[class*="physics-"][class$="-card"]{
  position: relative;
  background: var(--op-panel);
  border: 1px solid var(--op-rule);
  border-radius: var(--op-radius);
  padding: 28px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

/* component solder-pads at two corners, revealed on hover */
[class*="physics-"][class$="-card"]::before,
[class*="physics-"][class$="-card"]::after{
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--op-phosphor);
  opacity: 0;
  transition: opacity 0.18s ease, box-shadow 0.18s ease;
}
[class*="physics-"][class$="-card"]::before{ top: 10px; left: 10px; }
[class*="physics-"][class$="-card"]::after{ bottom: 10px; right: 10px; }

[class*="physics-"][class$="-card"]:hover{
  border-color: rgba(111,231,183,0.4);
  background: var(--op-panel-hi);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
[class*="physics-"][class$="-card"]:hover::before,
[class*="physics-"][class$="-card"]:hover::after{
  opacity: 1;
  box-shadow: 0 0 8px rgba(111,231,183,0.8);
}

/* micro-hover: heading gains a phosphor underline stroke that draws in */
[class*="physics-"][class$="-card"] h3,
[class*="physics-"][class$="-card"] h4{
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}
[class*="physics-"][class$="-card"] h3::after,
[class*="physics-"][class$="-card"] h4::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--op-phosphor);
  transition: width 0.25s ease;
}
[class*="physics-"][class$="-card"]:hover h3::after,
[class*="physics-"][class$="-card"]:hover h4::after{
  width: 100%;
}

[class*="physics-"][class$="-card"] p{
  font-size: 0.96rem;
  margin-bottom: 0;
}

/* ---------- Shared callout "note" boxes ---------- */
[class*="physics-"][class$="-note"]{
  border-left: 3px solid var(--op-amber);
  background: rgba(242,166,90,0.06);
  padding: 18px 22px;
  border-radius: 0 var(--op-radius) var(--op-radius) 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
[class*="physics-"][class$="-note"]:hover{
  background: rgba(242,166,90,0.1);
  border-color: var(--op-phosphor);
}
[class*="physics-"][class$="-note"] p{
  margin: 0;
  font-size: 0.95rem;
  color: var(--op-ink-soft);
}
[class*="physics-"][class$="-note"] strong{
  font-family: var(--op-font-mono);
  font-size: 0.78rem;
  color: var(--op-amber);
  display: block;
  margin-bottom: 0.35em;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   COURSE CARDS — styled like equipment nameplates (mono headings, since
   the text itself carries real course codes: SPH3U, SPH4U, SPH4C)
   ========================================================================== */
.physics-course-card h3{
  font-family: var(--op-font-mono);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--op-phosphor);
}
.physics-course-card:hover h3{ color: var(--op-amber); }

/* ==========================================================================
   SYLLABUS BLOCKS & TOPIC GRID
   ========================================================================== */
.physics-syllabus-block{ margin-bottom: 3.4rem; }
.physics-syllabus-block:last-of-type{ margin-bottom: 2.6rem; }

.physics-syllabus-block > h3{
  font-family: var(--op-font-mono);
  font-size: 1.2rem;
  color: var(--op-phosphor);
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--op-rule);
  margin-bottom: 0.8em;
}

.physics-syllabus-block > p{ margin-bottom: 2rem; }

.physics-topic-card{ background: var(--op-bg-alt); }
.physics-topic-card h4{ color: var(--op-ink); }
.physics-topic-card:hover h4{ color: var(--op-phosphor); }
.physics-topic-card p{ font-size: 0.94rem; margin: 0; }

/* ==========================================================================
   HOW IT WORKS — circuit-trace layout
   A shared bus wire runs above the steps; each step hangs from its own
   solder-pad node, matching the page's electricity/circuits content
   rather than a generic numbered list.
   ========================================================================== */
.ontario-physics-how-it-works .section-intro{ max-width: 60ch; }

.physics-process-grid{
  display: flex;
  gap: 20px;
  margin-top: 2.6rem;
  padding-top: 84px;
  position: relative;
}

/* the shared bus wire */
.physics-process-grid::before{
  content: "";
  position: absolute;
  left: 5%; right: 5%; top: 38px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--op-phosphor) 6%, var(--op-phosphor) 94%, transparent);
  opacity: 0.55;
}

.physics-process-card{
  flex: 1 1 200px;
  min-width: 200px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 4px;
  position: relative;
  transition: transform 0.2s ease;
}
.physics-process-card::before,
.physics-process-card::after{ display: none; }

/* vertical lead connecting the node down into the card */
.physics-process-card > .process-number::after{
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 24px;
  background: var(--op-rule);
  transform: translateX(-50%);
  transition: background 0.2s ease;
}

/* the node itself: a circular solder pad carrying the step number */
.process-number{
  position: absolute;
  top: -68px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--op-panel);
  border: 2px solid var(--op-phosphor);
  color: var(--op-phosphor);
  font-family: var(--op-font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.physics-process-card h3{ font-size: 1rem; text-align: center; }
.physics-process-card p{ font-size: 0.92rem; text-align: center; margin-left: auto; margin-right: auto; }

.physics-process-card:hover{ transform: translateY(-4px); }
.physics-process-card:hover .process-number{
  border-color: var(--op-amber);
  color: var(--op-amber);
  box-shadow: 0 0 14px rgba(242,166,90,0.55);
  transform: translateX(-50%) scale(1.08);
}
.physics-process-card:hover > .process-number::after{ background: var(--op-amber); }

@media (max-width: 900px){
  .physics-process-grid{
    flex-direction: column;
    padding-top: 0;
  }
  .physics-process-grid::before{ display: none; }
  .physics-process-card{
    padding: 0 0 30px 26px;
    border-left: 2px solid var(--op-rule);
    text-align: left;
  }
  .physics-process-card:hover{ border-left-color: var(--op-amber); }
  .physics-process-card h3, .physics-process-card p{ text-align: left; margin-left: 0; }
  .process-number{
    position: static;
    transform: none;
    margin-bottom: 14px;
    margin-left: -47px;
  }
  .physics-process-card > .process-number::after{ display: none; }
  .physics-process-card:hover .process-number{ transform: scale(1.08); }
}

/* ==========================================================================
   STAGE SUPPORT — checklist styling
   ========================================================================== */
.physics-stage-card{ padding: 32px 30px; }
.physics-stage-card h3{ font-size: 1.28rem; color: var(--op-phosphor); }
.physics-stage-card:hover h3{ color: var(--op-amber); }

.physics-stage-card ul{ margin-top: 1.2em; }

.physics-stage-card li{
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.65em;
  font-size: 0.95rem;
  color: var(--op-ink-soft);
  transition: color 0.15s ease, transform 0.15s ease;
}
.physics-stage-card li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 2px;
  background: var(--op-phosphor);
  transition: background 0.15s ease, width 0.15s ease;
}
.physics-stage-card li:hover{
  color: var(--op-ink);
  transform: translateX(3px);
}
.physics-stage-card li:hover::before{
  background: var(--op-amber);
  width: 16px;
}

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.ontario-physics-final-cta{
  background-color: #0D1310;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(111,231,183,0.08), transparent 45%),
    radial-gradient(circle, var(--op-rule-soft) 1px, transparent 1px);
  background-size: auto, 26px 26px;
  border-bottom: none;
}

.ontario-physics-final-cta > .container{ max-width: 720px; }

.ontario-physics-final-cta h2{ color: var(--op-phosphor); }
.ontario-physics-final-cta p{ color: var(--op-ink-soft); }

.ontario-physics-final-cta .btn-secondary{
  color: var(--op-ink);
  border-color: var(--op-rule);
}
.ontario-physics-final-cta .btn-secondary:hover{
  border-color: var(--op-phosphor);
  color: var(--op-phosphor);
}

.final-cta-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.8rem;
}

/* ==========================================================================
   FAQ — readout-style toggle
   ========================================================================== */
.ontario-physics-faq > .container{ max-width: 820px; }

.ontario-physics-faq .faq-list{ border-top: 1px solid var(--op-rule); }
.ontario-physics-faq .faq-item{ border-bottom: 1px solid var(--op-rule); }

.ontario-physics-faq .faq-question{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--op-font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--op-ink);
  padding: 22px 4px;
  cursor: pointer;
  transition: color 0.18s ease, padding-left 0.18s ease;
}
.ontario-physics-faq .faq-question:hover{
  color: var(--op-phosphor);
  padding-left: 8px;
}
.ontario-physics-faq .faq-question:focus-visible{
  outline: 2px solid var(--op-phosphor);
  outline-offset: 4px;
}

/* square LED-style indicator instead of a round icon */
.ontario-physics-faq .faq-icon{
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1.5px solid var(--op-rule);
  border-radius: 3px;
  color: var(--op-ink-soft);
  font-family: var(--op-font-mono);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ontario-physics-faq .faq-question:hover .faq-icon{
  border-color: var(--op-phosphor);
  color: var(--op-phosphor);
}
.ontario-physics-faq .faq-item.active .faq-icon{
  background: var(--op-phosphor);
  color: #0D1310;
  border-color: var(--op-phosphor);
  box-shadow: 0 0 10px rgba(111,231,183,0.6);
  transform: rotate(180deg);
}

.ontario-physics-faq .faq-answer{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.28s ease, opacity 0.28s ease;
}
.ontario-physics-faq .faq-answer p{
  padding: 0 4px 22px;
  margin: 0;
  font-size: 0.97rem;
  max-width: 62ch;
}

/* ==========================================================================
   ACCESSIBILITY & MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  [class*="ontario-physics-"],
  [class*="ontario-physics-"] *{
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

[class*="ontario-physics-"] a:focus-visible,
[class*="ontario-physics-"] button:focus-visible{
  outline: 2px solid var(--op-phosphor);
  outline-offset: 3px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px){
  section[class*="ontario-physics-"]{ padding: 64px 0; }
  section[class*="ontario-physics-"] > .container{ padding: 0 22px; }

  .ontario-physics-hero{ padding: 76px 0 64px; }
  .ontario-physics-hero h1{ padding-left: 16px; }
  .ontario-physics-hero::after{ right: -200px; opacity: 0.1; }

  [class*="physics-"][class$="-grid"]{ grid-template-columns: 1fr; }

  .hero-actions, .final-cta-actions{ flex-direction: column; align-items: stretch; }
  [class*="ontario-physics-"] .btn{ justify-content: center; }
}

@media (max-width: 480px){
  [class*="ontario-physics-"] h1{ font-size: 2rem; }
  [class*="ontario-physics-"] h2{ font-size: 1.35rem; }
  section[class*="ontario-physics-"] .section-intro{ font-size: 0.98rem; }
}

/* ==========================================
   PHYSICS PAGE LINK SECTIONS (MERGED)
   1. .ontario-physics-subject-links-section
   2. .physics-curriculum-cross-links-section
========================================== */

/* ---------- Shared variables & section wrapper ---------- */

.ontario-physics-subject-links-section,
.physics-curriculum-cross-links-section {
  --pl-primary: #1e3a8a;
  --pl-accent: #f59e0b;
  --pl-text: #1f2937;
  --pl-muted: #6b7280;
  --pl-bg: #f8fafc;
  --pl-card-bg: #ffffff;
  --pl-border: #e5e7eb;
  --pl-radius: 14px;

  padding: 70px 0;
  background: var(--pl-bg);
}

/* Alternate background so the two sections are visually distinct */
.physics-curriculum-cross-links-section {
  background: #ffffff;
}

.ontario-physics-subject-links-section .container,
.physics-curriculum-cross-links-section .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ---------- Heading ---------- */

.ontario-physics-subject-links-section .section-heading,
.physics-curriculum-cross-links-section .section-heading {
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
}

.ontario-physics-subject-links-section .section-eyebrow,
.physics-curriculum-cross-links-section .section-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pl-primary);
  background: rgba(30, 58, 138, 0.08);
  border-radius: 999px;
}

.ontario-physics-subject-links-section .section-heading h2,
.physics-curriculum-cross-links-section .section-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.25;
  color: var(--pl-text);
}

.ontario-physics-subject-links-section .section-heading p,
.physics-curriculum-cross-links-section .section-heading p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--pl-muted);
}

/* ---------- Grids ---------- */

.ontario-physics-subject-links-grid,
.physics-curriculum-cross-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- Cards ---------- */

.ontario-physics-subject-link-card,
.physics-curriculum-cross-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--pl-card-bg);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              border-color 0.25s ease;
}

.ontario-physics-subject-link-card::before,
.physics-curriculum-cross-link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--pl-primary), var(--pl-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.ontario-physics-subject-link-card h3,
.physics-curriculum-cross-link-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--pl-primary);
}

.ontario-physics-subject-link-card p,
.physics-curriculum-cross-link-card p {
  flex-grow: 1;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--pl-muted);
}

/* "Explore ..." link: always visible, styled as a button.
   Section class is included for higher specificity so theme
   rules for `a span` can't hide or recolour it. */
.ontario-physics-subject-links-section .ontario-physics-subject-link-card span,
.physics-curriculum-cross-links-section .physics-curriculum-cross-link-card span {
  display: inline-block;
  align-self: flex-start;
  opacity: 1;
  visibility: visible;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  background: var(--pl-primary);
  border-radius: 8px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

/* ---------- Hover / focus ---------- */

.ontario-physics-subject-link-card:hover,
.ontario-physics-subject-link-card:focus-visible,
.physics-curriculum-cross-link-card:hover,
.physics-curriculum-cross-link-card:focus-visible {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(30, 58, 138, 0.14);
}

.ontario-physics-subject-link-card:hover::before,
.ontario-physics-subject-link-card:focus-visible::before,
.physics-curriculum-cross-link-card:hover::before,
.physics-curriculum-cross-link-card:focus-visible::before {
  transform: scaleX(1);
}

.ontario-physics-subject-link-card:hover span,
.ontario-physics-subject-link-card:focus-visible span,
.physics-curriculum-cross-link-card:hover span,
.physics-curriculum-cross-link-card:focus-visible span {
  color: var(--pl-text);
  background: var(--pl-accent);
  transform: translateX(4px);
}

.ontario-physics-subject-link-card:focus-visible,
.physics-curriculum-cross-link-card:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.5);
  outline-offset: 2px;
}

/* ==========================================
   SECTION-SPECIFIC RULES
========================================== */

/* --- Ontario: 13 cards, centre the lone last card on desktop --- */

.ontario-physics-subject-link-card:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

/* --- Ontario: closing note --- */

.ontario-physics-subject-links-note {
  max-width: 720px;
  margin: 34px auto 0;
  font-size: 14.5px;
  line-height: 1.6;
  text-align: center;
  color: var(--pl-muted);
}

/* --- Curriculum: featured last card (homepage link) --- */

.physics-curriculum-cross-link-card:last-child {
  grid-column: 1 / -1;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a, #2f55c5);
  border-color: transparent;
}

.physics-curriculum-cross-link-card:last-child h3 {
  color: #ffffff;
}

.physics-curriculum-cross-links-section .physics-curriculum-cross-link-card:last-child span {
  align-self: center;
  color: var(--pl-primary);
  background: #ffffff;
}

.physics-curriculum-cross-link-card:last-child p {
  flex-grow: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.85);
}

.physics-curriculum-cross-links-section .physics-curriculum-cross-link-card:last-child:hover span,
.physics-curriculum-cross-links-section .physics-curriculum-cross-link-card:last-child:focus-visible span {
  color: var(--pl-text);
  background: #fcd34d;
}

/* ==========================================
   RESPONSIVE
========================================== */

/* ---------- Tablet ---------- */

@media (max-width: 991px) {
  .ontario-physics-subject-links-section,
  .physics-curriculum-cross-links-section {
    padding: 56px 0;
  }

  .ontario-physics-subject-links-grid,
  .physics-curriculum-cross-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* 13th Ontario card is alone in a 2-col row: span it */
  .ontario-physics-subject-link-card:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .ontario-physics-subject-links-section,
  .physics-curriculum-cross-links-section {
    padding: 44px 0;
  }

  .ontario-physics-subject-links-section .section-heading,
  .physics-curriculum-cross-links-section .section-heading {
    margin-bottom: 30px;
  }

  .ontario-physics-subject-links-section .section-heading p,
  .physics-curriculum-cross-links-section .section-heading p {
    font-size: 16px;
  }

  .ontario-physics-subject-links-grid,
  .physics-curriculum-cross-links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ontario-physics-subject-link-card,
  .physics-curriculum-cross-link-card {
    padding: 22px 20px 18px;
  }

  .ontario-physics-subject-link-card:last-child:nth-child(3n + 1) {
    grid-column: auto;
  }

  .physics-curriculum-cross-link-card:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .physics-curriculum-cross-links-section .physics-curriculum-cross-link-card:last-child span {
    align-self: flex-start;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ontario-physics-subject-link-card,
  .ontario-physics-subject-link-card::before,
  .ontario-physics-subject-link-card span,
  .physics-curriculum-cross-link-card,
  .physics-curriculum-cross-link-card::before,
  .physics-curriculum-cross-link-card span {
    transition: none;
  }
}/* End custom CSS */