/* ==========================================================================
   Redesigned Case Studies (Uspješne priče) Styles
   ========================================================================== */

.fg-stories-page {
  --stories-ink: var(--dark, #111827);
  --stories-copy: #4b5867;
  --stories-border: #e2e8f0;
  --stories-bg-card: #ffffff;
  --stories-bg-alt: #f8fafc;
  --stories-gold: #ffcb08;
  --stories-gold-dark: #67510b;
  --stories-gold-light: #fff7d5;
  --stories-red-bg: #fff1f2;
  --stories-red-border: #fecdd3;
  --stories-red-text: #9f1239;
  --stories-blue-bg: #f0f7ff;
  --stories-blue-border: #bae6fd;
  --stories-blue-text: #0369a1;
  --stories-green-bg: #f0fdf4;
  --stories-green-border: #bbf7d0;
  --stories-green-text: #15803d;
  color: var(--stories-ink);
  font-family: var(--font-main, 'Plus Jakarta Sans', system-ui, sans-serif);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.fg-stories-page .page-hero {
  padding: 80px 0 60px;
  background-color: var(--bg-warm, #FAF8F5);
  background-image: linear-gradient(90deg, #faf8f5 20%, rgba(250, 248, 245, 0.85)), url('../images/bg-diamonds.svg');
  background-size: auto, 60px 60px;
  border-bottom: 1px solid #eae7e0;
  text-align: center;
}

.fg-stories-page .page-hero .badge-pill {
  margin-bottom: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  padding: 6px 14px;
}

.fg-stories-page .page-hero-title {
  font-size: clamp(2.3rem, 4.2vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 860px;
  margin: 0 auto;
  color: var(--stories-ink);
}

.fg-stories-page .page-hero-title mark {
  background: linear-gradient(120deg, rgba(255, 203, 8, 0.35), rgba(255, 203, 8, 0.9));
  padding: 0 0.12em;
  border-radius: 4px;
}

.fg-stories-page .page-hero-lead {
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.8;
  color: var(--stories-copy);
  max-width: 720px;
  margin: 22px auto 0;
}

/* --------------------------------------------------------------------------
   Key Metrics Strip (Dark Bar)
   -------------------------------------------------------------------------- */
.fg-stories-page .dark-metrics-bar {
  background: #111827;
  padding: 34px 0;
  color: #fff;
  border-bottom: 1px solid #1f2937;
}

.fg-stories-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
}

.fg-metric-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fg-metric-highlight-val {
  font-size: clamp(1.7rem, 2.5vw, 2.25rem);
  font-weight: 800;
  color: var(--stories-gold);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fg-metric-highlight-lbl {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 8px;
  max-width: 220px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Category Filter Section
   -------------------------------------------------------------------------- */
.fg-filter-section {
  padding: 24px 0 16px;
  background: #faf8f5;
  border-bottom: 1px solid #ede9e1;
  position: sticky;
  top: 80px;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(250, 248, 245, 0.96);
  transition: box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.fg-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.fg-filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #78716c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fg-filter-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.fg-filter-btn {
  background: #ffffff;
  border: 1px solid #dcd7ce;
  color: #44403c;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fg-filter-btn:hover {
  border-color: #111827;
  color: #111827;
  transform: translateY(-1px);
}

.fg-filter-btn.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}

.fg-filter-btn .fg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  background: #f1ede5;
  color: #57534e;
  transition: all 0.2s ease;
}

.fg-filter-btn.is-active .fg-count {
  background: var(--stories-gold);
  color: #111827;
}

/* --------------------------------------------------------------------------
   Case Studies Main Section
   -------------------------------------------------------------------------- */
.fg-cases-section {
  padding: 70px 0 90px;
  background: #faf8f5;
}

.fg-cases-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px;
}

.fg-cases-header .section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--stories-ink);
  margin-bottom: 14px;
}

.fg-cases-header .section-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--stories-copy);
}

/* Case Grid */
.fg-cases-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

/* --------------------------------------------------------------------------
   Individual Case Card
   -------------------------------------------------------------------------- */
.fg-case-card {
  background: #ffffff;
  border: 1px solid #e3dec9;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(27, 23, 14, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}

.fg-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(27, 23, 14, 0.09);
  border-color: #cfc6ab;
}

.fg-case-card.is-hidden {
  display: none !important;
}

/* Card Header */
.fg-case-header {
  padding: 32px 32px 20px;
  border-bottom: 1px solid #f1ece1;
}

.fg-case-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.fg-case-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fg-case-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--stories-gold-light);
  color: var(--stories-gold-dark);
  border: 1px solid #eedc9c;
}

.fg-grade-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.fg-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
  background: #f4efe6;
  padding: 5px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e5ded2;
}

.fg-live-badge:hover {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.fg-live-badge .fg-arrow-up-right {
  font-size: 0.85rem;
  font-weight: 800;
}

.fg-case-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--stories-ink);
  margin: 0;
}

/* Mockup Showcase Image */
.fg-case-mockup-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid #ede7dc;
  background: #fdfcfb;
  display: block;
  line-height: 0;
}

.fg-case-mockup-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fg-case-card:hover .fg-case-mockup-img {
  transform: scale(1.025);
}

/* Card Body */
.fg-case-body {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

/* --------------------------------------------------------------------------
   The 3 Pillars of Problem - Solution - Result
   -------------------------------------------------------------------------- */
.fg-case-pillars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fg-pillar {
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.65;
  position: relative;
}

.fg-pillar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.fg-pillar-sub {
  font-weight: 500;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.72rem;
}

.fg-pillar-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.68;
}

/* Problem Box (Red/Amber tone) */
.fg-pillar-problem {
  background: var(--stories-red-bg);
  border: 1px solid var(--stories-red-border);
  color: #7f1d1d;
}

.fg-pillar-problem .fg-pillar-label {
  color: var(--stories-red-text);
}

/* Solution Box (Blue/Slate tone) */
.fg-pillar-solution {
  background: var(--stories-blue-bg);
  border: 1px solid var(--stories-blue-border);
  color: #0f172a;
}

.fg-pillar-solution .fg-pillar-label {
  color: var(--stories-blue-text);
}

/* Result Box (Emerald Green tone) */
.fg-pillar-result {
  background: var(--stories-green-bg);
  border: 1px solid var(--stories-green-border);
  color: #14532d;
}

.fg-pillar-result .fg-pillar-label {
  color: var(--stories-green-text);
}

/* --------------------------------------------------------------------------
   Metrics Strip
   -------------------------------------------------------------------------- */
.fg-case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid #e9eef4;
}

.fg-metric-box {
  display: flex;
  flex-direction: column;
}

.fg-metric-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--stories-ink);
  line-height: 1.2;
}

.fg-metric-lbl {
  font-size: 0.73rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Testimonial Block Inside Card
   -------------------------------------------------------------------------- */
.fg-case-testimonial {
  margin: 0;
  padding: 20px 22px;
  background: #fdfaf2;
  border: 1px solid #f3e9cb;
  border-left: 4px solid var(--stories-gold);
  border-radius: 12px;
}

.fg-stars {
  color: #eab308;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.fg-quote-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #374151;
  font-style: italic;
  margin: 0 0 10px;
}

.fg-quote-author {
  font-size: 0.8rem;
  font-weight: 700;
  font-style: normal;
  color: #111827;
}

/* --------------------------------------------------------------------------
   Card Footer
   -------------------------------------------------------------------------- */
.fg-case-footer {
  padding: 20px 32px 28px;
  border-top: 1px solid #f1ece1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: #fffdf9;
}

.fg-case-btn {
  font-size: 0.82rem;
  padding: 12px 20px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
}

.fg-case-btn .fg-arrow {
  font-weight: 800;
}

.fg-inquire-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #67510b;
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.fg-inquire-link:hover {
  color: #111827;
}

/* --------------------------------------------------------------------------
   Trust & Long-Term Partnership Spotlight (Huskić Law)
   -------------------------------------------------------------------------- */
.fg-trust-section {
  padding: 80px 0;
  background: #111827;
  color: #ffffff;
  border-top: 1px solid #1f2937;
  border-bottom: 1px solid #1f2937;
}

.fg-trust-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.fg-trust-copy .badge-pill {
  background: rgba(255, 203, 8, 0.15);
  color: var(--stories-gold);
  border-color: rgba(255, 203, 8, 0.3);
  margin-bottom: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.fg-trust-title {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 18px;
}

.fg-trust-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #94a3b8;
  margin-bottom: 26px;
}

.fg-trust-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  border-top: 1px solid #27354a;
  padding-top: 24px;
}

.fg-trust-stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--stories-gold);
}

.fg-trust-stat-lbl {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.fg-trust-card {
  background: #1b2432;
  border: 1px solid #2e3e55;
  border-radius: 20px;
  padding: 36px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.fg-trust-card::before {
  content: "“";
  position: absolute;
  top: 16px;
  right: 28px;
  font-size: 5rem;
  line-height: 1;
  color: rgba(255, 203, 8, 0.2);
  font-family: Georgia, serif;
}

.fg-trust-quote {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #f1f5f9;
  font-style: italic;
  margin: 0 0 20px;
  position: relative;
  z-index: 1;
}

.fg-trust-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #2e3e55;
  padding-top: 18px;
}

.fg-trust-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.fg-trust-author-firm {
  font-size: 0.8rem;
  color: var(--stories-gold);
}

.fg-trust-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 16px;
}

.fg-trust-visit:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Wall of Love (Client Testimonials Strip)
   -------------------------------------------------------------------------- */
.fg-wall-section {
  padding: 85px 0;
  background: #faf8f5;
  border-bottom: 1px solid #ede9e1;
}

.fg-wall-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.fg-wall-header .badge-pill {
  margin-bottom: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.fg-wall-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--stories-ink);
  margin-bottom: 14px;
}

.fg-wall-header p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--stories-copy);
}

.fg-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.fg-wall-card {
  background: #ffffff;
  border: 1px solid #e5ded2;
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fg-wall-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  border-color: #cfc6b5;
}

.fg-wall-rating {
  color: #eab308;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 700;
}

.fg-wall-quote {
  font-size: 0.94rem;
  line-height: 1.75;
  color: #374151;
  font-style: italic;
  margin: 0 0 20px;
  flex: 1;
}

.fg-wall-footer {
  border-top: 1px solid #f3ece1;
  padding-top: 14px;
}

.fg-wall-author {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--stories-ink);
}

.fg-wall-role {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .fg-filter-section {
    position: static;
    top: auto;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  .fg-filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .fg-filter-label {
    margin: 0;
  }
  .fg-filter-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    padding-top: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .fg-filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .fg-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .fg-cases-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .fg-wall-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .fg-trust-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .fg-stories-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .fg-filter-section {
    padding: 16px 0 12px;
  }
  .fg-filter-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .fg-filter-label {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }
  .fg-filter-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    padding-top: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .fg-filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .fg-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 7px 14px;
  }
  .fg-cases-header .section-title {
    font-size: clamp(1.6rem, 6.5vw, 2.1rem);
    overflow-wrap: break-word;
  }
  .fg-case-header {
    padding: 24px 22px 16px;
  }
  .fg-case-body {
    padding: 20px 22px;
  }
  .fg-case-footer {
    padding: 16px 22px 22px;
    flex-direction: column;
    align-items: stretch;
  }
  .fg-case-btn {
    justify-content: center;
  }
  .fg-inquire-link {
    justify-content: center;
    text-align: center;
  }
  .fg-wall-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .fg-trust-highlights {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fg-trust-card {
    padding: 26px;
  }
}

@media (max-width: 480px) {
  .fg-case-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .fg-metric-box:not(:last-child) {
    border-bottom: 1px solid #e9eef4;
    padding-bottom: 8px;
  }
  .fg-stories-metrics-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
