/* ==========================================================================
   Your Co-Operative Tabbed Page Styles
   ========================================================================== */

.ga-cooperative-page {
  padding: 60px 20px;
}

.ga-cooperative-header {
  text-align: center;
  margin-bottom: 40px;
}

.ga-cooperative-header h1 {
  font-size: 42px;
  color: #0f2d4d;
  font-weight: 700;
  margin: 0;
}

/* Tab Navigation - Desktop */
.ga-cooperative-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}

.ga-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6b7280;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -2px;
}

.ga-tab-btn:hover {
  color: #0f2d4d;
  background: rgba(0, 167, 126, 0.05);
}

.ga-tab-btn.active {
  color: #00a77e;
  border-bottom-color: #00a77e;
}

.ga-tab-icon {
  display: flex;
  align-items: center;
}

.ga-tab-icon svg {
  stroke: currentColor;
}

/* Tab Content */
.ga-cooperative-content {
  position: relative;
  min-height: 400px;
}

.ga-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.ga-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Spinner */
.ga-tab-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
}

.ga-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #00a77e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ga-tab-loading p {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
}

/* Content loaded state */
.ga-tab-content-loaded {
  padding: 20px 0;
}

.ga-tab-content-loaded h1,
.ga-tab-content-loaded h2 {
  color: #0f2d4d;
  margin-bottom: 20px;
}

.ga-tab-content-loaded h1 {
  font-size: 36px;
  font-weight: 700;
}

.ga-tab-content-loaded h2 {
  font-size: 28px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 0;
}

.ga-tab-content-loaded p {
  color: #374151;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Mobile Styles - Accordion/Stacked */
@media (max-width: 768px) {
  .ga-cooperative-page {
    padding: 40px 15px;
  }

  .ga-cooperative-header h1 {
    font-size: 32px;
  }

  /* Transform tabs into accordion */
  .ga-cooperative-tabs {
    flex-direction: column;
    gap: 0;
    border-bottom: none;
    margin-bottom: 0;
  }

  .ga-tab-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    border-left: 3px solid transparent;
    margin-bottom: 0;
    font-size: 18px;
    background: #f9fafb;
  }

  .ga-tab-btn:hover {
    background: #f3f4f6;
  }

  .ga-tab-btn.active {
    background: #ffffff;
    border-left-color: #00a77e;
    border-bottom-color: #e5e7eb;
    color: #00a77e;
  }

  .ga-tab-btn.active + .ga-tab-content {
    display: block;
  }

  /* Stack tabs with content */
  .ga-cooperative-content {
    min-height: auto;
  }

  .ga-tab-content {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 30px;
    margin-bottom: 0;
  }

  .ga-tab-content:last-child {
    border-bottom: none;
  }

  /* Mobile accordion behavior */
  .ga-tab-content.active {
    display: block;
    border-left: 3px solid #00a77e;
    padding-left: 20px;
    padding-right: 20px;
    background: #ffffff;
  }

  .ga-tab-loading {
    padding: 40px 15px;
  }

  .ga-tab-content-loaded h1 {
    font-size: 28px;
  }

  .ga-tab-content-loaded h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .ga-cooperative-header h1 {
    font-size: 26px;
  }

  .ga-tab-btn {
    padding: 16px;
    font-size: 16px;
  }

  .ga-tab-icon svg {
    width: 18px;
    height: 18px;
  }

  .ga-tab-content-loaded h1 {
    font-size: 24px;
  }

  .ga-tab-content-loaded h2 {
    font-size: 20px;
  }

  .ga-tab-content-loaded p {
    font-size: 15px;
  }
}

/* Ensure content formatting matches theme */
.ga-tab-content-loaded img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

.ga-tab-content-loaded ul,
.ga-tab-content-loaded ol {
  margin: 20px 0;
  padding-left: 30px;
}

.ga-tab-content-loaded li {
  margin-bottom: 10px;
  color: #374151;
  line-height: 1.6;
}

.ga-tab-content-loaded a {
  color: #00a77e;
  text-decoration: none;
}

.ga-tab-content-loaded a:hover {
  text-decoration: underline;
}

/* Board members grid (if present) */
.ga-tab-content-loaded .board-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.ga-tab-content-loaded .board-member {
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.ga-tab-content-loaded .board-member img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 15px;
}
