/* ============================================
   EVOLVE ROBOT LAB — Components
   ============================================ */

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: padding var(--transition-base);
}

.nav.scrolled {
  padding-top: 10px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  min-height: 76px;
  padding: 0 20px;
  background: rgba(5, 10, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav__logo img {
  height: 80px;
  width: auto;
}

.nav__logo span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding: 10px 14px;
  border-radius: 12px;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link--active {
  color: var(--text-primary);
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 132, 214, 0.35);
}

.nav__link--active::after {
  display: none;
}

.nav__cta {
  margin-left: 10px;
  border-radius: 18px;
  padding-left: 24px;
  padding-right: 24px;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

body.menu-open .nav__hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav__hamburger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav__hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--text-primary);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 132, 214, 0.3);
}

.btn--outline {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  color: var(--accent);
  padding: 14px 16px;
}

.btn--ghost:hover {
  color: var(--accent-hover);
}

.btn--ghost::after {
  content: '\2192';
  transition: transform var(--transition-fast);
}

.btn--ghost:hover::after {
  transform: translateX(4px);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 18px 40px;
  font-size: 1rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 132, 214, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0d1117, #111827);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.card__image .image-placeholder {
  border-radius: 0;
  border: none;
  min-height: unset;
  height: 100%;
}

.section--dark .card__image img {
  object-fit: cover;
  padding: 0;
  transition: transform 0.5s ease;
}

.section--dark .card:hover .card__image img {
  transform: scale(1.05);
}

.card__body {
  padding: 28px;
}

.card__body h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.card__body p {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 132, 214, 0.1);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* --- Testimonials Slider --- */
.testimonials-slider {
  position: relative;
  overflow: hidden;
}

.testimonials-slider::before,
.testimonials-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}

.testimonials-slider::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-secondary) 0%, rgba(17, 17, 17, 0) 100%);
}

.testimonials-slider::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-secondary) 0%, rgba(17, 17, 17, 0) 100%);
}

.testimonials-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.testimonials-track .card {
  flex: 0 0 clamp(280px, 30vw, 380px);
}

.testimonials-track .card__body {
  height: 100%;
}

/* --- Spec Table --- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--border-color);
}

.spec-table td {
  padding: 16px 0;
  font-size: 0.95rem;
}

.spec-table td:first-child {
  color: var(--text-secondary);
  width: 40%;
  font-weight: 500;
}

.spec-table td:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Trust Badges --- */
.trust-strip {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-color);
}

.trust-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.trust-strip__item svg,
.trust-strip__item img {
  width: 24px;
  height: 24px;
  opacity: 0.7;
}

.trust-strip__divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 32px 0;
  flex-wrap: wrap;
}

.trust-logos img {
  height: 32px;
  opacity: 0.4;
  filter: grayscale(100%);
  transition: opacity var(--transition-base), filter var(--transition-base);
}

.trust-logos img:hover {
  opacity: 0.8;
  filter: grayscale(0%);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-card);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-success {
  display: none;
  padding: 20px;
  background: rgba(0, 132, 214, 0.1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-align: center;
  color: var(--text-primary);
  font-weight: 500;
}

.form-success.show {
  display: block;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
}

.footer__brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer__social {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.footer__social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer__col ul li {
  margin-bottom: 12px;
}

.footer__col ul a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__col ul a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Feature Blocks --- */
.feature-block {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.feature-block__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 132, 214, 0.1);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.feature-block h4 {
  margin-bottom: 12px;
}

.feature-block p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Research Branch --- */
.research-branch {
  margin-bottom: 48px;
}

.research-branch:last-child {
  margin-bottom: 0;
}

.research-branch__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent);
}

.research-branch__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 132, 214, 0.1);
  border-radius: 10px;
  flex-shrink: 0;
}

.research-branch__header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Research Cards --- */
.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.research-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 132, 214, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.research-card__icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 132, 214, 0.1);
  border-radius: 16px;
  margin: 0 auto 24px;
}

.research-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.research-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.research-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.research-card__tags span {
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 20px;
  background: rgba(0, 132, 214, 0.08);
  border: 1px solid rgba(0, 132, 214, 0.2);
  color: var(--accent);
}

.research-card--large {
  padding: 56px 48px;
}

.research-card--large .research-card__icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.research-card--large h3 {
  font-size: 1.75rem;
}

.research-card__projects {
  text-align: left;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.research-card__projects-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.research-card__projects ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.research-card__projects li {
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  padding-left: 20px;
}

.research-card__projects li:last-child {
  border-bottom: none;
}

.research-card__projects li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.research-selector {
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.research-selector__cta {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.research-selector.active {
  border-color: rgba(0, 132, 214, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 132, 214, 0.4), 0 12px 40px rgba(0, 0, 0, 0.3);
}

.research-selector:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.research-detail[hidden] {
  display: none !important;
}

.research-detail__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
}

.research-detail__header .btn {
  margin-bottom: 20px;
}

.research-detail__header h2 {
  margin-bottom: 14px;
}

.research-project-grid[hidden] {
  display: none !important;
}

/* --- Tech Stack Grid --- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.tech-tag {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.page-hero h1 {
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
}

/* --- CTA Section --- */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Related Platforms --- */
.related-platforms {
  padding: 80px 0;
}

.related-platforms h3 {
  text-align: center;
  margin-bottom: 48px;
}

/* --- Gallery Category Cards --- */
.gallery-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.gallery-cat {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.gallery-cat:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 132, 214, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.gallery-cat__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.gallery-cat__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-cat:hover .gallery-cat__image img {
  transform: scale(1.08);
}

.gallery-cat__image--placeholder {
  background: linear-gradient(135deg, #0d1117, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.gallery-cat__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.gallery-cat__count {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.gallery-cat__overlay h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gallery-cat__overlay p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Gallery Detail View --- */
.gallery-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}

.gallery-detail__back:hover {
  color: var(--accent-hover);
}

.gallery-detail__header {
  margin-bottom: 48px;
  padding-left: 20px;
  border-left: 4px solid var(--accent);
}

.gallery-detail__header h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--accent);
}

.gallery-detail__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.gallery-detail__section-header {
  grid-column: 1 / -1;
  padding: 12px 0 4px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 0;
}

.gallery-detail__section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gallery-detail__section-header.hidden {
  display: none;
}

.gallery-detail__item {
  transition: opacity var(--transition-base);
}

.gallery-detail__item.hidden {
  display: none;
}

.gallery-detail__item-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1117, #111827);
  cursor: pointer;
}

.gallery-detail__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-detail__item-image:hover img {
  transform: scale(1.05);
}

.gallery-detail__item-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 16px;
}

.gallery-detail__item-accent {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  margin-bottom: 10px;
  border-radius: 2px;
}

.gallery-detail__item-caption {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
  z-index: 2;
}

.lightbox__close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
  z-index: 2;
}

.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

.lightbox__prev:hover,
.lightbox__next:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__content {
  max-width: 80vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__caption {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
}
