*{
  box-sizing: border-box;
  max-width: 100%;
}
html, body {
  overflow-x: hidden; /* Prevent horizontal overflow */
}



body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all ease-in-out 1s ;
  width: 100%;
}
body::-webkit-scrollbar{
  width: 5px;
  background-color: #000000;
}

body::-webkit-scrollbar-thumb{
background-color: #393939e1;
border-radius: 9px;
}



header {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.762) , rgba(69, 69, 69, 0.082));
  /* color: #fff; */
  padding: 10px 20px;
  text-align: center;
  display: flex;
  justify-content: space-between;
  transition: all ease-in-out 1s ;
  width: 100%;
  right: 0;
}
header img{
  width: 10rem;
  height: 5rem;
}

header h1 {
  margin: 0;
 text-align: center;
}
/* General Styles for Navigation */

.menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  padding: 10px 20px;
}

.menu h1 {
  color: white;
  margin: 0;
}

.nav-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-list ul li {
  margin: 0 10px;
}
.nav-list ul li:hover{
 
  width: 100%;
  border-bottom: 1px solid white;
}

.nav-list ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.nav-list ul li a:hover {
  color: #ddd;
}

.menu-icon {
  display: none;
  cursor: pointer;
}

.menu-icon i {
  font-size: 24px;
  color: white;
}

/* Media Query for Mobile */
@media screen and (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background-color: #333;
    text-align: center;
  }

  .nav-list ul {
    flex-direction: column;
  }

  .nav-list ul li {
    margin: 10px 0;
  }

  .menu-icon {
    display: block;
  }
}

/* Show the nav-list when active */
.nav-list.active {
  display: flex;
}

/* Styling for larger screens */
@media screen and (min-width: 769px) {
  .menu-button {
    display: none;
  }

  .nav-list {
    display: flex;
  }
}

.search-section {
  display: flex;
  justify-content: center;
  margin: 20px;
}

#country-search {
  background-color: #acacacd4;
  width: 500px;
  height: 50px;
  font-size: 150%;
  max-width: 600px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 1px;
  transition: border-color 0.3s;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.167);
}

.filters {
  align-items:center ;
  display: flex;
  justify-content: left;
  margin: 10px;
  width: 100%;
  
 
}

.filters select {
  padding: 10px;
  margin: 0 5px;
  border: none;
  border-radius: 1px;
  transition: border-color 0.3s;
  width: 20%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.167);
}

.results-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.country-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 10px;
  padding: 15px;
  text-align: center;
  width: 200px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  border-bottom: 2px solid #00000033;
  border-left: 1px solid #00000049 ;
  background: linear-gradient(270deg, rgb(180, 180, 180), rgb(230, 230, 230));
  
}

.country-card img {
  width: 100%;
  height: auto;
}

.country-card:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.details-section {
  margin: 10px auto;
  padding: 1rem;
  background: linear-gradient(160deg, rgb(33, 33, 33), rgb(62, 60, 74));
  color: white;
  border-radius: 8px;
  /* width: 90%; */
  max-width: 1200px;
  position: relative;
  transition: all ease-in-out 1s ;
}

.details-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all ease-in-out 1s ;
}

#country-flag {
  width: 50%;
  height: auto;
  margin-bottom: 1rem;
  transition: all ease-in-out 1s ;
}

#country-map {
  margin-top: 1rem;
  width: 100%;
  height: 300px; /* Adjust height as needed */
  border: 1px solid #ccc;
  background: #eaeaea;
  transition: all ease-in-out 1s ;
}

.details-content p {
  margin: 0.5rem 0;
  text-align: center;
}

.details-content span {
  font-weight: normal;
  width: 100%;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 10px;
  position: relative;
  width: 100%;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  height: 20vh;
}


.icon{
  position: relative;
  font-size: 150%;/* margin-top: 0px; */
  list-style: none;
}
.icon ul{
  display: flex;
  margin-left: 100px;

}
.icon ul li{
  
  margin-left: 50px;
  list-style: none;
  
}



i{
  color: white;
}
i:hover{
      transition:background-color 1s ease-in-out;
      text-shadow: 0 0 10px rgba(165, 211, 255, 0.493); 
      transform: translate(1.04); 

  }

/* Dark Mode Styles */
body.light-mode {
  background: #121212;
  color: #e0e0e0;
  transition: all ease-in-out 1s ;
}

body.light-mode nav ul li a{
  text-decoration: none;
  color: #ffffff;
  padding: 2rem;
}



body.light-mode header {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.293) , rgba(65, 65, 65, 0.984));
  transition: all ease-in-out 1s ;
}

body.light-mode .country-card {
  background: linear-gradient(90deg, rgb(18, 18, 18), rgb(48, 48, 48));
  color: #e0e0e0;
  border: 1px solid #000000;
  border-bottom: 2px solid #ddd;
  border-left: 1px solid #ddd ;
 
  
  /* transition: all ease-in-out 1s ; */
}

body.light-mode .details-section {
  background: linear-gradient(90deg, rgb(18, 18, 18), rgb(48, 48, 48));
  transition: all ease-in-out 1s ;
}

body.light-mode .details-content {
  color: #e0e0e0;
  transition: all ease-in-out 1s ;
}

body.light-mode #country-flag {
  filter: brightness(1.2);
  transition: all ease-in-out 1s ;
}
