/* ============================================================
   FRONTTEXT — Feed Component Styles
   Admin-editable slides / posts feed
   ============================================================ */

/* ── Fronttext Brand ─────────────────────────────────────── */
.fronttext-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
}
.fronttext-brand .ft-word {
  color: var(--text);
  transition: color var(--t-slow);
}
[data-theme="dark"] .fronttext-brand .ft-word { color: var(--ft-accent); }

/* ── Feed Section ────────────────────────────────────────── */
.ft-section {
  background: var(--bg);
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.ft-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.ft-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}

.ft-title .ft-brand {
  color: var(--ft-accent);
}

/* ── Feed Slide Card ─────────────────────────────────────── */
.ft-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ft-card:hover {
  box-shadow: var(--sh);
  transform: translateY(-3px);
  border-color: var(--border-2);
}

/* Image */
.ft-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  overflow: hidden;
}

.ft-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.ft-card:hover .ft-card-img img { transform: scale(1.04); }

.ft-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ft-bg), var(--bg-2));
  font-size: 3rem;
}

/* Category label on image */
.ft-cat-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--ft-accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Body */
.ft-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ft-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ft-card-meta .dot-sep {
  width: 3px; height: 3px;
  background: var(--text-light);
  border-radius: 50%;
}

.ft-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ft-card-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.ft-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ft-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ft-accent);
  text-decoration: none;
  transition: gap var(--t);
}
.ft-explore-btn:hover { gap: 10px; color: var(--ft-accent); }
.ft-explore-btn i { font-size: .85rem; }

/* ── Featured Slide (Large) ──────────────────────────────── */
.ft-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 320px;
  transition: all var(--t);
}

@media (max-width: 767px) {
  .ft-featured { grid-template-columns: 1fr; }
}

.ft-featured:hover { box-shadow: var(--sh-lg); }

.ft-featured-img {
  background: var(--bg-2);
  overflow: hidden;
  min-height: 280px;
}
.ft-featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.ft-featured:hover .ft-featured-img img { transform: scale(1.04); }

.ft-featured-body {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 767px) {
  .ft-featured-body { padding: 24px 20px; }
}

.ft-featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ft-bg);
  color: var(--ft-accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 16px;
  width: fit-content;
}

.ft-featured-title {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 12px;
}

.ft-featured-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Swiper Customization ────────────────────────────────── */
.ft-swiper .swiper-pagination-bullet {
  background: var(--text-light);
  opacity: 1;
  width: 6px; height: 6px;
  transition: all var(--t);
}
.ft-swiper .swiper-pagination-bullet-active {
  background: var(--ft-accent);
  width: 20px;
  border-radius: 3px;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 575px) {
  .ft-section { padding: 48px 0; }
  .ft-card-body { padding: 14px 16px 16px; }
  .ft-card-title { font-size: .9rem; }
  .ft-card-desc { font-size: .78rem; -webkit-line-clamp: 2; }
}

/* ══ FrontText dark redesign (navy hero + glass search) ═══════ */
.ft-dark {
  background: linear-gradient(180deg, #0B1B4D 0%, #10256B 32%, #0E1E56 100%);
}

.ft-hero {
  background: linear-gradient(160deg, #0A1747 0%, #1B3AA8 60%, #2450D4 100%);
  padding-bottom: 46px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 40px rgba(4,10,40,.45);
}

.ft-hero-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: 1rem;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: all .18s ease;
}
.ft-hero-btn:hover { background: rgba(255,255,255,.24); color:#fff; }

.ft-search {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.96);
  border-radius: 999px;
  padding: 11px 18px;
  margin: 18px 0 16px;
  box-shadow: 0 6px 24px rgba(4,10,40,.35);
}
.ft-search i.bi-search { color: #1B3AA8; font-size: .95rem; }
.ft-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: .9rem; color: #0B1B4D;
}
.ft-search input::placeholder { color: #7C8BB8; }
.ft-search a { color: #7C8BB8; text-decoration: none; font-size: .8rem; }
.ft-search a:hover { color: #0B1B4D; }

.ft-pills-dark { padding-bottom: 4px; margin-bottom: 0; }
.ft-pills-dark .ft-pill {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
}
.ft-pills-dark .ft-pill:hover { border-color:#7EC8FF; color:#fff; }
.ft-pills-dark .ft-pill.active {
  background: #fff; border-color: #fff; color: #1B3AA8;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
}

/* Feed cards pop on the navy background */
.ft-dark .card { box-shadow: 0 8px 28px rgba(4,10,40,.35); border: none; }

/* ══ X / Twitter-style composer ══════════════════════════════ */
.ft-composer-x {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 14px 18px 10px;
  box-shadow: 0 8px 28px rgba(4,10,40,.35);
}
.ftx-row { display: flex; gap: 12px; }
.ftx-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; overflow: hidden;
}
.ftx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ftx-main { flex: 1; min-width: 0; }
.ftx-input {
  width: 100%; border: none; background: transparent; resize: none;
  font-size: 1.25rem; line-height: 1.5; color: var(--text);
  outline: none; padding: 8px 0 4px; min-height: 40px; overflow: hidden;
}
.ftx-input::placeholder { color: var(--text-muted); font-weight: 400; }
.ftx-preview { max-height: 240px; max-width: 100%; border-radius: 16px; margin: 6px 0 4px; }
.ftx-actions {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px;
}
.ftx-tools { display: flex; align-items: center; gap: 2px; }
.ftx-tool {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 1.15rem; cursor: pointer;
  transition: background .15s ease;
}
.ftx-tool:hover { background: var(--blue-light); }
.ftx-post {
  background: var(--blue); color: #fff; border: none;
  border-radius: 999px; padding: 9px 24px;
  font-weight: 700; font-size: .95rem; cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.ftx-post:hover { filter: brightness(1.08); }
.ftx-post:active { transform: scale(.97); }
