/* ========== Global Layout & Theme (from your current design) ========== */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

header {
  text-align: center;
  background: #007bff;
  color: #fff;
  padding: 2rem 1rem;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header p.intro,
header p {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

main {
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1rem;
}

section {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: #007bff;
}

/* FAQ styles (to match your other tools) */
#faq {
  margin-top: 2rem;
}

.faq-question {
  width: 100%;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  color: #007bff;
}

.faq-answer {
  display: none;
  padding: 1rem;
  border-left: 3px solid #007bff;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 4px;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
footer {
  background: #f1f1f1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== How to Use Section Styles (shared with your other tools) ========== */
section h2 {
  text-align: center;
  color: #007bff;
  font-size: 1.9rem;
  margin-bottom: 2rem;
  font-weight: 600;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #007bff;
  border-radius: 2px;
  opacity: 0.8;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.step {
  background: #ffffff;
  border: 1px solid #e1e8ef;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.15);
}

.step-number {
  width: 65px;
  height: 65px;
  background: linear-gradient(145deg, #007bff, #0056b3);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.step:hover .step-number {
  background: linear-gradient(145deg, #0069d9, #004d9f);
  transform: scale(1.05);
}

.step h3 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Steps animation delays */
.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.3s; }
.step:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Note box shared style */
.note-box {
  background: #e9f5ff;
  border: 2px solid #007bff;
  color: #0056b3;
  border-radius: 8px;
  text-align: center;
  padding: 1.2rem 1.5rem;
  margin-top: 2.5rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.note-box p {
  margin: 0;
  font-size: 1rem;
}

/* Related Tools Section (if you reuse it later) */
.related-tools {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.related-tools h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #007bff;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.tool-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  section h2 {
    font-size: 1.6rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  .note-box {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

/* ========== Percentage Calculator–Specific Styles (from existing style.css) ========== */

/* Calculator layout container */
.calculator-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-around;
  margin-top: 1.5rem;
}

.calc-mode {
  flex-basis: 30%; /* 3 columns on large screens */
  min-width: 280px;
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calc-mode h3 {
  color: #007bff;
  font-size: 1.3rem;
  margin-top: 0;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.calc-mode .description {
  font-style: italic;
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.input-group label,
.input-group span {
  font-weight: 500;
  color: #007bff;
  white-space: nowrap;
}

.input-group input[type="number"],
.input-group select {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  flex-grow: 1;
  min-width: 80px;
}

.result-box {
  background: #e3f2fd;
  border: 1px solid #007bff;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
}

#result1,
#result2,
#result3 {
  color: #28a745;
  font-size: 1.5rem;
}

/* Benefits list styling */
.benefits-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.benefits-grid li {
  background: #f8f9fa;
  padding: 1rem;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  font-size: 1rem;
}

/* Responsive adjustments for calculator */
@media (max-width: 1024px) {
  .calc-mode {
    flex-basis: 48%; /* 2 columns on medium screens */
  }
}

@media (max-width: 600px) {
  .calc-mode {
    flex-basis: 100%; /* 1 column on small screens */
  }

  .input-group {
    gap: 0.75rem;
  }

  .input-group input[type="number"],
  .input-group select {
    width: 100%;
  }
}
