/* ================================================================
   TILT CARD  —  3-D mouse-tilt journal cover card
   Include via master layout or per-page @push('styles')
   ================================================================ */

/* ── Section wrapper ─────────────────────────────────────────── */
.tilt-section {
  padding: 60px 0;
}
.tilt-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Section header ──────────────────────────────────────────── */
.tilt-section-header {
  text-align: center;
  margin-bottom: 52px;
}
.tilt-section-header .tilt-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.09);
  border: 1px solid rgba(15, 118, 110, 0.18);
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 14px;
}
.tilt-section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
  line-height: 1.2;
}
.tilt-section-header p {
  color: #64748b;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Responsive grid ─────────────────────────────────────────── */
.tilt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 36px;
}

/* ── Perspective wrapper ─────────────────────────────────────── */
/* perspective is set per-card via transform: perspective() in JS,
   but we keep it on the wrap for CSS fallback / initial state     */
.tilt-wrap {
  perspective: 1200px;
}

/* ── Card shell ──────────────────────────────────────────────── */
.tilt-card {
  display: block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  will-change: transform;

  /* Initial / reset state */
  transform: perspective(1100px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: transform 0.45s ease-out, box-shadow 0.45s ease-out;

  /* Resting shadow */
  box-shadow:
    0  4px 16px rgba(15, 118, 110, 0.08),
    0  1px  4px rgba(0, 0, 0, 0.06);
}

/* Elevated shadow + glow while actively tilting */
.tilt-card.is-tilting {
  box-shadow:
    0 28px 70px rgba(15, 118, 110, 0.22),
    0  8px 24px rgba(0, 0, 0, 0.12),
    0  0    0 1px rgba(15, 118, 110, 0.12);
}

/* Inner-edge rim — adds depth illusion on the card face */
.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  pointer-events: none;
  z-index: 30;
}

/* ── Glare overlay (JS writes background radial-gradient) ─────── */
.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.28s ease;
  mix-blend-mode: overlay; /* blends light without washing out colours */
}

/* ── Card content wrapper ────────────────────────────────────── */
.tilt-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Cover image area ────────────────────────────────────────── */
.tilt-cover {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  flex-shrink: 0;
  background: #cbd5e1; /* fallback while loading */
}

.tilt-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* slight extra zoom: cancels out on reset, amplifies on tilt */
  transition: transform 0.45s ease;
}

/* Zoom image very slightly when card is tilting */
.tilt-card.is-tilting .tilt-cover img {
  transform: scale(1.04);
}

/* Placeholder when no image provided */
.tilt-cover-placeholder {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tilt-cover-placeholder span {
  font-size: 3.2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 4px;
}

/* Gradient strip at top of image — holds ISSN / volume info */
.tilt-img-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 13px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.58) 0%,
    transparent 100%
  );
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .45px;
  z-index: 2;
}
.tilt-vol-info { opacity: .9; }
.tilt-issn-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  opacity: .85;
}

/* Dark scrim at image bottom — smooth fade into white body */
.tilt-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.9) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Text body ───────────────────────────────────────────────── */
.tilt-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Pill badge */
.tilt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 9px 3px 7px;
  border-radius: 30px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.18);
  width: fit-content;
}

/* Journal abbreviation — big and bold */
.tilt-abbr {
  font-size: 22px;
  font-weight: 900;
  color: #0f766e;
  letter-spacing: 1.5px;
  line-height: 1;
  margin: 0;
}

/* Journal full title */
.tilt-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin: 0;
}

/* Optional short description */
.tilt-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* Volume/Issue meta text */
.tilt-meta {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Footer row: meta left, CTA right */
.tilt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px solid #f1f5f9;
}

/* CTA arrow link */
.tilt-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: .3px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.tilt-card:hover .tilt-cta {
  gap: 8px;
  color: #115e59;
}
.tilt-cta i {
  font-size: 10px;
  transition: transform 0.2s ease;
}
.tilt-card:hover .tilt-cta i {
  transform: translateX(3px);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 992px) {
  .tilt-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
  }
  .tilt-cover { height: 280px; }
}

@media (max-width: 640px) {
  .tilt-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .tilt-cover  { height: 210px; }
  .tilt-abbr   { font-size: 16px; }
  .tilt-title  { font-size: 12px; }
  .tilt-body   { padding: 12px 14px 14px; gap: 6px; }
  .tilt-section-header h2 { font-size: 1.5rem; }
}

@media (max-width: 380px) {
  .tilt-grid   { grid-template-columns: 1fr; }
  .tilt-cover  { height: 280px; }
}
