/* ── Hub-specific overrides ──────────────────────────────────────────────── */

/* Single-column hub layout */
.hub-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* Hub hero — text-centered variant */
.hub-hero {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  padding: 52px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hub-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(255,255,255,0.08) 0%, transparent 70%);
}
.hub-hero-title {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  position: relative;
}
.hub-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

/* Converter card on hub */
.hub-converter {
  margin-bottom: 40px;
}
.converter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.converter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 640px) {
  .converter-row {
    flex-direction: column;
    gap: 10px;
  }
  .converter-row .input-row { width: 100%; }
  .hub-swap-btn { transform: rotate(90deg); }
}
.converter-row .input-row {
  flex: 1;
}
.hub-swap-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.hub-swap-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  transform: rotate(180deg);
}
.converter-result-box {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.converter-result-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
  font-family: 'DM Mono', monospace;
}
.converter-result-placeholder {
  font-size: 14px;
  color: var(--gray-400);
}
.converter-rate-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-600);
  padding: 4px 0;
}
.converter-rate-info .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); display: inline-block;
  margin-right: 5px;
  animation: blink 2s ease-in-out infinite;
}
.converter-rate-info .rate-date {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}
.converter-rate-info .rate-date svg {
  width: 14px; height: 14px;
}

/* ── Section headers ─────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 28px;
}
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.section-subtitle {
  font-size: 14px;
  color: var(--gray-400);
}

/* ── Search box ──────────────────────────────────────────────────────── */
.search-box {
  position: relative;
  margin-bottom: 20px;
}
.search-box-inner {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box-inner:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.search-box-inner svg.search-icon {
  width: 18px; height: 18px;
  margin-left: 14px;
  color: var(--gray-400);
  flex-shrink: 0;
}
.search-box-inner input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: transparent;
}
.search-box-inner input::placeholder {
  color: var(--gray-400);
}
.clear-search-btn {
  border: none;
  background: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.15s;
}
.clear-search-btn:hover { color: var(--navy); }
.clear-search-btn svg { width: 16px; height: 16px; }
.search-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
  text-align: center;
}
.search-results {
  margin-bottom: 20px;
}
.search-results .currency-pair-grid {
  margin-bottom: 0;
}

/* ── Currency tabs ───────────────────────────────────────────────────── */
.currency-tabs-wrapper {
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.currency-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
}
.currency-tab {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.currency-tab:hover {
  border-color: var(--blue);
  color: var(--navy);
}
.currency-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.currency-tab .tab-code {
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}
.currency-tab .tab-name {
  font-size: 12px;
  opacity: 0.8;
}
.currency-tab.active .tab-name {
  opacity: 0.9;
}

/* Dropdown for "Flere" */
.currency-tab-dropdown {
  position: relative;
}
.dropdown-toggle {
  gap: 4px;
}
.dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}
.dropdown-toggle.open svg {
  transform: rotate(180deg);
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
}
.dropdown-menu.open {
  display: block;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--gray-600);
  transition: background 0.1s;
  text-align: left;
}
.dropdown-item:hover {
  background: var(--gray-100);
  color: var(--navy);
}
.dropdown-item .item-code {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  font-size: 12px;
  color: var(--navy);
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 36px;
  text-align: center;
}
.dropdown-item .item-name {
  font-size: 13px;
}

/* ── Currency pair grid ──────────────────────────────────────────────── */
.currency-pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .currency-pair-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pair-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
  }
  .pair-card .pair-name {
    white-space: normal;
    overflow: visible;
  }
}

.pair-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}
.pair-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.pair-card .pair-flags {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pair-card .pair-flags .flag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gray-100);
  padding: 2px 5px;
  border-radius: 4px;
}
.pair-card .pair-flags svg {
  width: 12px;
  height: 12px;
  color: var(--blue);
  flex-shrink: 0;
}
.pair-card .pair-name {
  font-size: 12px;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Panel visibility for tabs */
.pairs-panel {
  display: none;
}
.pairs-panel.active {
  display: block;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.panel-header .pair-count {
  font-size: 12px;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Popular conversions ─────────────────────────────────────────────── */
.popular-section {
  margin-bottom: 40px;
}
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.popular-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s;
}
.popular-link:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.popular-link .popular-pair {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  font-family: 'DM Mono', monospace;
}
.popular-link .popular-name {
  font-size: 12px;
  color: var(--gray-400);
}

/* ── Info section ────────────────────────────────────────────────────── */
.info-section {
  margin-bottom: 24px;
}
.info-section .info-content {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.info-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.info-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 20px 0 8px;
}
.info-content p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 10px;
}
.info-content ol,
.info-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.info-content li {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 4px;
}
.info-content .currency-list {
  columns: 2;
  column-gap: 24px;
}
@media (min-width: 640px) {
  .info-content .currency-list {
    columns: 3;
  }
}
.info-content .currency-list li {
  font-size: 13px;
  break-inside: avoid;
}
