/* ═══════════════════════════════════════════════════════════
   techi-tools.css — Styles for /tools/ hub and calculator pages
   Loaded conditionally via wp_enqueue_style on tools pages only
   Version: 1.0.0
   Updated: March 31, 2026
   ═══════════════════════════════════════════════════════════ */


/* ──────────────────────────────────────────────────────────
   1. PAGE LAYOUT OVERRIDES
   Tools pages need wider content area (no max-width: 820px)
   ────────────────────────────────────────────────────────── */

.techi-tools-page .techi-page-content {
  max-width: none;
  padding: 0;
}

.techi-tools-page .techi-page-content-main {
  padding-right: 24px;
}


/* ──────────────────────────────────────────────────────────
   2. LINK RESET
   Override global .post-content a forced color/underline
   so tool cards display correctly
   ────────────────────────────────────────────────────────── */

.techi-tools-page .post-content.entry-content a.techi-tool-card,
.techi-tools-page .post-content.entry-content a.techi-tool-card--featured,
.techi-tools-page .post-content.entry-content a.techi-sidebar-btn {
  color: inherit !important;
  text-decoration: none !important;
}

.techi-tools-page .post-content.entry-content a.techi-tool-card:hover,
.techi-tools-page .post-content.entry-content a.techi-tool-card--featured:hover {
  color: inherit !important;
  text-decoration: none !important;
}

.techi-tools-page .post-content.entry-content a.techi-sidebar-btn {
  color: #fff !important;
}


/* ──────────────────────────────────────────────────────────
   3. PAGE HEADER
   ────────────────────────────────────────────────────────── */

.techi-tools-page .techi-page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.techi-tools-page .techi-page-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.2;
}

.techi-page-subtitle {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  max-width: 580px;
}


/* ──────────────────────────────────────────────────────────
   4. TOOLS HUB — Featured Grid (2x2)
   ────────────────────────────────────────────────────────── */

.techi-tools-hub {
  margin-top: 4px;
}

.techi-tools-featured {
  margin-bottom: 40px;
}

.techi-tools-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.techi-tools-section-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.techi-tools-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 12px;
}

.techi-tools-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}


/* ──────────────────────────────────────────────────────────
   5. FEATURED TOOL CARD
   ────────────────────────────────────────────────────────── */

.techi-tool-card--featured {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 22px;
  text-decoration: none !important;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.techi-tool-card--featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #00b0ae;
}

.techi-tool-card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.techi-tool-card__icon--green  { background: #ecfdf5; color: #059669; }
.techi-tool-card__icon--blue   { background: #eff6ff; color: #2563eb; }
.techi-tool-card__icon--purple { background: #f5f3ff; color: #7c3aed; }
.techi-tool-card__icon--red    { background: #fef2f2; color: #dc2626; }

.techi-tool-card--featured h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
  line-height: 1.3;
}

.techi-tool-card--featured p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 14px;
}

.techi-tool-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00b0ae;
  display: inline-block;
}


/* ──────────────────────────────────────────────────────────
   6. CATEGORY GRID (3-col)
   ────────────────────────────────────────────────────────── */

.techi-tools-category {
  margin-bottom: 32px;
}

.techi-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.techi-tool-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 14px;
  text-decoration: none !important;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

a.techi-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  border-color: #00b0ae;
}

.techi-tool-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 2px;
  line-height: 1.3;
}

.techi-tool-card p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}


/* ──────────────────────────────────────────────────────────
   7. COMING SOON STATE
   ────────────────────────────────────────────────────────── */

.techi-tool-card--coming-soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  background: #fafafa;
}

.techi-tool-card__badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 7px;
  border-radius: 3px;
  margin-top: 6px;
}


/* ──────────────────────────────────────────────────────────
   8. TOOLS SIDEBAR
   ────────────────────────────────────────────────────────── */

.techi-tools-sidebar-nav {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.techi-sidebar-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e293b;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.techi-sidebar-tools-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.techi-sidebar-tools-list li {
  margin: 0;
}

.techi-sidebar-tools-list li a {
  display: block;
  padding: 9px 12px;
  font-size: 0.88rem;
  color: #4a5568 !important;
  text-decoration: none !important;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.35;
}

.techi-sidebar-tools-list li a:hover {
  background: #e6f7f7;
  color: #00b0ae !important;
}

.techi-sidebar-tools-list li.current a {
  background: #00b0ae;
  color: #fff !important;
  font-weight: 600;
}

.techi-tools-sidebar-cta {
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 100%);
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.techi-tools-sidebar-cta .techi-sidebar-heading {
  border-bottom-color: #99f6e4;
}

.techi-tools-sidebar-cta p {
  margin: 0 0 12px;
  line-height: 1.5;
  font-size: 0.85rem;
  color: #64748b;
}

a.techi-sidebar-btn,
.techi-sidebar-btn {
  display: inline-block;
  background: #00b0ae;
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

a.techi-sidebar-btn:hover,
.techi-sidebar-btn:hover {
  background: #009694;
  color: #fff !important;
}


/* ──────────────────────────────────────────────────────────
   9. CALCULATOR FORM STYLES
   ────────────────────────────────────────────────────────── */

.techi-calc-wrapper {
  margin-bottom: 32px;
}

.techi-calc-intro {
  margin-bottom: 4px;
}

.techi-calc-intro p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

.techi-calculator-form .frm_form_fields {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 8px;
}

.techi-calculator-form .frm_submit {
  text-align: center;
  margin-top: 12px;
}

.techi-calculator-form .frm_submit button {
  background: #00b0ae !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 48px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.1s !important;
}

.techi-calculator-form .frm_submit button:hover {
  background: #009694 !important;
  transform: translateY(-1px) !important;
}

.techi-calculator-form .frm_form_field label.frm_primary_label {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
  margin-bottom: 6px !important;
}

.techi-calculator-form .frm_form_field input[type="number"],
.techi-calculator-form .frm_form_field input[type="text"],
.techi-calculator-form .frm_form_field select {
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 1rem !important;
  background: #fff !important;
  transition: border-color 0.2s !important;
}

.techi-calculator-form .frm_form_field input:focus,
.techi-calculator-form .frm_form_field select:focus {
  border-color: #00b0ae !important;
  box-shadow: 0 0 0 3px rgba(0, 176, 174, 0.1) !important;
  outline: none !important;
}

.techi-calculator-form .techi-calc-result-field {
  background: #f0fdfa !important;
  border: 2px solid #99f6e4 !important;
  border-radius: 10px !important;
  padding: 14px 18px !important;
  margin-top: 8px !important;
}

.techi-calculator-form .techi-calc-result-field label.frm_primary_label {
  color: #0d9488 !important;
  font-size: 0.72rem !important;
}

.techi-calculator-form .techi-calc-result-field input {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  background: transparent !important;
  border: none !important;
  padding: 2px 0 !important;
}

.techi-calculator-form .techi-calc-result-field input:focus {
  box-shadow: none !important;
}

.techi-calculator-form .frm_half {
  width: 48% !important;
  display: inline-block !important;
  vertical-align: top !important;
}

.techi-calculator-form .frm_half.frm_first {
  margin-right: 3% !important;
}


/* ──────────────────────────────────────────────────────────
   10. FORMULA BOX
   ────────────────────────────────────────────────────────── */

.techi-formula-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #00b0ae;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 16px 0 24px;
}

.techi-formula-box code {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  background: none;
  padding: 0;
  display: block;
  margin-bottom: 6px;
  line-height: 1.6;
}

.techi-formula-box code sup {
  font-size: 0.7em;
}

.techi-formula-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.techi-formula-legend span {
  font-size: 0.82rem;
  color: #64748b;
}

.techi-formula-legend strong {
  color: #1e293b;
}


/* ──────────────────────────────────────────────────────────
   11. RESPONSIVE
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
  .techi-tools-page .techi-page-content-main {
    padding-right: 0;
  }
  .techi-tools-page .techi-page-sidebar {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
  }
}

@media (max-width: 768px) {
  .techi-tools-featured-grid {
    grid-template-columns: 1fr;
  }
  .techi-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .techi-tools-page .techi-page-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }
}

@media (max-width: 480px) {
  .techi-tools-grid {
    grid-template-columns: 1fr;
  }
  .techi-tool-card--featured {
    padding: 18px 16px;
  }
  .techi-formula-legend {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 600px) {
  .techi-calculator-form .frm_half {
    width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
  }
}
