/*
================================================================================
  FROOTS REVAMPED COLLAPSIBLE
  froots-revamped-collapsible.css

  Version history:
  v1.0  2026  Initial revamped version
              - Fixed double comment opener at top
              - No other changes — logic and structure were clean
              - Load after froots-revamped-core.css
================================================================================
*/

.collapsible-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
  margin-top: 1.5rem;
  transition: background-color 0.3s ease;
}

.collapsible-toggle:hover {
  background-color: #f8f8f8;
  box-shadow: 10px -10px 15px rgba(0, 0, 0, 0.3);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
}

.section-heading h2 {
  margin: 0;
  flex-grow: 1;
}

.intro-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

.intro-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius, 4px);
  flex-shrink: 0;
}

.intro-text-block {
  flex: 1;
  min-width: 200px;
}

.intro-text-block p {
  margin: 0;
  line-height: 1.5;
}

.toggle-indicator {
  display: inline-flex;
  align-items: center;
  color: #444;
  gap: 0.4rem;
  flex-shrink: 0;
}

.chevron {
  display: inline-block;
  font-size: 0.8em;
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

.chevron.open {
  transform: rotate(90deg);
}

.toggle-label {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
}

.collapsible-section {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.4s ease-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-out;
}

.collapsible-section.expanded {
  max-height: 5000px;
  opacity: 1;
  margin-top: 0;
  padding: 1.5rem 1rem;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .intro-block {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .intro-img {
    align-self: center;
    width: 80px;
    height: 80px;
  }

  .collapsible-toggle {
    padding: 1rem;
  }

  .collapsible-section.expanded {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .intro-img {
    width: 60px;
    height: 60px;
  }
}
