/* =======================
   Layout & Global Styles
   ======================= */
body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

#main-content {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: auto;
}

/* =======================
   Navbar - Desktop Styles
   ======================= */
.navbar {
  display: flex;
  justify-content: center;
  padding: 3rem;
  width: 100%;
  background-color: #fff;
  position: relative;
}

.nav-brand {
  display: none; /* hidden on desktop */
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text);
  user-select: none;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 6rem;
  margin: 0;
  padding: 0;
}

.navbar a {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.5rem;
  display: inline-block;
  padding: 0.5rem 0;
  --underline-color: #000;
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background-color: var(--underline-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  transform: scaleX(1);
}

.navbar a.active:hover {
  animation: waveDrop 0.8s ease forwards;
}

.navbar a.active span {
  display: inline-block;
  transform: translateY(0);
}

/* =======================
   Link Animation Keyframes
   ======================= */
@keyframes waveDrop {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-3px);
  }
  40% {
    transform: translateY(2px);
  }
  60% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

/* =======================
   Hamburger Icon Styles
   ======================= */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: rgb(0, 0, 0);
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =======================
   Footer Styles
   ======================= */
footer {
  display: flex;
  justify-content: center;
  background-color: transparent;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text);
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* =======================
   Responsive Styles - Tablet
   ======================= */
@media (max-width: 1200px) {
  #main-content {
    max-width: 900px;
  }
}

/* =======================
   Responsive Styles - Mobile
   ======================= */
@media (max-width: 900px) {
  #main-content {
    max-width: 768px;
  }

  .navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* brand left, hamburger right */
    align-items: center;
    padding: 1rem 2rem;
  }

  .nav-brand {
    display: flex; /* show brand */
  }

  .nav-list {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 100%; /* directly under navbar */
    right: 0;
    width: 200px;
    box-shadow: var(--shadow, 0 4px 8px rgba(0, 0, 0, 0.1));
    padding: 1rem;
    gap: 1rem;
    z-index: 999;
    border-radius: 0 0 20px 20px;
  }

  .nav-list.active,
  .nav-list.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* =======================
   Utility Classes
   ======================= */
.hidden {
  display: none;
}

/* =============
   Page Specific
   ============= */

.tool-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.tool-card {
  width: 360px;
  height: 280px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  border: 2px solid #e9ecef;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: #0060f0;
  text-decoration: none;
}

.card-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #4caf50, #45a049);
}

.card-content {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #333;
  font-family: sans-serif;
}

.card-description {
  font-size: 1rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  background-color: #e9ecef;
  color: #333;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-age {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

.card-arrow {
  width: 24px;
  height: 24px;
  color: #0060f0;
  transition: transform 0.3s ease;
}

.tool-card:hover .card-arrow {
  transform: translateX(4px);
}
