/* ============================================================
   KATZ JESED CENTER — Sistema fresco
   Blanco + azules vivos + acento juguetón. Sin beige.
   ============================================================ */

:root {
  --ink:        #0a2748;
  --ink-soft:   #1a3a6e;
  --blue:       #1e6dd8;     /* azul vivo principal */
  --blue-bright:#3d8bff;
  --blue-soft:  #c9def7;
  --blue-pale:  #e8f1fc;
  --coral:      #ff6b4a;     /* acento juguetón */
  --yellow:     #ffd23f;     /* segundo acento sutil */
  --mint:       #6fd8b8;
  --paper:      #ffffff;
  --paper-2:    #f4f7fb;
  --line:       rgba(10, 39, 72, 0.12);
  --line-soft:  rgba(10, 39, 72, 0.06);
  --mute:       rgba(10, 39, 72, 0.62);

  --display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --sans:    "Inter Tight", "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

.kz, .kz * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.kz {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.005em;
}

.kz .display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-feature-settings: "ss01";
}

.kz .mono {
  font-family: var(--mono);
  font-feature-settings: "tnum";
  letter-spacing: 0;
}

.kz .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kz .eyebrow::before {
  content: "●";
  font-size: 8px;
  color: var(--coral);
}

.kz a { color: inherit; text-decoration: none; }
.kz button { font-family: inherit; cursor: pointer; }

/* Pill button */
.kz .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--r-pill);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s;
}
.kz .btn:hover { transform: translateY(-2px); background: var(--blue); }
.kz .btn .arr { transition: transform .25s; display: inline-block; }
.kz .btn:hover .arr { transform: translateX(4px); }

.kz .btn.coral { background: var(--coral); color: var(--paper); }
.kz .btn.coral:hover { background: var(--ink); }

.kz .btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.kz .btn.ghost:hover { background: var(--ink); color: var(--paper); }

.kz .btn.white {
  background: var(--paper);
  color: var(--ink);
}
.kz .btn.white:hover { background: var(--coral); color: var(--paper); }

/* Tag chip */
.kz .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--blue-pale);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.kz .chip.coral { background: var(--coral); color: var(--paper); }
.kz .chip.yellow { background: var(--yellow); }
.kz .chip.mint { background: var(--mint); }

/* Photo placeholder */
.kz .ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(10,39,72,0.05) 0 1px,
      transparent 1px 10px),
    var(--blue-pale);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  overflow: hidden;
  border-radius: var(--r-md);
}
.kz .ph::after {
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.kz .ph.coral {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.18) 0 1px,
      transparent 1px 10px),
    var(--coral);
  color: rgba(255,255,255,.85);
}
.kz .ph.coral::after { color: rgba(255,255,255,.8); }
.kz .ph.ink {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.06) 0 1px,
      transparent 1px 10px),
    var(--ink);
  color: rgba(255,255,255,.7);
}
.kz .ph.ink::after { color: rgba(255,255,255,.6); }

/* Marquee */
@keyframes marqueeX {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Floating logo float — pure vertical, no rotation (keeps centering) */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.kz .float { animation: floatY 4.5s ease-in-out infinite; }
.kz .float-slow { animation: floatY 6s ease-in-out infinite; }

/* Spin slow */
@keyframes spinSlow {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.kz .spin { animation: spinSlow 18s linear infinite; }

/* Gradient blob (subtle, used as ambient bg) */
.kz .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
}

/* ============================================================
   FLIP CARD — institutions (photo cover front + premium back)
   ============================================================ */
.fc {
  position: relative;
  perspective: 1600px;
  width: 100%;
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.4, .15, .25, 1);
}
.fc.is-flipped .fc-inner { transform: rotateY(180deg); }
@media (hover: hover) {
  .fc:hover .fc-inner { transform: translateY(-4px); }
  .fc.is-flipped:hover .fc-inner { transform: rotateY(180deg) translateY(-4px); }
}

.fc-face {
  position: absolute; inset: 0;
  border-radius: 18px;
  padding: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  overflow: hidden;
  font-family: var(--sans);
}
.fc-front { z-index: 2; }
.fc-back  { transform: rotateY(180deg); padding: 20px; }

/* Cover photo on front */
.fc-cover {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform .8s cubic-bezier(.2,.7,.3,1);
}
.fc:hover .fc-cover { transform: scale(1.06); }
.fc-gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,39,72,0.10) 0%, rgba(10,39,72,0.05) 35%, rgba(10,39,72,0.78) 100%);
  pointer-events: none;
}
.fc-front:not(:has(.fc-cover)) .fc-gradient { display: none; }

.fc-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.fc-code { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.fc-front.fc-colored .fc-code { text-shadow: none; }
.fc-dot  { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.22); }

/* Logo chip floating */
.fc-logo-chip {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.96);
  display: grid; place-items: center;
  position: relative; z-index: 2;
  box-shadow: 0 6px 16px rgba(10,39,72,.20);
  margin-top: 10px;
  flex: none;
  padding: 4px;
  box-sizing: border-box;
  overflow: hidden;
}
.fc-logo-chip img { width: 100%; height: 100%; object-fit: contain; display: block; }

.fc-name-block {
  position: relative; z-index: 2;
  margin-top: auto;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.fc-front.fc-colored .fc-name-block { text-shadow: none; }
.fc-name {
  font-family: var(--display); font-weight: 600;
  font-size: 22px; line-height: 1;
  letter-spacing: -0.025em;
}
.fc-tag {
  font-size: 12px; line-height: 1.35;
  opacity: .85; margin-top: 4px;
  font-weight: 500;
}

.fc-flip-btn {
  margin-top: 10px;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.32);
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; z-index: 2;
  transition: background .25s, transform .25s;
  letter-spacing: .02em;
  align-self: flex-start;
}
.fc-flip-btn:hover { background: rgba(255,255,255,.32); transform: translateY(-1px); }
.fc-flip-icn { display: inline-block; transition: transform .4s; }
.fc-flip-btn:hover .fc-flip-icn { transform: rotate(180deg); }

.fc-back-body {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 8px 0 4px;
  min-height: 0;
  overflow: hidden;
}
.fc-back-name {
  font-family: var(--display); font-weight: 600;
  font-size: 22px; line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: #fff;
  flex: none;
}
.fc-back-rule {
  width: 36px; height: 3px; border-radius: 2px;
  flex: none;
}
.fc-back-desc {
  font-family: var(--sans);
  font-size: 12.5px; line-height: 1.45;
  color: #fff;
  margin: 0;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  font-weight: 500;
  opacity: .92;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 0 1 auto;
}
.fc-back-meta {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  padding-top: 2px;
  font-weight: 600;
  flex: none;
}

.fc-back-actions {
  display: flex; gap: 8px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.16);
  flex: none;
}

/* ─── Inline mini gallery on back ─── */
.fc-mini-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 0;
  flex: none;
  height: 54px;
}
.fc-mini-thumb {
  position: relative;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform .25s, box-shadow .25s;
  outline: 1px solid rgba(255,255,255,.10);
  outline-offset: -1px;
}
.fc-mini-thumb:nth-child(4) { display: none; }
.fc-mini-thumb::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10,39,72,0);
  transition: background .25s;
}
.fc-mini-thumb:hover::before { background: rgba(10,39,72,0.18); }
.fc-mini-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.fc-mini-more {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(10,39,72,0.62);
  color: #fff;
  font-family: var(--display); font-weight: 600;
  font-size: 14px; letter-spacing: -0.02em;
  z-index: 1;
}
.fc-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform .25s, background .25s, opacity .25s;
  min-height: 38px;
  letter-spacing: -0.005em;
}
.fc-btn:hover { transform: translateY(-2px); }
.fc-btn .fc-arr { transition: transform .25s; }
.fc-btn:hover .fc-arr { transform: translateX(3px); }
.fc-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.40);
  color: #fff;
}
.fc-btn-ghost:hover { background: rgba(255,255,255,.14); }
.fc-btn-solid { background: var(--coral); color: #fff; }

.fc-flip-btn-x {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff;
  border: none; font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .25s;
}
.fc-flip-btn-x:hover { background: rgba(255,255,255,.28); }

/* Small flip cards (e.g. <=320px height) get tighter back type */
.fc-cell.compact .fc-back-name { font-size: 26px; }
.fc-cell.compact .fc-back-desc { font-size: 14px; line-height: 1.5; }

