/*
 * Cell Type Page Styles - Replicating vspow.com cell type pages
 */

/* The vspow main content's stats grids use negative margin-top to overlap
 * their own hero banner. We keep that overlap effect but raise the z-index
 * so the cards are always painted above the template banner. */
.cell-type-raw-content .custom_gl_stats_grid,
.cell-type-raw-content .custom_gl_stats-grid,
.cell-type-raw-content .custom_gl_stats_wrap,
.battery-solution-raw-content .custom_gl_stats_grid,
.battery-solution-raw-content .custom_gl_stats-grid,
.battery-solution-raw-content .custom_gl_stats_wrap {
  position: relative !important;
  z-index: 999 !important;
}

/* CRITICAL: vspow's inline .custom_gl_wrapper sets overflow-x:hidden which
 * clips the cards' upward (-80px) overflow, hiding the stat values.
 * Override it so the overlapping cards are fully visible. */
.cell-type-raw-content .custom_gl_wrapper,
.battery-solution-raw-content .custom_gl_wrapper {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  /* vspow sets a solid white background here which hides the template
   * banner gradient behind the overlapping stat cards. Make it transparent
   * so the cards visibly span across the banner, like lifepo4-battery. */
  background-color: transparent !important;
}

/* Unify stat cards (solid-state / lithium-metal / etc.) with the
 * lifepo4-battery card style: 4 equal columns, -50px overlap, 12px radius,
 * 24px padding. Keep each page's own width/max-width so cards stay
 * contained and centered (do NOT force full width). */
.cell-type-raw-content .custom_gl_stats_grid {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  margin-top: -50px !important;
  margin-left: auto;
  margin-right: auto;
}

.cell-type-raw-content .custom_gl_stat_card {
  border-radius: 12px !important;
  padding: 24px !important;
  /* vspow's card background uses var(--custom_gl_bg_white) which is
   * undefined inside .custom_gl_stats_sec on some pages (e.g.
   * lithium-metal), making the card background transparent. Force white. */
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Ensure the raw content container itself doesn't sit below the banner */
.cell-type-raw-content,
.battery-solution-raw-content {
  position: relative;
  z-index: 10;
}

.custom_gl_wrapper {
  --custom_gl_primary: #0093dd;
  --custom_gl_primary-hover: #0079b7;
  --custom_gl_primary-light: rgba(0, 147, 221, 0.1);
  --custom_gl_bg-dark: #0f172a;
  --custom_gl_bg-light: #f8fafc;
  --custom_gl_bg-white: #ffffff;
  --custom_gl_text-main: #334155;
  --custom_gl_text-muted: #64748b;
  --custom_gl_text-light: #f1f5f9;
  --custom_gl_border-color: #e2e8f0;
  --custom_gl_gradient-main: linear-gradient(135deg, #0093dd 0%, #0079b7 100%);
  --custom_gl_gradient-tech: linear-gradient(90deg, #0093dd 0%, #97d4f2 100%);
  font-family: 'Poppins', sans-serif;
  color: var(--custom_gl_text-main);
  line-height: 1.6;
  background-color: var(--custom_gl_bg-light);
}

.custom_gl_container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

/* ===== Cell Type page banner (vspow.com style) ===== */
.cell-type-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 68px;
  padding-bottom: 120px; /* Extra bottom space so cards span across */
  height: auto;
  min-height: 450px;
  box-sizing: border-box;
  position: relative;
}

.cell-type-banner .container {
  position: relative;
  z-index: 1;
}

.cell-type-banner .custom_gl_badge {
  margin-bottom: 20px;
}

.cell-type-banner h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.cell-type-subtitle {
  max-width: 800px;
  margin: 0 auto 16px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.cell-type-banner .breadcrumb {
  font-size: 14px;
  opacity: 0.85;
}

/* Stats cards span across banner and content sections */
.cell-type-stats {
  position: relative;
  z-index: 10;
  margin-top: -70px; /* Pull cards up over the banner bottom */
}

.cell-type-stats .custom_gl_stats-grid {
  margin-top: 0; /* Section-level margin handles the overlap */
}

/* Section spacing - give every content section breathing room */
.custom_gl_bg-alt,
.custom_gl_bg-grey,
.custom_gl_bg_white_sec,
.custom_gl_bg_light_sec {
  padding: 50px 0;
}

/* Background colors (hyphen and underscore variants both supported) */
.custom_gl_bg_white_sec {
  background-color: var(--custom_gl_bg-white);
}

.custom_gl_bg_light_sec {
  background-color: var(--custom_gl_bg-light);
}

.custom_gl_h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--custom_gl_text-light);
  margin-bottom: 24px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.custom_gl_subtitle {
  font-size: 1.25rem;
  color: rgba(241, 245, 249, 0.9);
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.8;
}

.custom_gl_h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}

.custom_gl_h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--custom_gl_gradient-tech);
  border-radius: 2px;
}

.custom_gl_section-desc {
  text-align: center;
  color: var(--custom_gl_text-muted);
  max-width: 750px;
  margin: 0 auto 50px auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

.custom_gl_h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom_gl_banner {
  height: 450px;
  background: linear-gradient(-45deg, #0093dd, #0079b7, #005a8a, #0f172a);
  background-size: 400% 400%;
  animation: custom_gl_gradientBG 15s ease infinite;
  position: relative;
  overflow: hidden;
  color: var(--custom_gl_text-light);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.custom_gl_banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, transparent 20%, rgba(15, 23, 42, 0.8) 80%);
  z-index: -1;
}

.custom_gl_grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  z-index: -1;
}

@keyframes custom_gl_gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.custom_gl_stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.custom_gl_stat-card {
  background: var(--custom_gl_bg-white);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--custom_gl_border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom_gl_stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 147, 221, 0.15);
  border-color: var(--custom_gl_primary);
}

.custom_gl_stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--custom_gl_primary);
  margin-bottom: 12px;
  background: var(--custom_gl_gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.custom_gl_stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--custom_gl_text-main);
}

.custom_gl_bg-alt {
  background-color: var(--custom_gl_bg-white);
}

.custom_gl_bg-grey {
  background-color: var(--custom_gl_bg-light);
}

.custom_gl_table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--custom_gl_bg-white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--custom_gl_border-color);
  margin-top: 36px;
}

.custom_gl_table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 800px;
}

.custom_gl_table th {
  background-color: #f1f5f9;
  color: #1e293b;
  padding: 22px 28px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--custom_gl_border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom_gl_table td {
  padding: 20px 28px;
  border-bottom: 1px solid var(--custom_gl_border-color);
  font-size: 0.95rem;
  color: var(--custom_gl_text-main);
  line-height: 1.8;
}

.custom_gl_table tr:last-child td {
  border-bottom: none;
}

.custom_gl_table tr:hover td {
  background-color: rgba(0, 147, 221, 0.03);
}

.custom_gl_table strong {
  color: #0f172a;
}

.custom_gl_tag-highlight {
  background-color: var(--custom_gl_primary-light);
  color: var(--custom_gl_primary);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.custom_gl_grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px;
  align-items: center;
}

.custom_gl_grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 28px;
  align-items: stretch;
}

.custom_gl_tech-card {
  background: var(--custom_gl_bg-white);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--custom_gl_border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.custom_gl_tech-card h3 {
  margin-bottom: 16px;
}

.custom_gl_tech-card p {
  margin: 0;
}

.custom_gl_tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--custom_gl_primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom_gl_tech-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 147, 221, 0.3);
}

.custom_gl_tech-card:hover::before {
  opacity: 1;
}

.custom_gl_tech-card p {
  line-height: 1.9;
}

.custom_gl_card-icon-wrapper {
  width: 56px;
  height: 56px;
  background-color: var(--custom_gl_primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--custom_gl_primary);
}

.custom_gl_comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 36px;
}

.custom_gl_pro-column, .custom_gl_con-column {
  background: var(--custom_gl_bg-white);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  border: 1px solid var(--custom_gl_border-color);
}

.custom_gl_pro-column {
  border-top: 4px solid #10b981;
}

.custom_gl_con-column {
  border-top: 4px solid #ef4444;
}

.custom_gl_comp-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom_gl_comp-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.9;
}

.custom_gl_comp-item svg {
  flex-shrink: 0;
  margin-top: 5px;
}

.custom_gl_app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.custom_gl_app-card {
  background: var(--custom_gl_bg-white);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--custom_gl_border-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom_gl_app-card:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 147, 221, 0.08);
  border-color: var(--custom_gl_primary);
}

.custom_gl_faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.custom_gl_faq-item {
  background: var(--custom_gl_bg-white);
  border: 1px solid var(--custom_gl_border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.custom_gl_faq-item:hover {
  border-color: var(--custom_gl_primary);
  box-shadow: 0 4px 12px rgba(0, 147, 221, 0.05);
}

.custom_gl_faq-question {
  padding: 28px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.custom_gl_faq-question:hover {
  color: var(--custom_gl_primary);
}

.custom_gl_faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.custom_gl_faq-answer {
  display: none; /* Collapsed by default */
  padding: 0 28px 28px 28px;
  color: var(--custom_gl_text-muted);
  font-size: 0.98rem;
  line-height: 1.9;
  border-top: 1px solid transparent;
}

.custom_gl_faq-item.active {
  border-color: var(--custom_gl_primary);
  box-shadow: 0 8px 20px rgba(0, 147, 221, 0.1);
}

.custom_gl_faq-item.active .custom_gl_faq-answer {
  display: block;
  padding-top: 20px;
  border-top-color: var(--custom_gl_border-color);
}

.custom_gl_faq-item.active .custom_gl_faq-question svg {
  transform: rotate(180deg);
}

.custom_gl_badge {
  background: var(--custom_gl_gradient-tech);
  color: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .cell-type-banner {
    padding-top: 60px;
    padding-bottom: 100px;
    min-height: auto;
  }
  .cell-type-banner h1 {
    font-size: 34px;
  }
  .cell-type-stats {
    margin-top: -60px;
  }
  .custom_gl_stats-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -30px;
  }
  .custom_gl_grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .custom_gl_comparison-container {
    grid-template-columns: 1fr;
  }
  .custom_gl_app-grid {
    grid-template-columns: 1fr;
  }
  .custom_gl_h1 {
    font-size: 2rem;
  }
  .custom_gl_h2 {
    font-size: 1.75rem;
  }
  .custom_gl_banner {
    height: auto;
    padding: 60px 0 100px 0;
  }
  .custom_gl_grid-2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .cell-type-banner {
    padding-top: 50px;
    padding-bottom: 90px;
  }
  .cell-type-banner h1 {
    font-size: 26px;
  }
  .cell-type-stats {
    margin-top: -50px;
  }
  .custom_gl_grid-3 {
    grid-template-columns: 1fr;
  }
  .custom_gl_stats-grid {
    grid-template-columns: 1fr;
  }
  .custom_gl_pro-column, .custom_gl_con-column {
    padding: 24px;
  }
}
