@charset "UTF-8";

/* Estilos específicos para Tasador de joyas y detector de contrastes de oro y plata */

:root {
  --gold-primary: #eab308;
  --gold-hover: #ca8a04;
  --gold-glow: rgba(234, 179, 8, 0.25);
  --gold-border: rgba(234, 179, 8, 0.35);

  --silver-primary: #94a3b8;
  --silver-hover: #cbd5e1;
  --silver-glow: rgba(148, 163, 184, 0.25);

  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-surface: #1e293b;
  --bg-input: #020617;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.14);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

[data-theme="light"] {
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.12);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --gold-glow: rgba(202, 138, 4, 0.15);
  --silver-glow: rgba(100, 116, 139, 0.15);
}

/* Contención global y layout canónico */
body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main, #0b0f19);
  color: var(--text-main);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
}

.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Cabecera del visualizador */
.gold-hero-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.gold-hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.gold-hero-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gold-hero-title svg {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.gold-hero-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.6;
  max-width: 850px;
}

/* Pestañas de modo */
.tabs-navigation {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-navigation::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 150px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.tab-btn.active {
  background: var(--gold-primary);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--gold-glow);
}

/* Paneles */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Tarjetas de herramientas */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.panel-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.panel-card-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* Filtros de punzones */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
}

.form-select,
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Grid de punzones */
.hallmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.hallmark-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
}

.hallmark-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-primary);
}

.hallmark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hallmark-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(234, 179, 8, 0.15);
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

.hallmark-badge.silver {
  background: rgba(148, 163, 184, 0.15);
  color: var(--silver-hover);
  border-color: var(--silver-glow);
}

.hallmark-badge.alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.hallmark-visual {
  height: 90px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.hallmark-visual svg {
  max-width: 100%;
  max-height: 80px;
}

.hallmark-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.hallmark-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  flex-grow: 1;
}

.hallmark-specs {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Calculadora de peso y cotización */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  text-align: center;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.kpi-box.secondary .kpi-value {
  color: var(--text-main);
}

.kpi-highlight {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid var(--gold-border);
}

.kpi-highlight .kpi-value {
  font-size: 1.85rem;
  color: var(--gold-primary);
}

/* Arquímedes y densidad */
.density-stepper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.density-step {
  display: flex;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  align-items: flex-start;
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--gold-primary);
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.step-body {
  flex: 1;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.35rem 0;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.density-result-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  text-align: center;
}

.density-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

.density-badge.pure-gold {
  background: rgba(234, 179, 8, 0.2);
  color: var(--gold-primary);
  border: 1px solid var(--gold-border);
}

.density-badge.silver {
  background: rgba(148, 163, 184, 0.2);
  color: var(--silver-hover);
  border: 1px solid var(--silver-glow);
}

.density-badge.fake {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Guía de pruebas */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.test-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.test-card h4 {
  font-family: var(--font-heading);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-card p {
  color: var(--text-muted);
  font-size: 0.885rem;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.test-verdict {
  background: var(--bg-card);
  border-left: 3px solid var(--gold-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.825rem;
  color: var(--text-main);
}

/* Sección SEO y FAQ */
.seo-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 2rem;
}

.seo-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  color: var(--text-main);
}

.seo-p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

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

/* Modales accesibles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Responsive */
@media (max-width: 992px) {
  .tool-with-sidebar {
    flex-direction: column;
  }
}
