/* ==========================================================================
   Harvest Fund Cards - Production Stylesheet (v2.8.1)
   Features: Deep Space Blue Header (#0C355A), White Fund Names (#FFFFFF),
   Performance Column Headings: Sky Blue (#6EB2ED),
   Theme Accents: Harvest Orange (#FF9900) for ETFs, HHIS Blue (#0099FF) for Single Stock.
   Includes: Tickers, Info Icon Badge, Download Icon, and CTA Arrow Accents.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --harvest-orange: #FF9900;
  --harvest-blue: #0C355A;
  --harvest-sky-blue: #6EB2ED;
  --harvest-hhis-blue: #0099FF;
  --harvest-border: #CACACA;
  --harvest-separator: #DFDFDF;
  --harvest-bg: #FFFFFF;
}

/* Base Wrapper */
.harvest-card-section,
.harvest-etf-section {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--harvest-blue);
  width: 100%;
  max-width: 1240px;
  margin: 30px auto;
  box-sizing: border-box;
}

.harvest-card-section *,
.harvest-card-section *::before,
.harvest-card-section *::after,
.harvest-etf-section *,
.harvest-etf-section *::before,
.harvest-etf-section *::after {
  box-sizing: border-box;
}

/* Card Grid Layout */
.harvest-card-grid,
.harvest-etf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Card Container with Subgrid */
.harvest-card,
.harvest-etf-card {
  background: var(--harvest-bg);
  border: 1px solid var(--harvest-border);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(12, 53, 90, 0.07);
  padding: 25px 20px 20px;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 0;
  overflow: hidden; /* Clips dark blue header to card's 12px rounded top corners */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

/* ==========================================================================
   Card Header — Harvest Deep Space Blue Background with White Text
   ========================================================================== */
.harvest-card-header,
.harvest-etf-card-header {
  background-color: var(--harvest-blue);
  margin: -25px -20px 20px -20px; /* Pulls header full-bleed to top, left, and right */
  padding: 24px 20px 22px;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Base / ETF Ticker: Harvest Orange */
.harvest-card-ticker,
.harvest-etf-ticker {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--harvest-orange);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

/* Single Stock (HHIS) Ticker: HHIS Blue (#0099FF) */
.harvest-theme-hhis .harvest-card-ticker,
.harvest-theme-hhis .harvest-etf-ticker,
.harvest-ticker-hhis {
  color: var(--harvest-hhis-blue) !important;
}

/* Fund Name: High-Contrast Crisp White */
.harvest-card-name,
.harvest-etf-name {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #FFFFFF !important;
  margin: 0;
  text-wrap: balance;
}

.harvest-card-name sup,
.harvest-etf-name sup {
  font-size: 0.6em;
  font-weight: 600;
  /*vertical-align: super;*/
  top: 0.9;
  line-height: 0;
  margin-left: 2px;
  color: #FFFFFF !important;
}

/* ==========================================================================
   Metrics Block (Price & Yield)
   ========================================================================== */
.harvest-card-metrics,
.harvest-etf-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--harvest-separator);
  margin-bottom: 20px;
}

.harvest-metric-item:first-child {
  padding-right: 14px;
}

.harvest-metric-item:last-child {
  padding-left: 14px;
  border-left: none;
}

.harvest-metric-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--harvest-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  position: relative;
}

/* Solid Info Icon with Interactive Tooltip */
.harvest-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.harvest-info-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  background-color: var(--harvest-orange);
  border-radius: 50%;
  color: #FFFFFF;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
  user-select: none;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

/* HHIS Info Icon: HHIS Blue (#0099FF) */
.harvest-theme-hhis .harvest-info-icon-badge {
  background-color: var(--harvest-hhis-blue) !important;
}

.harvest-tooltip-bubble {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 320px;
  background-color: #EFEFEF;
  color: #333333;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.harvest-tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #EFEFEF transparent transparent transparent;
}

.harvest-tooltip-bubble::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: #D1D5DB transparent transparent transparent;
}

.harvest-tooltip-wrap:hover .harvest-tooltip-bubble,
.harvest-tooltip-wrap:focus-within .harvest-tooltip-bubble {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.harvest-metric-val {
  font-size: 36px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--harvest-blue);
  letter-spacing: -0.02em;
}

.harvest-metric-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--harvest-sky-blue);
  margin-top: 4px;
}

/* ==========================================================================
   Performance Block
   ========================================================================== */
.harvest-card-perf-block,
.harvest-etf-perf-block {
  width: 100%;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--harvest-separator);
  margin-bottom: 20px;
}

.harvest-perf-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--harvest-blue);
  margin-bottom: 7px;
}

.harvest-perf-date {
  font-weight: 500;
  color: #64748b;
  font-size: 12px;
}

.harvest-perf-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.harvest-perf-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Headings (3M, 6M, YTD, S.I.) are Sky Blue (#6EB2ED) across all cards */
.harvest-perf-tf {
  font-size: 13px;
  font-weight: 600;
  color: var(--harvest-sky-blue); /* #6EB2ED */
}

.harvest-perf-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--harvest-blue);
}

/* ==========================================================================
   Product Sheet Download Section
   ========================================================================== */
.harvest-card-downloads,
.harvest-etf-downloads {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.harvest-download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--harvest-blue);
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.2s ease;
}

.harvest-download-link:hover {
  text-decoration: none;
}

.harvest-download-icon-svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Base ETF Download Icon: Harvest Orange (#FF9900) */
.harvest-download-icon-svg .harvest-icon-bg {
  fill: transparent;
  stroke: var(--harvest-orange);
  stroke-width: 2.2;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.harvest-download-icon-svg .harvest-icon-arrow {
  stroke: var(--harvest-orange);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.2s ease;
}

.harvest-download-link:hover .harvest-download-icon-svg .harvest-icon-bg {
  fill: var(--harvest-orange);
  stroke: var(--harvest-orange);
}

.harvest-download-link:hover .harvest-download-icon-svg .harvest-icon-arrow {
  stroke: #FFFFFF;
}

/* Single Stock (HHIS) Download Icon: HHIS Blue (#0099FF) */
.harvest-theme-hhis .harvest-download-icon-svg .harvest-icon-bg {
  stroke: var(--harvest-hhis-blue) !important;
}

.harvest-theme-hhis .harvest-download-icon-svg .harvest-icon-arrow {
  stroke: var(--harvest-hhis-blue) !important;
}

.harvest-theme-hhis .harvest-download-link:hover .harvest-download-icon-svg .harvest-icon-bg {
  fill: var(--harvest-hhis-blue) !important;
  stroke: var(--harvest-hhis-blue) !important;
}

.harvest-theme-hhis .harvest-download-link:hover .harvest-download-icon-svg .harvest-icon-arrow {
  stroke: #FFFFFF !important;
}

/* ==========================================================================
   Card Footer & CTA Link
   ========================================================================== */
.harvest-card-footer,
.harvest-etf-footer {
  width: 100%;
  margin-top: auto;
  padding-top: 4px;
}

.harvest-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--harvest-blue) !important;
  text-decoration: none !important;
}

.harvest-arrow-icon {
  flex-shrink: 0;
  color: var(--harvest-orange);
  stroke: var(--harvest-orange);
  transition: transform 0.2s ease;
  width: 18px;
  height: 18px;
}

.harvest-cta-link:hover .harvest-arrow-icon {
  transform: translateX(3px);
}

/* Single Stock (HHIS) CTA Arrow: HHIS Blue (#0099FF) */
.harvest-theme-hhis .harvest-arrow-icon {
  color: var(--harvest-hhis-blue) !important;
  stroke: var(--harvest-hhis-blue) !important;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .harvest-card-grid,
  .harvest-etf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media screen and (max-width: 940px) {
  .harvest-card-grid,
  .harvest-etf-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .harvest-card,
  .harvest-etf-card {
    display: flex;
    flex-direction: column;
    grid-row: auto;
    padding: 24px 20px 20px;
  }
  .harvest-card-header,
  .harvest-etf-card-header {
    margin: -24px -20px 20px -20px;
    padding: 20px 20px 18px;
  }
  .harvest-metric-val {
    font-size: 30px;
  }
  .harvest-tooltip-bubble {
    width: 260px;
    transform: translateX(-50%) translateY(4px);
  }
}