/* Project ATLAS - Site #16: Calculadora de Porcentajes (Spanish) */
:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --border-subtle: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #38bdf8;
  --accent-blue-hover: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-blue);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--accent-blue);
}

/* Hero */
.tool-section {
  padding: 3rem 0;
  background: radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
}

.tool-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.badge-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.tool-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Calculator Tabs & Cards */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: #090e1a;
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-mono);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-blue);
}

.result-box {
  background: #080c16;
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top: 1.25rem;
  text-align: center;
}

.result-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.result-formula {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.btn-copy-res {
  margin-top: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-copy-res:hover {
  color: #fff;
  border-color: var(--accent-blue);
}

/* Editorial & Guides */
.editorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-top: 4rem;
}

.editorial-card h2 {
  font-size: 1.85rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.editorial-card h3 {
  font-size: 1.35rem;
  color: var(--accent-blue);
  margin: 2rem 0 0.75rem;
}

.editorial-card p, .editorial-card li {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.editorial-card ul, .editorial-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.feature-box h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-blue);
}
