/* =========================================================
   ROOT · LIGHT CLÍNICO AZUL
========================================================= */
:root {
  --bg: #E0F2FE;          /* fondo azul celeste claro */
  --panel: #FFFFFF;
  --card: #F0F9FF;
  --border: #CBD5E1;

  --text: #0F172A;
  --muted: #475569;

  --primary: #0EA5E9;
  --primary-strong: #0284C7;

  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
}

/* =========================================================
   RESET / BASE
========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--primary-strong);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.hidden {
  display: none !important;
}

/* =========================================================
   LAYOUT
========================================================= */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.app {
  padding-top: 0.5rem;
}

/* =========================================================
   BREADCRUMB
========================================================= */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--primary-strong);
}

.breadcrumb span {
  margin: 0 0.4rem;
  color: var(--muted);
}

/* =========================================================
   HEADER
========================================================= */
.app-header {
  margin-bottom: 2rem;
}

.app-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text);
}

.subtitle {
  margin-top: 0.5rem;
  color: var(--muted);
  max-width: 720px;
}

/* =========================================================
   PANELS
========================================================= */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(2,132,199,0.05);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--text);
}

/* =========================================================
   GRID
========================================================= */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

/* =========================================================
   FORMS
========================================================= */
label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}

input,
select {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  margin-top: 0.35rem;
  font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

/* =========================================================
   TEXT / NOTES
========================================================= */
.note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}

.result {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* =========================================================
   ACTIONS / BUTTONS
========================================================= */
button {
  appearance: none;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  margin-top: 1rem;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}

button:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom));
  text-align: center;
}

.footer-nav {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--text);
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--primary-strong);
}

.footer-copy,
footer p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* =========================================================
   LANGUAGE SWITCHER
========================================================= */
.language-switcher {
  text-align: right;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.language-switcher a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.4rem;
  transition: color .2s ease;
}

.language-switcher a:hover {
  color: var(--primary);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .app-header h1 {
    font-size: 1.55rem;
  }
}

/* Bloque SEO desplegable */
.seo-panel details {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.seo-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.seo-panel h2 {
  margin-top: 1rem;
}
