/*PRESDEX Stylesheet*/

/* Imports the elegant Cormorant SC for headings and Marcellus for body text */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@300;400;500;600;700&family=Marcellus&display=swap');

/*Makes root color scheme dark*/
:root {
  color-scheme: dark;
}

/*Forces Webpage to fit screen*/
*, *::before, *::after {
  box-sizing: border-box;
}

/*Makes on click scrolling smoooth*/
html {
  scroll-behavior: smooth;
}

/* Defines the general style - Defaulting to Marcellus for all standard text */
body {
  margin: 0;
  background: #050508;
  color: #ededd3;
  font-family: 'Marcellus', serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Gets rid of default spacing */
h1, h2, h3, h4, p { margin: 0; }

/* Gets rid of links being blue */
a { color: inherit; text-decoration: none; }

/* makes images readable on mobile and rounds their corners */
img { 
  max-width: 100%; 
  display: block; 
  border-radius: 1rem; /* Adjust this number to make it more/less round */
}

/* Allows user to navigate with keyboard */
a:focus-visible, button:focus-visible {
  outline: 2px solid #88b4d2;
  outline-offset: 2px;
}

/* ===================== TYPOGRAPHY ===================== */

/* We mapped your old classes to the new fonts so your HTML automatically updates! */
.font-copper { font-family: 'Cormorant SC', serif; letter-spacing: 0.02em; }
.font-times  { font-family: 'Marcellus', serif; }

/* Allows users to navigate through site with just tab button (Accesibility) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: #88b4d2; color: #050508; padding: 0.75rem 1.5rem;
  font-weight: 700; border-radius: 0 0 0.5rem 0;
  transition: left 0.15s;
}
.skip-link:focus { left: 0; }

/* Navbar */
main {
  padding-top: 64px;
}

/* Liquid Glass */
.nav-spatial {
  background: rgba(10,12,20,0.65);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 1px solid rgba(136,180,210,0.08);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(136,180,210,0.06);
}

/* Sets Shape and Look of Navbar */
.nav-link {
  position: relative; padding: 0.5rem 0.75rem; border-radius: 0.75rem;
  color: rgba(237,237,211,0.7); transition: all 0.25s ease;
  cursor: pointer;
}

/* Liquid Glass Backgroud */
.nav-link::before {
  content: ''; position: absolute; inset: 0; border-radius: 0.75rem;
  background: rgba(136,180,210,0); transition: background 0.25s ease;
}

/* Navbar Hover Effects */
.nav-link:hover { color: #ededd3; }
.nav-link:hover::before { background: rgba(136,180,210,0.08); }

/* Sets Active State After User has Moved */
.nav-active { color: #ededd3 !important; }
.nav-active::after {
  content: ''; position: absolute; bottom: 2px; left: 25%; right: 25%;
  height: 2px; background: #88b4d2; border-radius: 1px;
  box-shadow: 0 0 8px rgba(136,180,210,0.5);
}

/* ===================== LOADING SCREEN ===================== */

/* Full screen dark overlay that blocks the page until it's ready */
#page-loader {
  position: fixed; inset: 0; z-index: 9999; background: #050508;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: calc(28vh - 120px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}

#page-loader.show-loader { opacity: 1; visibility: visible; pointer-events: auto; }

/* The kill switch: fades out the loader and lets the user click the page */
#page-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

/* Stacks the logo, title, and loading bar neatly in the center */
.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
  animation: loader-appear .5s ease-out both;
}

/* Sizes the logo and makes it spin continuously */
.loader-logo {
  width: 240px; height: 240px; object-fit: contain; margin-top: 4px;
  animation: loader-spin 3.5s linear infinite;
  transform-origin: center 52%;
}

/* The big Presdex title font styling */
.loader-wordmark {
  color: #ededd3; font-size: 3.3rem; letter-spacing: .08em;
  font-family: 'Cormorant SC', serif;
}

/* The small "Know your pills" subtitle */
.loader-tagline {
  color: rgba(237,237,211,.5); font-size: 1.2rem; letter-spacing: .14em;
  font-family: 'Marcellus', serif; text-transform: uppercase;
}

/* The empty background track for the fake loading bar */
.loader-bar-track {
  width: 140px; height: 1.5px; background: rgba(255,255,255,.12);
  border-radius: 1px; overflow: hidden;
}

/* The cyan bar that fills up over 1.6 seconds */
.loader-bar-fill {
  height: 100%; width: 0; background: #88b4d2; border-radius: 1px;
  animation: loader-bar 1.6s cubic-bezier(.4,0,.2,1) forwards;
}

/* Animation keyframes for the loading screen elements */
@keyframes loader-appear { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:none } }
@keyframes loader-spin { 0% { transform: rotate(0deg); } 11% { transform: rotate(540deg); } 26% { transform: rotate(810deg); } 43% { transform: rotate(960deg); } 63% { transform: rotate(1050deg); } 80% { transform: rotate(1080deg); } 100% { transform: rotate(1080deg); } }
@keyframes loader-bar { 0%{width:0} 50%{width:55%} 80%{width:78%} 100%{width:85%} }

/* ===================== BACKGROUND REEL & EFFECTS ===================== */

/* Pins the background slideshow to the very back of the website */
#bg-reel { position: fixed; inset: 0; z-index: -10; overflow: hidden; }

/* Hides inactive images/videos in the background */
.bg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; pointer-events: none; }

/* Fades in the currently active background slide */
.bg-slide.active { opacity: 1; }

/* Forces background images and videos to cover the whole screen */
.bg-slide img, .bg-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Adds a slow, dramatic zoom effect to static background images */
.bg-slide.active img { animation: slow-zoom 14s ease-out forwards; }
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Floating dust/particle effect container */
.particle-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

/* Shapes and animates the tiny floating particles */
.particle { position: absolute; width: 2px; height: 2px; background: rgba(136,180,210,0.3); border-radius: 50%; animation: particle-drift linear infinite; }
@keyframes particle-drift { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100vh) translateX(30px); opacity: 0; } }

/* Large, blurry glowing orbs that float in the background */
.glow-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.08; pointer-events: none; animation: orb-pulse 8s ease-in-out infinite alternate; }
@keyframes orb-pulse { 0% { opacity: 0.05; transform: scale(1); } 100% { opacity: 0.12; transform: scale(1.15); } }

/* ===================== GLASS PANELS & STAT CARDS ===================== */

/* Base styling for the sleek, frosted glass info cards */
.stat-glass {
  position: relative; border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(136,180,210,0.08), rgba(91,163,217,0.04));
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(136,180,210,0.12); overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* Creates a radial light flare inside the card */
.stat-glass::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(136,180,210,0.1) 0%, transparent 60%);
  pointer-events: none; transition: opacity 0.5s ease; opacity: 0.5;
}

/* Creates a sharp diagonal glass reflection across the card */
.stat-glass::after {
  content: ''; position: absolute; inset: 0; border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Makes the card pop up and cast a shadow when hovered */
.stat-glass:hover {
  transform: translateY(-6px) scale(1.02); border-color: rgba(136,180,210,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(136,180,210,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Brightens the light flare on hover */
.stat-glass:hover::before { opacity: 1; }

/* The big glowing number inside the stat card */
.stat-glass .stat-number { font-family: 'Cormorant SC', serif; font-size: 2.75rem; font-weight: 200; color: #a8d4f0; line-height: 1; position: relative; z-index: 1; text-shadow: 0 0 30px rgba(136,180,210,0.2); }

/* The small descriptive label under the number */
.stat-glass .stat-label { font-family: 'Marcellus', serif; color: rgba(237,237,211,0.5); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.75rem; position: relative; z-index: 1; }

/* Standard frosted glass box for larger content sections */
.glass-panel {
  background: rgba(13,16,23,0.6); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(136,180,210,0.1); border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(136,180,210,0.06);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Lifts the glass panel slightly when hovered */
.glass-panel:hover {
  transform: translateY(-4px); border-color: rgba(136,180,210,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(136,180,210,0.1);
}

/* Wraps images in a clean, rounded container with a drop shadow */
.img-spatial {
  border-radius: 1.5rem; border: 1px solid rgba(136,180,210,0.08); overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s ease;
}

/* Pops the image container out on hover */
.img-spatial:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(136,180,210,0.1);
}

/* Smoothly zooms the actual photo inside the container when hovered */
.img-spatial img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.img-spatial:hover img { transform: scale(1.06); }

/* ===================== BUTTONS ===================== */

/* Shared base styling for the primary call-to-action buttons */
.btn-primary, .btn-liquid {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  border-radius: 1.25rem; border: 1px solid rgba(136,180,210,0.2);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* Specific coloring for the main primary button */
.btn-primary {
  height: 3.5rem; padding: 0 2.5rem; color: #ededd3; letter-spacing: 0.05em;
  background: linear-gradient(135deg, rgba(136,180,210,0.12), rgba(91,163,217,0.06));
}

/* Specific coloring for the alternative 'liquid' button */
.btn-liquid {
  height: 3.25rem; padding: 0 2.25rem; color: #a8d4f0; letter-spacing: 0.06em; text-transform: uppercase;
  background: #000000;
}

/* Prepares invisible hover layers inside the buttons */
.btn-primary::before, .btn-liquid::before {
  content: ''; position: absolute; inset: 0; border-radius: 1.25rem; opacity: 0; transition: opacity 0.4s ease;
}

/* The actual colors of the hover glow layers */
.btn-primary::before { background: linear-gradient(135deg, rgba(168,212,240,0.12), rgba(136,180,210,0.04), transparent); }
.btn-liquid::before { background: linear-gradient(135deg, rgba(168,212,240,0.15), rgba(136,180,210,0.05), transparent); }

/* Prepares the light-sweep effect that passes over the button on hover */
.btn-primary::after, .btn-liquid::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; transition: left 0.7s ease;
}
.btn-primary::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent); }
.btn-liquid::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); transition: left 0.6s ease; }

/* The physical lift and glow effect when hovering over the buttons */
.btn-primary:hover, .btn-liquid:hover {
  border-color: rgba(168,212,240,0.35); transform: translateY(-3px);
}
.btn-primary:hover { box-shadow: 0 16px 50px rgba(136,180,210,0.12), 0 0 30px rgba(136,180,210,0.06), inset 0 1px 0 rgba(255,255,255,0.08); }
.btn-liquid:hover { box-shadow: 0 12px 40px rgba(136,180,210,0.12), 0 0 20px rgba(136,180,210,0.06), inset 0 1px 0 rgba(255,255,255,0.08); color: #ededd3; }

/* Triggers the light layers we prepared earlier on hover */
.btn-primary:hover::before, .btn-liquid:hover::before { opacity: 1; }
.btn-primary:hover::after, .btn-liquid:hover::after { left: 100%; }

/* The 'click' physics (makes the button feel like it's being pressed down) */
.btn-primary:active, .btn-liquid:active { transform: translateY(-1px) scale(0.98); transition-duration: 0.1s; }

@keyframes cta-purple-shimmer {
  0%   { left: -100%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}

.cta-shimmer {
  position: relative;
  overflow: hidden;
}

.cta-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(160,100,255,0.25) 40%, rgba(200,140,255,0.35) 50%, rgba(160,100,255,0.25) 60%, transparent 100%) !important;
  pointer-events: none;
  transition: none !important;
}

.cta-shimmer:hover::after {
  animation: cta-purple-shimmer 0.8s ease-in-out;
}

/* A subtle, less prominent button style */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.75rem; padding: 0 1.5rem; border-radius: 1rem; border: 1px solid rgba(136,180,210,0.1);
  background: rgba(136,180,210,0.03); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: rgba(237,237,211,0.65); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.04em; cursor: pointer; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

/* Light sweep effect for the ghost button */
.btn-ghost::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent); transition: left 0.5s ease; }

/* Ghost button hover states */
.btn-ghost:hover { background: rgba(136,180,210,0.08); border-color: rgba(136,180,210,0.2); color: #ededd3; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04); }
.btn-ghost:hover::after { left: 100%; }
.btn-ghost:active { transform: translateY(0) scale(0.98); transition-duration: 0.1s; }

/* Secondary catalog buttons */
.scroll-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 3rem; border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); color: white; text-align: center; font-weight: 500; backdrop-filter: blur(6px); transition: background-color 0.2s; }
.scroll-btn:hover { background-color: rgba(255, 255, 255, 0.2); }

/* Smaller version of the secondary buttons */
.scroll-btn-small { display: inline-flex; align-items: center; justify-content: center; height: 2.5rem; padding: 0 1.25rem; border-radius: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); color: white; font-size: 0.875rem; font-weight: 500; backdrop-filter: blur(6px); transition: background-color 0.2s; }
.scroll-btn-small:hover { background-color: rgba(255, 255, 255, 0.2); }

/* ===================== LAYOUT ELEMENTS & UTILITIES ===================== */

/* The little pill-shaped tags used to label sections */
.section-label {
  display: inline-flex; align-items: center; gap: 0.6rem; font-family: 'Marcellus', serif; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(168,212,240,0.5); padding: 0.4rem 1rem 0.4rem 0.75rem; background: rgba(136,180,210,0.04); border: 1px solid rgba(136,180,210,0.08); border-radius: 2rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* The tiny glowing dot inside the section label */
.section-label::before { content: ''; width: 6px; height: 6px; background: rgba(136,180,210,0.4); border-radius: 50%; box-shadow: 0 0 8px rgba(136,180,210,0.3); }

/* Fading horizontal divider lines */
.section-line { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(136,180,210,0.2) 20%, rgba(136,180,210,0.2) 80%, transparent); }

/* The thin progress bar that fills up at the top of the screen as you scroll down */
#scroll-progress { position: fixed; top: 0; left: 0; z-index: 100; height: 2px; width: 0; background: linear-gradient(90deg, #88b4d2, #5ba3d9, #a8d4f0); transition: width 0.1s linear; box-shadow: 0 0 10px rgba(136,180,210,0.4); }

/* Slowly zooms the main hero image on page load */
.hero-img { animation: slow-zoom 12s ease-out forwards; will-change: transform; }

/* ===================== DIVIDERS ===================== */

/* Full-width image strips used to break up content sections */
.divider {
  width: 100vw; height: 12rem; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  background-position: center 50%; background-size: cover; position: relative;
}

/* Adds dark fades to the top and bottom of the divider images to blend them into the page */
.divider::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    180deg,
    #050508 0%,
    rgba(5,5,8,0.92) 7%,
    rgba(5,5,8,0.72) 16%,
    rgba(5,5,8,0.38) 28%,
    rgba(5,5,8,0.0)  42%,
    rgba(5,5,8,0.0)  58%,
    rgba(5,5,8,0.38) 72%,
    rgba(5,5,8,0.72) 84%,
    rgba(5,5,8,0.92) 93%,
    #050508 100%
  );
}

/* Makes the dividers taller on desktop screens */
@media (min-width: 768px) { .divider { height: 20rem; } }

/* The specific background images for each divider section */
.divider-catalog { background-image: url('https://images.pexels.com/photos/4058105/pexels-photo-4058105.jpeg'); }
.divider-about { background-image: url('https://images.pexels.com/photos/7526056/pexels-photo-7526056.jpeg'); }
.divider-goals { background-image: url('https://images.pexels.com/photos/7615573/pexels-photo-7615573.jpeg'); }
.divider-contact { background-image: url('https://images.pexels.com/photos/208512/pexels-photo-208512.jpeg'); }
.divider-support { background-image: url('https://images.pexels.com/photos/3683040/pexels-photo-3683040.jpeg'); }

/* ===================== CONTACT CAROUSEL (HOMEPAGE) ===================== */

/* Wrapper and viewport for the horizontally scrolling team/contact cards */
.c-wrap { position: relative; width: 100%; }
.c-vp { overflow: hidden; width: 100%; }

/* The moving track that holds all the cards */
.c-track { display: flex; align-items: stretch; will-change: transform; }

/* The individual team member cards (starts blurred and slightly shrunken) */
.c-slide {
  flex-shrink: 0; width: 65%; height: 44vh; display: flex; border-radius: 1.5rem; overflow: hidden; background: rgba(13,16,23,0.6); backdrop-filter: blur(16px); border: 1px solid rgba(136,180,210,0.08); margin: 0 10px; box-sizing: border-box; filter: blur(3px); opacity: 0.35; transition: filter .65s cubic-bezier(0.16,1,0.3,1), opacity .65s ease, transform .65s cubic-bezier(0.16,1,0.3,1), border-color .65s ease; transform: scale(0.95);
}

/* Brings the currently centered card into sharp focus and scales it up */
.c-slide.c-active { filter: none; opacity: 1; transform: scale(1); border-color: rgba(136,180,210,0.15); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

/* The photo area of the team card */
.c-img { width: 33.333%; flex-shrink: 0; overflow: hidden; background: rgba(255,255,255,.05); }
.c-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The text area of the team card */
.c-text { flex: 1; padding: 2rem 2.5rem; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }

/* Team member name formatting (starts invisible for a fade-in effect) */
.c-name { color: #88b4d2; font-size: 1.85rem; letter-spacing: .04em; font-family: 'Cormorant SC', serif; opacity: 0; transform: translateY(10px); transition: opacity .4s ease .06s, transform .4s ease .06s; }

/* Team member role/designation formatting */
.c-desig { color: rgba(237,237,211,.5); font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; font-family: 'Marcellus', serif; margin-top: .45rem; opacity: 0; transform: translateY(10px); transition: opacity .4s ease .2s, transform .4s ease .2s; }

/* Team member bio formatting */
.c-bio { color: #ededd3; font-family: 'Marcellus', serif; font-size: .94rem; line-height: 1.7; margin-top: 1rem; opacity: 0; transform: translateY(10px); transition: opacity .4s ease .35s, transform .4s ease .35s; }

/* Cascading fade-in animation for the text when the card becomes active */
.c-slide.c-active .c-name, .c-slide.c-active .c-desig, .c-slide.c-active .c-bio { opacity: 1; transform: none; }

/* The left/right arrows for the carousel */
.c-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(136,180,210,0.2); background: rgba(10,12,20,0.7); color: #ededd3; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(12px); z-index: 10; padding: 0; transition: all 0.25s ease;
}

/* Brightens the arrows on hover */
.c-btn:hover { background: rgba(136,180,210,0.15); border-color: rgba(136,180,210,0.35); }

/* Positions the specific left and right arrows */
.c-btn-prev { left: .5rem; }
.c-btn-next { right: .5rem; }

/* ===================== SCROLL REVEAL SYSTEM ===================== */

/* Sets up elements to be invisible and pushed down slightly before scrolling into view */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: none; } /* Triggers the fade up */

/* Elements that slide in from the left */
.reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-left.is-visible { opacity: 1; transform: none; }

/* Elements that slide in from the right */
.reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-right.is-visible { opacity: 1; transform: none; }

/* Elements that "grow" into place */
.reveal-scale { opacity: 0; transform: scale(0.92); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-scale.is-visible { opacity: 1; transform: none; }

/* Used on parent containers to make children fade in one after the other (domino effect) */
.stagger-children > * { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.stagger-children.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.stagger-children.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.19s; }
.stagger-children.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.26s; }
.stagger-children.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.33s; }
.stagger-children.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.40s; }

/* ===================== DRUG PAGE STYLES ===================== */

/* Removes the 200% width and horizontal flex, stacking them vertically instead */
#effectsSlides { 
  display: flex; 
  flex-direction: column; 
  width: 100%; 
  gap: 6rem; /* Adds generous vertical breathing room between the two sections */
  
  /* OVERRIDE: Stops any old Javascript from trying to slide the page left/right */
  transform: none !important; 
}

/* Makes each section take up the full width of the container */
.slide { 
  width: 100%; 
  padding-right: 0; 
  box-sizing: border-box; 
}

/* OVERRIDE: Stops the old Javascript from fading out the "inactive" slide */
.slide .slide-inner { 
  opacity: 1 !important; 
  transform: none !important; 
  transition: none; 
}

/* Removes the cut-off boundaries so the page scrolls naturally */
#effectsViewport { 
  overflow: visible; 
  padding-bottom: 4rem; 
  margin-bottom: 0; 
}

/* General drug page image sizing */
.slide img { max-width: 75%; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.pair-img { width: 100%; max-width: 100%; height: 100%; max-height: 360px; object-fit: contain; display: block; margin: 0 auto; }
.pair-frame { height: 360px; display: flex; align-items: center; justify-content: center; background: #000000; overflow: hidden; border-radius: 1rem; }
.solo-img { max-width: 75%; height: auto; object-fit: contain; display: block; margin: 0 auto; }

/* Glossary Popups */

/* Wraps the text so the popup knows where to anchor */
.glossary-term { position: relative; display: inline-block; }

/* Styles the actual clickable glossary word (underlined) */
.glossary-link { color: #badcde; text-decoration: underline; text-underline-offset: 0.1em; display: inline-block; transition: transform 180ms ease, color 180ms ease; transform-origin: center; cursor: pointer; }

/* Scales the word up slightly when you hover over it */
.glossary-term:hover .glossary-link, .glossary-term:focus-within .glossary-link { transform: scale(var(--hover-scale, 1.04)); color: #dff4f6; }

/* The floating definition box (starts invisible) */
.glossary-popup {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; font-family: 'Marcellus', serif; font-size: 1.2rem;
  transform: translateX(-50%) translateY(-4px); min-width: 16rem; max-width: 24rem; padding: 0.75rem 0.9rem;
  border-radius: 0.85rem; border: 1px solid rgba(186, 220, 222, 0.35); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  background: rgba(10, 10, 10, 0.92); color: #ededd3; text-align: left; white-space: normal; line-height: 1.4;
  overflow-wrap: break-word; word-break: break-word; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; transition-delay: 0ms; z-index: 50;
}

/* Fades the box in when hovering over the word */
.glossary-term:hover .glossary-popup, .glossary-term:focus-within .glossary-popup { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition-delay: 400ms; }

/* Title and divider styling inside the popup */
.glossary-title { display: block; font-weight: 600; color: #badcde; }
.glossary-divider + .glossary-title { margin-top: 0.2rem; }
.glossary-divider { display: block; height: 0; border-top: 1px solid rgba(237, 237, 211, 0.45); margin: 0.45rem 0; }
.glossary-desc { display: block; font-size: 0.9em; line-height: 1.45; white-space: normal; overflow-wrap: break-word; word-break: break-word; }

/* Disclaimer Popups (Catalog) */

/* The dark background overlay that dims the page behind the disclaimer */
#disclaimer-overlay { position: fixed; inset: 0; z-index: 9990; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.5s ease, visibility 0.5s ease; }
#disclaimer-overlay.visible { opacity: 1; visibility: visible; pointer-events: auto; }

/* The actual glass box holding the disclaimer text */
#disclaimer-box { width: min(500px, 90vw); max-height: 78vh; background: rgba(10, 10, 10, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(186, 220, 222, 0.3); border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8); }

/* Disclaimer typography */
#disclaimer-title { font-family: 'Cormorant SC', serif; font-size: 1.5rem; letter-spacing: 0.1em; color: #badcde; flex-shrink: 0; margin: 0; }

/* Allows the text inside the box to scroll if it's too long */
#disclaimer-body { overflow-y: auto; flex: 1; min-height: 0; color: #ededd3; font-family: 'Marcellus', serif; font-size: 1rem; line-height: 1.65; padding-right: 0.35rem; }

/* Customizes the scrollbar inside the disclaimer box */
#disclaimer-body::-webkit-scrollbar { width: 3px; }
#disclaimer-body::-webkit-scrollbar-track { background: transparent; }
#disclaimer-body::-webkit-scrollbar-thumb { background: rgba(186, 220, 222, 0.25); border-radius: 2px; }

/* The 'I Understand' button styling */
#disclaimer-btn { flex-shrink: 0; width: 100%; padding: 0.85rem 1rem; background: rgba(186, 220, 222, 0.1); border: 1px solid rgba(186, 220, 222, 0.4); border-radius: 0.75rem; color: #badcde; font-family: 'Cormorant SC', serif; font-size: 1rem; letter-spacing: 0.12em; cursor: pointer; transition: background 180ms ease, color 180ms ease, border-color 180ms ease; }
#disclaimer-btn:hover { background: rgba(186, 220, 222, 0.22); color: #dff4f6; border-color: rgba(186, 220, 222, 0.65); }

/* Tiny visual details for the disclaimer layout */
.disclaimer-divider { border: none; border-top: 1px solid rgba(237, 237, 211, 0.22); margin: 0; flex-shrink: 0; }
#disclaimer-sub { flex-shrink: 0; color: rgba(237, 237, 211, 0.4); font-family: 'Marcellus', serif; font-size: 0.8rem; line-height: 1.5; text-align: center; margin: 0; }

/* ===================== RESPONSIVE & REDUCED MOTION ===================== */

/* Ensures images shrink properly on tablets */
@media (max-width: 868px) { .slide { padding-right: 0.5rem; } .slide img { max-width: 100%; } }

/* Fixes glossary popups so they don't break off-screen on tiny phone displays */
@media (max-width: 768px) {
  .glossary-popup { position: fixed; left: 0; transform: translateX(0) translateY(-4px); min-width: 14rem; max-width: 18rem; z-index: 9999; }
  .glossary-term:hover .glossary-popup, .glossary-term:focus-within .glossary-popup { transform: translateX(0) translateY(0); }
}

/* Kills all animations and zooms if the user has requested "Reduced Motion" in their computer settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .stagger-children > * { opacity: 1; transform: none; }
  .bg-slide.active img { animation: none; }
  .particle-field { display: none; }
  .glow-orb { animation: none; }
}

/* ===================== CATALOG PAGE SPECIFICS ===================== */

/* Search Bar */

/* Styles the frosted glass container holding the search input */
.catalog-search {
  background: linear-gradient(135deg, rgba(136,180,210,0.10), rgba(91,163,217,0.05));
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(136,180,210,0.18);
  border-radius: 1.25rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Makes the search box glow when the user is typing in it */
.catalog-search:focus-within {
  border-color: rgba(136,180,210,0.35);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 20px rgba(136,180,210,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Removes default input styles so it blends into the glass perfectly */
.catalog-search input {
  background: transparent; border: none; outline: none;
  color: #ededd3; 
  font-size: 1.75rem; /* Increased from 1.25rem to make text much larger */
  width: 100%;
  font-family: 'Marcellus', serif;
}

/* Dims the "Search for a drug..." placeholder text */
.catalog-search input::placeholder { color: rgba(237,237,211,0.35); }

/* ===================== DRUG LIST CONTAINER ===================== */

.drug-list {
  background: transparent;
  border: none;
  gap: 0.75rem !important; 
  
  /* FIX: 2rem padding at the top replaces the missing margin. 
     Cards will now scroll through this 2rem space until they hit the search bar! */
  padding: 2rem 2.5rem 6rem 2.5rem !important; 
  
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 85%, transparent 100%);
  
  /* Firefox scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Chrome/Safari/Edge Scrollbar width */
.drug-list::-webkit-scrollbar { width: 8px; }
.drug-list::-webkit-scrollbar-track { background: transparent; margin: 20px 0; }
.drug-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 10px; }

/* ===================== DRUG CARD ===================== */

.drug-card {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  
  /* Base glass panel styling */
  background: rgba(13,16,23,0.6); 
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(136,180,210,0.1); 
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(136,180,210,0.06);
  
  flex-shrink: 0; 
  cursor: pointer; 
  text-decoration: none;
  
  /* CRITICAL: overflow hidden keeps the light inside the rounded corners */
  overflow: hidden; 

  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

/* Text & Icon Styling Injected from the row-based approach */
.drug-card .drug-name {
  color: #ffffff; 
  font-weight: 400; 
  font-size: 1.25rem; 
  letter-spacing: 0.03em; 
  position: relative; 
  z-index: 1;
  font-family: 'Cormorant SC', serif;
  transition: font-weight 0.2s ease;
}

.drug-card:hover .drug-name {
  font-weight: 700;
}

.drug-card .drug-icons { 
  display: flex; gap: 0.75rem; position: relative; z-index: 1; 
}

.drug-card .drug-icon {
  width: 2rem; height: 2rem; 
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; 
  color: rgba(255, 255, 255, 0.5); 
  transition: color 0.2s ease;
}

.drug-card:hover .drug-icon { color: #ffffff; }
.drug-card:hover .atc-icon img { opacity: 1 !important; }

/* ── 1. The Inner Glow Layer (matches homepage buttons) ── */
.drug-card::before {
  content: ''; 
  position: absolute; 
  inset: 0; 
  border-radius: 1.25rem; 
  opacity: 0; 
  transition: opacity 0.4s ease;
  background: linear-gradient(135deg, rgba(168,212,240,0.12), rgba(136,180,210,0.04), transparent);
  z-index: 0;
}

/* ── 2. The Sliding Glossy Light Sweep ── */
.drug-card::after { 
  content: ''; 
  position: absolute; 
  top: 0; 
  /* Starts all the way off the left side of the screen */
  left: -100%; 
  width: 100%; 
  height: 100%; 
  /* Made much brighter (0.15) so it is extremely visible */
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent); 
  transition: left 0.6s ease; 
  pointer-events: none;
  /* z-index 2 forces the light to slide OVER the text and icons, not behind them */
  z-index: 2; 
}

/* ===================== DRUG CARD HOVER ===================== */

.drug-card:hover {
  transform: translateY(-4px) scale(1.02); 
  border-color: rgba(136,180,210,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(136,180,210,0.15);
}

/* Fades in the blue background glow */
.drug-card:hover::before { 
  opacity: 1; 
}

/* Shoots the light sweep across to the right side */
.drug-card:hover::after { 
  left: 100%; 
}

/* Slide-in Entrance Animation */
.drug-card-enter {
  opacity: 0; 
  transform: translateY(12px); 
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.drug-card-enter.visible { 
  opacity: 1; 
  transform: translateY(0); 
}

/* ===================== Coming Soon Overlay ===================== */

/* Dark background curtain for the 'Coming Soon' popup */
.coming-soon-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(5,5,8,0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Fades the overlay in when triggered */
.coming-soon-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* The actual glass box displaying the 'Coming Soon' message */
.coming-soon-box {
  width: min(480px, 90vw); background: rgba(13,16,23,0.85);
  backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(136,180,210,0.18); border-radius: 1.5rem; padding: 2.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(136,180,210,0.06); text-align: center;
}

/* The dimmed logo inside the box */
.coming-soon-box img { width: 100px; height: 100px; object-fit: contain; opacity: 0.7; }

/* The Cormorant SC heading */
.coming-soon-box h2 {
  font-family: 'Cormorant SC', serif;
  color: #88b4d2; font-size: 1.4rem; letter-spacing: 0.08em;
}

/* The descriptive paragraph */
.coming-soon-box p {
  font-family: 'Marcellus', serif; color: rgba(237,237,211,0.65); font-size: 1rem; line-height: 1.6;
}

/* The 'Return to Catalog' button */
.coming-soon-close {
  padding: 0.7rem 2rem; border-radius: 0.85rem; border: 1px solid rgba(136,180,210,0.25);
  background: rgba(203, 221, 234, 0.08); color: #a8d4f0; font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.06em; cursor: pointer; transition: all 0.3s ease;
}

/* Brightens the button when hovered */
.coming-soon-close:hover { background: rgba(136,180,210,0.18); border-color: rgba(136,180,210,0.4); color: #ededd3; }
.coming-soon-close:focus-visible { outline: 2px solid #88b4d2; outline-offset: 2px; }

/* ===================== NEW UI ELEMENTS ===================== */


/* ===================== ATC BUBBLE ===================== */
/* Category chip shown beneath a drug prespage's title, e.g. "ATC · N — Nervous System".
   Filled in at runtime by JavaScript/ATC-Bubble.js from ATC_CATEGORIES (ATC-Data.js). */
.atc-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(136,180,210,0.2);
  background: rgba(13,16,23,0.6);
  font-family: 'Marcellus', serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.atc-bubble .atc-code { color: #badcde; font-weight: 700; }
.atc-bubble .atc-category { color: rgba(237,237,211,0.6); text-transform: uppercase; }

/* ===================== TABLE OF CONTENTS (SIDEBAR) ===================== */

.toc-link {
  position: relative;
  display: block;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(237,237,211,0.6);
  font-size: 1.15rem;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}

/* The hover effect */
.toc-link:hover {
  background: rgba(136,180,210,0.06);
  border-color: rgba(136,180,210,0.2);
  color: #ededd3;
  transform: translateX(6px); /* Slides the button slightly to the right */
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Prepares the light-sweep effect (the flash) */
.toc-link::after {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); 
  transition: left 0.5s ease; 
}

/* Shoots the light across the button when hovered */
.toc-link:hover::after {
  left: 100%;
}

/* ===================== CONTRIBUTER FORM STYLES ===================== */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-family: 'Marcellus', serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(237,237,211,0.5);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.form-input {
  background: rgba(13,16,23,0.6);
  border: 1px solid rgba(136,180,210,0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  color: #ededd3;
  font-family: 'Marcellus', serif;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: 2px solid rgba(136, 180, 210, 0.2);
  border-color: #88b4d2;
}

.upload-zone {
  border: 1px dashed rgba(136,180,210,0.2);
  background: rgba(13,16,23,0.6);
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: rgba(136,180,210,0.4);
  background: rgba(13,16,23,0.8);
}

.btn-submit {
  background: #88b4d2;
  color: #050508;
  font-weight: 600;
  font-family: 'Marcellus', serif;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  width: 100%;
  border-radius: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-add-section {
  background: rgba(13,16,23,0.6);
  color: #ededd3;
  border: 1px solid rgba(136,180,210,0.15);
  font-weight: 600;
  font-family: 'Marcellus', serif;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  width: 100%;
  border-radius: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-submit:hover { opacity: 0.9; }
.btn-submit:active { transform: scale(0.98); }

.btn-add-section:disabled { opacity: 0.4; cursor: not-allowed; }

.section-entry { position: relative; }
.section-entry + .section-entry {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(136,180,210,0.2);
}

.remove-section-btn {
  position: absolute;
  top: -0.875rem; 
  left: 50%;
  transform: translateX(-50%);
  
  width: 4.5rem !important;
  height: 1.75rem !important;
  border-radius: 9999px;
  
  background: rgba(13,16,23,0.9) !important;
  border: 1px solid rgba(136,180,210,0.3) !important;
  color: #ededd3 !important;
  
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem !important;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.remove-section-btn:hover {
  /* Original red hover colors */
  background: rgba(217,119,87,0.15) !important;
  border-color: rgba(217,119,87,0.45) !important;
  color: #f2b8a2 !important;
}

#successBanner { display: none; padding: 1rem; border-radius: 0.75rem; border: 1px solid rgba(136,180,210,0.3); background: rgba(136,180,210,0.08); }
#successBanner.show { display: flex; }

/* ===================== FORM BUTTON STATES ===================== */

/* Disables the button so they can't double-click it while loading */
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* The dark-blue loading state */
.btn-submit.loading {
  background: rgba(136, 180, 210, 0.3);
  border: 1px solid rgba(136, 180, 210, 0.5);
  color: #ededd3;
}

/* The green success state */
.btn-submit.success {
  background: rgba(74, 222, 128, 0.15); /* Soft transparent green */
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #86efac; /* Mint green text */
}

/* Spinner animation for the Bootstrap icon */
@keyframes spin-icon {
  100% { transform: rotate(360deg); }
}
.icon-spin {
  display: inline-block;
  animation: spin-icon 1.2s linear infinite;
}

/* ===================== NAVBAR OVERRIDES ===================== */
/* Dark Mode Defaults */
.nav-item {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  background-color: transparent;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Light Mode Overrides */
body.light-mode .nav-brand {
  color: #000000 !important;
}

body.light-mode .nav-item {
  color: rgba(0, 0, 0, 0.8) !important;
}

body.light-mode .nav-item:hover {
  color: #000000 !important;
  background-color: rgba(0, 0, 0, 0.08) !important;
}

/* ===================== LIGHT MODE TOGGLE (NEW) ===================== */
body.light-mode {
  background: #ffffff;
  color: #000000;
}

body.light-mode .bg-black {
  background-color: #f8f8f8 !important;
}

body.light-mode .text-white,
body.light-mode .text-white\/90,
body.light-mode .text-white\/70 {
  color: #000000 !important;
}

body.light-mode .text-gray-300,
body.light-mode .text-gray-400 {
  color: #333333 !important;
}

body.light-mode header,
body.light-mode .nav-spatial {
  background: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.light-mode header a,
body.light-mode header button {
  color: #000000 !important;
}

body.light-mode .toc-link,
body.light-mode .nav-link {
  color: rgba(0,0,0,0.7);
}

/* Switches the hover backgrounds from transparent white to transparent black */
body.light-mode .toc-link:hover,
body.light-mode .nav-link:hover,
body.light-mode header a:hover,
body.light-mode header button:hover {
  background-color: rgba(0,0,0,0.08) !important;
  color: #000000 !important;
}

/* ===================== NUCLEAR ATC BUBBLE OVERRIDE ===================== */
/* Targets the exact page heading section to overpower the ATC-Bubble.js script */
body.light-mode section.pt-24 .atc-bubble,
body.light-mode section.pt-24 [class*="atc-"] {
  background-color: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

/* The wildcard (*) forces every injected child element to render in black */
body.light-mode section.pt-24 .atc-bubble,
body.light-mode section.pt-24 .atc-bubble *,
body.light-mode section.pt-24 [class*="atc-"] * {
  color: #000000 !important;
  text-shadow: none !important;
}

body.light-mode .bg-black\/80,
body.light-mode .bg-black\/60 {
  background: rgba(255,255,255,0.9) !important;
  border-color: rgba(0,0,0,0.15) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.05) !important;
}

body.light-mode .border-white\/10,
body.light-mode .border-white\/5,
body.light-mode .border-white\/20 {
  border-color: rgba(0,0,0,0.1) !important;
}

body.light-mode .glossary-title,
body.light-mode .glossary-link {
  color: #000000;
}

/* ===================== CONTRIBUTER FORM STYLES ===================== */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-family: 'Marcellus', serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(237,237,211,0.5);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.form-input {
  background: rgba(13,16,23,0.6);
  border: 1px solid rgba(136,180,210,0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  color: #ededd3;
  font-family: 'Marcellus', serif;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: 2px solid rgba(136, 180, 210, 0.2);
  border-color: #88b4d2;
}

.upload-zone {
  border: 1px dashed rgba(136,180,210,0.2);
  background: rgba(13,16,23,0.6);
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: rgba(136,180,210,0.4);
  background: rgba(13,16,23,0.8);
}

.btn-submit {
  background: #88b4d2;
  color: #050508;
  font-weight: 600;
  font-family: 'Marcellus', serif;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  width: 100%;
  border-radius: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-add-section {
  background: rgba(13,16,23,0.6);
  color: #ededd3;
  border: 1px solid rgba(136,180,210,0.15);
  font-weight: 600;
  font-family: 'Marcellus', serif;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
  width: 100%;
  border-radius: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-submit:hover { opacity: 0.9; }
.btn-submit:active { transform: scale(0.98); } 

.btn-add-section:disabled { opacity: 0.4; cursor: not-allowed; }

.section-entry { position: relative; }
.section-entry + .section-entry {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(136,180,210,0.2);
}

.remove-section-btn {
  position: absolute;
  top: -0.875rem; 
  left: 50%;
  transform: translateX(-50%);
  
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgba(13,16,23,0.9);
  border: 1px solid rgba(136,180,210,0.3);
  color: #ededd3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.remove-section-btn:hover {
  background: rgba(217,119,87,0.15);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  border-color: rgba(217,119,87,0.45);
  color: #f2b8a2;
}

#successBanner { display: none; padding: 1rem; border-radius: 0.75rem; border: 1px solid rgba(136,180,210,0.3); background: rgba(136,180,210,0.08); }
#successBanner.show { display: flex; }

/* ===================== AUTOFILL OVERRIDES ===================== */
/* Prevents the browser from changing the font and background when auto-filling forms */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    /* 1. Forces the font back to your chosen style */
    font-family: 'Marcellus', serif !important;
    
    /* 2. Forces the text color back to your cream color */
    -webkit-text-fill-color: #ededd3 !important;
    
    /* 3. Browsers don't let you use 'background: transparent' for autofill, 
       so we use a solid inner shadow matching your dark panel color (#0d1017) 
       to cover up the browser's default autofill background. */
    -webkit-box-shadow: 0 0 0 50px #0d1017 inset !important;
    
    /* 4. A standard hack to delay any background color change infinitely */
    transition: background-color 5000s ease-in-out 0s;
}

/* ===================== FORM BUTTON LIGHT SWEEP ===================== */

/* 1. Ensure the buttons can contain the sweeping light */
.btn-submit, .btn-add-section {
  position: relative;
  overflow: hidden;
}

/* 2. Create the invisible light bar sitting off to the left side */
.btn-submit::after, .btn-add-section::after {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  transition: left 0.6s ease; 
  pointer-events: none;
}

/* 3. Style the gradient (Brighter for the blue submit btn, subtle for the dark add btn) */
.btn-submit::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); 
}
.btn-add-section::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); 
}

/* 4. Trigger the sweep animation on hover */
.btn-submit:hover::after, .btn-add-section:hover::after {
  left: 100%;
}

/* ============ ZOOM CAROUSEL ============ */
.zoom-carousel { cursor: default; }

.zoom-viewport { position: relative; }

.zoom-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.zoom-img.entering {
  opacity: 0;
  transition: none;
}
.zoom-img.entering.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.zoom-level-label {
  transition: opacity 0.3s ease;
}

.zoom-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(136,180,210,0.4);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.zoom-dot.active {
  background: #88b4d2;
  border-color: #88b4d2;
}