/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
:root{
    --dkBlue: #1B4C9C;
    --ltblue: #5DA9E9;
    --ltyellow: #FFD970;
    font-size: 16px;
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
  }
  /* light mode */
  body.light-mode header{
    background-color: var(--ltblue);
    color: black;
   
  }          
  body.light-mode {
    background-color: white;
    color: black;
  }   
  /* Theme Toggle Icons */
#theme-toggle {
    position: absolute;
    top: 15px; /* Increased spacing from the top */
    left: 15px; /* Increased spacing from the left */
    cursor: pointer;
    z-index: 1100; /* Ensure it stays above other elements */
    pointer-events: auto; /* Ensure the element is clickable */
}


#theme-toggle img {
    width: 30px; /* Default size for icons */
    height: 30px;
    transition: opacity 0.3s ease; /* Smooth transition for visibility */
}

#sun {
    display: block; /* Show the sun icon by default (dark mode) */
}
#moon{
    display: none; /* Hide the moon icon by default (dark mode) */
}


body.light-mode #sun {
    display: none; /* Hide the sun icon in light mode */
}

body.light-mode #moon {
    display: block; /* Show the moon icon in light mode */
}
body.light-mode #topic-gallery-slider {
    background-color: var(--ltblue);
}

/* Start code */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    
}

body {
    background-color: black;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  p {
    font-size: larger;
  }
/* sticky svg */
#svg-container{
    position: fixed;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0px;
    z-index: 999;
    pointer-events: auto; /* Allow interactions */
}
#main-svg-wrapper{
    width: 100px;
    height: auto;
}
#animated-svg-wrapper{
    width: 50px;
    height: auto;
    position: relative;
    z-index: 2;
}
#animated-svg-wrapper svg{
    position: absolute; 
    bottom:75px; 
    right: -35px; 
    transform-origin: bottom right;
    
}
/*header*/
header{
    background-color: black;
    color: var(--ltblue);
    margin: 5px 0;
    
}

/* hamburger menu */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 10px 5px;
    flex-direction: row;
  }
  /* Stack h1 and p on the right */
.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
  
  /* Hamburger Icon */
  .menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
    position: relative;
    top: 0px;
  }
  
  .bar {
    height: 3px;
    background-color: var(--dkBlue);
    border-radius: 2px;
    transition: 0.3s ease, margin-top 0.3s ease;
    margin: 0;

  }
  .bar.active {
    background-color: var(--ltblue); /* Changes color on hover */
    margin-top: 10px; /* Moves the bars down slightly when hovered */
}
  
  
  /* Transform to X */
  .menu-icon.active .bar1 {
    transform: rotate(-45deg) translate(40px, 6px);
  }
  .menu-icon.active .bar2 {
    opacity: 0;
  }
  .menu-icon.active .bar3 {
    transform: rotate(45deg) translate(-5px, -50px);
  }
  
  /* Navigation Links (hidden by default) */
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--ltyellow);
    position: absolute;
    top: 60px;
    width: 100%;
    z-index: 1000;
    cursor: pointer;
  }
  
  .nav-links a {
    display:block;
    color: var(--ltblue);
    text-decoration: none;
    padding: 15px 20px;
    font-weight: bold;
    border-bottom: 1px solid white;
    box-sizing: border-box;
    z-index: 2;
  }
  .nav-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
  }
  
  /* Show menu when active */
  .nav-links.active {
    display: flex;
    margin-top: 10px;
  }
  .nav-links a:hover {
    background-color: var(--dkBlue);
    color: white;
    transition: 0.3s ease, margin-top 0.3s ease;
    transform: scale(1.05); 
  }

/* text, headers */
h1 {
    font-size: 3em;
    font-weight: bold;
    text-align: right;
    line-height: 2;
    
}
header p{
    font-style: italic;
    font-size: larger;
    text-align: right;
    color: var(--ltyellow);
}
h2 {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin-top: 20px;
}
#homeText {
  display: none;
}
h3 {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}
h4 {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}
/*main*/
main{
    background-color: white;
    margin: 0;
    flex: 1;
    color: #222;
    line-height: normal;            
  
}
#home{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}
/*slider section*/
#topic-gallery-slider {
  position: relative;
  width: 100%;
  background-color: black;
  /* overflow: hidden; */
  margin-top: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  height: 350px;
  box-sizing: border-box; /* Ensures padding is included in width/height */
}
#topic-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden; 
  transition: transform 0.5s ease-in-out;
  
 
}
.topic {
  position: absolute;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row-reverse;
  text-align: left;
  color: black;
  text-align: left;
  padding: 10px;
  height: 100%;
  background-color: white;
  border-radius: 10px;
  transition: all 0.5s ease;
  z-index: 1;
  left: 50%; /* Start centered */
  transform: translateX(-50%) scale(0.9);
}
/* Topic text container */
.topic-text {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 35px;
  box-sizing: border-box;
}

/* Topic image container */
.topic-img-wrapper {
  width: 40%; 
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 25px;
  box-sizing: border-box;
}

/* Topic image styling */
.topic-img {
  width: 100%; 
  height: auto;
  object-fit: contain; 
  border-radius: 8px; 
  max-height: 100%;
}


.learn-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background-color: var(--dkBlue);
  color: white;
  border: none;

  min-height: 44px;
  padding: 10px 20px;

  font-size: 1rem;      /* Increased from 0.8rem */
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;

  cursor: pointer;
  border-radius: 10px;
  transition: background-color 0.3s;
}

.learn-more-btn:hover {
  background-color: var(--ltblue);
}
/* Center topic styling */
.topic.center {
  z-index: 3;
  transform: translateX(-50%) scale(1.1); /* Slightly larger */
}

.topic.left {
  z-index: 2;
  transform: translateX(-75%) scale(0.9); /* Shift left and smaller */
  opacity: 0.8;
}

.topic.right {
  z-index: 2;
  transform: translateX(-25%) scale(0.9); /* Shift right and smaller */
  opacity: 0.8;
}

.topic.hidden {
  z-index: 0;
  opacity: 0.5;
  transform: translateX(-50%) scale(0.5);
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--dkBlue);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
}
#prevBtn {
  left: 10px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
}
#nextBtn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
}
.slider-btn:hover {
  background-color: var(--ltyellow);
}

/* mouse animation */
#mouse-graphic {
  position: relative;
  width: 100%;
  height: 100px; 
  overflow: hidden; 
}
#mouse-graphic svg {
  position: absolute;
  top: 50%; /* center vertically */
  transform: translateY(-50%); /* center vertically */
  width: 150px;
  height: auto;
  animation: mouse-animation 15s infinite linear;
}

@keyframes mouse-animation {
  0% {
    left: 0%;
    transform: translateY(-50%) scaleX(1);
  }
  10% {
    left: 0%;
    transform: translateY(-50%) scaleX(1); /* Pause at start */
  }
  45% {
    left: 90%;
    transform: translateY(-50%) scaleX(1);
  }
  50% {
    left: 90%;
    transform: translateY(-50%) scaleX(-1); /* Flip at right side */
  }
  60% {
    left: 90%;
    transform: translateY(-50%) scaleX(-1); /* Pause after flip */
  }
  95% {
    left: 0%;
    transform: translateY(-50%) scaleX(-1);
  }
  100% {
    left: 0%;
    transform: translateY(-50%) scaleX(1); /* Flip back at start */
  }
}
.red-text {
  color: red;
}
section {
  /* border-top: #1B4C9C 3px solid; */
  border-bottom: #1B4C9C 3px solid;
  box-shadow: 0 6px 8px rgba(29, 49, 89, 0.5);
}

#discussionForum {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#forum-icon {
  width: 200px; /* Control the size */
  height: 200px;
  object-fit: cover; /* Ensures it fills the circle without distortion */
  border-radius: 50%; /* Makes it a circle */
  box-shadow: 0 4px 12px rgba(27, 76, 156, 0.5); /* Optional: matches glow */
  margin: 0; /* Remove weird margins */
  padding: 0;
}
#forum-text {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 10px;
}
#forum-image {
  
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-right: 0;
  box-shadow: 0 4px 12px rgba(27, 76, 156, 0.5); /* Blueish glow */

}
#symptom-icons img,
#forum-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth animation */
}
/*symptom checker*/
#symptom-checker-icon {
  width: 100%;
  height: auto;
  margin: -55px -2px;
}
#symptom-text, #OTC-text, #forum-text, #symptom-icons, #OTC-icons, #forum-icons {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
   
}
.symptom-icons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
}

#symptomCheckers {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;

}
.symptom-icon-tile {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}

.symptom-icon-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  cursor: pointer;
}

.symptom-icon-tile h4,
.symptom-icon-tile p {
  color: inherit;
}
.symptom-icon-tile,
.symptom-icon-tile:link,
.symptom-icon-tile:visited {
    text-decoration: none;
    color: inherit;
}

.symptom-icon-tile h4,
.symptom-icon-tile p {
    text-decoration: none;
    color: inherit;
}

.symptom-icon-tile:hover {
    text-decoration: none;
}
.symptom-checker-icon {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%; /* makes it a perfect circle */
  flex-shrink: 0;
  background: white;
  border: 2px solid var(--dkBlue);
}

.symptom-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.symptom-text h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  text-align: left;
}

.symptom-text p {
  font-size: 1rem;
  text-align: left;
}

/* Hover effect */
#symptom-icons img:hover,
#forum-icon:hover {
    transform: translateY(-5px); /* Lift the icon slightly up */
    box-shadow: 0 4px 12px rgba(var(--dkBlue)); /* Soft glow shadow */
}

#OTCproducts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    flex-wrap: wrap;
}
.product {
  width: 100%;
  /* max-width: 1200px; optional: controls max size */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  padding: 2px; /* reduced padding */
  box-sizing: border-box;
  gap: 15px; /* add a little space between image and text */
  flex-wrap: wrap;
  border: var(--dkBlue) 2px solid;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product:hover {
  transform: scale(1.02); /* slightly grow on hover */
  box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* add a shadow on hover */
}
.product-image {
  flex: 0 0 30%; /* flex instead of width: better control */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px; /* smaller padding */
  box-sizing: border-box;
}

.product-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 50%; 
  box-shadow: 0 4px 12px rgba(27, 76, 156, 0.5); /* Blueish glow */
}

.product-text {
  flex: 1;
  padding: 5px;
  box-sizing: border-box;
}

/* Popup styles */
#productPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8); /* dark background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#productPopup.show {
  visibility: visible;
  opacity: 1;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  position: relative;
}

.popup-content img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
}

.popup-button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: var(--dkBlue);
  color: white;
  border: none;
  border-radius: 5px;
  text-decoration: none;
}

#closePopup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f00;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 50%;
  cursor: pointer;
}

/*footer*/
footer{
    font-size: small;
    text-align: center;
    background-color:var(--ltyellow);
    padding: 1rem;
    
}
/*contact page*/
.contact-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    background-color: var(--dkBlue);
    color: white;
    margin-bottom: 20px;
}
form{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 35px 35px 5px;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
    

}


form label {
    align-items: flex-start;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--dkBlue);
    font-size: 1.1rem;
}

form input,
form textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
}

form input:focus,
form textarea:focus {
    border-color: var(--ltblue);
    box-shadow: 0 0 8px var(--ltblue);
    outline: none;
}


form button:hover {
    background-color: var(--ltblue);
    transform: scale(1.05);
}


#thank-you-message {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  margin: 50px;
}

#thank-you-message.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
}
.cloud-wrapper {
  width: 100%;
  display: flex;
  justify-content: center; 
  align-items: center;
  margin-bottom: 20px;
}

.cloud-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  height: 450px; 
  
}


/* Clouds */
.cloud {
  width: 350px;
  height: auto;
  position: absolute;
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
  animation: float 6s ease-in-out infinite;
  bottom: 0px;  
  z-index: 1;
}

#cloud1 {
  width: 350px;
  height: 360px;
  left: 5%;
  bottom: 100px
  
}

#cloud2 {
  left: 25%;
  
}

#cloud3 {
  left: 55%;
  width: 400px;
 
}

/* Sheep */
.sheep {
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
  animation: jump 10s ease-in-out infinite;
  
  position: absolute;
  bottom: 25px;
  z-index: 2;
  
}

#sheep1 {
  left: 10%;
  width: 90px;
}

#sheep2 {
  left: 35%;
  width: 110px;
  animation-delay: 0.5s;
 
}

#sheep3 {
  left: 60%;
  width: 120px;
  animation-delay: 1s;
  
}

/* Animations */
@keyframes jump {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-80px);
  }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}
/*About Page */
.about-header {
  text-align: center;
  padding: 30px 20px 10px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.7;
}

.about-content h3 {
  margin-top: 30px;
  color: var(--dkBlue);
  font-size: 1.6rem;
}

.about-content p {
  margin-top: 10px;
}

/*content page */
 #sleep-hygiene-article {
    max-width: 800px;
    margin: 25px auto;
    padding: 20px;
 }
 #sleep-disorders-article {
    max-width: 800px;
    margin: 25px auto;
    padding: 20px;
}
 .article-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
    background-color: var(--ltyellow);
    color: var(--dkBlue);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  .article-content {
    /* max-width: 800px; */
    width: 100%;
    margin: 0;
    padding: 1rem;
    line-height: 1.7;
    background-color: white;
    color: black;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: var(--ltblue) 2px solid;
    box-sizing: border-box;
    overflow-wrap: break-word;
    font-size: large;
  }
  .article-content h3 {
    margin-top: 10px;
    color: var(--dkBlue);
    font-size: 1.6rem;
    text-align: left;
  }
  aside {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    background-color: black;
    color: var(--ltyellow); 
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.2);
  }
  aside h3 {
    margin-top: 0;
    font-size: 1.6rem; 
  }
  aside p {
    margin-top: 10px;
  }
  aside ul {
    list-style-type: none;
    padding: 0;
  }
  aside li {
    margin: 5px 0;
  }
  details {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--ltblue);
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
  }
  
  summary {
    font-weight: bold;
    cursor: pointer;
  }
  
  details[open] {
    background-color: #e6f0ff;
  }
  #social-media-icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
  }
  .footer-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
  }
  
  .footer-logo:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    transition: transform 0.3s ease; /* Smooth transition */
  }
 /* Floating table of contents */

#floating-toc {
    display: none;
    position: fixed;
    top: 140px;
    right: 24px;
    width: 230px;
    z-index: 1000;
}

#floating-toc.is-visible {
    display: block;
}

#toc-toggle {
    display: none;
}

#toc-navigation {
    max-height: calc(100vh - 180px);
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
    border: 2px solid #1b4c9c;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.15);
}

#toc-navigation h2 {
    margin: 0 0 15px;
    color: #1b4c9c;
    font-size: 1.15rem;
}

#toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

#toc-list li {
    margin: 0;
    padding: 0;
}

#toc-list a {
    display: block;
    padding: 7px 5px;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.3;
    text-decoration: none;
    border-left: 3px solid transparent;
}

#toc-list a:hover,
#toc-list a:focus {
    color: #1b4c9c;
    text-decoration: underline;
}

#toc-list a.active {
    padding-left: 10px;
    color: #1b4c9c;
    font-weight: 700;
    border-left-color: #1b4c9c;
}

#toc-list a.toc-h3 {
    padding-left: 15px;
}

#toc-list a.toc-h3.active {
    padding-left: 20px;
}

#toc-back-to-top {
    display: block;
    margin-top: 15px;
    padding-top: 12px;
    color: #1b4c9c;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-top: 1px solid #ddd;
}

#toc-back-to-top:hover,
#toc-back-to-top:focus {
    text-decoration: underline;
}

.article-content h2,
.article-content h3 {
    scroll-margin-top: 120px;
}

html {
    scroll-behavior: smooth;
}

@media screen and (max-width: 1100px) {
    #floating-toc {
        top: auto;
        right: 18px;
        bottom: 120px;
        width: min(290px, calc(100vw - 36px));
    }

    #toc-toggle {
        display: block;
        width: 100%;
        padding: 12px 16px;
        background-color: #1b4c9c;
        color: #fff;
        border: none;
        border-radius: 25px;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    }

    #toc-navigation {
        display: none;
        margin-bottom: 10px;
        max-height: 60vh;
    }

    #floating-toc.menu-open #toc-navigation {
        display: block;
    }
}

@media (min-width: 769px) {
    /*slider section*/
    #topic-gallery-slider {
        position: relative;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
        height: 450px;
    }

    .topic {
        width: 60%;
        text-align: left;
        padding: 10px;
        height: 350px;
    }

    /* Topic text container */
    #topic-text {
        width: 50%;
    }

    /* Topic image container */
    #topic-img-wrapper {
        width: 50%;
    }

    /* Topic image styling */
    .topic-img {
        width: 100%;
    }

    #symptomCheckers {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 20px;
        padding: 20px;
        margin: 0 auto;
    }

    #symptom-text {
        grid-column: 1 / -1;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .symptom-icons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        grid-column: 1 / -1; /* This spans the icon grid across both columns in the parent */
    }

    .symptom-icon-tile {
        display: grid;
        grid-template-columns: 1fr 2fr;
        align-items: center;
        padding: 20px;
        gap: 20px;
        border: var(--dkBlue) 2px solid;
        border-radius: 10px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    #OTCproducts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 20px;
    }

    #OTCproducts > h2,
    #OTCproducts > p {
        grid-column: 1 / -1;
        text-align: center;
    }

    .product {
        display: flex;
        flex-direction: column; /* 👈 stack image over text */
        align-items: center;
        text-align: center;
        gap: 15px;
        background: #f9f9f9;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .product-image img {
        width: 200px;
        height: 200px;
        object-fit: cover;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(27, 76, 156, 0.5);
    }

    .product-text h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .product-text p {
        font-size: 1rem;
    }

    /* Desktop layout changes for header at 769px+ */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        flex-direction: row;
        background-color: black;
        color: var(--dkBlue);
    }

    /* Hide hamburger menu */
    .menu-icon {
        display: none;
    }

    /* Logo and tagline on the left */
    .header-text {
        text-align: left;
        flex: 1;
        font-size: 1.3rem;
    }

    /* Optional image container on the right */
    .header-image {
        flex: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    h1 {
        line-height: normal;
    }

    .header-image img {
        width: 100px;
        height: auto;
        object-fit: contain;
    }

    header p {
        font-size: 1.75rem;
    }

    /* Horizontal nav bar */
    .nav-links {
        display: flex;
        justify-content: center;
        flex-direction: row;
        background-color: transparent;
        margin: 10px;
        gap: 40px;
        position: static;
        opacity: 0;
        animation: fadeIn 0.5s ease-in-out forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.active {
        flex-direction: row;
        display: flex;
    }

    .nav-links ul {
        display: flex;
        gap: 40px;
        padding: 0;
        margin: 0;
        flex-direction: row;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        background-color: var(--ltyellow);
        color: black;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: bold;
        text-decoration: none;
        transition: background-color 0.3s ease;
    }

    .nav-links a:hover {
        background-color: var(--ltblue);
        color: white;
    }

    .article-content {
        padding: 12px 30px 10px 35px;
    }
}
.epworth-results-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.epworth-results-card {
    padding: 2.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.12);
}

.results-eyebrow {
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.epworth-results-card h1 {
    margin-top: 0;
}

.results-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    padding: 2rem;
    background: #ffd970;
    border-radius: 1rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.score-total {
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.results-section {
    margin-top: 2rem;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.results-actions button,
.results-actions a {
    display: inline-block;
    padding: 0.8rem 1.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: #1b4c9c;
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.results-disclaimer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ccc;
    font-size: 0.9rem;
}

@media print {
      #svg-container,
    #animated-svg-wrapper {
        display: none !important;
    }
    @page {
        size: Letter;
        margin: 0.25in;
    }

    header,
    nav,
    footer,
    .results-actions,
    #wpadminbar {
        display: none !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .epworth-results-page {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .epworth-results-card {
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .results-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .results-score {
        margin: 0.4rem 0 !important;
        padding: 0.5rem !important;
    }

    .results-section {
        margin-top: 0.4rem !important;
    }

    .results-section h2,
    .results-section p,
    .results-disclaimer {
        margin-top: 0.2rem !important;
        margin-bottom: 0.2rem !important;
    }
}
.page-content-card {
    width: min(90%, 900px);
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    color: #000;
    border: 2px solid var(--blue);
    border-radius: 8px;
    box-sizing: border-box;
}

.page-content-card p,
.page-content-card li {
    color: #000;
}

.page-content-card h2,
.page-content-card h3,
.page-content-card h4 {
    color: var(--blue);
}
#footer-legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin: 15px auto;
    padding: 0 20px;
}

#footer-legal-links a {
    color: #1b4c9c;
    font-size: 0.9rem;
    font-weight: bold;
    text-decoration: none;
}

#footer-legal-links a:hover,
#footer-legal-links a:focus {
    color: #ffffff;
    text-decoration: underline;
}
.header-text {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
}

.header-logo-link {
    display: block;
    flex: 0 0 auto;
}

.header-logo {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.header-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-brand-copy h1,
.header-brand-copy p {
    margin: 0;
}
.header-text {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
}

.header-logo-link {
    display: block;
    flex: 0 0 auto;
}

.header-logo {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.header-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-brand-copy h1,
.header-brand-copy p {
    margin: 0;
}
@media (max-width: 768px) {
    .header-brand-copy {
        display: none !important;
    }
}
.shop-store-button {
    text-align: center;
    margin: 30px 0;
}

.shop-btn {
    display: inline-block;
    background-color: #1B4C9C;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.shop-btn:hover {
    background-color: #5DA9E9;
    color: #ffffff;
    transform: translateY(-2px);
}