/* demos-shared.css — Shared styles for demo hub and category pages */

body { background: var(--white); color: var(--black); }

/* Hero extensions */
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1.25rem; border-radius: 9999px;
  font-size: .65rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  background: #1a3a28; border: 1px solid rgba(26,92,58,.3);
  color: #fff; margin-bottom: 1.5rem; position: relative;
}
.hero-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #2a9d5c;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}
.page-hero .highlight {
  color: #2a9d5c;
  -webkit-text-fill-color: #2a9d5c;
}
.hero-buttons {
  display: flex; justify-content: center; gap: 1rem; position: relative; margin-bottom: 1rem;
}
.btn-hero {
  padding: .75rem 2rem; border-radius: 8px; font-size: .95rem; font-weight: 600;
  text-decoration: none; transition: all .2s; cursor: pointer; border: none;
}
.btn-hero-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 4px 20px rgba(26,92,58,.3);
}
.btn-hero-primary:hover { background: #14472d; transform: translateY(-2px); }
.btn-hero-ghost {
  background: transparent; color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
}
.btn-hero-ghost:hover { border-color: rgba(255,255,255,.5); color: #fff; transform: translateY(-2px); }

/* Language Tabs */
.lang-bar {
  display: flex; justify-content: center; gap: .5rem; padding: 1.25rem 2rem;
  background: #f5f5f5; border-bottom: 1px solid #e5e5e5;
  position: sticky; top: 64px; z-index: 50;
}
.lang-tab {
  padding: .45rem 1.25rem; border-radius: 9999px; border: 1px solid #e5e5e5;
  background: #fff; color: #555; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.lang-tab:hover { border-color: var(--green); color: var(--green); }
.lang-tab.active {
  background: #1a5c3a; color: #fff; border-color: #1a5c3a;
}

/* Category Quick Nav */
.category-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  padding: 1rem 2rem; max-width: 900px; margin: 0 auto;
  position: relative; z-index: 1;
}
.category-pill {
  padding: .35rem 1rem; border-radius: 9999px; font-size: .8rem; font-weight: 600;
  color: var(--green); background: #f5f5f5; border: 1px solid #e5e5e5;
  text-decoration: none; transition: all .2s;
}
.category-pill:hover { background: #e5e5e5; border-color: #ccc; }
.category-pill.active { background: var(--green); color: #fff; border-color: var(--green); }

/* Content */
.demos-content {
  max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 4rem;
}

/* Category Section */
.demo-category {
  margin-bottom: 3rem; scroll-margin-top: 140px;
}
.demo-category h2 {
  font-weight: 700;
  font-size: 1.5rem; color: #111;
  margin-bottom: .25rem; padding-bottom: .5rem;
  border-bottom: 2px solid #e5e5e5;
}
.demo-category > p {
  font-size: .9rem; color: #555; margin-bottom: 1.25rem;
}

/* Card Grid */
.demo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px; background: #e5e5e5; border-radius: 8px; overflow: hidden;
}

/* Demo Card */
.demo-card {
  overflow: hidden; border: none;
  background: #fff; cursor: pointer; transition: all .2s;
  position: relative;
}
.demo-card:hover { background: #f5f5f5; }
.demo-card:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.demo-card-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden; background: #f5f5f5;
}
.demo-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(17,17,17,.3); opacity: 0; transition: opacity .2s;
}
.demo-card:hover .play-overlay { opacity: 1; }
.play-icon {
  width: 56px; height: 56px; background: rgba(26,92,58,.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.play-icon svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }

.demo-card-info { padding: .75rem 1rem; }
.demo-card-title {
  font-size: .9rem; font-weight: 600; color: #111;
  margin-bottom: .25rem;
}
.demo-card-meta {
  display: flex; align-items: center; gap: .5rem; font-size: .75rem;
}
.demo-badge {
  display: inline-flex; padding: .15rem .5rem; border-radius: 8px; font-size: .6rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
}
.demo-badge-replace { background: #eef5f0; color: var(--green); }
.demo-badge-encrypt { background: #f5f5f5; color: #111; }
.demo-badge-redact { background: #fef3c7; color: #b45309; }
.demo-badge-restore { background: #dbeafe; color: #1d4ed8; }
.demo-card-duration { color: #767676; }

/* Video Modal */
.video-modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
  padding: 2rem;
}
.video-modal.open { display: flex; }
.video-modal-inner {
  position: relative; width: 100%; max-width: 960px;
  background: #000; border-radius: 12px; overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,.5);
}
.video-modal-close {
  position: absolute; top: -40px; right: 0; background: none; border: none;
  color: rgba(255,255,255,.7); font-size: 1.5rem; cursor: pointer; padding: .25rem .5rem;
  transition: color .2s; z-index: 10;
}
.video-modal-close:hover { color: #fff; }
.video-modal video {
  width: 100%; display: block; aspect-ratio: 16/9; background: #000;
}
.video-modal-title {
  padding: .75rem 1rem; color: rgba(255,255,255,.8); font-size: .9rem;
  font-weight: 600; background: rgba(17,17,17,.9);
}

/* Stats bar */
.demos-stats {
  display: flex; justify-content: center; gap: 2.5rem; padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e5e5;
}
.demos-stat { text-align: center; }
.demos-stat-num { font-weight: 700; font-size: 1.5rem; color: #111; }
.demos-stat-label {
  font-size: .65rem; color: #767676; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em;
}

/* Hub category cards */
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem; max-width: 1200px; margin: 2rem auto; padding: 0 2rem;
}
.hub-card {
  background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: all .2s;
}
.hub-card:hover { border-color: var(--green); box-shadow: 0 4px 20px rgba(26,92,58,.1); transform: translateY(-2px); }
.hub-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: #f5f5f5; }
.hub-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-card-body { padding: 1.25rem; }
.hub-card-title { font-size: 1.1rem; font-weight: 700; color: #111; margin-bottom: .35rem; }
.hub-card-desc { font-size: .85rem; color: #555; line-height: 1.6; margin-bottom: .75rem; }
.hub-card-meta { display: flex; align-items: center; gap: 1rem; font-size: .75rem; color: #767676; }
.hub-card-link { color: var(--green); font-weight: 600; font-size: .85rem; text-decoration: none; }
.hub-card-link:hover { text-decoration: underline; }

/* See also links */
.see-also {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #e5e5e5;
}
.see-also h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.see-also-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.see-also-link {
  display: block; padding: .75rem 1rem; background: #f5f5f5; border-radius: 8px;
  text-decoration: none; color: var(--green); font-weight: 600; font-size: .85rem;
  transition: all .2s; border: 1px solid transparent;
}
.see-also-link:hover { background: #eef5f0; border-color: var(--green-border); }

/* Video transcript/process description */
.video-transcript {
  margin-top: .5rem; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
}
.video-transcript summary {
  padding: .5rem .75rem; font-size: .8rem; font-weight: 600; color: var(--green);
  cursor: pointer; background: #f9f9f9;
}
.video-transcript summary:hover { background: #f0f0f0; }
.video-transcript ol {
  padding: .75rem 1rem .75rem 2rem; font-size: .8rem; color: #555; line-height: 1.7;
}
.video-transcript ol li { margin-bottom: .35rem; }

/* Breadcrumb */
.breadcrumb {
  position: static; z-index: auto; background: none; border-bottom: none;
  max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 0;
  font-size: .8rem; color: #767676;
}
.breadcrumb a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 .35rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero-buttons { flex-direction: column; align-items: center; }
  .demos-content { padding: 1rem 1rem 3rem; }
  .demo-grid { grid-template-columns: 1fr; }
  .lang-bar { gap: .35rem; padding: 1rem 1rem; }
  .lang-tab { padding: .4rem 1rem; font-size: .8rem; }
  .demos-stats { gap: 1.5rem; }
  .video-modal { padding: 1rem; }
  .hub-grid { grid-template-columns: 1fr; padding: 0 1rem; }
  .see-also-grid { grid-template-columns: 1fr; }
  .breadcrumb { padding: 1rem 1rem 0; }
}
@media (max-width: 480px) {
  .category-nav { gap: .35rem; }
  .category-pill { font-size: .75rem; padding: .3rem .75rem; }
}
