/* =========================================================
   My Student Site - Presentation Mode
   Optimised for large interactive displays / classroom use
   Suggested toggle: <body class="presentation-mode">
   ========================================================= */

:root {
  --pm-bg: #f6f8fb;
  --pm-surface: #ffffff;
  --pm-surface-soft: #f1f5f9;
  --pm-text: #132238;
  --pm-muted: #4a6078;
  --pm-border: #d7e0ea;
  --pm-primary: #0f62fe;
  --pm-primary-dark: #0b4ecc;
  --pm-success: #0f766e;
  --pm-warning: #b45309;
  --pm-danger: #b91c1c;
  --pm-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --pm-radius: 18px;
  --pm-radius-sm: 12px;
  --pm-content-max: 1600px;
  --pm-font: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* Activated mode */
body.presentation-mode {
  background: var(--pm-bg);
  color: var(--pm-text);
  font-family: var(--pm-font);
  font-size: 22px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* General spacing */
body.presentation-mode * {
  box-sizing: border-box;
}

body.presentation-mode img,
body.presentation-mode iframe,
body.presentation-mode video {
  max-width: 100%;
  height: auto;
  border-radius: var(--pm-radius-sm);
}

/* Make page content breathe */
body.presentation-mode main,
body.presentation-mode .container,
body.presentation-mode .container-fluid,
body.presentation-mode .content,
body.presentation-mode .page-content,
body.presentation-mode .main-content,
body.presentation-mode .post-content,
body.presentation-mode .lesson-content,
body.presentation-mode .week-content,
body.presentation-mode article,
body.presentation-mode section {
  max-width: var(--pm-content-max);
}

/* Centre the main visible content area */
body.presentation-mode .container,
body.presentation-mode .container-fluid,
body.presentation-mode .content,
body.presentation-mode .page-content,
body.presentation-mode .main-content,
body.presentation-mode article {
  margin-left: auto;
  margin-right: auto;
}

/* Top navigation - keep available but less dominant */
body.presentation-mode nav,
body.presentation-mode .navbar,
body.presentation-mode .top-nav,
body.presentation-mode header {
  font-size: 18px;
}

body.presentation-mode .navbar,
body.presentation-mode nav {
  background: #ffffff;
  box-shadow: 0 3px 16px rgba(15, 23, 42, 0.05);
}

body.presentation-mode .navbar a,
body.presentation-mode nav a,
body.presentation-mode header a {
  font-weight: 600;
}

/* Accessibility toolbar / utility controls */
body.presentation-mode .accessibility,
body.presentation-mode .accessibility-toolbar,
body.presentation-mode .accessibility-panel,
body.presentation-mode .toolbar,
body.presentation-mode .utility-bar {
  font-size: 17px;
  line-height: 1.4;
}

/* Optional: collapse utility-heavy areas by default in presentation mode */
body.presentation-mode .presentation-hide,
body.presentation-mode .screen-tools,
body.presentation-mode .admin-tools {
  display: none !important;
}

/* Strong page title styling */
body.presentation-mode h1,
body.presentation-mode .page-title,
body.presentation-mode .entry-title {
  font-size: clamp(2.4rem, 3.8vw, 4rem);
  line-height: 1.1;
  margin: 0 0 0.75em;
  padding: 0.4em 0 0.2em;
  color: var(--pm-text);
  font-weight: 800;
}

/* Section headings */
body.presentation-mode h2 {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  line-height: 1.2;
  margin-top: 1.7em;
  margin-bottom: 0.7em;
  padding: 0.8em 1em;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-left: 8px solid var(--pm-primary);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
}

body.presentation-mode h3 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.25;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
  color: var(--pm-primary-dark);
  font-weight: 700;
}

body.presentation-mode h4,
body.presentation-mode h5,
body.presentation-mode h6 {
  font-size: 1.15em;
  margin-top: 1.2em;
  margin-bottom: 0.45em;
  color: var(--pm-text);
}

/* Paragraphs and text blocks */
body.presentation-mode p,
body.presentation-mode li,
body.presentation-mode blockquote,
body.presentation-mode td,
body.presentation-mode th {
  font-size: clamp(1.15rem, 1.45vw, 1.45rem);
}

body.presentation-mode p {
  max-width: 75ch;
  margin-bottom: 1em;
}

/* Lists */
body.presentation-mode ul,
body.presentation-mode ol {
  padding-left: 1.4em;
  margin-bottom: 1.2em;
}

body.presentation-mode li {
  margin-bottom: 0.45em;
}

/* Links */
body.presentation-mode a {
  color: var(--pm-primary-dark);
  text-underline-offset: 0.12em;
  text-decoration-thickness: 2px;
}

body.presentation-mode a:hover,
body.presentation-mode a:focus {
  color: var(--pm-primary);
}

/* Tables */
body.presentation-mode table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pm-surface);
  border-radius: var(--pm-radius);
  overflow: hidden;
  box-shadow: var(--pm-shadow);
  margin: 1.5em 0;
}

body.presentation-mode th,
body.presentation-mode td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--pm-border);
  text-align: left;
  vertical-align: top;
}

body.presentation-mode th {
  background: #eaf2ff;
  font-weight: 700;
}

/* Generic card treatment for content chunks */
body.presentation-mode .card,
body.presentation-mode .panel,
body.presentation-mode .box,
body.presentation-mode .well,
body.presentation-mode .content-card,
body.presentation-mode .lesson-block,
body.presentation-mode .resource-block {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.2rem;
}

/* On this page / TOC area */
body.presentation-mode .toc,
body.presentation-mode .table-of-contents,
body.presentation-mode .on-this-page,
body.presentation-mode aside,
body.presentation-mode .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  padding: 1.25rem 1.5rem;
  margin: 1.2rem 0 2rem;
}

body.presentation-mode .toc h2,
body.presentation-mode .table-of-contents h2,
body.presentation-mode .on-this-page h2,
body.presentation-mode aside h2 {
  font-size: 1.35rem;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
}

/* Buttons and controls */
body.presentation-mode button,
body.presentation-mode .btn,
body.presentation-mode input[type="button"],
body.presentation-mode input[type="submit"] {
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

body.presentation-mode .btn-primary,
body.presentation-mode .button-primary {
  background: var(--pm-primary);
  color: #fff;
}

body.presentation-mode .btn-secondary,
body.presentation-mode .button-secondary {
  background: #e8eef7;
  color: var(--pm-text);
}

/* Form fields */
body.presentation-mode input,
body.presentation-mode select,
body.presentation-mode textarea {
  font-size: 1rem;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid var(--pm-border);
  padding: 12px 14px;
}

/* Horizontal rules / separators */
body.presentation-mode hr {
  border: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--pm-border), transparent);
  margin: 2rem 0;
}

/* Support sections near the bottom */
body.presentation-mode .files,
body.presentation-mode .downloads,
body.presentation-mode .attachments,
body.presentation-mode .homework,
body.presentation-mode .stretch,
body.presentation-mode .english-maths,
body.presentation-mode .resources {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  padding: 1.2rem 1.4rem;
  margin: 1rem 0 1.5rem;
}

/* Prev / next week navigation */
body.presentation-mode .pagination,
body.presentation-mode .pager,
body.presentation-mode .week-nav,
body.presentation-mode .next-prev,
body.presentation-mode .prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2rem 0 1rem;
}

body.presentation-mode .pagination a,
body.presentation-mode .pager a,
body.presentation-mode .week-nav a,
body.presentation-mode .next-prev a,
body.presentation-mode .prev-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid var(--pm-border);
  border-radius: 14px;
  box-shadow: var(--pm-shadow);
  text-decoration: none;
  font-weight: 700;
}

/* Sticky lesson tools area if present */
body.presentation-mode .sticky-tools,
body.presentation-mode .lesson-actions,
body.presentation-mode .floating-nav {
  position: sticky;
  top: 12px;
  z-index: 1000;
}

/* Improve text selection visibility on touchscreen */
body.presentation-mode ::selection {
  background: rgba(15, 98, 254, 0.18);
}

/* Focus states for accessibility on large screens */
body.presentation-mode a:focus-visible,
body.presentation-mode button:focus-visible,
body.presentation-mode input:focus-visible,
body.presentation-mode select:focus-visible,
body.presentation-mode textarea:focus-visible {
  outline: 4px solid rgba(15, 98, 254, 0.25);
  outline-offset: 3px;
}

/* Optional “teaching view” layout:
   hide footer clutter and non-essential extras */
body.presentation-mode .site-footer,
body.presentation-mode footer .social,
body.presentation-mode .copyright small,
body.presentation-mode .crypto,
body.presentation-mode .donation,
body.presentation-mode .ad,
body.presentation-mode .promo {
  opacity: 0.75;
}

/* Better spacing on very large screens */
@media (min-width: 1400px) {
  body.presentation-mode {
    font-size: 24px;
  }

  body.presentation-mode .container,
  body.presentation-mode .container-fluid,
  body.presentation-mode .content,
  body.presentation-mode .page-content,
  body.presentation-mode .main-content,
  body.presentation-mode article {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Touchscreen portrait / narrower layout */
@media (max-width: 1100px) {
  body.presentation-mode {
    font-size: 20px;
  }

  body.presentation-mode h1 {
    font-size: 2.3rem;
  }

  body.presentation-mode h2 {
    font-size: 1.7rem;
    padding: 0.75em 0.85em;
  }

  body.presentation-mode p,
  body.presentation-mode li {
    font-size: 1.08rem;
  }
}

/* Reduce animation if the site uses any */
@media (prefers-reduced-motion: reduce) {
  body.presentation-mode *,
  body.presentation-mode *::before,
  body.presentation-mode *::after {
    animation: none !important;
    transition: none !important;
    scroll-behaviour: auto !important;
  }
}