/* ========================================
   Tyrimai (Research) Page Styles
   AI Adoption & Usage — European Focus
   ======================================== */

/* --- Active nav link --- */
.nav__link--active {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Research Hero --- */
.research-hero {
  position: relative;
  padding: calc(var(--nav-height) + 80px) 0 80px;
  overflow: hidden;
}

.research-hero__bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.research-hero__gradient {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(58, 158, 139, 0.06) 0%,
    rgba(58, 158, 139, 0.02) 40%,
    transparent 70%
  );
  filter: blur(60px);
}

.research-hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.research-hero__badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.research-hero__title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.research-hero__title-accent {
  display: block;
  color: var(--color-accent);
}

.research-hero__text {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 520px;
}

/* --- Key Stats Strip --- */
.key-stats {
  padding: 48px 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.key-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.key-stats__card {
  text-align: center;
}

.key-stats__number {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 8px;
}

.key-stats__label {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* --- Tab Navigation --- */
.research-tabs {
  padding: 80px 0 0;
}

.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 48px;
}

.tabs-nav__item {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  padding: 16px 28px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.tabs-nav__item:hover {
  color: var(--color-text-secondary);
}

.tabs-nav__item.active {
  color: var(--color-text);
  font-weight: 600;
  border-bottom-color: var(--color-text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ===========================
   TAB 1: Country Usage
   =========================== */

.country-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

/* --- Europe Choropleth Map (SVG) --- */
.geo-map {
  width: 100%;
  max-width: 640px;
  height: auto;
}

.geo-country path {
  cursor: pointer;
  fill: #d6f0e8;
  stroke: #fff;
  stroke-width: 0.3;
  transition: opacity 0.15s ease, stroke 0.15s ease;
}

.geo-country text {
  font-family: 'Poppins', sans-serif;
  font-size: 3px;
  font-weight: 600;
  fill: #1a3d33;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: central;
}

.geo-country:hover path {
  opacity: 0.8;
  stroke: rgba(0,0,0,0.25);
  stroke-width: 0.5;
}

.geo-country.active path {
  stroke: var(--color-text);
  stroke-width: 0.8;
}

.geo-country.active text {
  font-weight: 700;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.map-legend__scale {
  display: flex;
  gap: 2px;
}

.map-legend__swatch {
  width: 20px;
  height: 10px;
  border-radius: 2px;
}

/* --- Country Detail Panel --- */
.country-detail {
  background-color: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.country-detail__name {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.country-detail__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.country-stat {
  display: flex;
  flex-direction: column;
}

.country-stat__value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.country-stat__label {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}

/* Usage Index Bar */
.usage-bar {
  margin-bottom: 28px;
}

.usage-bar__label {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
}

.usage-bar__track {
  position: relative;
  height: 8px;
  background-color: var(--color-bg-alt);
  border-radius: 4px;
  overflow: visible;
}

.usage-bar__marker-expected {
  position: absolute;
  top: -4px;
  height: 16px;
  width: 1px;
  background-color: var(--color-text-tertiary);
  left: 25%;
}

.usage-bar__marker-expected::after {
  content: 'Tikėtina: 1';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  margin-bottom: 4px;
}

.usage-bar__fill {
  height: 100%;
  background-color: #3a9e8b;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.usage-bar__value-label {
  position: absolute;
  top: -22px;
  right: 0;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  transform: translateX(50%);
}

/* Top Tasks List */
.country-tasks {
  margin-bottom: 24px;
}

.country-tasks__title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.country-task {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.country-task:last-child {
  border-bottom: none;
}

.country-task__num {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  width: 20px;
}

.country-task__text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-secondary);
  flex: 1;
}

.country-task__pct {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
}

/* ===========================
   TAB 2: Job Explorer
   =========================== */

.job-explorer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* Treemap */
.treemap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.treemap__item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  min-height: 60px;
}

.treemap__item:hover {
  filter: brightness(0.92);
}

.treemap__item.active {
  outline: 2px solid var(--color-text);
  outline-offset: -2px;
}

.treemap__item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.treemap__item-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Treemap color palette */
.treemap__item--computer     { background-color: #3a9e8b; color: #fff; }
.treemap__item--arts         { background-color: #c4d4a0; color: #2d3a1a; }
.treemap__item--education    { background-color: #7fb5a4; color: #0a3d33; }
.treemap__item--management   { background-color: #b8cfc7; color: #1a3d33; }
.treemap__item--business     { background-color: #d4c99a; color: #3a351a; }
.treemap__item--legal        { background-color: #a8c4b8; color: #1a3d33; }
.treemap__item--science      { background-color: #8cb8a8; color: #0a3d33; }
.treemap__item--healthcare   { background-color: #c8ddd5; color: #1a4d3a; }
.treemap__item--office       { background-color: #d4dfa8; color: #3a3d1a; }
.treemap__item--sales        { background-color: #c0d4c8; color: #1a3d2a; }
.treemap__item--other        { background-color: #dde5dd; color: #3a4d3a; }

.treemap-note {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 16px;
  line-height: 1.5;
}

/* Job detail panel */
.job-detail {
  background-color: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.job-detail__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.job-detail__pct {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.job-detail__desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.job-tasks-list {
  list-style: none;
}

.job-tasks-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 14px;
  line-height: 1.45;
}

.job-tasks-list li:last-child {
  border-bottom: none;
}

.job-tasks-list .task-text {
  color: var(--color-text-secondary);
  flex: 1;
}

.job-tasks-list .task-pct {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
}

/* ===========================
   TAB 3: Augmentation vs Automation
   =========================== */

.aug-section {
  max-width: 900px;
  margin: 0 auto;
}

/* Big split bar */
.aug-bar {
  margin-bottom: 48px;
}

.aug-bar__visual {
  display: flex;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.aug-bar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  transition: flex-basis 0.5s ease;
}

.aug-bar__seg--aug {
  background-color: #3a9e8b;
  color: #fff;
}

.aug-bar__seg--auto {
  background-color: #d97757;
  color: #fff;
}

.aug-bar__seg-label {
  font-size: 14px;
  font-weight: 500;
}

.aug-bar__seg-value {
  font-size: 22px;
  font-weight: 700;
}

.aug-bar__sublabel {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* Interaction modes */
.interaction-modes {
  margin-bottom: 48px;
}

.interaction-modes__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.mode-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mode-bar {
  display: grid;
  grid-template-columns: 160px 1fr 60px;
  align-items: center;
  gap: 16px;
}

.mode-bar__label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.mode-bar__track {
  height: 28px;
  background-color: var(--color-bg-alt);
  border-radius: 6px;
  overflow: hidden;
}

.mode-bar__fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-bar__fill--aug { background-color: #3a9e8b; }
.mode-bar__fill--auto { background-color: #d97757; }
.mode-bar__fill--neutral { background-color: var(--color-text-tertiary); }

.mode-bar__value {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  text-align: right;
}

/* Aug/Auto cards */
.aug-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.aug-card {
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--color-border-light);
}

.aug-card--aug {
  background-color: rgba(58, 158, 139, 0.06);
  border-color: rgba(58, 158, 139, 0.15);
}

.aug-card--auto {
  background-color: rgba(217, 119, 87, 0.06);
  border-color: rgba(217, 119, 87, 0.15);
}

.aug-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.aug-card--aug .aug-card__icon {
  background-color: rgba(58, 158, 139, 0.12);
}

.aug-card--auto .aug-card__icon {
  background-color: rgba(217, 119, 87, 0.12);
}

.aug-card__title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}

.aug-card__text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.aug-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aug-card__list li {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--color-text-secondary);
  padding-left: 16px;
  position: relative;
}

.aug-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.aug-card--aug .aug-card__list li::before {
  background-color: #3a9e8b;
}

.aug-card--auto .aug-card__list li::before {
  background-color: #d97757;
}

/* Key insight callout */
.aug-insight {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 36px;
  border-left: 4px solid var(--color-accent);
}

.aug-insight__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.aug-insight__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ===========================
   Insights / What This Means
   =========================== */

.insights-section {
  padding: 80px 0;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.insight-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: box-shadow var(--transition-slow), border-color var(--transition-base), transform var(--transition-slow);
}

.insight-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  transform: translateY(-2px);
}

.insight-card__number {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  color: var(--color-border-light);
  line-height: 1;
  margin-bottom: 16px;
}

.insight-card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.insight-card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Data source note */
.data-source {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--color-border-light);
  margin-top: 48px;
}

.data-source a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ===========================
   Economic Index Preview Card
   (for index.html)
   =========================== */

.index-preview {
  padding: 80px 0;
}

.index-preview__card {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  overflow: hidden;
}

.index-preview__content {
  max-width: 480px;
}

.index-preview__badge {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.index-preview__title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.index-preview__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
}

.index-preview__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  padding: 12px 24px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.index-preview__link:hover {
  background-color: var(--color-card);
  border-color: var(--color-text-tertiary);
}

.index-preview__link svg {
  transition: transform var(--transition-base);
}

.index-preview__link:hover svg {
  transform: translateX(3px);
}

/* Mini Europe choropleth for preview card */
.index-preview__map-wrap {
  max-width: 520px;
  justify-self: center;
}

.preview-geo-map {
  width: 130%;
  height: auto;
  margin-left: -15%;
}

.preview-country {
  fill: #8ad0c0;
  stroke: #fff;
  stroke-width: 0.3;
}

.preview-country path {
  fill: inherit;
  stroke: inherit;
  stroke-width: inherit;
}

/* Color preview countries by AUI tier */
.preview-country[data-country="IS"],
.preview-country[data-country="CH"] { fill: #1a7f6d; }

.preview-country[data-country="IE"],
.preview-country[data-country="NL"],
.preview-country[data-country="UK"],
.preview-country[data-country="NO"],
.preview-country[data-country="SE"] { fill: #3a9e8b; }

.preview-country[data-country="FI"],
.preview-country[data-country="EE"],
.preview-country[data-country="DE"],
.preview-country[data-country="BE"],
.preview-country[data-country="FR"],
.preview-country[data-country="DK"],
.preview-country[data-country="LT"],
.preview-country[data-country="AT"] { fill: #5cb8a5; }

.preview-country[data-country="LV"],
.preview-country[data-country="SI"],
.preview-country[data-country="CZ"],
.preview-country[data-country="PT"],
.preview-country[data-country="SK"],
.preview-country[data-country="ES"] { fill: #8ad0c0; }

.preview-country[data-country="IT"],
.preview-country[data-country="PL"],
.preview-country[data-country="HU"],
.preview-country[data-country="HR"],
.preview-country[data-country="GR"],
.preview-country[data-country="RS"] { fill: #b3e2d6; }

.preview-country[data-country="RO"],
.preview-country[data-country="BG"] { fill: #d6f0e8; }

/* ===========================
   Stagger animations for tabs
   =========================== */

.insights-grid .insight-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.insights-grid .insight-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.insights-grid .insight-card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ===========================
   Responsive
   =========================== */

@media (max-width: 1024px) {
  .country-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .country-detail {
    position: static;
  }

  .index-preview__card {
    grid-template-columns: 1fr;
    padding: 48px;
  }

  .index-preview__map-wrap {
    max-width: 100%;
  }

  .aug-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .key-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tabs-nav__item {
    padding: 14px 20px;
    font-size: 14px;
  }

  .geo-map {
    max-width: 100%;
  }

  .geo-country text {
    font-size: 2.5px;
  }

  .treemap {
    min-height: 300px;
  }

  .treemap__item {
    padding: 10px;
    min-height: 50px;
  }

  .treemap__item-name {
    font-size: 11px;
  }

  .treemap__item-value {
    font-size: 16px;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .mode-bar {
    grid-template-columns: 120px 1fr 50px;
    gap: 10px;
  }

  .mode-bar__label {
    font-size: 12px;
  }

  .index-preview__card {
    padding: 28px;
  }

  .research-hero {
    padding: calc(var(--nav-height) + 48px) 0 48px;
  }

  .aug-bar__seg-label {
    font-size: 12px;
  }

  .aug-bar__seg-value {
    font-size: 18px;
  }

  .aug-bar__visual {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .key-stats__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .key-stats__card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }

  .key-stats__number {
    font-size: 32px;
    flex-shrink: 0;
  }

  .country-detail__stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .treemap__item-value {
    font-size: 14px;
  }
}
