/* Euribor.us – naranja fuerte + negro, estilo irph.es */
:root {
  --orange: #ff5a00;
  --orange-dark: #e04e00;
  --orange-soft: #fff4ed;
  --black: #111111;
  --dark: #1a1a1a;
  --text: #222;
  --muted: #555;
  --border: #e5e5e5;
  --bg: #f7f7f7;
  --card: #fff;
  --success: #0a7a3e;
  --danger: #c62828;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --wrap: min(1180px, 100% - 2rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

/* ===== RÓTULO (banner) ===== */
.topbar {
  background: #000;
  line-height: 0;
}
.topbar img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== MENÚ DOBLE ===== */
.nav-primary {
  background: var(--black);
  border-bottom: 3px solid var(--orange);
}
.nav-primary .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  padding: .45rem 0;
}
.nav-primary a {
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 6px;
}
.nav-primary a:hover,
.nav-primary a.active {
  background: var(--orange);
  text-decoration: none;
}

.nav-secondary {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.nav-secondary .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem;
  padding: .35rem 0;
}
.nav-secondary a {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  padding: .35rem .7rem;
  border-radius: 5px;
}
.nav-secondary a:hover,
.nav-secondary a.active {
  color: var(--orange);
  background: var(--orange-soft);
  text-decoration: none;
}

/* ===== LAYOUT ===== */
main { padding: 1.4rem 0 2.5rem; }

.hero-title {
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--black);
  margin-bottom: .4rem;
  line-height: 1.25;
}
.hero-lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 640px;
  margin-bottom: 1.25rem;
}

/* Cards de datos */
.rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .9rem;
  margin-bottom: 1.2rem;
}
.rate {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.rate.main {
  background: linear-gradient(145deg, #ff5a00, #e04e00);
  color: #fff;
  border: none;
}
.rate .icon { font-size: 1.3rem; display: block; margin-bottom: .25rem; }
.rate .label { font-size: .78rem; opacity: .9; margin-bottom: .2rem; font-weight: 600; }
.rate .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.rate .sub { font-size: .78rem; margin-top: .25rem; opacity: .9; }

/* Clave / tip boxes */
.clave {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  background: var(--orange-soft);
  border: 1px solid #ffd0b0;
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: .95rem 1.1rem;
  margin: 1.25rem 0;
  font-size: .96rem;
}
.clave .k { font-size: 1.25rem; flex-shrink: 0; line-height: 1.3; }
.clave strong { color: #b33d00; }

.tip {
  background: #f0f7f3;
  border: 1px solid #c8e6d0;
  border-radius: 8px;
  padding: .9rem 1.1rem;
  margin: 1.1rem 0;
  font-size: .95rem;
}

/* Sections */
.section { margin-bottom: 2rem; }
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--black);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.chart-box { position: relative; height: 300px; width: 100%; }

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .55rem .65rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  font-weight: 650;
}
tr:hover td { background: #fafafa; }
.up { color: var(--danger); font-weight: 600; }
.down { color: var(--success); font-weight: 600; }

/* Forms / calc */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}
.calc-grid label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .25rem;
}
.calc-grid input, .calc-grid select {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 1rem;
  background: #fff;
}
.calc-grid input:focus {
  outline: 2px solid var(--orange);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .7rem 1.25rem;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--orange-dark); }
.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline:hover { background: var(--orange-soft); }

.calc-result {
  display: none;
  background: var(--orange-soft);
  border: 1px solid #ffd0b0;
  border-radius: 10px;
  padding: 1.15rem;
  margin-top: 1rem;
}
.calc-result.show { display: block; }
.calc-result .big {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange-dark);
}

/* Tools grid */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .75rem;
}
.tools a {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: 1rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: .93rem;
  transition: border-color .15s, background .15s, transform .12s;
}
.tools a:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
  text-decoration: none;
  transform: translateY(-1px);
}
.tools a .t-icon { font-size: 1.35rem; flex-shrink: 0; }
.tools a .t-desc {
  display: block;
  font-weight: 400;
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

/* Blog cards */
.blog-list .card { margin-bottom: .85rem; }
.blog-list h2 { font-size: 1.08rem; margin-bottom: .3rem; }
.blog-list h2 a { color: var(--black); }
.blog-list h2 a:hover { color: var(--orange); }

/* Footer */
footer {
  background: var(--black);
  color: #aaa;
  padding: 1.75rem 0;
  font-size: .84rem;
  margin-top: 1rem;
}
footer a { color: #ffb380; }
footer .wrap { text-align: center; }

/* Utils */
.muted { color: var(--muted); }
.text-sm { font-size: .875rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: .6rem 0 1rem 1.3rem; }
.prose h2 { margin-top: 1.6rem; margin-bottom: .6rem; }

@media (max-width: 700px) {
  .nav-primary a, .nav-secondary a { font-size: .8rem; padding: .35rem .55rem; }
  .rate .value { font-size: 1.45rem; }
  .chart-box { height: 240px; }
  .hero-title { font-size: 1.3rem; }
}
