/* ============================================================
   UE Funding Cards
   - Square corners
   - Image top
   - Title + reason
   - INFO / FUND buttons
   - "NOK raised / goal"
   - One thick progress bar
   - Layer accent drives FUND + progress fill
   ============================================================ */

/* Layer colors (brand constants) */
:root{
  --fundue-accent-agora:    #9fc38f;
  --fundue-accent-councils: #c3805c;
  --fundue-accent-powers:   #3e6db0;

  /* Base (light) */
  --fundue-card-bg: #ebebeb;
  --fundue-card-border: rgba(0,0,0,0.15);
  --fundue-text: #111111;
  --fundue-muted: rgba(0,0,0,0.65);

  --fundue-progress-track: rgba(0,0,0,0.12);
}

/* Ensure UE Funding cards remain opaque on transparent pages */
.ue-page-transparent .fundue-card{
  background-color: var(--fundue-card-bg, #ebebeb) !important;
  background-image: none;
}

/* Grid */
.fundue-grid { display: grid; gap: 30px; }
.fundue-grid.fundue-cols-1 { grid-template-columns: 1fr; }
.fundue-grid.fundue-cols-2 { grid-template-columns: 1fr 1fr; }
.fundue-grid.fundue-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.fundue-grid.fundue-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 900px) {
  .fundue-grid.fundue-cols-2,
  .fundue-grid.fundue-cols-3,
  .fundue-grid.fundue-cols-4 { grid-template-columns: 1fr; }
}

/* Card base */
.fundue-card{
  --fundue-accent: var(--fundue-accent-agora);

  background: var(--fundue-card-bg);
  border: 1px solid var(--fundue-card-border);
  border-radius: 8px;
  color: var(--fundue-text);
  overflow: hidden;
}

/* Accent mapping by layer */
.fundue-card[data-layer="agora"]    { --fundue-accent: var(--fundue-accent-agora); }
.fundue-card[data-layer="councils"] { --fundue-accent: var(--fundue-accent-councils); }
.fundue-card[data-layer="powers"]   { --fundue-accent: var(--fundue-accent-powers); }

/* Media */
.fundue-card__media{
  width: 100%;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
}
.fundue-card__img{
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Body */
.fundue-card__body{
  padding: 18px 18px 16px;
}

.fundue-card__title{
  margin: 2px 0 10px 0;     /* more vertical space */
  line-height: 1.25;       /* prevents glyph clipping */
  font-size: 24px;         /* slightly larger title */

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fundue-card__reason{
  margin: 0 0 40px 0;   /* digest space lives here */
  color: var(--fundue-muted);
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fundue-card__actions{
  margin: 0 0 16px 0;   /* normal spacing below buttons */
}



/* ============================================================
   Buttons: INFO / FUND
   - Always black text
   - INFO: light grey fill
   - FUND: layer accent fill
   - Rounded corners
   - Subtle shadow at rest, reduced on hover
   ============================================================ */

.fundue-card a.fundue-btn,
.fundue-card a.fundue-btn:visited,
.fundue-card a.fundue-btn:hover,
.fundue-card a.fundue-btn:focus,
.fundue-card a.fundue-btn:active{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 8px;                 /* rounded corners */
  border: 1px solid rgba(0,0,0,0.14); /* subtle frame */

  text-decoration: none !important;
  font-weight: 700;
  letter-spacing: 0.02em;

  color: #000 !important;
  cursor: pointer;

  /* subtle shadow at rest */
  box-shadow: 0 2px 6px rgba(0,0,0,0.14);

  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease,
    filter 0.15s ease;
}

/* Ensure inner spans/icons never inherit theme colors */
.fundue-card a.fundue-btn *{
  color: #000 !important;
}

/* Hover/focus: flatten (reduce shadow) */
.fundue-card a.fundue-btn:hover,
.fundue-card a.fundue-btn:focus{
  box-shadow: 0 0 0 rgba(0,0,0,0.0);  /* almost none */
  transform: translateY(0);           /* no lift */
}

/* Keyboard accessibility */
.fundue-card a.fundue-btn:focus-visible{
  outline: 2px solid rgba(0,0,0,0.35);
  outline-offset: 2px;
}

/* INFO = light grey fill */
.fundue-btn--info{
  background: rgba(0,0,0,0.06);
}

/* INFO hover: slightly darker grey (optional but nice) */
.fundue-card a.fundue-btn--info:hover,
.fundue-card a.fundue-btn--info:focus{
  background: rgba(0,0,0,0.09);
}

/* FUND = accent fill */
.fundue-btn--fund{
  background: var(--fundue-accent);
  border-color: var(--fundue-accent);
}

/* FUND hover: keep accent, slightly darker via brightness */
.fundue-card a.fundue-btn--fund:hover,
.fundue-card a.fundue-btn--fund:focus{
  background: var(--fundue-accent);
  filter: brightness(0.95);
}


/* Amount line */
.fundue-card__amount{
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: 0.01em;
}

/* Progress */
.fundue-progress{
  height: 12px; /* thicker */
  background: var(--fundue-progress-track);
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0;
  overflow: hidden;
}
.fundue-progress__fill{
  height: 100%;
  width: 0;
  background: var(--fundue-accent);
}
