/* === Hide radio buttons === */
.fg-tabs input[type="radio"] { 
  position: absolute; 
  left: -9999px; 
}

/* === Main structure === */
.fg-tabs .tabs-content {
  position: relative;
}

.fg-tabs .tab-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease;
}

/* === Display the selected panel based on checked radio === */
.fg-tabs:has(#fg-ta1:checked) #panel-concept,
.fg-tabs:has(#fg-ta2:checked) #panel-dna,  
.fg-tabs:has(#fg-ta3:checked) #panel-market,
.fg-tabs:has(#fg-ta4:checked) #panel-usage,
.fg-tabs:has(#fg-ta5:checked) #panel-benefits,  
.fg-tabs:has(#fg-tb1:checked) #panel-jerome,
.fg-tabs:has(#fg-tb2:checked) #panel-experts {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* === Navigation button container === */
.fg-tabs .tabs-nav .tab-btn {
  position: relative;
  text-align: center; /* center the h3 inside the tab */
}

/* === Label overlay for full clickable area === */
.fg-tabs .tabs-nav .tab-hit {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: transparent;
}

/* === Tab headings (icon + text) === */
.fg-tabs .tab-btn h3 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
    padding: 1em;
    border-radius: 4px;
    transition: color 0.3s ease, background-color 0.3s ease;
    width: 100%;
    font-weight: 400;
}

/* === FontAwesome icons === */
.tab-btn h3::before {
  font-family: "FontAwesome" !important;
  font-weight: 900 !important;
  color: var(--gcid-secondary-color);
  margin-right: 0.25em;
}

/* === Individual icons by tab ID === */
#btn-concept h3::before  { content: '\f0eb' !important; }
#btn-dna h3::before      { content: '\f471' !important; }
#btn-market h3::before   { content: '\f0b1' !important; }
#btn-usages h3::before   { content: '\f140' !important; }
#btn-benefits h3::before { content: '\f5a2' !important; }

/* === Hover state for tab buttons === */
.fg-tabs .tab-btn:hover h3 {
  color: var(--gcid-secondary-color);
  background-color: rgba(0, 0, 0, 0.03);
}

/* === Active tab (when radio is checked) === */
.fg-tabs:has(#fg-ta1:checked) #btn-concept h3,
.fg-tabs:has(#fg-ta2:checked) #btn-dna h3,
.fg-tabs:has(#fg-ta3:checked) #btn-market h3,
.fg-tabs:has(#fg-ta4:checked) #btn-usages h3,
.fg-tabs:has(#fg-ta5:checked) #btn-benefits h3,
.fg-tabs:has(#fg-tb1:checked) #btn-jerome h3,
.fg-tabs:has(#fg-tb2:checked) #btn-experts h3 {
  color: #000;
  font-weight: 700;
  background-color: var(--gcid-53054839-b83d-4ef0-8659-8a010e6148fd);
}

/* === Icon color when active === */
.fg-tabs:has(#fg-ta1:checked) #btn-concept h3::before,
.fg-tabs:has(#fg-ta2:checked) #btn-dna h3::before,
.fg-tabs:has(#fg-ta3:checked) #btn-market h3::before,
.fg-tabs:has(#fg-ta4:checked) #btn-usages h3::before,
.fg-tabs:has(#fg-ta5:checked) #btn-benefits h3::before,
.fg-tabs:has(#fg-tb1:checked) #btn-jerome h3::before,
.fg-tabs:has(#fg-tb2:checked) #btn-experts h3::before {
  color: #000;
}

/* === Reduced motion support for accessibility === */
@media (prefers-reduced-motion: reduce) {
  .fg-tabs .tab-panel {
    transition: none;
  }
}

/* === DEV mode (for Divi Builder visual editing) === */
.fg-tabs.fg-dev .tabs-content {
  position: static;
}

.fg-tabs.fg-dev .tab-panel {
  position: static !important;
  inset: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: none !important;
}
