/* ============================================
   Vertical Edge - Glossary Styles
   ============================================ */

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

@media screen and (max-width: 768px) {
  .page-container {
    display: flex;
    flex-direction: column;
    padding: 20px;
  }
  .sidebar { order: 1; margin-bottom: 30px; }
  .main-content { order: 2; }
}

/* Glossary Header */
.glossary-header {
  margin-bottom: 2rem;
}

.glossary-header h1 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0d3b2e;
  margin-bottom: 0.5rem;
}

.glossary-header p {
  color: #4a5e6d;
  font-size: 1.05rem;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 25px;
  font-size: 0.9em;
  color: #6b7b8a;
  background: #f0f3f5;
  padding: 10px 15px;
  border-radius: 6px;
}

.breadcrumb a {
  color: #145c47;
  text-decoration: none;
}

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

/* Category Section */
.glossary-category {
  margin-bottom: 45px;
  background: #fff;
  border-radius: 12px;
}

.glossary-category h2 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 1.6rem;
  color: #0d3b2e;
  border-bottom: 3px solid #0d3b2e;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
}

.glossary-category h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #ff6b2b;
}

/* Glossary List */
.glossary-list {
  display: grid;
  gap: 15px;
}

.glossary-item {
  padding: 15px 20px;
  background: #f7f9fc;
  border: 1px solid #e2e7eb;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.glossary-item:hover {
  border-color: #ff6b2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13,59,46,0.1);
}

.glossary-item h3 {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.glossary-item h3 a {
  color: #0d3b2e;
  text-decoration: none;
}

.glossary-item h3 a:hover {
  color: #ff6b2b;
}

.glossary-item p {
  font-size: 0.92rem;
  color: #4a5e6d;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Term List (grid) */
.term-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.term-list li a {
  display: block;
  padding: 12px 18px;
  background: #f7f9fc;
  border: 1px solid #e2e7eb;
  border-radius: 6px;
  color: #1e2d38;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.term-list li a:hover {
  border-color: #ff6b2b;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,107,43,0.12);
  color: #ff6b2b;
}

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

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

/* Term Article */
.glossary-term {
  background: #fff;
  padding: 0;
}

.term-title {
  font-family: 'Outfit', 'Noto Sans JP', sans-serif;
  font-size: 2rem;
  color: #0d3b2e;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e7eb;
  font-weight: 800;
  line-height: 1.3;
}

.term-category {
  display: inline-block;
  background: #0d3b2e;
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.term-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #4a5e6d;
}

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

.term-body strong {
  color: #1e2d38;
  font-weight: 700;
}

.term-body ul {
  background: #f0f3f5;
  padding: 18px 18px 18px 36px;
  border-radius: 8px;
  margin-bottom: 25px;
}

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

/* External Links */
.external-links {
  margin-top: 40px;
  padding: 22px;
  background: #f7f9fc;
  border: 1px solid #e2e7eb;
  border-radius: 8px;
}

.external-links h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: #0d3b2e;
  display: flex;
  align-items: center;
  border: none;
  padding: 0;
}

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

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

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

.external-links a {
  color: #145c47;
  font-weight: 500;
}

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

/* Sidebar */
.sidebar-section {
  margin-bottom: 30px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(13,59,46,0.06);
}

.sidebar h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 4px solid #ff6b2b;
  color: #0d3b2e;
}

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

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

.glossary-nav a {
  display: block;
  color: #4a5e6d;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.92rem;
}

.glossary-nav a:hover {
  background: #f0f3f5;
  color: #ff6b2b;
  padding-left: 14px;
}

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

.amazon-banner div {
  background: #ff6b2b;
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Glossary link */
a.glossary-link {
  color: #145c47;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
a.glossary-link:hover {
  color: #ff6b2b;
  text-decoration-style: solid;
}
