/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: "Poppins", sans-serif;
  color: #222;
  background: #f9f9f9;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* HEADER (gradient, non-sticky) */
.header {
  background: linear-gradient(90deg, #111827, #ff5555);
  color: #fff;
  padding: 1rem 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.container {
  width: 90%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* 🌈 Gradient Logo Text */
.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff7777, #ffcccc, #ff5555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

/* 🔥 Logo glow hover */
.logo:hover {
  text-shadow: 0 0 10px #ff6666, 0 0 20px #ff8888;
  transform: scale(1.05);
}

.nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.nav a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

/* 🔥 Nav link glow + underline animation */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #ff9999;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav a:hover::after {
  width: 100%;
}

.nav a:hover {
  color: #ffeaea;
  text-shadow: 0 0 8px #ff7777;
}

/* HERO SECTION */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #ff5555, #ff9966);
  color: white;
  text-align: center;
  padding: 6rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: slideFadeIn 1s ease forwards;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  animation: slideFadeIn 1s ease 0.2s forwards;
}

.hero .btn {
  background: #fff;
  color: #ff5555;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
  animation: slideFadeIn 1s ease 0.4s forwards;
  position: relative;
  z-index: 2;
}

.hero .btn:hover {
  background: #ffcccc;
  transform: scale(1.05);
}

/* MINI CALCULATOR ICONS IN HERO */
.hero .calc-preview {
  position: absolute;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: #ff5555;
  opacity: 0.85;
  animation: floatCalc 6s ease-in-out infinite;
  z-index: 1;
}

.hero .calc1 { top: 10%; left: 10%; animation-delay: 0s; }
.hero .calc2 { top: 20%; right: 15%; animation-delay: 2s; }
.hero .calc3 { bottom: 10%; left: 25%; animation-delay: 4s; }

@keyframes floatCalc {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* ANIMATION FOR HERO TEXT */
@keyframes slideFadeIn {
  0% { opacity: 0; transform: translateY(30px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* DECORATIVE SHAPES */
.hero-shapes span.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.shape1 {
  width: 200px;
  height: 200px;
  background: #fff;
  top: -50px;
  left: -50px;
}

.shape2 {
  width: 150px;
  height: 150px;
  background: #fff;
  bottom: 50px;
  right: -30px;
  animation-delay: 2s;
}

.shape3 {
  width: 100px;
  height: 100px;
  background: #fff;
  top: 20%;
  right: 40%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0);}
  50% { transform: translateY(-20px) translateX(15px);}
}

/* CALCULATORS SECTION */
.calculators {
  text-align: center;
  padding: 4rem 1rem;
}

.calculators h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* CARD STYLING */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.5s ease, opacity 0.6s ease;
  opacity: 0;
  transform: translateY(50px);
  position: relative;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 60px;
}

.card-sub {
  font-size: 0.85rem;
  color: #777;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.view-btn {
  background: #ff5555;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn:hover {
  background: #ff3333;
  transform: scale(1.05);
}

/* SUB LIST */
.sub-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  gap: 0.6rem;
  text-align: left;
}

.card.active .sub-list {
  max-height: 300px;
  opacity: 1;
}

.sub-list a {
  text-decoration: none;
  color: #333;
  background: #f6f6f6;
  padding: 0.6rem 0.8rem;
  border-radius: 5px;
  transition: 0.3s;
}

.sub-list a:hover {
  background: #ffeaea;
  color: #ff3333;
}

.card.active .view-btn {
  background: #444;
}

.card.active .view-btn::after {
  content: " ▲";
}

.view-btn::after {
  content: " ▼";
}

/* ABOUT SECTION */
.about {
  background: linear-gradient(135deg, #fff5f5, #ffeaea);
  padding: 4rem 1rem;
  text-align: center;
  color: #333;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about.visible {
  opacity: 1;
  transform: translateY(0);
}

.about h2 {
  font-size: 2rem;
  color: #ff5555;
  margin-bottom: 1rem;
}

.about p {
  max-width: 700px;
  margin: auto;
  font-size: 1.1rem;
  color: #444;
  line-height: 1.7;
}

/* FOOTER */
.footer {
  background: linear-gradient(90deg, #111827, #ff5555);
  color: #eee;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer p:last-child {
  color: #ffeaea;
  margin-top: 0.5rem;
}

/* SCROLL TO TOP BUTTON */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #ff5555;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.3rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

#scrollTopBtn:hover {
  background-color: #ff3333;
  transform: translateY(-4px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
  }

  .nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-btn {
    align-self: flex-start;
  }

  .card {
    padding: 1.5rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero .calc-preview {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .hero .calc1 { top: 5%; left: 5%; }
  .hero .calc2 { top: 15%; right: 5%; }
  .hero .calc3 { bottom: 5%; left: 15%; }
}
.more-btn {
  display: none; /* hidden by default */
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #ff5555;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: 0.3s ease;
}

.card.active .more-btn {
  display: inline-block; /* show only when expanded */
}

.more-btn:hover {
  background: #ff3333;
  transform: scale(1.05);
}
.all-calculators-wrapper {
  text-align: center;
  margin-top: 2rem;
}

.all-calculators-btn {
  display: inline-block;
  background: #ff5555;
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, background 0.25s ease;
}

.all-calculators-btn:hover {
  background: #ff3333;
  transform: translateY(-3px);
}
