/* Custom styles for PREVAJEUNE */

/* Background for all pages */
body {
  background: linear-gradient(135deg, #F7EBDD 0%, #FAEFEC 100%) !important;
  min-height: 100vh;
}

/* Harmonious modern styling for images, videos, and iframes */
img,
video,
iframe {
  display: block;
  margin: 0 auto !important;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(168, 144, 122, 0.15);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

img:hover,
video:hover,
iframe:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(168, 144, 122, 0.25);
}

/* Force centering for all possible image containers */
.cell-output-display,
figure,
.quarto-figure,
p:has(img) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100%;
  gap: 20px; /* Consistent spacing between stacked images */
}

/* Handle direct paragraphs containing only images (if :has isn't supported or standard output) */
p>img {
  margin: 0 auto;
}

/* Modernize all buttons */
.btn {
  border-radius: 12px !important;
  padding: 12px 28px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 10px rgba(168, 144, 122, 0.2);
  border: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, #A8907A 0%, #8C7A6B 100%) !important;
  color: white !important;
}

.btn-secondary {
  background: #EBE0D3 !important;
  color: #5A4E46 !important;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(168, 144, 122, 0.35);
}

/* Sidebar Styling with Glassmorphism */
/* Sidebar container background to match or blend */
.sidebar {
  background: rgba(247, 235, 221, 0.6) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}

/* Sidebar Sections (Modules) - Add spacing between them */
.sidebar-item-section {
  margin-bottom: 1.5rem !important;
  /* Space between modules */
}

/* Reset spacing for sub-items to keep them tight */
.sidebar-item-section .sidebar-item-section {
  margin-bottom: 0 !important;
}

/* Reduce module name font size and improve typography */
.sidebar-title,
.sidebar-section-title {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333 !important;
  /* Ensure readability */
}

/* Add small margin to sub-modules for better hierarchy */
.sidebar-item-container .sidebar-item {
  padding-left: 0.8rem !important;
}

/* Style for sidebar text matches */
.sidebar nav[role="navigation"] .sidebar-item a {
  font-size: 0.8rem !important;
  padding-left: 0.5rem;
  color: #555 !important;
}

/* Wizard Styles */
.step {
  display: none;
  /* Hidden by default */
  text-align: center;
  /* Center text and inline elements */
}

.step.active {
  display: block;
  /* Visible when active */
  animation: fadeIn 0.5s;
}

/* Center images, videos, and iframes */
.step img,
.step video,
.step iframe {
  display: block;
  margin: 0 auto;
  max-width: 70%;
}

/* Button container to center buttons nicely */
.button-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  margin-bottom: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Hide Quarto page titles safely without breaking the site structure */
#title-block-header, h1.title {
  display: none !important;
}

/* ─── Module Intro Page ─────────────────────────────────────────────────────── */
.module-intro-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.6s ease;
}

.module-intro-badge {
  display: inline-block;
  background: linear-gradient(135deg, #A8907A 0%, #8C7A6B 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 20px;
  border-radius: 30px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(168, 144, 122, 0.35);
}

.module-intro-week {
  font-size: 14px;
  font-weight: 600;
  color: #A8907A;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.module-intro-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #5A4E46;
  margin-bottom: 24px;
  line-height: 1.2;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.module-intro-description {
  max-width: 500px;
  font-size: 1rem;
  color: #7A6B62;
  line-height: 1.7;
  margin-bottom: 36px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}