/* =========================================================
   ROOT · MEDICAL PREMIUM SYSTEM
========================================================= */
:root {
  --bg: #eef7fd;
  --bg-soft: #f7fbff;

  --panel: #ffffff;
  --panel-alt: #f0f9ff;

  --border: #d9eaf5;
  --border-strong: #b6d4e6;

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

  --primary: #38bdf8;
  --primary-strong: #0284c7;

  --shadow-soft: 0 8px 28px rgba(14,165,233,.08);
  --shadow-hover: 0 16px 38px rgba(14,165,233,.18);
}

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

html, body {
  margin: 0;
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* =========================================================
   CONTAINER
========================================================= */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* =========================================================
   BREADCRUMB · MÁS ELEGANTE
========================================================= */
.breadcrumb {
  font-size: 0.82rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.breadcrumb a {
  font-weight: 600;
  color: var(--primary-strong);
}

.breadcrumb span {
  opacity: .5;
}

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

.app-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.subtitle {
  margin-top: .6rem;
  color: var(--muted);
  max-width: 720px;
  font-size: .95rem;
}

/* =========================================================
   PANEL · APP STYLE
========================================================= */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

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

.field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
}

/* =========================================================
   INPUTS PREMIUM
========================================================= */
input, select {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .75rem .9rem;
  margin-top: .45rem;
  font-size: .95rem;
  transition: all .2s ease;
}

input:focus, select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56,189,248,.18);
}

/* =========================================================
   NOTES / CALLOUT
========================================================= */
.note {
  font-size: .9rem;
  color: var(--muted);
  margin: .6rem 0 1rem;
}

.callout {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(56,189,248,.08);
  border: 1px solid rgba(56,189,248,.25);
}

.hidden { display: none !important; }

/* =========================================================
   ACTIONS / BUTTONS · CLÍNICO MODERNO
========================================================= */
.actions {
  display: flex;
  gap: .85rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

button {
  appearance: none;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #00202e;
  border: none;
  border-radius: 999px;
  padding: .65rem 1.25rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14,165,233,.25);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary-strong);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(56,189,248,.10);
}

/* =========================================================
   RESULTS
========================================================= */
.results { margin-top: 1.25rem; }

.resultado {
  margin-top: .8rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(14,165,233,.06);
}

/* =========================================================
   FOOTER · INSTITUCIONAL
========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.5rem 1.25rem;
  background: var(--panel-alt);
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  font-size: .9rem;
  margin-bottom: .8rem;
}

.footer-nav a {
  font-weight: 600;
  color: var(--primary-strong);
}

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

.footer-copy {
  font-size: .78rem;
  color: var(--muted);
}

/* =========================================================
   NAV · MÁS CLEAN
========================================================= */
.top-nav {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.nav-links {
  display: flex;
  gap: .85rem;
}

.nav-link {
  font-size: 1rem;
  font-weight: 700;
  padding: .75rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.nav-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14,165,233,.15);
}

.nav-primary {
  border-color: var(--primary);
  background: rgba(56,189,248,.12);
  color: var(--primary-strong);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 640px){
  .top-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-link {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   LANGUAGE SWITCHER
========================================================= */
.language-switcher {
  text-align: right;
  font-size: .82rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.language-switcher a {
  color: var(--muted);
  font-weight: 600;
}

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

.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;
}

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