/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Reset & Base Styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #ccd6e2;
  color: #03171f;
  transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #006D77;
  font-family:'Lucida Sans', sans-serif;
  color: #FFFFFF;
  padding: 16px 10px;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

/* Dark Mode */
.dark-mode {
  background-color: #121212;
  color: #F0F0F0;
}

.dark-mode header {
  background-color: #003B42;
  color: #E0F7FA;
}

.dark-mode .card {
  background-color: #1E2A30;
  color: #E0E0E0;
}

.dark-mode .card a {
  color: #121212;
  background-color: #7FDBFF;
}

.dark-mode .card a:hover {
  color: #121212;
  background-color: #5FCADD;
  text-decoration: underline;
}

.dark-mode footer {
  background-color: #004E64;
  color: #E0F7FA;
}

.dark-mode .search-bar input {
  background-color: #2A2A2A;
  color: #E0E0E0;
  border-color: #555555;
}

.dark-mode .search-bar input::placeholder {
  color: #B0B0B0;
}

.dark-mode .search-bar input:focus {
  border-color: #7FDBFF;
}

.dark-mode #categoryFilter {
  background-color: #2A2A2A;
  color: #E0E0E0;
  border-color: #555555;
}

.dark-mode #categoryFilter:focus {
  border-color: #7FDBFF;
}

.dark-mode #categoryFilter option {
  background-color: #2A2A2A;
  color: #E0E0E0;
}

/* Main Heading */
.main-heading h1 {
  margin-top: 12px;
}

/* Container */
.container {
  margin: 20px auto;
  padding: 20px;
  max-width: 900px;
}

.container h3 {
  text-align: center;
  font-size: 2rem;
  color: #1d4c64;
  font-family:'Lucida Sans', sans-serif;
}

/* Search Bar */
.search-bar {
  margin: 30px auto;
  max-width: 600px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.search-bar input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #cccccc;
  border-radius: 10px;
  outline: none;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
  color: #5ca5cc;
  transition: all 0.3s ease;
}

.search-bar input::placeholder {
  color: #5ca5cc;
}

.search-bar input:focus {
  border: 2px solid #219EBC;
  box-shadow: 0 0 8px rgba(33, 158, 188, 0.3);
  background-color: #f9f9f9;
}

/* Filter Dropdown */
#categoryFilter {
  width: 140px;
  height: 44px;
  padding: 0 10px;
  text-align: center;
  color: #5ca5cc;
  border: 1px solid #ccc;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 15px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
}

#categoryFilter:focus {
  border-color: #219EBC;
  outline: none;
}

/* Card Styling */
.card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin: 25px 0;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.03);
  background-color: rgba(222, 230, 233, 0.9);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.card a {
  color: #219EBC;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s ease-in-out;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 12px;
}

.card a:hover {
  color: #037b86;
  cursor: pointer;
  text-decoration: underline;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 100;
  display: none;
  background-color: #219EBC;
  color: white;
  border: none;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

#backToTop:hover {
  background-color: #037b86;
  transform: scale(1.2);
}

.dark-mode #backToTop {
  background-color: #7FDBFF;
  color: #121212;
}

.dark-mode #backToTop:hover {
  background-color: #5FCADD;
}

/* Toggle Mode Button */
#toggle-mode {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #037b86;
  border: 1px solid #037b86;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

#toggle-mode:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: aqua;
  border-width: 2px;
}

@media (max-width: 786px) {
  #toggle-mode {
    position: static;
  }
}

/* Footer */
footer {
  background-color: #28A6C7;
  color: white;
  font-family: Arial, sans-serif;
  padding: 50px 20px 30px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
}

.footer-section {
  flex: 1 1 220px;
  text-align: center;
}

.footer-section h2 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-section p {
  font-size: 15px;
  line-height: 1.5;
  color: #f0f0f0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #e5e5ff;
  text-decoration: none;
  font-size: 15px;
}

.footer-section a:hover {
  color: white;
}

.social-icons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons a {
  font-size: 20px;
  color: white;
  transition: 0.3s ease;
}

.social-icons a:hover {
  color: #000000;
}

.footer-bottom {
  margin-top: 40px;
  text-align: center;
  font-size: 15px;
  color: #e3e3e3;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  padding-top: 15px;
}

/* Dropdown Filter Section */
.filter-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  padding: 8px 8px;
  border: none;
  height: 45px;
  background-color: #28A6C7;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.dropdown-btn:hover {
  background-color: #006D77;
}
.checkbox-dropdown {
  display: none;
  position: absolute;
  background-color: white;
  border-radius: 8px;
  min-width: 180px;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  padding: 1px;
  background-color: #ccd6e2;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.checkbox-dropdown label {
   display: block;
  margin: 0px 0;
  padding-top: 8px;
  width: 180px;
  font-size: 14px;
  border-top: 1px solid #2b2727;
  border-bottom: 1px solid #2b2727;
  padding-left: 8px;
  border-radius: 0px;
  height: 25px;
}

.checkbox-dropdown input[type="checkbox"] {
  position: static;
  opacity: 1;
  width: auto;
  height: auto;
  margin-left: 0;
  margin-right: 0;
}

.checkbox-dropdown label:hover {
  background-color: #006D77;
  color:#e3e3e3
}
.dark-mode .checkbox-dropdown {
    background-color: #3d4e62;
    color: #E0E0E0;
}

.dark-mode .checkbox-dropdown label {
    color: #E0E0E0;
    border-top: 1px solid #646161;
   border-bottom: 1px solid #646161;
}

.dark-mode .checkbox-dropdown input[type="checkbox"] {
    accent-color: #7FDBFF;  /* color for checked box in supported browsers */
}


.filter-dropdown.open .checkbox-dropdown {
  display: block;
}


/* Hidden class */
.hidden {
  display: none;
}

#noResultsMessage {
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  text-align: left;
  font-size: 1.1rem;
  font-family: 'Roboto', sans-serif;
  animation: fadeIn 0.3s ease-out;
  
  /* Light mode default */
  background-color: #FFF5F5;
  color: #5E2B2B;
  border-left: 4px solid #FF6B6B;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
}

.dark-mode #noResultsMessage {
  background-color: #2A1A1A;
  color: #FFB4B4;
  border-left: 4px solid #FF4D4D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
input[placeholder] .search-bar{
  text-align: left;
}
.search-bar {
  position: relative;
  width: 100%;
}

.search-icon-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 16px;
  width: 20px;
  height: 20px;
  fill: #5ca5cc;
  transition: fill 0.3s ease;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 14px 46px 14px 16px !important;
}

/* Focus effects */
.search-bar input:focus + .search-icon {
  fill: #219EBC;
}

/* Dark mode */
.dark-mode .search-icon {
  fill: #B0B0B0;
}

.dark-mode .search-bar input:focus + .search-icon {
  fill: #7FDBFF;
}
