/* ========================= */
/* 🌍 LAYOUT GENERAL */
/* ========================= */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  border-bottom: none !important;
}

hr {
  display: none;
}

/* ========================= */
/* ⚠️ WARNING BANNER */
/* ========================= */

.warning-banner {
  background: linear-gradient(90deg, #fff3cd, #ffeeba);
  color: #856404;
  text-align: center;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* ========================= */
/* 🌐 HEADER */
/* ========================= */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.site-header h1 a {
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 1.5rem;
}

/* ========================= */
/* 🌍 LANGUAGE SWITCH */
/* ========================= */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.lang-switch a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.lang-switch a.active {
  opacity: 1;
  transform: scale(1.1);
}

/* Flags (SVG) */
.lang-switch img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  display: inline-block;
}

/* ========================= */
/* 🧱 GRID + CARDS */
/* ========================= */

.samupy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.samupy-card {
  display: block;
  background: #f6f6f6;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.samupy-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.samupy-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.samupy-card-body {
  padding: 16px;
}

.samupy-card-body h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.samupy-card-body p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ========================= */
/* 📝 ARTICLE CONTENT */
/* ========================= */

.post-content {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 1.05rem;
}

.post-content img {
  border-radius: 8px;
  margin: 20px 0;
  max-width: 100%;
}

/* ========================= */
/* 📊 ETF TABLE */
/* ========================= */

.etf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.etf-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #ddd;
  font-weight: 600;
}

.etf-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.etf-table th:not(:last-child),
.etf-table td:not(:last-child) {
  padding-right: 20px;
}

.etf-table tbody tr:hover {
  background: #f6f6f6;
}

/* números alineats */
.etf-table td:nth-child(2),
.etf-table td:nth-child(3) {
  text-align: right;
}

/* ISIN a la dreta */
.etf-table td:last-child,
.etf-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

/* ========================= */
/* 🔢 ISIN */
/* ========================= */

.isin-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
}

.copy-btn {
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  opacity: 0.6;
}

.copy-btn:hover {
  opacity: 1;
}

/* ========================= */
/* 🏆 BEST ETF */
/* ========================= */

.best-etf {
  background: rgba(0, 200, 100, 0.08);
  border-left: 4px solid #00c864;
}

.best-etf:hover {
  background: rgba(0, 200, 100, 0.15);
}

.etf-badge {
  margin-left: 8px;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #00c864;
  color: white;
  font-weight: 600;
}

.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #94a3b8;
}

.tooltip .tooltiptext {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;

  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);

  background-color: #020617;
  color: #fff;
  text-align: left;
  padding: 10px;
  border-radius: 8px;

  width: 220px;
  font-size: 13px;
  line-height: 1.4;

  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  z-index: 10;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}