@charset "UTF-8";

/* =========================================
   Glossary Page Layout & Base Styles
   ========================================= */

/* 2-column layout for desktop */
@media screen and (min-width: 769px) {
  .page-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 120px auto 0 auto;
    padding: 40px 20px;
    gap: 40px;
  }

  .main-content {
    width: 70%;
  }

  .sidebar {
    width: 28%;
  }
}

/* Mobile: Sidebar above content */
@media screen and (max-width: 768px) {
  .page-container {
    display: flex;
    flex-direction: column;
    padding: 100px 20px 20px 20px;
  }

  .sidebar {
    order: 1;
    margin-bottom: 40px;
  }

  .main-content {
    order: 2;
  }
}

/* =========================================
   Breadcrumb
   ========================================= */
.breadcrumb {
  margin-bottom: 30px;
  font-size: 0.9em;
  color: #666;
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 4px;
}

.breadcrumb a {
  color: #2E86AB;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #1a5a7d;
}

/* =========================================
   Glossary Index Page (Category & List)
   ========================================= */
.glossary-category {
  margin-bottom: 50px;
  background: #fff;
  border-radius: 8px;
}

.glossary-category h2 {
  font-size: 1.8rem;
  color: #333;
  border-bottom: 3px solid #2E86AB;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-weight: 700;
}

.term-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.term-list li {
  margin: 0;
}

.term-list li a {
  display: block;
  padding: 15px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  position: relative;
}

.term-list li a:hover {
  border-color: #2E86AB;
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 134, 171, 0.15);
  color: #2E86AB;
}

.term-list li a::after {
  content: "→";
  position: absolute;
  right: 15px;
  color: #ccc;
  transition: color 0.2s;
}

.term-list li a:hover::after {
  color: #2E86AB;
}

/* =========================================
   Glossary Term Page (Article)
   ========================================= */
.glossary-term {
  background: #fff;
  padding: 0;
}

.term-title {
  font-size: 2.2rem;
  color: #2d3436;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  font-weight: 800;
  line-height: 1.3;
}

.term-category {
  display: inline-block;
  background: #2E86AB;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(46, 134, 171, 0.2);
}

.term-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
}

.term-body p {
  margin-bottom: 1.5em;
}

.term-body h2 {
  font-size: 1.6rem;
  color: #2E86AB;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.term-body h3 {
  font-size: 1.3rem;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.term-body strong {
  background: linear-gradient(transparent 60%, #b3d9ff 60%);
  padding: 0 2px;
}

.term-body ul {
  background: #f9f9f9;
  padding: 20px 20px 20px 40px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.term-body li {
  margin-bottom: 10px;
}

/* =========================================
   External Links Section
   ========================================= */
.external-links {
  margin-top: 50px;
  padding: 25px;
  background: #f0f8ff;
  border: 2px solid #d0e8ff;
  border-radius: 8px;
}

.external-links h3 {
  font-size: 1.2rem;
  margin: 0 0 15px 0;
  color: #1a5a7d;
  display: flex;
  align-items: center;
}

.external-links h3::before {
  content: "🔗";
  margin-right: 10px;
  font-size: 1rem;
}

.external-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

.external-links li {
  margin-bottom: 10px;
  border-bottom: 1px dashed #b3d9ff;
  padding-bottom: 5px;
}

.external-links li:last-child {
  border-bottom: none;
}

.external-links a {
  color: #2E86AB;
  text-decoration: none;
  font-weight: 500;
}

.external-links a:hover {
  text-decoration: underline;
  color: #1a5a7d;
}

/* =========================================
   Sidebar Specifics
   ========================================= */
.sidebar-section {
  margin-bottom: 40px;
}

.sidebar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  padding-left: 10px;
  border-left: 4px solid #2E86AB;
  color: #333;
}

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

.glossary-nav li {
  margin-bottom: 10px;
}

.glossary-nav a {
  display: block;
  color: #555;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.glossary-nav a:hover {
  background: #f0f0f0;
  color: #2E86AB;
  padding-left: 15px;
}

/* =========================================
   Ad Banner Styles
   ========================================= */
.ad-banner {
  text-align: center;
}

.ad-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* =========================================
   Hero Image (for term pages)
   ========================================= */
.term-hero {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.term-hero img {
  width: 100%;
  height: auto;
  display: block;
}
