/* Platform 50.1 — Global experience layer (no module branding changes) */

/* Discovery shelves */
.g51-discovery { background: #f8fafc; border-top: 1px solid #e2e8f0; }
.g51-discovery__header { text-align: center; margin-bottom: 2rem; }
.g51-discovery__title { font-size: 1.875rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.g51-discovery__subtitle { color: #64748b; max-width: 42rem; margin: 0 auto; }

.g51-shelf { margin-bottom: 2.5rem; }
.g51-shelf__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.g51-shelf__title { font-size: 1.25rem; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 0.5rem; }
.g51-shelf__title i { color: #2563eb; }
.g51-shelf__more { font-size: 0.875rem; color: #2563eb; text-decoration: none; font-weight: 500; }
.g51-shelf__more:hover { text-decoration: underline; }

.g51-shelf__grid { display: grid; gap: 1rem; }
.g51-shelf__grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.g51-shelf__grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.g51-card { display: flex; flex-direction: column; background: #fff; border-radius: 0.5rem; overflow: hidden; border: 1px solid #e2e8f0; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; }
.g51-card:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.g51-card__image { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #f1f5f9; }
.g51-card__placeholder { aspect-ratio: 16/9; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2rem; }
.g51-card__body { padding: 0.75rem 1rem 1rem; }
.g51-card__module { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; }
.g51-card__title { font-size: 0.9375rem; font-weight: 600; color: #0f172a; line-height: 1.4; margin-top: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Internal linking */
.g51-internal-links { margin: 2rem 0; padding: 1.5rem; background: #f8fafc; border-radius: 0.5rem; border: 1px solid #e2e8f0; }
.g51-link-group { margin-bottom: 1.25rem; }
.g51-link-group:last-child { margin-bottom: 0; }
.g51-link-group__title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #475569; margin-bottom: 0.5rem; }
.g51-link-group__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.g51-link-group__link { display: inline-block; padding: 0.375rem 0.75rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 9999px; font-size: 0.8125rem; color: #2563eb; text-decoration: none; }
.g51-link-group__link:hover { background: #eff6ff; border-color: #bfdbfe; }

/* AEO blocks */
.g51-aeo { margin: 1.5rem 0; }
.g51-aeo__block { margin-bottom: 1.5rem; padding: 1.25rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 0.5rem; }
.g51-aeo__heading { font-size: 1.125rem; font-weight: 600; color: #0f172a; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.g51-aeo__heading i { color: #2563eb; }
.g51-aeo__text { color: #334155; line-height: 1.7; }
.g51-aeo__list { margin: 0; padding-left: 1.25rem; color: #334155; }
.g51-aeo__list li { margin-bottom: 0.5rem; }
.g51-aeo__faq-item { border-bottom: 1px solid #e2e8f0; padding: 0.75rem 0; }
.g51-aeo__faq-item summary { font-weight: 600; cursor: pointer; color: #1e293b; }
.g51-aeo__faq-item p { margin: 0.5rem 0 0; color: #475569; }
.g51-aeo__meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8125rem; color: #64748b; }
.g51-aeo__meta i { margin-right: 0.25rem; }
.g51-aeo__facts-list { margin: 0; padding: 0; }
.g51-aeo__fact { margin: 0 0 0.625rem; }
.g51-aeo__fact:last-child { margin-bottom: 0; }
.g51-aeo__fact dd { margin: 0; color: #334155; line-height: 1.6; font-size: 0.9375rem; }

/* Search overlay */
.g51-search-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-start; justify-content: center; padding-top: 10vh; }
.g51-search-overlay[hidden] { display: none !important; }
.g51-search-overlay__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); }
.g51-search-overlay__panel { position: relative; width: min(640px, 92vw); background: #fff; border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 25px 50px rgba(0,0,0,0.2); }
.g51-search-form { display: flex; flex-direction: column; gap: 0.75rem; }
.g51-search-input { width: 100%; padding: 0.875rem 1rem; font-size: 1.125rem; border: 2px solid #e2e8f0; border-radius: 0.5rem; }
.g51-search-input:focus { outline: none; border-color: #2563eb; }
.g51-search-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.g51-search-filter { font-size: 0.8125rem; padding: 0.25rem 0.5rem; background: #f1f5f9; border-radius: 0.25rem; cursor: pointer; }
.g51-search-submit { align-self: flex-start; padding: 0.5rem 1.25rem; background: #2563eb; color: #fff; border: none; border-radius: 0.375rem; font-weight: 600; cursor: pointer; }
.g51-search-close { position: absolute; top: 0.75rem; right: 0.75rem; background: none; border: none; font-size: 1.25rem; color: #64748b; cursor: pointer; }
.g51-search-quick { margin-top: 1rem; }
.g51-search-quick__label { font-size: 0.75rem; text-transform: uppercase; color: #94a3b8; margin-bottom: 0.5rem; }
.g51-search-quick__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.g51-search-tag { padding: 0.25rem 0.75rem; background: #f1f5f9; border-radius: 9999px; font-size: 0.8125rem; color: #2563eb; text-decoration: none; }
.g51-search-suggest-list { list-style: none; padding: 0; margin: 0.5rem 0 0; border-top: 1px solid #e2e8f0; }
.g51-search-suggest-list a { display: block; padding: 0.5rem 0; color: #1e293b; text-decoration: none; }
.g51-search-suggest-list a:hover { color: #2563eb; }
body.g51-search-open { overflow: hidden; }

/* Footer enhancements */
.g51-footer-modules a,
.g51-footer-searches a { color: #9ca3af; font-size: 0.875rem; transition: color 0.2s; }
.g51-footer-modules a:hover,
.g51-footer-searches a:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .g51-card { transition: none; }
}

@media (max-width: 640px) {
    .g51-shelf__grid--4 { grid-template-columns: 1fr 1fr; }
}
