
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    background-color: #eff7f2;
    background-image: url("Assets/first aid background.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #b7c9c800;
  font-weight: bold;
  font-style: italic;
  font-size: 1.25rem;

}
.logo-container {
  display: flex;
  gap: 10px; 
  width: 175px;
  height: 175px;
}


.menu {
  flex-grow: 1;
  text-align: right;
}

.menu a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  padding: 10px 20px;
  transition: all 0.3s ease-in-out;
}

.menu a:hover,
.menu a.active {
  background-color: #2fc2ae;
  color: black;
  border-radius: 5px;
}
  /* Title */
  main h1.fade-in {
    text-align: center;
    font-size: 90px;
    margin-top: 20px;
    font-weight: bold;
  }

  main h1.fade-in {
    color: #1c6b57 !important; 
    text-align: center;
    font-size: 90px;
    margin-top: 20px;
    font-weight: bold;
    color: #1c666b; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease, text-shadow 0.3s ease;
  }
  main h1.fade-in:hover{
    color:#22cfa4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  
  }
.subtitle.fade-in {
    text-align: center;
    margin-bottom: 30px;
    font-size: 25px;  
    color: #1c6b57;
  }

  .subtitle.fade-in:hover {
    color: #22cfa4;
  }
  
  /* Cards Section */
  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
    padding: 20px;
  }
  
  .card {
    background-color: #83daac;
    padding: 20px;
    width: 300px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  #diabetesCard {
    background-color: #ffe0e0;
  }
  
  #lactoseCard {
    background-color: #ffe0e0;
  }
  
  .card:hover {
    transform: scale(1.05);
    background-color: #a5dbcb;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  
  }
  #diabetesCard:hover {
    background-color: #ffb3b3;
  }

  #lactoseCard:hover {
    background-color: #ffb3b3;
  }
  
  .card img {
    width: 150px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .card:hover img {
    transform: rotate(10deg) scale(1.1);
  }
  
  /* Info Box */
  .info-box {
    margin: 30px auto;
    width: 80%;
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: opacity 0.5s ease;
    opacity: 0;
  }
  
  .info-box.show {
    opacity: 1;
    font-size: 20px;
    color: #2c3e50; 
  }
  
  hr {
    width: 100%; 
    border: none; 
    border-top: 1px dashed #1c6b57; 
    margin: 20px auto; 
}







  /* Animations */
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    font-size: 20px;
    color: #2c3e50; 
  }
  
  .fade-in:nth-child(1) { animation-delay: 0.2s; }
  .fade-in:nth-child(2) { animation-delay: 0.4s; }
  .fade-in:nth-child(3) { animation-delay: 0.6s; }
  .fade-in:nth-child(4) { animation-delay: 0.8s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }




/* sections indetaills */

.first-aid-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* General link styling */
a {
  text-decoration: none; 
  color: inherit; 
  font-weight: bold; 
  transition: color 0.3s ease; 
}

a:hover {
  color: #11bcc9; 
}

/*Chatbot*/   
#chatbot-icon {
  position: fixed;
  top: 150px;
  right: 20px;
  cursor: pointer;
  z-index: 999;
  transition: transform 0.5s ease;
}

#chatbot-icon img {
  width: 100px;
  height: 100px;
  transition: transform 0.3s ease;
  -webkit-transition: transform 0.3s ease;
  -moz-transition: transform 0.3s ease;
  -ms-transition: transform 0.3s ease;
  -o-transition: transform 0.3s ease;
}

#chatbot-icon:hover img {
  transform: scale(1.2);
}
.label {
position: absolute;
bottom: -40px;
right: 50%;
transform: translateX(50%);
background: #A0D9D3;
color: black;
padding: 5px 10px;
border-radius: 8px;
white-space: nowrap;
font-size: 14px;
opacity: 0;
transition: 0.3s;
pointer-events: none;
z-index: 999; /* تأكد فوق الكل */
font-weight: bold;
font-style: italic;
font-size: 1.25rem;
}
#chatbot-icon:hover .label {
opacity: 1;
}




/* Default Styles (Desktop First) */
/* .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo-container {
  width: 175px;
  height: 175px;
}

.logo-container img {
  width: 100%;
  height: auto;
  max-width: 220px;
  max-height: 200px;
}

.menu {
  text-align: right;
} */

main h1.fade-in {
  font-size: 90px;
}

.subtitle.fade-in {
  font-size: 25px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: center;
}

.card {
  width: 300px;
}

#chatbot-icon {
  position: fixed;
  top: 150px;
  right: 20px;
  width: 100px;
  height: 100px;
  z-index: 1000;
}

#chatbot-icon img {
  width: 100%;
  height: 100%;
}

.info-box {
  width: 80%;
  margin: 20px auto;
}

/* -------------------------------------- */
/* Responsive Styles */

/* Tablet Screens (768px and below) */
@media (max-width: 768px) {

  main h1.fade-in {
    font-size: 70px;
  }

  .subtitle.fade-in {
    font-size: 20px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .card {
    width: 80%;
  }

  .info-box {
    width: 90%;
  }
}

/* Mobile Screens (480px and below) */
@media (max-width: 480px) {

  main h1.fade-in {
    font-size: 50px;
  }

  .subtitle.fade-in {
    font-size: 18px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card {
    width: 90%;
  }


  .info-box {
    width: 95%;
  }
}


















/* Basic styling for the hamburger menu */
.menu-icon {
  display: none; 
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000; 
  width: 40px;
  height: 40px;
  

}

.menu-icon .bar {
  display: block;
  width: 30px;
  height: 5px;
  margin: 6px 0;
  background-color: black;
  border-radius: 10px; 

}


/* Responsive Design */
/* @media (max-width: 1024px) {

  .header {
      flex-direction: column; 
      align-items: center;
  }

  .logo {
      width: 120px; 
      height: auto;
  }

  .menu {
      justify-content: center;
      gap: 10px;
  }
  #chatbot-icon {
      top: 100px; 
      right: 10px;
      width: 80px; 
      height: 80px;
  }

  #chatbot-icon img {
      width: 80px;
      height: 80px;
  }

  h1 {
      font-size: 60px; 
  }


} */

@media (max-width: 0px) {
  nav ul {
      flex-direction: row;
  }
  .header {
      flex-direction: row; /* Stack header elements */
      align-items: center;
  }

  .logo {
      width: 100px; /* Further reduce logo size */
      height: auto;
  }

  .menu {
      flex-direction: column; /* Stack navigation links vertically */
      align-items: center;
      gap: 15px;
  }

  .menu a {
      font-size: 16px; /* Reduce font size for navigation links */
      padding: 8px 15px;
  }
  #chatbot-icon {
      top: 80px; /* Adjust chatbot position */
      right: 10px;
      width: 70px; /* Reduce chatbot size */
      height: 70px;
  }

  #chatbot-icon img {
      width: 70px;
      height: 70px;
  }

  h1 {
      font-size: 50px; /* Adjust font size for smaller tablets */
  }
}

@media (max-width: 0px) {
  nav ul li {
      margin: 0.5rem 0;
  }

  .chatbot-button {
      width: 50px;
      height: 50px;
      font-size: 10px;
  }

  .modal-content {
      padding: 1rem;
  }

  .header {
      flex-direction: column; /* Stack header elements */
      align-items: center;
  }

  .logo {
      width: 80px; /* Further reduce logo size for small screens */
      height: auto;
  }

  .menu {
      flex-direction: column; /* Stack navigation links vertically */
      align-items: center;
      gap: 10px;
  }

  .menu a {
      font-size: 14px; /* Reduce font size for navigation links */
      padding: 8px 10px;
  }

  #chatbot-icon {
      top: 60px; /* Adjust chatbot position */
      right: 5px;
      width: 60px; /* Reduce chatbot size */
      height: 60px;
  }

  #chatbot-icon img {
      width: 60px;
      height: 60px;
  }
}

/* Responsive Styles */
/* Tablet Screens (768px and below) */
@media (max-width: 0px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo-container {
    width: 125px;
    height: 125px;
    margin-bottom: 10px;
    margin-right: 280px;

  }

  .logo-container img {
    max-width: 125px;
    max-height: 125px;
  }

  .menu {
    text-align: center;
  }
  #chatbot-icon {
    top: 120px;
    right: 15px;
    width: 90px;
    height: 90px;
  }

  #chatbot-icon img {
    width: 100%;
    height: 100%;
  }

}
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
  }

  .logo-container {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
  }

  .logo-container img {
    max-width: 100px;
    max-height: 100px;
  }

  .menu {
    text-align: center;
  }

  #chatbot-icon {
    top: 130px;
    right: 10px;
    width: 70px;
    height: 70px;
  }

  #chatbot-icon img {
    width: 100%;
    height: 100%;
  }
}

/* Basic styling for the hamburger menu */
.menu-icon {
  display: none; 
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000; 
  width: 40px;
  height: 40px;
}

.menu-icon .bar {
  display: block;
  width: 30px;
  height: 5px;
  margin: 6px 0;
  background-color: black;
  border-radius: 10px; 

}

/* Make the navbar hidden in responsive mode */
#navbar.hidden {
  display: none;
}

/* Responsive layout - when screen width is below 768px */
@media (max-width: 768px) {
  .menu-icon {
      display: block; /* Show hamburger icon in mobile view */
      z-index: 1001;
  }

  #navbar {
    position: absolute;
    top: 0;
    right: 5;
    width: 100%;
    flex-direction: row;
    align-items: center;
    align-content: center;
    display: none; /* Hidden by default */
    padding-top: 90px;
    font-weight: bold;
    font-style: italic;
    font-size: 1.25rem;
  left: 5px;
  gap: 3px;
  
}

  #navbar ul {
      flex-direction: row;
      gap: 10px;
  }

  #navbar.visible {
      display: flex; /* Show navbar when toggled */
      z-index: 1000;
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #b7c9c800;
  font-weight: bold;
  font-style: italic;
  font-size: 1.25rem;

}
.logo-container {
  display: flex;
  gap: 10px; 
  width: 175px;
  height: 175px;
}


.menu {
  flex-grow: 1;
  text-align: right;
}

.menu a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  padding: 10px 20px;
  transition: all 0.3s ease-in-out;
  align-items: center;
  justify-content: center;
}

.menu a:hover,
.menu a.active {
  background-color: #2fc2ae;
  color: black;
  border-radius: 5px;
}

@media (max-width: 768px) ,(max-width: 1024px) {
  .menu-icon {
      display: block; /* Show hamburger icon in mobile view */
      z-index: 1001;
  }

  #navbar {
    position: absolute;
    top: 0;
    width: 100%;
    flex-direction: row;
    align-items: center;
    display: none; /* Hidden by default */
    padding-top: 90px;
    font-weight: bold;
    font-style: italic;
    font-size: 1.2rem;
  left: px;
  gap: 3px;
  
}

  #navbar ul {
      flex-direction: row;
      gap: 3px;
  }

  #navbar.visible {
      z-index: 1000;
  }
  }

/* Responsive Styles */
@media (max-width: 768px) {
  .header {
      flex-direction: ro; 
      align-items: center; 
      justify-content: space-between;
      padding: 10px 0px; 
  }

  .menu {
      display: flex;
      text-align: center;
      transform: translateX(20px)  ;
      -webkit-transform: translateX(-20px);
      -moz-transform: translateX(20px);
      -ms-transform: translateX(20px);
      -o-transform: translateX(20px);
      flex-wrap: wrap; 
      justify-content: center;
      gap: 10px;
  
}

  .menu a {
      font-size: 14px; 
      padding: 8px 15px; 
      display: block; 
  }

  .logo-container {
      width: 80px; 
      height: 80px; 
      margin-left:-320px;

  }

  .menu a {
      margin: 5px 0;
  }

  #chatbot-icon {
      top: 120px; 
      right: 10px; 
  }

  #chatbot-icon img {
      width: 80px; 
      height: 80px; 
  }
  .menu-icon {
    display: block; /* Show hamburger icon in mobile view */
    z-index: 1001;
}

#navbar {
  position: absolute;
  top: 0;
  right: 5;
  flex-direction: row;
  align-items: center;
  display: none; /* Hidden by default */
  padding-top: 95px;
  font-weight: bold;
  font-style: italic;
  font-size: 1.25rem;
  left: 5px;
  gap: 3px;
}

#navbar.visible {
    display: flex; /* Show navbar when toggled */
    z-index: 1000;
}

  .category.locked::after {
    content: "🔒 Login is required";
    position: absolute;
    bottom: 29px;
    left: 18%;
    transform: translateX(-7%);
    background: rgba(0, 0, 0, 0.845);
    color: #fff4f4;
    font-size: 9px;
}
}
