@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Navbar Styles */
.nav {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 4rem;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    margin: 0;
}

.logo {
    height: 2rem;
    width: auto;
    margin: 0;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    margin-right: 2rem;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    justify-content: flex-end;
}

.nav-item {
    position: relative;
    display: inline-block;
}

.nav-button {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-button:hover {
    color: #fff;
}

.chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.chevron.rotate {
    transform: rotate(180deg);
}

.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.dropdown.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-button {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    z-index: 1001;
}

.hamburger {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(17, 17, 37, 0.8) 0%, rgba(39, 39, 69, 0.8) 100%), url('https://static.vecteezy.com/system/resources/previews/007/278/150/non_2x/dark-background-abstract-with-light-effect-vector.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  text-align: center;
  padding: 2rem;     /* Increased padding */
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  max-width: 1200px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  margin: 6rem auto 2rem;  /* Increased top margin */
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #61dafb;
  text-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  height: 300px;
}

.calculator-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.5);
}

.calculator-card h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-align: center;
}

.calculator-card p {
  color: #ddd;
  font-size: 1rem;
  margin-bottom: 0;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.calculator-card .wave {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  height: 50px;
  background: linear-gradient(45deg, #61dafb, #21a1f1, #61dafb);
  background-size: 200% 200%;
  animation: waveAnimation 5s linear infinite;
  border-radius: 0 0 10px 10px;
}

@keyframes waveAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.calculator-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* Only make changes for screens below 1024px */
@media (max-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card {
    height: auto;
  }

  .calculator-card h2 {
    font-size: 1.4rem;
  }

  .calculator-card p {
    font-size: 1rem;
  }
}

/* Specific adjustments for tablets and mobile devices */
@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .nav-items {
    display: none;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-items.mobile-active {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-button {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1rem;
  }

  .dropdown {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 0.5rem;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .dropdown.active {
    display: block;
    animation: none;
    transform: none;
  }

  .dropdown-item {
    padding: 0.75rem 2rem;
  }

  .calculator-card h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .calculator-card p {
    font-size: 0.9rem;
    position: static;
    transform: none;
    text-align: center;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .calculator-card {
    padding: 15px;
  }

  .calculator-card h2 {
    font-size: 1.2rem;
  }

  .calculator-card p {
    font-size: 0.8rem;
  }

  .calculator-card .wave {
    height: 30px;
  }
}