/* style/glossary.css */
:root {
  --primary-color: #1E3A8A;
  --secondary-color: #F59E0B;
  --dark-bg-color: #0a0a0a;
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --border-color: #e0e0e0;
}

/* 🚨 Fixed nav bar padding-top for content */
.page-glossary {
  padding-top: 120px; /* Desktop: Adjust based on actual fixed header height */
  color: var(--light-text-color); /* Body is dark, so text is light */
  background-color: var(--dark-bg-color);
}

.page-glossary__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Banner Section */
.page-glossary__hero-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 80px 0;
  text-align: center;
}

.page-glossary__hero-title {
  font-size: 3.5em;
  font-weight: bold;
  color: var(--light-text-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-glossary__hero-description {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.page-glossary__hero-cta-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--dark-text-color);
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
}

.page-glossary__hero-cta-button:hover {
  background: #e08e00;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-glossary__introduction-section {
  padding: 60px 0;
  background-color: var(--dark-bg-color);
}

.page-glossary__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--light-text-color);
  text-align: center;
  margin-bottom: 40px;
}

.page-glossary__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-glossary__text-content {
  flex: 2;
  font-size: 1.1em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.page-glossary__text-content p {
  margin-bottom: 15px;
}

.page-glossary__image-content {
  flex: 1;
  min-width: 300px;
}

.page-glossary__feature-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Glossary List Section */
.page-glossary__glossary-list-section {
  padding: 60px 0;
  background-color: var(--dark-bg-color);
}

.page-glossary__subtitle {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 50px;
}

.page-glossary__glossary-category {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-glossary__category-title {
  font-size: 2em;
  color: var(--secondary-color);
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.5);
  padding-bottom: 15px;
}

.page-glossary__term-item {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.page-glossary__term-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.page-glossary__term-title {
  font-size: 1.5em;
  color: var(--light-text-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-glossary__term-definition {
  font-size: 1.05em;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.page-glossary__inline-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-glossary__inline-link:hover {
  color: #e08e00;
  text-decoration: underline;
}

/* CTA Section */
.page-glossary__cta-section {
  padding: 80px 0;
  background-color: var(--dark-bg-color);
}

.page-glossary__cta-section .page-glossary__container {
  background: linear-gradient(145deg, var(--primary-color), #0f2766);
  border-radius: 15px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.page-glossary__cta-title {
  font-size: 2.8em;
  font-weight: bold;
  color: var(--light-text-color);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.page-glossary__cta-description {
  font-size: 1.15em;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.page-glossary__cta-button {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--dark-text-color);
  padding: 18px 45px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  z-index: 1;
}

.page-glossary__cta-button:hover {
  background: #e08e00;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.page-glossary__cta-image {
  position: absolute;
  bottom: -20px;
  right: -50px;
  opacity: 0.15;
  max-width: 350px;
  height: auto;
  z-index: 0;
  transform: rotate(15deg);
}

/* FAQ Section */
.page-glossary__faq-section {
  padding: 60px 0;
  background-color: var(--dark-bg-color);
}

.page-glossary__faq-list {
  margin-top: 30px;
}

.page-glossary__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-glossary__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-glossary__faq-item.active .page-glossary__faq-answer {
  max-height: 2000px !important; /* Ensure it expands fully */
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Light background for answer on dark page */
  border-radius: 0 0 5px 5px;
}

.page-glossary__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-glossary__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-glossary__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

.page-glossary__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--light-text-color);
  pointer-events: none;
}

.page-glossary__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-glossary__faq-item.active .page-glossary__faq-toggle {
  color: var(--light-text-color);
  transform: rotate(45deg); /* Change + to X visually */
}

.page-glossary__faq-answer p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-glossary__hero-title {
    font-size: 2.8em;
  }
  .page-glossary__hero-description {
    font-size: 1.1em;
  }
  .page-glossary__section-title {
    font-size: 2em;
  }
  .page-glossary__category-title {
    font-size: 1.8em;
  }
  .page-glossary__term-title {
    font-size: 1.3em;
  }
  .page-glossary__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  /* 🚨 Mobile: Adjust padding-top for fixed header */
  .page-glossary {
    padding-top: 100px !important; /* Mobile: Adjust based on mobile fixed header height */
  }

  .page-glossary__hero-banner {
    padding: 60px 0;
  }

  .page-glossary__hero-title {
    font-size: 2em;
  }

  .page-glossary__hero-description {
    font-size: 1em;
  }

  .page-glossary__hero-cta-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-glossary__introduction-section,
  .page-glossary__glossary-list-section,
  .page-glossary__cta-section,
  .page-glossary__faq-section {
    padding: 40px 0;
  }

  .page-glossary__container {
    padding: 0 15px;
  }

  .page-glossary__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-glossary__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .page-glossary__text-content {
    font-size: 1em;
  }

  .page-glossary__glossary-category {
    padding: 20px;
    margin-bottom: 30px;
  }

  .page-glossary__category-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .page-glossary__term-title {
    font-size: 1.2em;
  }

  .page-glossary__term-definition {
    font-size: 0.95em;
  }

  .page-glossary__cta-section .page-glossary__container {
    padding: 40px 20px;
  }

  .page-glossary__cta-title {
    font-size: 1.8em;
  }

  .page-glossary__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-glossary__cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
  }

  .page-glossary__cta-image {
    display: none; /* Hide on mobile for better readability */
  }

  .page-glossary__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-glossary__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-glossary__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-glossary__faq-answer {
    padding: 0 15px;
  }
  
  .page-glossary__faq-item.active .page-glossary__faq-answer {
    padding: 15px !important;
  }

  /* 🚨 Mobile image responsive adaptation */
  .page-glossary img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-glossary__section,
  .page-glossary__card,
  .page-glossary__container,
  .page-glossary__content-wrapper,
  .page-glossary__image-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-glossary__image-content {
    padding: 0 !important; /* Reset padding from container if nested */
  }
}