html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: hidden;
}

body {
  font-family: "Oswald";
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #151424;
  color: rgb(255, 255, 255);
}

h1 {
  text-align: center;
  width: 100%;
}

button {
  padding: 10px 15px;
  text-decoration: none;
  color: white;
  background-color: #28506b;
  margin-top: 15px;
  margin-left: 20px;
  border: none;

  z-index: 1;
}

nav + button {
  margin-top: 40px;
}

a {
  color: white;
  text-decoration: none;
}

a:visited {
  color: white;
}

button:hover {
  background-color: #28506b8f;
  cursor: pointer;
}

#grid-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

#main-content {
  display: flex;
  flex-direction: row;
  align-items: center;
}

nav p {
  margin: 0;
  max-width: none;
  text-align: left;
  font-size: 1.2rem;
  line-height: 2;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
  justify-content: center;
}

nav {
  background-color: #1a1a1a;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-buttons {
  display: flex;
  gap: 30px;
  z-index: 1001;
  position: relative;
  flex: 1;
  justify-content: center;
}

.hamburger {
  display: none;
}

.nav-buttons a {
  padding: 10px 15px;
  text-decoration: none;
  color: white;
  background-color: #28506b;
  border: none;

  pointer-events: auto;
  display: inline-block;
}

.nav-buttons a:hover {
  background-color: #28506b8f;
  cursor: pointer;
}

.btn {
  padding: 10px 15px;
  text-decoration: none;
  color: white;
  background-color: #28506b;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;

  margin-top: 15px;
  margin-left: 20px;
}

.btn:hover {
  background-color: #28506b8f;
  cursor: pointer;
}

nav + .btn {
  margin-top: 40px;
}

.bottom-link {
  margin: 30px;
}

.bottom-link:hover {
  background-color: #28506b8f;
  cursor: pointer;
}

p {
  max-width: 600px;
  text-align: center;
  color: rgb(196, 196, 196);
  font-size: 1.5rem;
  line-height: 2;
  margin: 20px auto;
}

#converter {
  color: #ffffff;
  border-bottom: 5px solid #194144;
}

#generator {
  color: #ffffff;
  border-bottom: 5px solid #b13030;
}

#tool {
  color: #ffffff;
  border-bottom: 5px solid #155318;
}

#browser {
  color: #ffffff;
  border-bottom: 5px solid #56207a;
}

.logo {
  text-decoration: none;
  color: #ecf0f1;
  font-size: 1.5rem;
}

#grid-main a.card {
  display: flex;
  flex-direction: column;
  background-color: #202020;
  color: #ffffff;

  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 3px 6px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.05);
  border: 2px solid #ffffff;
  overflow: hidden;
  width: 18%;
  max-width: 18%;
  height: 300px;
  min-width: 0;
  flex: 0 0 auto;
}

#grid-main a.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.08);
}

.card-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #4e4e4e;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
}

.card-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #009fff;
  text-align: center;
}

.card-description {
  margin: 0;
  font-size: 0.9rem;
  color: #dfdfdf;
  line-height: 1.4;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#grid-main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding-top: 30px;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 1400px;
}

#grid-main > div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #3d3d3d62;
  padding: 10px;
  gap: 25px;
}

#grid-main h1 {
  font-size: 1.8rem;
  margin-top: 0;
  padding-bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 1200px) {
  #grid-main a.card {
    width: 23%;
    max-width: 23%;
  }
}

@media (max-width: 992px) {
  #grid-main a.card {
    width: 30%;
    max-width: 30%;
  }
}

@media (max-width: 768px) {
  #grid-main a.card {
    width: 45%;
    max-width: 45%;
  }

  .nav-center {
    display: none;
  }

  .nav-right {
    margin-left: auto;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
  }

  .hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-buttons {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    text-align: center;
  }

  .nav-buttons.active {
    display: flex;
  }
}

@media (max-width: 480px) {
  #grid-main a.card {
    width: 100%;
    max-width: 100%;
  }
}
