/* ================================================
   UTILITY HUB — Main Stylesheet
   ================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #10b981;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 25px rgba(0,0,0,0.14);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.2s ease;
}

/* LANGUAGE VISIBILITY */
.show-es { display: none; }

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
p { margin-bottom: 1rem; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ================================================
   HEADER
================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: none;
}
.site-logo em { color: var(--text); font-style: normal; }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.875rem;
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition);
}
.header-search input:focus { border-color: var(--primary); background: white; }
.header-search .ico { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.site-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.site-nav a {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.site-nav a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* DROPDOWN */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 300;
  max-height: 380px;
  overflow-y: auto;
}
.search-dropdown.active { display: block; }
.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--text);
}
.search-result:hover { background: var(--bg-alt); text-decoration: none; }
.search-result .r-icon { font-size: 1.25rem; flex-shrink: 0; }
.search-result .r-name { font-weight: 600; font-size: 0.875rem; display: block; }
.search-result .r-desc { font-size: 0.78rem; color: var(--text-muted); }

/* ================================================
   AD UNITS
================================================ */
.ad-wrapper {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ad-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 4px;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  max-width: 100%;
}
.ad-unit::after { content: 'Ad'; position: absolute; top: 3px; right: 6px; font-size: 0.65rem; color: #b45309; }
.ad-leaderboard { width: 728px; height: 90px; }
.ad-rectangle { width: 336px; height: 280px; }
.ad-sidebar-box { width: 300px; height: 250px; }
.ad-sidebar-tall { width: 300px; height: 600px; position: sticky; top: 5rem; }
.ad-in-content { width: 100%; max-width: 728px; height: 90px; margin: 1.5rem auto; }
.ad-mobile-banner { width: 320px; height: 50px; }

/* ================================================
   HERO
================================================ */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #2563eb 80%, #7c3aed 100%);
  color: white;
  text-align: center;
  padding: 4.5rem 1.25rem 3.5rem;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 1rem; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.hero p { font-size: 1.15rem; opacity: 0.88; margin-bottom: 2rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.hero-search { max-width: 600px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
  outline: none;
  color: var(--text);
}
.hero-search .ico {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
}
.hero-stat strong { display: block; font-size: 1.9rem; font-weight: 800; }
.hero-stat span { font-size: 0.85rem; opacity: 0.75; }

/* ================================================
   SECTIONS
================================================ */
.section { padding: 3.5rem 0; }
.section-header { margin-bottom: 2rem; }
.section-title { font-size: 1.65rem; font-weight: 700; margin-bottom: 0.35rem; }
.section-sub { color: var(--text-muted); }

/* ================================================
   CATEGORY CARDS
================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  display: block;
  color: inherit;
  transition: all var(--transition);
  cursor: pointer;
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.cat-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.cat-count { font-size: 0.8rem; color: var(--text-muted); }

/* ================================================
   TOOL CARDS
================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tool-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.tool-card p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.55; flex: 1; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; }

.badge { font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 50px; font-weight: 600; }
.badge-finance { background: #d1fae5; color: #065f46; }
.badge-math { background: #dbeafe; color: #1e40af; }
.badge-daily { background: #fce7f3; color: #9d174d; }
.badge-curiosity { background: #ede9fe; color: #4c1d95; }

.btn-use {
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: background var(--transition);
  text-decoration: none;
}
.btn-use:hover { background: var(--primary-dark); text-decoration: none; }
a.tool-card { color: inherit; text-decoration: none; }

/* ================================================
   TOOL PAGE LAYOUT
================================================ */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 2rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}
.tool-main { min-width: 0; }
.tool-sidebar { position: sticky; top: 5rem; }

/* BREADCRUMB */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* TOOL WIDGET */
.tool-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.tool-widget-header {
  background: linear-gradient(135deg, #1e3a5f, var(--primary));
  color: white;
  padding: 1.75rem;
}
.tool-widget-header h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.tool-widget-header p { opacity: 0.85; font-size: 0.9rem; margin: 0; }
.tool-widget-body { padding: 1.75rem; }

/* FORM */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
  background: white;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

.btn-calc {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.75rem;
}
.btn-calc:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(37,99,235,0.4); }
.btn-reset {
  width: 100%;
  padding: 0.6rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all var(--transition);
}
.btn-reset:hover { border-color: var(--primary); color: var(--primary); }

/* RESULTS */
.results-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: none;
}
.results-box.show { display: block; animation: fadeIn 0.3s ease; }

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

.result-main {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.result-main .rv { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 0.25rem; }
.result-main .rl { font-size: 0.85rem; opacity: 0.85; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.result-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: center;
}
.result-item .ri-val { font-size: 1.2rem; font-weight: 700; color: var(--primary); display: block; }
.result-item .ri-lbl { font-size: 0.75rem; color: var(--text-muted); }

/* ================================================
   SEO CONTENT ARTICLE
================================================ */
.seo-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.seo-article h2 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--text); }
.seo-article h3 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; color: var(--text); }
.seo-article p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.8; }
.seo-article ul, .seo-article ol { margin: 0.75rem 0 1rem 1.5rem; }
.seo-article li { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 0.4rem; list-style: disc; }

/* FAQ */
.faq-section { margin-top: 1.75rem; }
.faq-section h2 { margin-bottom: 1rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.faq-q {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  transition: background var(--transition);
  user-select: none;
}
.faq-q:hover { background: var(--bg-alt); }
.faq-icon { transition: transform var(--transition); font-style: normal; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding: 0 1.25rem;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0.75rem 1.25rem 1rem; }

/* RELATED TOOLS */
.related-tools {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.related-tools h3 { margin-bottom: 1rem; font-size: 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.related-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.83rem;
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
}
.related-link:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.related-link .rl-icon { font-size: 1.1rem; }

/* SIDEBAR CARD */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sidebar-card h4 { font-size: 0.875rem; margin-bottom: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sidebar-tool-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.sidebar-tool-link:last-child { border-bottom: none; }
.sidebar-tool-link:hover { color: var(--primary); text-decoration: none; }

/* ABOUT/STATIC PAGES */
.page-hero {
  background: linear-gradient(135deg, #1e3a5f, var(--primary));
  color: white;
  text-align: center;
  padding: 4rem 1.25rem;
}
.page-hero h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.page-hero p { opacity: 0.85; max-width: 600px; margin: 0 auto; }
.page-content {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}
.page-content h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; color: var(--text); }
.page-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.page-content p { color: var(--text-muted); line-height: 1.8; }
.page-content ul { margin: 0.75rem 0 1rem 1.5rem; }
.page-content ul li { color: var(--text-muted); margin-bottom: 0.4rem; list-style: disc; }

/* ================================================
   FOOTER
================================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  border-bottom: 1px solid #1e293b;
}
.footer-brand strong { color: white; font-size: 1.2rem; display: block; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.65; margin: 0; }
.footer-col h4 { color: white; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: #94a3b8; font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: white; text-decoration: none; }
.footer-bottom {
  text-align: center;
  padding: 1.5rem 1.25rem 0;
  font-size: 0.8rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ================================================
   SCIENTIFIC CALCULATOR SPECIAL
================================================ */
.calc-display {
  background: #0f172a;
  color: #f0fdf4;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  text-align: right;
  font-family: 'Courier New', monospace;
}
.calc-expression { font-size: 0.85rem; color: #64748b; min-height: 1.2em; word-break: break-all; }
.calc-value { font-size: 2rem; font-weight: 700; word-break: break-all; }
.calc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}
.calc-btn {
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
  min-height: 2.5rem;
}
.calc-btn:hover { background: var(--bg-alt); border-color: var(--primary); color: var(--primary); }
.calc-btn.op { background: var(--primary-light); color: var(--primary-dark); }
.calc-btn.op:hover { background: var(--primary); color: white; }
.calc-btn.fn { background: #f3e8ff; color: #6b21a8; }
.calc-btn.fn:hover { background: #7c3aed; color: white; }
.calc-btn.equals { background: var(--primary); color: white; grid-column: span 2; }
.calc-btn.equals:hover { background: var(--primary-dark); }
.calc-btn.danger { background: #fee2e2; color: #b91c1c; }
.calc-btn.danger:hover { background: #ef4444; color: white; }

/* UNIT CONVERTER TABS */
.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: white;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* CURRENCY TABLE */
.currency-result-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.currency-result-table th { background: var(--bg-alt); padding: 0.6rem 0.75rem; text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.currency-result-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.currency-result-table td:last-child { font-weight: 700; color: var(--primary); }
.currency-result-table tr:hover td { background: var(--bg-alt); }

/* BMI GAUGE */
.bmi-gauge { position: relative; height: 20px; background: linear-gradient(90deg, #3b82f6 0%, #22c55e 18.5%, #22c55e 25%, #fbbf24 30%, #f97316 35%, #ef4444 100%); border-radius: 10px; margin: 1rem 0; }
.bmi-marker { position: absolute; top: -6px; width: 12px; height: 32px; background: #1e293b; border-radius: 3px; transform: translateX(-50%); transition: left 0.5s ease; }
.bmi-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); }

/* ================================================
   LANGUAGE TOGGLE
================================================ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.15rem;
  flex-shrink: 0;
}
.lang-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  color: var(--text-muted);
  transition: all var(--transition);
  letter-spacing: 0.04em;
}
.lang-btn.active { background: var(--primary); color: white; }
.lang-btn:hover:not(.active) { color: var(--primary); }

/* AD MID-CONTENT */
.ad-mid-content {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 1.5rem auto;
}

/* EXAMPLE BOX */
.example-box {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}
.example-box h4 { color: #0369a1; margin-bottom: 0.75rem; font-size: 0.95rem; }
.example-box p, .example-box li { color: #0c4a6e; font-size: 0.9rem; margin-bottom: 0.35rem; }
.example-box strong { color: #0369a1; }
.example-box code {
  background: white;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: #0c4a6e;
}
.example-steps { margin: 0.5rem 0 0 1.25rem; }
.example-steps li { list-style: decimal; margin-bottom: 0.3rem; }

/* JOURNEY BANNER (entre herramientas) */
.journey-banner {
  background: linear-gradient(135deg, var(--primary-light), #ede9fe);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.journey-banner p { font-size: 0.88rem; color: var(--primary-dark); margin: 0; flex: 1; }
.journey-banner a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.journey-banner a:hover { background: var(--primary-dark); text-decoration: none; }

/* ================================================
   404 PAGE
================================================ */
.page-404 {
  text-align: center;
  padding: 8rem 1.25rem;
}
.page-404 .err-code { font-size: 6rem; font-weight: 900; color: var(--primary); line-height: 1; }
.page-404 h2 { font-size: 1.75rem; margin: 1rem 0 0.75rem; }
.page-404 p { color: var(--text-muted); max-width: 400px; margin: 0 auto 2rem; }
.btn-home { display: inline-block; padding: 0.8rem 2rem; background: var(--primary); color: white; border-radius: 50px; font-weight: 700; }
.btn-home:hover { background: var(--primary-dark); text-decoration: none; }

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 1024px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.85rem; }
  .hero-stats { gap: 2rem; }
  .hero-stat strong { font-size: 1.5rem; }
  .site-nav { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .ad-leaderboard { width: 320px; height: 50px; }
  .calc-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .header-search { display: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================
   FEEDBACK WIDGET
   ================================================ */
#feedback-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
  z-index: 9000;
  transition: transform var(--transition), background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
#feedback-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

#feedback-modal { display: none; position: fixed; inset: 0; z-index: 9500; }
#feedback-modal.active { display: block; }

.fb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }

.fb-dialog {
  position: absolute;
  bottom: 5.5rem;
  right: 1.5rem;
  width: min(370px, calc(100vw - 2rem));
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.fb-dialog h3 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--text); }
.fb-dialog p { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 0.85rem; }
.fb-dialog textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.fb-dialog textarea:focus { border-color: var(--primary); }
.fb-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.fb-send {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition);
}
.fb-send:hover { background: var(--primary-dark); }
.fb-cancel {
  padding: 0.6rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.fb-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.2rem;
}
.fb-close:hover { color: var(--text); }
