/* ============================================================
   COMPONENTS CSS — Reusable UI Components
   ============================================================ */

/* ── Expertise Progress Bars ─────────────────────────────── */
.expertise-item { margin-bottom: 20px; }
.expertise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.expertise-label {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.expertise-percent {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
}
.expertise-bar {
  height: 6px;
  background: rgba(0,59,47,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.expertise-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.expertise-fill.animated { transform: scaleX(1); }

/* ── Timeline ────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.25);
}

.timeline-date {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.timeline-org {
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Engagement Card ─────────────────────────────────────── */
.engagement-card {
  border-radius: var(--radius-md);
  padding: 36px 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.engagement-card.primary {
  background: var(--primary);
  color: var(--white);
}
.engagement-card.outline {
  background: var(--white);
  border: 2px solid var(--border-light);
}
.engagement-card.featured {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: 2px solid var(--gold);
  color: var(--white);
}

.engagement-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.engagement-tag {
  position: absolute;
  top: -1px;
  right: 28px;
  background: var(--gold);
  color: var(--primary-dark);
  font-family: var(--font-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 0 0 8px 8px;
}

/* ── Case Study Card ─────────────────────────────────────── */
.case-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}
.case-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.case-card-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 28px;
  position: relative;
}
.case-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.case-card-icon i { font-size: 1.3rem; color: var(--gold); }
.case-card-industry {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.case-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 8px 0 0;
  line-height: 1.35;
}

.case-card-body { padding: 24px; }
.case-section-label {
  font-family: var(--font-accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 6px;
  display: block;
}
.case-text {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.case-result {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,59,47,0.05);
  border-radius: 8px;
  padding: 12px 16px;
}
.case-result i { color: var(--gold); font-size: 1rem; }
.case-result span {
  font-family: var(--font-accent);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
}

/* ── Filter Buttons ──────────────────────────────────────── */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filter-btn {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid var(--border-light);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ── Accordion (FAQ) ─────────────────────────────────────── */
.faq-accordion .faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-accordion .faq-item.open { border-color: rgba(0,59,47,0.25); }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.faq-question:hover { background: var(--bg-light); }
.faq-question span {
  font-family: var(--font-accent);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.faq-icon {
  width: 28px;
  height: 28px;
  background: rgba(0,59,47,0.06);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-icon i { font-size: 0.75rem; color: var(--primary); transition: var(--transition); }
.faq-item.open .faq-icon { background: var(--primary); }
.faq-item.open .faq-icon i { color: var(--gold); transform: rotate(180deg); }

.faq-answer {
  padding: 0 22px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-answer.open {
  max-height: 400px;
  padding-bottom: 18px;
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Search Bar ──────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 400px;
}
.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.9rem;
}
.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  background: var(--white);
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,59,47,0.07);
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--border-light);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ── WhatsApp Float ──────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 84px;
  right: 28px;
  width: 50px;
  height: 50px;
  background: #25D366;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 499;
  box-shadow: 0 6px 20px rgba(37,211,102,0.35);
  transition: var(--transition);
  animation: whatsapp-pulse 3s ease-in-out infinite;
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 10px 28px rgba(37,211,102,0.45); }
.whatsapp-float i { font-size: 1.5rem; color: #fff; }

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,0.35); }
  50% { box-shadow: 0 6px 28px rgba(37,211,102,0.55), 0 0 0 8px rgba(37,211,102,0.08); }
}

/* ── Cookie Banner ───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 460px;
  background: var(--text);
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  z-index: 800;
  box-shadow: var(--shadow-lg);
  display: none;
}
.cookie-banner.show { display: block; animation: slideUp 0.4s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Alert Toast ─────────────────────────────────────────── */
.site-toast {
  position: fixed;
  top: 100px;
  right: 24px;
  background: var(--primary);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--font-accent);
  font-size: 0.87rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  z-index: 999;
  transform: translateX(140%);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  border-left: 4px solid var(--gold);
}
.site-toast.show { transform: translateX(0); }
.site-toast.error { background: #991B1B; border-left-color: #EF4444; }
.site-toast.success { background: #065F46; border-left-color: #10B981; }

/* ── Loading Spinner ─────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,59,47,0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
  display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  text-align: center;
  padding: 60px 20px;
}
.loading-state p {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}
