/* --- RESET & GLOBAL --- */
html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: rgba(190, 192, 194, 0.2); 
  color: #333;
}

/* --- SEGMENTED SIDE NAVIGATION --- */
.side-nav {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.nav-segment {
  width: 10px;
  height: 45px;
  background-color: #1D428A; 
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.4;
}

.nav-segment.active {
  background-color: #C8102E; 
  height: 65px; 
  opacity: 1;
  box-shadow: 0 0 15px rgba(200, 16, 46, 0.4);
}

/* --- SCROLL SECTIONS --- */
.scroll-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  width: 100%;
  gap: 1.5rem; 
  min-height: 100vh;
}

/* --- TEXT WIDTH FIXES --- */
.scroll-section h1, .scroll-section h2 {
  color: #1D428A;
  margin: 0;
  max-width: 850px; /* Prevents titles from getting too long */
}

.scroll-section p {
  /* This is the key change for readability */
  max-width: 700px; 
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5; /* Slightly more breathing room between lines */
  font-size: 1.15rem;
}

/* --- BUTTONS --- */
.btn-primary {
  background-color: #1D428A !important;
  border-color: #1D428A !important;
  color: white !important;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #C8102E !important;
  border-color: #C8102E !important;
}

/* --- PLOTLY & IMAGES --- */
.plotly-container {
  width: 100%;
  max-width: 1100px; /* Plots stay wide, only text narrows */
  flex: 1 1 75vh; 
  max-height: 75vh;
  min-height: 50px; 
  margin: 0 auto;
  position: relative;
  background: transparent !important; 
  overflow: hidden;
}

.plotly-container iframe {
  height: 100% !important;
  width: 100% !important;
  border: none;
  background: transparent !important;
}

.scroll-section img {
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* --- SCROLL CUE --- */
.scroll-cue {
  font-size: 2.5rem;
  color: #C8102E;
  margin-top: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}

@media (min-width: 768px) {
  html { scroll-snap-type: y mandatory; }
  .scroll-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

@media (max-width: 767px) {
  .side-nav { display: none; }
  .scroll-section { padding: 3rem 1rem; height: auto; }
  .scroll-section p { 
    text-align: left; 
    max-width: 100%; /* Let it use the full mobile width */
  }
}

/* --- SMART TOP BAR --- */
.smart-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #1D428A; /* Naval Blue */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  box-sizing: border-box;
  z-index: 2000;
  transition: transform 0.3s ease-in-out;
  transform: translateY(-100%); /* Hidden by default */
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.smart-nav.visible {
  transform: translateY(0); /* Shown when scrolling up */
}

.nav-brand {
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #BEC0C2; /* Court Grey */
}

/* Ensure content doesn't get hidden under the bar when it appears */
.scroll-section {
  position: relative;
}


/* --- SUB-PAGE SPECIFIC STYLES --- */

/* This container handles the background and top-spacing for sub-pages */
.standard-page-body {
  background-color: rgba(190, 192, 194, 0.1); 
  min-height: 100vh;
  padding-top: 80px; /* Space for the hotbar */
  padding-bottom: 5rem;
}

/* --- UNIVERSAL SUB-PAGE STYLING --- */
.standard-page-body {
  background-color: rgba(190, 192, 194, 0.1); 
  min-height: 100vh;
  padding-top: 80px; 
  padding-bottom: 80px;
}

.standard-content {
  max-width: 800px; /* The Squish factor */
  margin: 0 auto;
  padding: 40px 60px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  text-align: left;
}

.standard-content h1 { text-align: center; color: #1D428A; }
.standard-content h2 { color: #1D428A; border-bottom: 2px solid #C8102E; padding-bottom: 5px; margin-top: 2rem; }
.standard-content h3 { color: #333; margin-top: 1.5rem; }

.standard-content p {
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

/* List styling inside the center column */
.standard-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.standard-content li {
  margin-bottom: 0.5rem;
}