/* ==================== Root Variables ==================== */
:root {
  --sidebar-width: 260px;
  --bg: #a37bc4;
  --accent: #54c4e9;
  --container-padding: 1rem;
}

/* ==================== Global ==================== */
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  line-height: 1.6;
  font-size: 1.1rem; /* mobile-first */
  background-color: #f8f9fa;
}

*, *::before, *::after { box-sizing: border-box; }

img {
  max-width: 100%;
  display: block;
  margin: 0;
  scroll-margin-top: 72px;
}

/* ==================== Header ==================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--container-padding);
  background: #89ceff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 30;
}

.brand { font-weight: 600; }

.menu-btn {
  background: none;
  border: 0;
  font-size: 40px;
  padding: 8px;
  cursor: pointer;
  color: #111;
}

/* ==================== Sidebar ==================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-width);
  background: var(--bg);
  box-shadow: 2px 0 8px rgba(0,0,0,0.12);
  transform: translateX(-110%);
  transition: transform 0.25s ease;
  z-index: 40;
  padding: 72px 16px 16px;
}

.sidebar.open { transform: translateX(0); }

.sidebar nav a {
  display: block;
  padding: 10px 8px;
  color: #111;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sidebar nav a:hover,
.sidebar nav a:focus {
  background: #f0f8ff;
  transform: translateX(2px);
  outline: none;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 20px;
  color: #111;
  padding: 8px;
  cursor: pointer;
}

/* ==================== Backdrop ==================== */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 35;
}

.backdrop.show { opacity: 1; pointer-events: auto; }

/* ==================== Main Content ==================== */
main {
  max-width: 1010px;
  margin: 0 auto;
  padding: 80px var(--container-padding) 24px;
}

/* ==================== Sections ==================== */
section {
  display: flex;
  flex-direction: column;  /* stack by default */
  align-items: stretch;
  gap: 1.5rem;
  width: 100%;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin: 0.5rem 0;
}
.section-title {
  scroll-margin: 5rem;
}
section > figure,
section > div {
  flex: 1 1 auto;
  width: 100%;  /* full width on mobile */
}

.section-image,
.section-double-image > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
}

.section-double-image {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
  padding: 0;
}

figure {
  border: 1px solid #ccc;
  text-align: center;
  margin: 0;
  flex: 1 1 auto;
}

figcaption {
  font-size: 0.9em;
  line-height: 1.4;
  color: #555;
  text-align: center;
  margin: 5px 0;
}
.credit {
  display: block; 
  font-size: 1em;
  font-style: italic;
  color: #666;
}
.owl-badge {
  max-width: 200px;
}

/* ==================== Typography ==================== */
h1 { font-size: 1.8rem; line-height: 2.1rem; margin:0 0 1rem 0; font-weight:600; letter-spacing:0.5px; }
h2 { font-size: 1.4rem; line-height: 1.9rem; margin:0 0 0.75rem 0; font-weight:600; letter-spacing:0.5px; }
p, li { font-size: 1.05rem; line-height:1.8; margin-bottom:1rem; }
ul { margin:0; }
a { text-decoration: underline; text-underline-offset: 2px; color: #2b6cb0; word-break: break-word; }

/* ==================== Video List ==================== */
.video-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
}

.video-list li {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.video-list li a {
  display: block;
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  color: #2b6cb0;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  max-width: 90%;
  margin: 0 auto 1rem auto;
  cursor: pointer;
}

.video-list li a:hover,
.video-list li a:focus {
  background-color: #e7f0ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  outline: none;
}
/* ==================== Lists ==================== */
.video-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
}

.video-list li {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  background-color: #f0f8ff;
  padding: .75rem 1rem;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Base card styling (mobile-first) */
.resources-list li {
  list-style: none;       /* remove bullets */
  margin-bottom: 1rem;
}
.directions {
  list-style:none;
  margin: 5px auto;
  text-align: left;
}
/* ==================== Unified Clickable Cards ==================== */

/* Base card styling for video links, resources, and downloads (mobile-first) */
.video-list li a,
.resources-list li a {
  display: block;
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  color: #2b6cb0;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-align: center;       /* center text on mobile */
  max-width: 90%;           /* mobile-friendly width */
  margin: 0 auto 1rem auto; /* center horizontally on mobile */
  cursor: pointer;
}

/* Hover and focus effects */
.video-list li a:hover,
.video-list li a:focus,
.resources-list li a:hover,
.resources-list li a:focus {
  background-color: #e7f0ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  outline: none;
}

/* ==================== Resource Box ==================== */
.resource-box {
  text-align: center;
  align-self: center;
  max-width: 90%;
  margin: 0 auto 1rem auto;
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* ==================== Buttons ==================== */
.download, .download2, .download3 {
  font-size: 1rem;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 12px;
  margin: 0 0 1rem 0;
  align-self: stretch;
  word-break: break-word;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.download:hover, .download2:hover, .download3:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.download:focus, .download2:focus, .download3:focus {
  outline: 3px solid #54c4e9;
  outline-offset: 2px;
}

.download { background-color: #f9a8d4; color: #111; }
.download2 { background-color: #b8f2ff; color: #111; }
.download3 { background-color: #e7ceff; color: #111; }

/* ==================== Dividers ==================== */
.divider { height: 1px; background-color: #eee; margin: 3rem 0; }
.mini-divider { height: 1px; background-color: #eee; margin: 1rem 0; }

/* ==================== Footer ==================== */
.footer {
  text-align: center;
  padding: 1rem;
  background: #f9fafb;
  border-top: 1px solid #eee;
  margin-top: 2rem;
  color: #555;
}
.footer p { margin: 0; font-size: 0.8rem; }

/* ==================== Desktop Layout ==================== */
@media (min-width: 769px) {
  /* Sidebar spacing for main content */
  main {
    margin-left: auto;
    margin-right: auto;
  }

  section {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  section > figure,
  section > div {
    flex: 1 1 50%;
    width: 50%;
  }

  .section-double-image {
    flex-direction: row;
    gap: 1rem;
  }

  .section-double-image > img {
    flex: 1;
    width: 100%;
    height: auto;
  }

  /* Adjust cards on desktop */
  .video-list, .directions { text-align: left; }
  .video-list li, .directions li { justify-content: flex-start; margin-bottom: 1rem; }
  .video-list li a,
  .resources-list li a {
    text-align: left;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }

  .resource-box {
    text-align: left;
    max-width: 100%;
    align-self: stretch;
  }

  body { font-size: 1.5rem; line-height: 2.25rem; }
  h1 { font-size: 2.8rem; line-height: 3.2rem; }
  h2 { font-size: 2rem; line-height: 2.4rem; }
  p, li { font-size: 1.5rem; line-height: 2.25rem; }
}
