/* ═══════════════════════════════════════════
   TOOLS HUB — Layout
═══════════════════════════════════════════ */

.tools-hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 100px;
  margin-top: 162px; /* banner (46px) + navbar (116px) */
}

/* ── PAGE HEADER ── */
.tools-header {
  margin-bottom: 40px;
}

.tools-header h1 {
  font-size: 44px;
  font-weight: 800;
  color: #0f1e3c;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tools-header p {
  font-size: 17px;
  color: #64748b;
  line-height: 1.7;
  max-width: 700px;
}

/* ── TOOLS LAYOUT: SIDEBAR + MAIN ── */
.tools-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-bottom: 64px;
}

/* ── SIDEBAR WITH TOOLS ── */
.tools-sidebar {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 20px;
  height: fit-content;
  position: sticky;
  top: 190px;
  box-shadow: 0 2px 8px rgba(8, 15, 30, 0.06);
}

.sidebar-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #0f1e3c;
  padding-bottom: 12px;
}

.sidebar-header h3 {
  font-size: 12px;
  font-weight: 800;
  color: #0f1e3c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

/* Tools List Navigation */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  color: #475569;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}

.tool-item:hover {
  background: #f8fafc;
  color: #0f1e3c;
  border-left-color: #2563eb;
}

.tool-item:active {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #2563eb;
}

.tool-icon {
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.tool-text {
  flex: 1;
}

.tools-sidebar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tool-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.tool-row:first-child {
  border-top: none;
}

.tool-row:hover {
  background: #f8fafc;
}

.tool-row td {
  padding: 12px 0;
}

.tool-name {
  font-weight: 600;
  color: #0f1e3c;
  flex: 1;
  font-size: 13px;
}

.tool-action {
  text-align: center;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #0f1e3c;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tool-link:hover {
  background: #1d4ed8;
  transform: translateX(2px);
}

/* ── MAIN CONTENT AREA ── */
.tools-main-content {
  width: 100%;
}

/* ── COMPACT TOOLS TABLE ── */
.tools-table-section {
  margin-bottom: 0;
}

.tools-table-section h2 {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.tools-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(8, 15, 30, 0.06);
}

.tools-table thead tr {
  background: #0f1e3c;
}

.tools-table th {
  padding: 13px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tools-table tbody tr {
  border-top: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.tools-table tbody tr:hover {
  background: #f8fafc;
}

.tools-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: #475569;
  vertical-align: middle;
}

.tools-table td.td-tool {
  font-weight: 700;
  color: #0f1e3c;
  font-size: 14px;
  white-space: nowrap;
}

.tools-table td.td-compliance {
  white-space: nowrap;
}

.compliance-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.tool-open-btn {
  display: inline-block;
  padding: 7px 16px;
  background: #0f1e3c;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.tool-open-btn:hover {
  background: #1d4ed8;
}

/* ── CTA SECTION ── */
.tools-cta-section {
  background: linear-gradient(135deg, #0f1e3c 0%, #1d4ed8 100%);
  border-radius: 16px;
  padding: 60px 48px;
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cta-content p {
  font-size: 16px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 32px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: white;
  color: #0f1e3c;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: rgba(255,255,255,0.12);
  color: white;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta-btn-secondary:hover {
  background: rgba(255,255,255,0.22);
}

/* ── TOOL PAGES: HEADER + NAV TABLE ── */
.tool-header-section {
  margin-bottom: 36px;
}

.tool-header-section h1 {
  font-size: 40px;
  font-weight: 800;
  color: #0f1e3c;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.tool-description {
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
  max-width: 720px;
}

/* Compact tools nav table on individual pages */
.tools-nav-table-section {
  margin-bottom: 48px;
}

.tools-nav-table-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.tools-nav-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}

.tools-nav-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.tools-nav-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tools-nav-table tbody tr {
  border-top: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}

.tools-nav-table tbody tr:hover {
  background: #f8fafc;
}

.tools-nav-table tbody tr.current-tool {
  background: #eff6ff;
}

.tools-nav-table td {
  padding: 11px 14px;
  color: #475569;
  vertical-align: middle;
}

.tools-nav-table td.td-tool-name {
  font-weight: 600;
  color: #0f1e3c;
  white-space: nowrap;
}

.tools-nav-table td.td-tool-name.active-tool {
  color: #2563eb;
}

.tools-nav-btn {
  display: inline-block;
  padding: 5px 13px;
  background: #0f1e3c;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.tools-nav-btn:hover {
  background: #1d4ed8;
}

.current-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── TOOL PAGE LAYOUT: SIDEBAR + MAIN ── */
.tool-page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}

/* ── TOOL PAGE SIDEBAR ── */
.tool-page-sidebar {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 18px;
  height: fit-content;
  position: sticky;
  top: 190px;
  box-shadow: 0 2px 8px rgba(8, 15, 30, 0.06);
}

.tool-page-sidebar .sidebar-header {
  margin-bottom: 18px;
  border-bottom: 2px solid #0f1e3c;
  padding-bottom: 12px;
}

.tool-page-sidebar .sidebar-header h3 {
  font-size: 11px;
  font-weight: 800;
  color: #0f1e3c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.tool-page-sidebar .tools-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tool-page-sidebar .tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  color: #64748b;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 500;
}

.tool-page-sidebar .tool-item:hover {
  background: #f8fafc;
  color: #0f1e3c;
  border-left-color: #2563eb;
}

.tool-page-sidebar .tool-item.active {
  background: #eff6ff;
  color: #2563eb;
  border-left-color: #2563eb;
  font-weight: 600;
}

.tool-page-sidebar .tool-icon {
  font-size: 15px;
  min-width: 18px;
  text-align: center;
}

.tool-page-sidebar .tool-text {
  flex: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 1280px) {
  .tool-page-layout {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .tool-page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tool-page-sidebar {
    position: static;
    display: none;
  }
}

.tool-calculator-panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 2px 8px rgba(8,15,30,0.05);
  height: fit-content;
  position: sticky;
  top: 180px; /* below banner + scrolled navbar */
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-section h3 {
  font-size: 12px;
  font-weight: 800;
  color: #0f1e3c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid #f0f4f8;
  padding-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 13px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 13px 11px 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafbfc;
  color: #0f1e3c;
  box-sizing: border-box;
}

/* Select doesn't have currency prefix — reset padding */
.form-group select {
  padding-left: 13px;
  cursor: pointer;
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.input-help {
  font-size: 11px;
  color: #94a3b8;
}

.calc-submit-btn {
  padding: 14px 24px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 10px rgba(37,99,235,0.3);
  margin-top: 8px;
  width: 100%;
}

.calc-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(37,99,235,0.4);
}

/* RESULTS PANEL */
.tool-results-panel {
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: fit-content;
  position: sticky;
  top: 180px;
}

.results-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.results-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeUp 0.25s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-section h3 {
  font-size: 12px;
  font-weight: 800;
  color: #0f1e3c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(226,232,240,0.6);
}

.result-row:last-of-type {
  border-bottom: none;
}

.result-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.result-value {
  font-size: 15px;
  color: #0f1e3c;
  font-weight: 700;
}

.result-row.highlight {
  background: rgba(37,99,235,0.1);
  padding: 12px 14px;
  border-radius: 8px;
  border-bottom: none;
  margin-top: 4px;
}

.result-row.highlight .result-value {
  color: #2563eb;
  font-size: 18px;
}

.info-box {
  background: white;
  border-left: 4px solid #2563eb;
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.65;
}

.info-box strong {
  display: block;
  margin-bottom: 6px;
  color: #0f1e3c;
  font-weight: 700;
}

/* FEATURES SECTION */
.tool-features-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 48px;
  box-shadow: 0 2px 8px rgba(8,15,30,0.04);
}

.tool-features-section h3 {
  font-size: 24px;
  font-weight: 800;
  color: #0f1e3c;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

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

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f1e3c;
}

.feature-item p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 1024px) {
  .tools-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tools-sidebar {
    position: static;
  }

  .tool-main-content {
    grid-template-columns: 1fr;
  }

  .tool-calculator-panel,
  .tool-results-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .tools-hub-container {
    padding: 50px 20px 80px;
    margin-top: 134px; /* banner (46px) + mobile navbar (88px) */
  }

  .tools-header h1,
  .tool-header-section h1 {
    font-size: 30px;
  }

  .tools-layout {
    grid-template-columns: 1fr;
  }

  .tools-sidebar {
    display: none;
  }

  .tool-calculator-panel,
  .tool-results-panel {
    padding: 24px;
  }

  .tools-cta-section {
    padding: 40px 24px;
  }

  .cta-content h2 {
    font-size: 26px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .tool-features-section {
    padding: 32px 24px;
  }

  .tools-table th,
  .tools-table td {
    padding: 11px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .tools-hub-container {
    padding: 36px 16px 60px;
  }

  .tools-table {
    display: block;
    overflow-x: auto;
  }

  .tool-calculator-panel,
  .tool-results-panel {
    padding: 18px;
  }

  .result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-value {
    font-size: 14px;
  }
}
