/* ═══════════════════════════════════════════════════════
   Home Page Keypad Calculator, Article & FAQ Styles
   ═══════════════════════════════════════════════════════ */

/* ── CALCULATOR WRAPPER & COMPACT CARD ── */
.main-calc-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0 35px;
}

.main-calc-card {
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 12px 28px -5px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  transition: all 0.25s ease;
}

/* Dark theme override */
body.dark-theme .main-calc-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.4);
}

/* ── DISPLAY SCREEN ── */
.calc-screen {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 14px;
  text-align: right;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

body.dark-theme .calc-screen {
  background: var(--bg-input);
  border-color: var(--border);
}

.calc-history {
  font-size: 0.8rem;
  color: #64748b;
  min-height: 18px;
  font-family: 'JetBrains Mono', monospace;
  overflow-x: auto;
  white-space: nowrap;
}

body.dark-theme .calc-history {
  color: var(--text-muted);
}

.calc-display-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-align: right;
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  padding: 2px 0 0 0 !important;
}

body.dark-theme .calc-display-input {
  color: var(--text-light);
}

/* ── KEYPAD GRID ── */
.calc-keypad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.btn-calc {
  height: 42px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-num {
  background: #ffffff;
  color: #0f172a;
}

.btn-num:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-func {
  background: #f1f5f9;
  color: #1d4ed8;
  font-weight: 600;
}

.btn-func:hover {
  background: #e2e8f0;
}

.btn-operator {
  background: #fef3c7;
  color: #d97706;
  border-color: #fde68a;
  font-weight: 700;
  font-size: 1.15rem;
}

.btn-operator:hover {
  background: #fde68a;
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
  font-weight: 700;
}

.btn-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

.btn-equals {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  font-weight: 700;
  font-size: 1.2rem;
}

.btn-equals:hover {
  background: #1d4ed8;
}

/* Dark Theme Overrides for Buttons */
body.dark-theme .btn-calc {
  border-color: var(--border);
}

body.dark-theme .btn-num {
  background: var(--bg-card);
  color: var(--text-light);
}

body.dark-theme .btn-num:hover {
  background: var(--bg-input);
}

body.dark-theme .btn-func {
  background: var(--bg-input);
  color: var(--accent);
}

body.dark-theme .btn-func:hover {
  background: var(--border);
}

body.dark-theme .btn-operator {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

body.dark-theme .btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── ARTICLE CONTENT SECTION ── */
.home-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.home-article-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-light);
}

.home-article-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--text-light);
}

.home-article-card p, 
.home-article-card ul {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.home-article-card ul {
  padding-left: 20px;
  margin-top: 8px;
}

.home-article-card li {
  margin-bottom: 8px;
}

/* ── INDUSTRY LEVEL FAQS SECTION ── */
.faq-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
}

.faq-section h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 20px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  outline: none;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--bg-input);
}

.faq-icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease;
  background: var(--bg-card);
  padding: 0 20px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* Active FAQ State */
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* ── MOBILE RESPONSIVENESS ── */
@media (max-width: 600px) {
  .main-calc-card {
    padding: 14px;
  }

  .calc-keypad {
    gap: 5px;
  }

  .btn-calc {
    height: 38px;
    font-size: 0.85rem;
  }

  .calc-display-input {
    font-size: 1.5rem;
  }

  .home-article-card, .faq-section {
    padding: 20px 16px;
  }
}