/* Euribor.page - Clean, friendly & intuitive */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-soft: #f0fdfa;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --radius: 14px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo span { color: var(--primary); }

nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
}

nav a { color: var(--muted); }
nav a:hover, nav a.active { color: var(--primary); text-decoration: none; }

.hero {
  padding: 1.75rem 0 1.25rem;
}

.hero-intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.35rem;
  max-width: 540px;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.rate-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.15rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.rate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgb(0 0 0 / 0.08);
}

.rate-card.main {
  background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
  color: white;
  border: none;
}

.rate-card .icon {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
  display: block;
}

.rate-card .label {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.rate-card .value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rate-card .change {
  font-size: 0.78rem;
  margin-top: 0.3rem;
  opacity: 0.9;
}

.tip {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.tip .tip-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  line-height: 1.3;
}

.tip strong {
  color: #92400e;
}

.tip-soft {
  background: var(--primary-soft);
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

section {
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: 1.12rem;
  font-weight: 650;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

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

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

.calc-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.calc-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--muted);
  margin-bottom: 0.28rem;
}

.calc-form input, .calc-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 1rem;
  background: #fff;
}

.calc-form input:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.3rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover { background: var(--primary-dark); }

.calc-result {
  background: var(--primary-soft);
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 1.2rem;
  display: none;
  margin-top: 1rem;
}

.calc-result.show { display: block; }

.calc-result .big {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:hover td { background: #f8fafc; }

.up { color: var(--danger); font-weight: 500; }
.down { color: var(--success); font-weight: 500; }

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem;
}

.links-grid a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  transition: border-color 0.15s, background 0.15s;
}

.links-grid a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

footer {
  margin-top: 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem;
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  nav { display: none; }
  .rate-card .value { font-size: 1.45rem; }
  .chart-wrap { height: 250px; }
}
