/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #F8F3E7;
  color: #2F3437;
  font-size: 16px;
  line-height: 1.6;
}

/* Logo */
.square-logo {
  width: 74px;
  height: 64px;
  margin: 5px;
}

/* Lists */
ul {
  margin: 0px 50px 0px 50px;
  font-size: 0.8rem;
}
ul li:last-child {
  margin-bottom: 20px;
}
.section-art-txt li {
  font-size: 1rem;
  color: #2F3437;
}

/* ═══════════════════════════════════════
   CONTENT SECTIONS
═══════════════════════════════════════ */
.section-art-txt {
  margin: 20px auto;
  padding: 20px 18px 20px 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 800px;
}
.section-art-txt > p {
  font-size: 1rem;
  color: #2F3437;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════
   MAIN CONTENT & LESSON LAYOUT
═══════════════════════════════════════ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.lesson-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #1D3557 0%, #2F3437 100%);
  color: #F8F3E7;
  margin-bottom: 30px;
  border-radius: 12px;
}

.section-art-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.lesson-container h3 {
  font-size: 1.4rem;
  color: #F5B041;
  margin-bottom: 16px;
  border-bottom: 3px solid #F5B041;
  padding-bottom: 8px;
}

/* ═══════════════════════════════════════
   OUTCOME & PRINCIPLE LISTS
═══════════════════════════════════════ */
.outcomes-list,
.key-principles {
  margin: 20px 0;
}
.section-art-txt ul {
  list-style: none;
}
.outcomes-list li,
.key-principles li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.outcomes-list li::before,
.key-principles li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #F5B041;
  font-weight: bold;
  font-size: 1.2rem;
}

/* ═══════════════════════════════════════
   HIGHLIGHT SECTION
═══════════════════════════════════════ */
.highlight-section {
  background: linear-gradient(135deg, #FDEBD0 0%, #ffffff 100%);
  border-left: 5px solid #E63946;
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.site-header {
  background-color: #1D3557;
  color: #F8F3E7;
  padding: 16px 24px;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════ */
.breadcrumb {
  background-color: #e8e2d6;
  padding: 10px 24px;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid #d5cfc5;
}

.breadcrumb a {
  color: #1D3557;
  font-weight: 600;
}

.breadcrumb a:hover { text-decoration: underline; }

.bc-sep {
  margin: 0 6px;
  color: #aaa;
}

.bc-current { color: #2F3437; font-weight: 600; }


/* FOOTER NAV */
.main-footer-nav {
  background-color: #1D3557;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.main-footer-nav-btn {
  background-color: #F5B041;
  color: #2F3437;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.main-footer-nav-btn:hover {
  background-color: #F8C471;
}

/* ═══════════════════════════════════════
   SITE FOOTER
═══════════════════════════════════════ */
.site-footer {
  background-color: #2F3437;
  color: #F8F3E7;
  padding: 40px 24px 24px 24px;
}

.footer-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #F1C40F;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col {
  text-align: left;
  color: #F1C40F;
  margin: 0 50px;
}

.footer-col a {
  color: #F1C40F;
  text-decoration: underline;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 0.50;
}

.footer-col h3 {
  font-size: 1.05rem;
  color: #F1C40F;
  margin-bottom: 10px;
}

.footer-col p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-credit {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .section-art-txt {
    padding: 16px 14px 16px 16px;
  }
  .section-art-title {
    font-size: 1.5rem;
  }
  .lesson-header {
    padding: 30px 15px;
  }
}

/* ── Back to Top Button ── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  padding: 10px 18px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Scroll Margin for Quick Nav Anchor Targets ── */
.section-art-txt[id],
.ppe-category[id],
.subsection-block[id],
.hazard-nav-card[id],
div[id].section-art-txt,
article[id] {
  scroll-margin-top: 80px;
}

/* ═══════════════════════════════════════
   SECTION MAP GRID (lesson cards)
═══════════════════════════════════════ */
.section-map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.section-map-card {
  display: flex; flex-direction: column; background: #f9f7f2;
  border: 1px solid #e0dbd2; border-top: 4px solid #1D3557; border-radius: 8px;
  padding: 20px 18px; text-decoration: none; color: inherit;
  transition: box-shadow 0.2s, transform 0.15s, border-top-color 0.2s;
}
.section-map-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-3px); border-top-color: #E63946; }
.smc-number { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: #E63946; text-transform: uppercase; margin-bottom: 6px; }
.smc-icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.section-map-card h4 { font-size: 1rem; font-weight: 700; color: #1D3557; margin-bottom: 8px; line-height: 1.3; }
.section-map-card p { font-size: 0.88rem; color: #555; line-height: 1.55; flex: 1; margin-bottom: 14px; }
.smc-link { font-size: 0.82rem; font-weight: 700; color: #1D3557; margin-top: auto; }
.section-map-card:hover .smc-link { color: #E63946; }
@media (max-width: 768px) { .section-map-grid { grid-template-columns: 1fr; } }
