/* =============================================
   Flip Cards — Slide/Stack Component
   ============================================= */

/* -- Accent color variables -- */
.fc-accent--purple { --fc-accent: #1E88E5; }
.fc-accent--blue   { --fc-accent: #76d6ff; }
.fc-accent--teal   { --fc-accent: #fff; }

/* -- Wrapper -- */
.fc-wrapper {
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  position: relative;
  /* width: 40vw; */
  max-width: 100%;
  height: auto;
  user-select: none;
}

/* -- Card stack container -- */
.fc-stack {
  position: relative;
  width: 100%;
  height: 300px;
  perspective: 1000px;
}

/* -- Base card -- */
.fc-card {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  padding: 28px 24px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* -- Card states -- */
.fc-card--active {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(0) scale(1) rotate(0deg);
  opacity: 1;
  z-index: 3;
  cursor: default;
}

.fc-card--next {
  transform: translateX(-20px) scale(0.94) rotate(-1deg);
  opacity: 0.5;
  z-index: 2;
}

.fc-card--prev {
  transform: translateX(20px) scale(0.94) rotate(1deg);
  opacity: 0.5;
  z-index: 2;
}

.fc-card--hidden {
  transform: translateX(-40px) scale(0.88) rotate(-2deg);
  opacity: 0.2;
  z-index: 1;
}

/* -- Accent line (right edge) -- */
.fc-accent-line {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--fc-accent);
  border-radius: 0 16px 16px 0;
  opacity: 0.3;
  transition: opacity 0.5s;
}

.fc-card--active .fc-accent-line {
  opacity: 1;
}

/* -- Tag badge -- */
.fc-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--fc-accent);
  background: color-mix(in srgb, var(--fc-accent) 10%, transparent);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* -- Title -- */
.fc-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.4;
  opacity: 0.5;
  transform: translateY(6px);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-card--active .fc-title {
  opacity: 1;
  transform: translateY(0);
}

/* -- Body text -- */
.fc-body {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.fc-card--active .fc-body {
  opacity: 1;
  transform: translateY(0);
}

/* -- Decorative glow -- */
.fc-glow {
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fc-accent) 12%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* -- Navigation bar -- */
.fc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 4px;
}

/* -- Dot indicators -- */
.fc-dots {
  display: flex;
  gap: 8px;
}

.fc-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-dot--active {
  width: 28px;
  background: var(--fc-accent);
}

/* -- Arrow buttons -- */
.fc-arrows {
  display: flex;
  gap: 8px;
}

.fc-arrow {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fc-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.fc-arrow:active {
  transform: scale(0.95);
}

.fc-absolute-wrapper {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  z-index: 10;
}

/* -- Light theme overrides -- */
html[data-theme="light"] .fc-accent--purple {
  --fc-accent: #4a2bb8;
}

html[data-theme="light"] .fc-accent--blue {
  --fc-accent: #0b8ef3;
}

html[data-theme="light"] .fc-accent--teal {
  --fc-accent: #27b596;
}

html[data-theme="light"] .fc-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 50, 75, 0.1);
  box-shadow: 0 18px 48px rgba(17, 38, 59, 0.08);
}

html[data-theme="light"] .fc-card--active {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 247, 255, 0.92) 100%);
  border-color: rgba(11, 142, 243, 0.18);
}

html[data-theme="light"] .fc-card--next,
html[data-theme="light"] .fc-card--prev {
  opacity: 0.7;
}

html[data-theme="light"] .fc-card--hidden {
  opacity: 0.3;
}

html[data-theme="light"] .fc-tag {
  background: color-mix(in srgb, var(--fc-accent) 14%, white);
}

html[data-theme="light"] .fc-title {
  color: #12324b;
}

html[data-theme="light"] .fc-body {
  color: rgba(18, 50, 75, 0.72);
}

html[data-theme="light"] .fc-dot {
  background: rgba(18, 50, 75, 0.14);
}

html[data-theme="light"] .fc-arrow {
  border-color: rgba(18, 50, 75, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(18, 50, 75, 0.78);
  box-shadow: 0 10px 24px rgba(17, 38, 59, 0.06);
}

html[data-theme="light"] .fc-arrow:hover {
  background: rgba(240, 247, 255, 0.95);
  border-color: rgba(11, 142, 243, 0.2);
}

html[data-theme="light"] .fc-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--fc-accent) 18%, white) 0%, transparent 72%);
}
