/* Concepts Page Styles */

/* foundational concepts page 2025 */

.foundational-title-container {
    max-width: 1200px;
    margin: 4rem auto;
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.foundational-title-left {
    flex: 1;
    min-width: 300px;
}

.foundational-title-heading {
    font-family: 'Norwester', sans-serif;
    line-height: 1.3;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #353535;
}

.foundational-title-description {
    position: relative;
    overflow: hidden;
    color: #353535;
    border-radius: 20px;
    padding: 25px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    line-height: 1.7;

    /* Glassy blue tint */
    background: rgba(198, 213, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.foundational-title-right {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.foundational-title-image-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 100%;
}

.foundational-title-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* Responsive Tweaks for Foundational Concepts Section */
@media (max-width: 1024px) {
    .foundational-title-container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .foundational-title-container {
        flex-direction: column;
        padding: 0 30px;
    }

    .foundational-title-left,
    .foundational-title-right {
        width: 100%;
    }

    .foundational-title-heading {
        font-size: 2.2rem;
        text-align: center;
    }

    .foundational-title-description {
        font-size: 1.2rem;
        text-align: center;
        margin: 0 auto;
    }

    .foundational-title-right {
        margin-top: 30px;
        justify-content: center;
    }

    .foundational-title-image-wrapper {
        max-width: 100%;
    }

    .foundational-title-image {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .foundational-title-container {
        padding: 0 20px;
    }

    .foundational-title-heading {
        font-size: 1.9rem;
    }

    .foundational-title-description {
        font-size: 1rem;
        padding: 20px;
    }
}

/* === Concept (Taxonomy) Entries === */

.concept-entries {
    margin-bottom: 5rem;
}

.container--concept-entries {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.concept-entry-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.concept-content {
    padding: 1rem 1.25rem;
    flex-grow: 1;
}

.concept-title {
    text-transform: uppercase;
    font-size: 1.7rem;
    font-family: var(--ff-caps-bold);
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #0a1a3c;
}

.concept-excerpt {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #353535;
}

.concept-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: #353535;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
}

.concept-link:hover {
    color: #0f3c82;
}

/* Pagination */
.concept-pagination {
    grid-column: 1 / -1;
    margin-top: 3rem;
    text-align: center;
}

@media (max-width: 992px) {
    .container--concept-entries {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .container--concept-entries {
        grid-template-columns: 1fr;
    }
}

/* Library Styles (Scoped to Entries/Sections) */

/* Increase max-width for Library Entry container */
@media (min-width: 1200px) {
  .container--entry-content,
  .container.container--entry-content {
    max-width: 1200px !important;
  }
}

/* --- Headings --- */
.entry-content h2 {
    font-size: 2.2rem;
    color: #0a1a3c;
    border-left: 4px solid #c6d5ff;
    padding-left: 12px;
    margin: 2em 0 1em;
}
.entry-content h3 {
    font-size: 1.8rem;
    color: #353535;
    font-weight: 600;
    margin: 1.5em 0 0.75em;
}

/* --- Paragraphs & Links --- */
.entry-content p {
	font-size: 1.5rem;
    line-height: 1.7;
    margin-bottom: 1.25em;
    color: #353535;
    font-weight: 600;
}
.entry-content a {
    color: #82a0f4;
    text-decoration: underline;
    transition: color 0.2s ease;
}
.entry-content a:hover {
    color: #0a1a3c;
}

/* --- Blockquotes --- */
.entry-content blockquote {
    background: #c6d5ff;
    border-left: 5px solid #0a1a3c;
    padding: 1rem 1.5rem;
    margin: 1.5em 0;
    font-style: italic;
    color: #0a1a3c;
    border-radius: 6px;
}

/* --- Callout Boxes --- */
.entry-callout-info {
    background: #c6d5ff;
    border-left: 5px solid #82a0f4;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5em 0;
}
.entry-callout-highlight {
    background: #f4e9b7;
    border-left: 5px solid #d4c56e;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5em 0;
    color: #353535; /* darker text for contrast */
}
.entry-callout-success {
    background: #c2e4e0;
    border-left: 5px solid #56c1b6;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5em 0;
}
.entry-callout-contrast {
    background: #e1aeaa;
    border-left: 5px solid #ba6d67;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5em 0;
}

/* Callout titles (first strong element styled as heading) */
.entry-callout-info strong:first-child,
.entry-callout-highlight strong:first-child,
.entry-callout-success strong:first-child,
.entry-callout-contrast strong:first-child {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 700;
    color: #0a1a3c;
}

/* --- Lists --- */
.entry-content ul {
    margin: 1em 0 1.5em 1.5em;
    list-style: disc;
    color: #0a1a3c;
}
.entry-content li {
	font-size: 1.4rem;
    margin-bottom: 0.5em;
}
/* Custom bullet color */
.entry-content ul li::marker {
    color: #82a0f4;
    font-weight: bold;
}

/* --- Images --- */
.entry-content img {
	display: block;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    margin: 3.5em auto;
}

/* --- Tables --- */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}
.entry-content th {
	font-size: 1.4rem;
    background: #c6d5ff;
    color: #0a1a3c;
    font-weight: 600;
    padding: 10px;
    border: 1px solid #82a0f4;
}
.entry-content td {
	font-size: 1.3rem;
    padding: 10px;
    border: 1px solid #ddd;
}
.entry-content tr:nth-child(even) {
    background: #f9f9f9;
}

.entry-content > *:first-child {
    margin-top: 0;
}

/* Layout for content + TOC */
.entry-layout {
  display: grid;
  grid-template-columns: 240px 1fr; /* narrower TOC */
  gap: 2rem;
  align-items: start;
  min-height: 100%;
}

/* Sticky TOC sidebar */
.entry-toc {
  position: sticky;
  top: 20%;
  max-height: calc(100vh - 25vh);
  overflow-y: auto;
  padding: 1rem 0.75rem;
  background: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: #c6d5ff transparent;
  border-left: 1px solid #efefef;
}

/* Custom scrollbar for WebKit */
.entry-toc::-webkit-scrollbar {
  width: 6px;
}
.entry-toc::-webkit-scrollbar-track {
  background: transparent;
}
.entry-toc::-webkit-scrollbar-thumb {
  background-color: #c6d5ff;
  border-radius: 4px;
}

/* TOC title */
.entry-toc__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0a1a3c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* TOC list */
.entry-toc nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level items */
.entry-toc nav li {
  font-size: 1.4rem;
  margin: 0.5rem 0; /* increased vertical spacing */
  padding-left: 0.5rem;
  transition: color 0.2s ease;
}

/* H3 indents */
.entry-toc nav li.h3 {
  margin-left: 2rem;
  color: #777; /* slightly lighter grey for subheadings */
}

/* TOC links */
.entry-toc nav a {
  text-decoration: none;
  color: #888; /* default lighter grey text */
  display: block;
  padding: 0.15rem 0.25rem;
  border-radius: 3px;
  transition: color 0.25s ease;
}

/* Hover effect: only color change (no background) */
.entry-toc nav a:hover {
  color: #353535;
}

/* Active state (clicked / scroll position) */
.entry-toc nav .active > a {
  color: #353535;
  font-weight: 600;
}

/* Container relative (no longer needed for highlight) */
.toc-container {
  position: relative;
}

/* Remove the highlight line */
.toc-highlight {
  display: none;
}

/* --- Responsive adjustments for TOC and content layout --- */

@media (max-width: 992px) {
  .entry-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .entry-toc {
    position: relative;
    top: unset;
    max-height: unset;
    border-left: none;
    border-top: 1px solid #efefef;
    padding-top: 1.5rem;
  }
}

/* Mobile breakpoint: hide TOC entirely */
@media (max-width: 768px) {
  .entry-layout {
    grid-template-columns: 1fr; /* only article content */
  }

  .entry-toc {
    display: none; /* hide sidebar */
  }
  
  .entry-layout > * {
  min-width: 0;
  }
}

/* allowing horizontal scroll instead of clipping for tables */
@media (max-width: 768px) {
  .entry-content table {
    display: block;            
    overflow-x: auto;         
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;  
    max-width: 100%;
  }

  .entry-content th,
  .entry-content td {
    min-width: 140px;
  }
  
  .entry-content table::after {
    content: '↔';
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.5rem;
  }
}