/* Modern CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #314D76;
  --primary-hover: #426289;
  --accent-color: #5789BB;
  --accent-hover: #4a7aaa;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding-top: 85px;
  background: var(--bg-secondary);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(87, 137, 187, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(87, 137, 187, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Content wrapper to ensure footer stays at bottom */
body > *:not(footer):not(#footer-placeholder) {
  flex-shrink: 0;
}

#footer-placeholder {
  margin-top: auto;
}

body.library-page {
  background: #eef2f7;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(87, 137, 187, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(87, 137, 187, 0.05) 0%, transparent 50%);
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 20px 0;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 45px;
  width: auto;
  display: block;
  max-width: 200px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-dropdown-trigger:hover {
  color: var(--accent-color);
}

.nav-dropdown-trigger svg {
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.nav-dropdown-item svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
  padding-left: 1.5rem;
}

.nav-dropdown-item:first-child:hover {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-dropdown-item:last-child:hover {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.nav-dropdown-item.active {
  color: var(--accent-color);
  background: var(--bg-secondary);
}

.nav-dropdown-item:first-child.active {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-dropdown-item:last-child.active {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.nav-link.active {
  color: var(--accent-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #426289 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(87, 137, 187, 0.1) 0%, rgba(87, 137, 187, 0) 100%);
  pointer-events: none;
}

header h1 {
  margin: 0 0 1rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

header h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Library Layout */
.library-layout {
  display: grid;
  grid-template-columns: 250px minmax(400px, 1fr);
  gap: 2rem;
  align-items: start;
  width: 100%;
  grid-template-rows: auto;
  box-sizing: border-box;
}

.library-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 100px;
}

.sidebar-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-title svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-filter-item,
.sidebar-sort-item {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.sidebar-filter-item svg,
.sidebar-sort-item svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-filter-item:last-child,
.sidebar-sort-item:last-child {
  margin-bottom: 0;
}

.sidebar-filter-item:hover,
.sidebar-sort-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
}

.sidebar-filter-item.active,
.sidebar-sort-item.active {
  background: transparent;
  color: var(--accent-color);
  font-weight: 600;
}

.sidebar-sort-item .sort-arrow {
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-sort-item:not([data-sort="year_published"]) .sort-arrow {
  display: none !important;
}

.library-sidebar .dropdown-wrapper {
  width: 100%;
}

.library-sidebar .dropdown-trigger {
  width: 100%;
  justify-content: space-between;
}

.library-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
  overflow: hidden; /* Prevent content from forcing shrink */
  flex: 1 1 auto; /* Allow flex growth but maintain structure */
}

.library-main .search-wrapper {
  margin-bottom: 0.5rem;
  width: 100%;
}

/* Controls Section */
.controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0;
}

/* Search Wrapper */
.search-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#search,
#previewSearch {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  line-height: normal;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

#heroSearch {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  line-height: normal;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

#search:focus,
#previewSearch:focus,
#heroSearch:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(87, 137, 187, 0.1);
  background: white;
}

#search::placeholder,
#previewSearch::placeholder,
#heroSearch::placeholder {
  color: var(--text-secondary);
}

.hero-search-wrapper #heroSearch::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

/* Dropdown Wrapper */
.dropdown-wrapper {
  position: relative;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.dropdown-trigger:hover {
  background: white;
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.dropdown-trigger.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.dropdown-trigger.active svg {
  stroke: white;
}

.dropdown-label {
  font-weight: 500;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: hidden;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-item span {
  flex: 1;
}

.dropdown-item svg:first-child {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dropdown-item .check-icon {
  opacity: 0;
  color: var(--accent-color);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.dropdown-item.active .check-icon {
  opacity: 1;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
}

.dropdown-item:hover svg:first-child {
  color: var(--accent-color);
}

.dropdown-item.active {
  background: rgba(87, 137, 187, 0.08);
  color: var(--accent-color);
  font-weight: 500;
}

.dropdown-item.active svg:first-child {
  color: var(--accent-color);
}

/* Legacy input/select styles for other pages */
input:not(#search):not(#previewSearch), select {
  flex: 1;
  min-width: 200px;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

input:not(#search):not(#previewSearch):focus, select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(87, 137, 187, 0.1);
  background: white;
}

input:not(#search):not(#previewSearch)::placeholder {
  color: var(--text-secondary);
}

/* Framework List - Two Column Grid */
.framework-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
  min-height: 200px; /* Ensure minimum height to prevent collapse */
}

.no-results {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.no-results svg {
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.no-results p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 500px;
}

/* Rankings Page - Table View */
.rankings-page .page-content {
  max-width: 1200px;
  width: 100%;
  padding: 3rem 1rem;
}

.rankings-page .container {
  max-width: 1200px;
  width: 100%;
  padding: 0;
  margin: 0 auto;
}

.rankings-table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
}

.rankings-table thead {
  background: var(--bg-secondary);
}

.rankings-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
}

.rankings-table th:first-child {
  text-align: center;
}

.rankings-table th:nth-child(3) {
  text-align: center;
}

.rankings-table th:nth-child(5) {
  text-align: center;
}

.rankings-table th:last-child {
  width: 40px;
  text-align: center;
}

.rankings-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.rankings-table tbody tr:hover {
  background-color: var(--bg-secondary);
}

.rankings-table td {
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.rankings-table td:first-child {
  font-weight: 600;
  color: var(--accent-color);
  width: 80px;
  text-align: center;
}

.rankings-table td:nth-child(3) {
  text-align: center;
}

.rankings-table td:nth-child(5) {
  text-align: center;
}

.rankings-table td:last-child {
  text-align: center;
  color: var(--text-secondary);
  width: 40px;
}

.rankings-table td:last-child svg {
  vertical-align: middle;
}

/* Card Styles - Stacked Vertical Layout */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), var(--primary-hover));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

/* Featured Card */
.card.featured {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-lg);
  background: var(--bg-primary);
}

.card.featured::before {
  transform: scaleX(1);
}

.card.featured:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.featured-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--accent-color);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(87, 137, 187, 0.3);
  z-index: 1;
}

.featured-badge svg {
  flex-shrink: 0;
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  padding: 1rem;
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.card h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.card-meta p {
  margin: 0;
  line-height: 1.3;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1rem 0 0 0;
}

.meta-description {
  flex-basis: 100%;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0.75rem 0 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.card p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Details Button */
.details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
  font-size: 0.95rem;
  margin-top: 1.5rem;
  width: fit-content;
  align-self: flex-start;
}

.details-btn:hover {
  background: var(--accent-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Framework Details Page */
.framework-details-wrapper {
  max-width: 1400px;
  margin: 1rem auto;
  padding: 0 2rem;
}

.framework-back-container {
  margin-bottom: 1rem;
}

.framework-back-container > .back {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.framework-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 0 1rem;
  align-items: start;
}

.framework-details {
  margin-top: 0;
}

.framework-main-column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.framework-back-container > .back:hover {
  color: var(--accent-color);
}

.framework-details {
  padding: 3rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* Single column layout for pages without sidebar */
main.framework-details {
  max-width: 920px;
  margin: auto;
}

.framework-details h1 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.framework-details h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 600;
  border-bottom: 3px solid var(--bg-tertiary);
  padding-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.framework-details h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 600;
}

.framework-details img {
  max-width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--bg-secondary);
}

.framework-details p {
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.framework-details ul {
  line-height: 1.8;
  margin: 1.5rem 0 1.5rem 2rem;
  color: var(--text-secondary);
}

.framework-details li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.framework-details li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Framework Meta Box */
.framework-meta {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 2rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border-left: 5px solid var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.framework-meta p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.framework-meta p strong {
  font-weight: 600;
  color: var(--primary-color);
  display: inline-block;
  min-width: 140px;
}

.meta-row {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-label {
  min-width: 180px;
  font-weight: 600;
  color: var(--primary-color);
  flex-shrink: 0;
}

.meta-label strong {
  font-weight: 600;
  color: var(--primary-color);
}

.meta-value {
  flex: 1;
  color: var(--text-primary);
  line-height: 1.6;
}

.framework-meta-action {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.framework-meta-action .official-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* CTA Section */
.cta-section {
  margin-top: 3rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius-md);
  text-align: center;
  border: 2px dashed var(--border-color);
}

.official-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  color: white !important;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}

.official-link::after {
  content: "";
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.official-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-color) 100%);
}

.framework-details a:not(.official-link):not(.back):not(.cta-button) {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(87, 137, 187, 0.35);
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.framework-details a:not(.official-link):not(.back):not(.cta-button):hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

/* CTA Sidebar */
.cta-sidebar {
  position: sticky;
  top: 105px;
  align-self: start;
}

.cta-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, #426289 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: white;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: white;
}

.cta-card > p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Cyverity partner link in CTA copy — match the CTA button blue */
.cta-card > p a,
.home-cta-content p a,
.article-cta .cta-box p a {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
}

.cta-card > p a:hover,
.home-cta-content p a:hover,
.article-cta .cta-box p a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-item svg {
  flex-shrink: 0;
  color: white;
  stroke: white;
}

.contact-item a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-item a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.cta-button {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--accent-color);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(87, 137, 187, 0.3);
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(87, 137, 187, 0.4);
}

.cta-button.cta-button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  line-height: 1;
}

.cta-card .cta-button.cta-button-with-icon {
  display: flex;
  width: 100%;
}

.cta-button-with-icon span {
  line-height: 1;
}

.cta-button-with-icon svg {
  flex-shrink: 0;
  display: block;
}

.cta-card .cta-button-secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
  margin-bottom: 0;
}

.cta-card .cta-button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.cta-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta-features p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-features strong {
  color: var(--accent-color);
  font-size: 1.1rem;
}

/* Back Button */
.back {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.back:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

/* Footer */
footer {
  padding: 2rem;
  background: var(--primary-color);
  color: rgba(255, 255, 255, 0.8);
  margin-top: auto;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  margin: 0;
  text-align: left;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

footer p {
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding-top: 75px;
  }

  .top-nav {
    padding: 15px 0;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 1rem 2rem;
  }

  /* Mobile Nav Dropdown */
  .nav-dropdown-trigger {
    width: 100%;
    text-align: left;
    padding: 1rem 2rem;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-secondary);
  }

  .nav-dropdown-item {
    padding: 0.875rem 2.5rem;
    gap: 0.5rem;
  }

  .nav-dropdown-item:hover {
    padding-left: 3rem;
  }

  .nav-dropdown-item svg {
    width: 16px;
    height: 16px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-search-wrapper {
    max-width: 100%;
  }

  .hero-search-container input {
    font-size: 1rem;
    padding: 0.875rem 0.875rem 0.875rem 3rem;
  }

  .hero-search-icon {
    left: 0.75rem;
  }

  .hero-search-container input::placeholder {
    padding-left: 0.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-button {
    width: 100%;
  }

  .selling-points {
    padding: 3rem 1rem;
  }

  .selling-points-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .selling-point-card {
    padding: 2rem 1.5rem;
  }

  .library-preview {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .home-cta {
    padding: 3rem 1rem;
  }

  .home-cta-content {
    padding: 2.5rem 1.5rem;
  }

  .home-cta-content h2 {
    font-size: 1.75rem;
  }

  .home-cta-content p {
    font-size: 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  header {
    padding: 2rem 1rem;
  }

  header h1 {
    font-size: 1.75rem;
  }
  
  .main-container {
    padding: 1rem;
  }

  .library-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .library-sidebar {
    position: static;
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar-section {
    padding: 1rem;
  }

  .sidebar-filter-item,
  .sidebar-sort-item {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  .controls {
    padding: 0.875rem;
    gap: 0.5rem;
  }
  
  .dropdown-trigger .dropdown-label {
    display: none;
  }
  
  .dropdown-trigger {
    padding: 0.75rem;
  }
  
  .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 200px;
  }

  input:not(#search):not(#previewSearch), select {
    min-width: 100%;
    width: 100%;
  }
  
  .pagination {
    gap: 0.75rem;
    padding: 1rem 0;
  }
  
  .pagination-buttons {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  
  .pagination-info {
    text-align: center;
    font-size: 0.85rem;
  }
  
  .pagination button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* Two Column Layout - Mobile */
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .column-left {
    padding-right: 0;
  }

  .feature-image {
    max-width: 100%;
  }
  
  .framework-list {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.15rem;
  }

  .details-btn {
    width: 100%;
  }

  .card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .framework-details-wrapper {
    padding: 0;
    margin: 1rem;
  }
  
  .framework-content-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem 0;
  }

  .cta-sidebar {
    position: static;
    order: -1;
    margin-top: 0;
  }
  
  .framework-details {
    padding: 2rem 1.5rem;
  }
  
  .framework-details h1 {
    font-size: 2rem;
  }
  
  .framework-details h2 {
    font-size: 1.5rem;
  }
}

/* Pagination */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem 0;
}

.pagination-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pagination button {
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.pagination button:hover:not(:disabled) {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination button.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.pagination .page-number {
  min-width: 38px;
  text-align: center;
}

.pagination .dots {
  padding: 0.5rem 0.25rem;
  color: var(--text-secondary);
}

/* Loading Animation (Optional Enhancement) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.5s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }

/* Hero Section (Home Page) */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 6rem 2rem;
  min-height: 600px;
  text-align: center;
  position: relative;
  overflow: visible;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/assets/images/map.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(87, 137, 187, 0.1) 0%, rgba(87, 137, 187, 0) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  padding: 0 2rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin: 0 0 2.5rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* Hero Search */
.hero-search-wrapper {
  display: flex;
  justify-content: center;
  max-width: 80%;
  width: 80%;
  margin: 0 auto;
}

.hero-search-wrapper .search-wrapper {
  flex: 1;
  z-index: 100;
}

.hero-search-wrapper #heroSearch {
  font-size: 1.1rem;
  padding-left: 3.5rem !important;
  padding-right: 1rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.hero-search-wrapper #heroSearch::placeholder {
  color: var(--text-secondary);
  opacity: 1;
  transform: translateX(0);
}

.hero-search-wrapper .search-icon {
  left: 1rem;
  z-index: 1;
}

.hero-search-wrapper #heroSearch:focus {
  border-color: white;
  background: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 10000;
}

.hero-search-dropdown.show {
  display: block;
}

/* Custom scrollbar for search dropdown */
.hero-search-dropdown::-webkit-scrollbar {
  width: 8px;
}

.hero-search-dropdown::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.hero-search-dropdown::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

.hero-search-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.hero-search-result {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-primary);
}

.hero-search-result:last-child {
  border-bottom: none;
}

.hero-search-result:hover {
  background: var(--bg-secondary);
}

.hero-search-result-content {
  flex: 1;
  text-align: left;
}

.hero-search-result-name {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.hero-search-result-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-search-result-arrow {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.hero-search-result:hover .hero-search-result-arrow {
  color: var(--accent-color);
  transform: translateX(4px);
}

.hero-search-no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 180px;
}

.hero-button.primary {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 12px rgba(87, 137, 187, 0.3);
}

.hero-button.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(87, 137, 187, 0.4);
}

.hero-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.hero-button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 3.5rem 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.page-header p {
  font-size: 1.15rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.page-header .back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.page-header .back:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

/* Selling Points Section */
.selling-points {
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.selling-points-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
}

.selling-point-card {
  background: white;
  padding: 1.75rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}

a.selling-point-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.selling-point-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.selling-point-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.selling-point-card h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.selling-point-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  flex: 1;
}

.category-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-color);
  transition: gap 0.2s ease;
}

.category-card-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.selling-point-card:hover .category-card-link {
  gap: 0.5rem;
}

.selling-point-card:hover .category-card-link svg {
  transform: translateX(3px);
}

/* Library Preview Section */
.library-preview {
  padding: 4rem 2rem;
  background: var(--bg-primary);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
}

.library-preview > .container > p {
  text-align: center;
  padding-bottom: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.view-all-wrapper {
  text-align: center;
  margin-top: 2.5rem;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.view-all-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Home CTA Section */
.home-cta {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
  margin-bottom: 0;
}

.home-cta-content {
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-color) 0%, #426289 100%);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg);
}

.home-cta-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: white;
}

.home-cta-content p {
  font-size: 1.1rem;
  margin: 0 0 2rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.home-cta-content .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.home-cta-content .cta-button {
  display: inline-block;
  width: auto;
  padding: 1rem 2rem;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.home-cta-content .cta-button.primary {
  background: var(--accent-color);
  color: white;
}

.home-cta-content .cta-button.secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: white;
  box-shadow: none;
}

.home-cta-content .cta-button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.home-cta-content .cta-button.cta-button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding-inline: 1.75rem;
}

.home-cta-content .contact-cta p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.home-cta-content .contact-cta a {
  color: white;
  font-weight: 600;
}

.home-cta-content .hero-button {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, #426289 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.cta-banner h2 {
  font-size: 2rem;
  margin: 0 0 1rem 0;
}

.cta-banner p {
  font-size: 1.15rem;
  margin: 0 0 2rem 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Page Content */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--bg-tertiary);
  padding-bottom: 0.75rem;
}

.content-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.column-left {
  padding-right: 1rem;
}

.column-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Ask an Expert Page Specific Styles */
.ask-an-expert-page .offering-item h3 + .card-meta {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.ask-an-expert-page .offering-item .card-meta strong {
  color: var(--accent-color);
}

.expert-image-bg {
  background-image: url('../images/pic2.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
  border-radius: var(--radius-lg);
}

.ask-an-expert-page .home-cta {
  padding-top: 0;
}

.ask-an-expert-page .home-cta .container {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Assessments Page Specific Styles */
.assessments-image-bg {
  background-image: url('../images/pic3.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
  border-radius: var(--radius-lg);
}

.assessments-page .home-cta {
  padding-top: 0;
}

.assessments-page .home-cta .container {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Courseware Page Specific Styles */
.courseware-image-bg {
  background-image: url('../images/pic4.jpg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
  border-radius: var(--radius-lg);
}

.courseware-page .home-cta {
  padding-top: 0;
}

.courseware-page .home-cta .container {
  padding-left: 2rem;
  padding-right: 2rem;
}

.offering-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.offering-item {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.offering-item h3 {
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.offering-item p {
  margin: 0;
}

/* CTA Offering Item with Dark Styling */
.offering-item-cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.offering-item-cta h3 {
  color: #ffffff;
}

.offering-item-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.offering-item-cta .hero-button {
  width: 100%;
  text-align: center;
}

.styled-list {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 1.5rem 0 1.5rem 2rem;
}

.styled-list li {
  margin-bottom: 0.75rem;
}

.styled-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cta-section-page {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: 3rem;
}

.cta-section-page h2 {
  margin: 0 0 1rem 0;
  border: none;
  padding: 0;
}

.cta-section-page p {
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Assessment Page */
.assessment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.assessment-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.assessment-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.assessment-card.featured {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent-color);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.assessment-card h3 {
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.assessment-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex: 1;
}

.assessment-card li {
  padding: 0.75rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.assessment-card li:last-child {
  border-bottom: none;
}

.assessment-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.assessment-button:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-form-section {
  background: var(--bg-primary);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-top: 3rem;
}

.assessment-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(87, 137, 187, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step h3 {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.step p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

/* Best Overall Page Styles */
.best-overall-page .page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.best-overall-page .container {
  max-width: 900px;
}

.article-content {
  max-width: 900px;
  margin: 0 auto;
}

.rankings-overview {
  margin-bottom: 3.5rem;
  padding: 2rem;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.rankings-overview h2 {
  color: var(--primary-color);
  font-size: 1.35rem;
  margin: 0 0 1.25rem 0;
  text-align: center;
}

.rankings-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rankings-toc-list li {
  border-bottom: 1px solid var(--border-color);
}

.rankings-toc-list li:last-child {
  border-bottom: none;
}

.rankings-toc-list a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.rankings-toc-list a:hover {
  background: rgba(87, 137, 187, 0.06);
}

.rankings-toc-list a:hover .toc-label {
  color: var(--accent-color);
}

.toc-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-color);
  text-align: center;
}

.toc-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.15s ease;
}

.toc-framework {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.ranking-anchor {
  scroll-margin-top: 100px;
}

.frameworks-ranking {
  margin-bottom: 4rem;
}

.frameworks-ranking h2 {
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  font-size: 2rem;
  text-align: center;
}

.best-overall-page .card {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-2px) !important;
}

.best-overall-page .card:hover {
  box-shadow: var(--shadow-xl) !important;
  transform: translateY(-4px) !important;
}

.best-overall-page .card::before {
  transform: scaleX(1);
}

.rank-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--accent-color);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(87, 137, 187, 0.3);
  z-index: 1;
}

.rank-badge.secondary {
  background: #94a3b8;
}

.ranking-pair {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

.ranking-pair .card {
  width: 100%;
}

.companion-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  background: #94a3b8;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  z-index: 1;
}

.best-overall-page .card-companion {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-2px) !important;
  border-style: solid;
  border-color: var(--border-color);
  border-left: 4px solid #94a3b8;
  background: var(--bg-secondary);
}

.best-overall-page .card-companion::before {
  transform: scaleX(1);
  opacity: 0.45;
}

.best-overall-page .card-companion:hover {
  box-shadow: var(--shadow-xl) !important;
  transform: translateY(-4px) !important;
}

.framework-detail-content {
  padding: 2.5rem 0 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.framework-detail-content h3 {
  color: var(--primary-color);
  margin: 0 0 1.5rem 0;
  font-size: 1.6rem;
  line-height: 1.3;
}

.framework-detail-content p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.framework-detail-content p:last-child {
  margin-bottom: 0;
}

.framework-detail-content a:not(.details-btn):not(.official-link) {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: rgba(87, 137, 187, 0.35);
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.framework-detail-content a:not(.details-btn):not(.official-link):hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.honorable-mentions-card {
  border-left-color: #94a3b8;
}

.honorable-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.honorable-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

.honorable-list li:last-child {
  border-bottom: none;
}

.honorable-list a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.honorable-list a:hover {
  text-decoration: underline;
}

.article-intro {
  margin-bottom: 3rem;
}

.article-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}


.comparison-section {
  margin: 4rem 0;
}

.comparison-section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.comparison-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.framework-comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
}

.framework-comparison-table thead tr {
  background: var(--primary-color);
  color: white;
}

.framework-comparison-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
}

.framework-comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  line-height: 1.6;
}

.framework-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.framework-comparison-table tbody tr:hover {
  background: var(--bg-secondary);
}

.framework-comparison-table a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.framework-comparison-table a:hover {
  text-decoration: underline;
}

.selection-guide,
.implementation-guide {
  margin: 4rem 0;
}

.selection-guide h2,
.implementation-guide h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.selection-guide h3,
.implementation-guide h3 {
  color: var(--primary-color);
  margin: 2rem 0 1rem 0;
  font-size: 1.3rem;
}

.selection-guide p,
.implementation-guide p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-cta {
  margin: 4rem 0;
}

.article-cta .cta-box {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.article-cta h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.article-cta p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.article-cta .cta-button.cta-button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  padding-inline: 1.75rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.cta-button.primary {
  background: var(--primary-color);
  color: white;
}

.cta-button.primary:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-button.secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
  background: var(--primary-color);
  color: white;
}

.contact-cta {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.contact-cta p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-secondary);
}

.contact-cta a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.contact-cta a:hover {
  text-decoration: underline;
}

.faq-section {
  background: var(--bg-secondary);
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.faq-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-section h2 {
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  font-size: 2rem;
  text-align: center;
}

.faq-item {
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  color: var(--primary-color);
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.faq-item p {
  line-height: 1.7;
  margin: 0;
  color: var(--text-primary);
}

.faq-item a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.faq-item a:hover {
  text-decoration: underline;
}

/* Responsive adjustments for Best Overall page */
@media (max-width: 768px) {
  .best-overall-page .page-content {
    padding: 2rem 1rem;
  }

  .best-overall-page .container {
    max-width: 100%;
  }

  .article-content {
    max-width: 100%;
  }

  .rankings-overview {
    padding: 1.25rem;
    margin-bottom: 2.5rem;
  }

  .rankings-toc-list a {
    grid-template-columns: 1.75rem 1fr;
    gap: 0.5rem 0.75rem;
  }

  .rankings-toc-list .toc-framework {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }

  .framework-detail-content {
    padding: 1.5rem;
  }

  .framework-detail-content h3 {
    font-size: 1.3rem;
  }

  .framework-detail-content p {
    font-size: 1rem;
  }

  .framework-comparison-table {
    font-size: 0.85rem;
  }

  .framework-comparison-table th,
  .framework-comparison-table td {
    padding: 0.75rem 0.5rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-button {
    width: 100%;
  }

  .article-cta .cta-box {
    padding: 2rem 1.5rem;
  }

  .faq-section {
    padding: 3rem 1rem;
  }

  .rank-badge {
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }

  .companion-badge {
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
}

/* ========================================
   Self-Assessment page (CRF widget in self-assessment/)
   ======================================== */

.smb-assessment-page .page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}


@media (max-width: 768px) {
  .smb-assessment-page .page-content {
    padding: 1.5rem 1rem 2rem;
  }
}

@media print {
  .smb-assessment-page .page-header,
  .smb-assessment-page #header-placeholder,
  .smb-assessment-page #footer-placeholder {
    display: none !important;
  }

  .smb-assessment-page .page-content {
    padding: 0;
    max-width: 100%;
  }
}
