/* ============================================
   SIGMA ALUTECH - Components
   ============================================ */

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: var(--z-nav);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__logo-img {
  height: 40px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: var(--ls-wide);
}

.nav__logo-text span {
  color: var(--gold-primary);
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }
}

.nav__link {
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

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

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

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

/* Mobile hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
}

@media (min-width: 768px) {
  .nav__hamburger {
    display: none;
  }
}

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

.nav__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.nav__mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-elevated);
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transition: right var(--transition-base);
  z-index: var(--z-nav);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.nav__mobile.open {
  right: 0;
}

.nav__mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: calc(var(--z-nav) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav__mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav__mobile-link {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.nav__mobile-link:hover {
  color: var(--gold-primary);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn--primary {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

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

.btn--outline:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

.btn--small {
  padding: 10px 20px;
  font-size: var(--fs-xs);
}

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

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: var(--space-lg);
}

.card__badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--gold-primary);
  background: var(--gold-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-sm);
}

.card__text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

.card__footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__link {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--gold-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.card__link .arrow {
  transition: transform var(--transition-fast);
}

.card:hover .card__link .arrow {
  transform: translateX(4px);
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--gold-primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stat__label {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* ---- Filter Tabs ---- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-primary);
}

.filter-btn.active {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border-color: var(--gold-primary);
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-darker);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
  z-index: 1;
}

.modal__close:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.modal__image-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-primary);
}

.modal__image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__body {
  padding: var(--space-xl);
}

.modal__title {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-md);
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.modal__tag {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--gold-primary);
  background: var(--gold-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.modal__description {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.modal__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.modal__detail-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.modal__detail-value {
  font-size: var(--fs-body);
  color: var(--text-primary);
}

/* Modal image gallery thumbnails */
.modal__gallery {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-md) 0;
}

.modal__gallery-thumb {
  width: 80px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.modal__gallery-thumb:hover,
.modal__gallery-thumb.active {
  opacity: 1;
  border-color: var(--gold-primary);
}

/* Video embed */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__image {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.lightbox__close:hover {
  color: var(--gold-primary);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-lg);
  transition: color var(--transition-fast);
}

.lightbox__nav:hover {
  color: var(--gold-primary);
}

.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

/* ---- Feature Item ---- */
.feature {
  text-align: center;
  padding: var(--space-xl);
}

.feature__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-lg);
  color: var(--gold-primary);
}

.feature__icon svg {
  width: 100%;
  height: 100%;
}

.feature__title {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-sm);
}

.feature__text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand-text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 360px;
}

.footer__heading {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--gold-primary);
  margin-bottom: var(--space-lg);
}

.footer__link {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--gold-primary);
}

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer__copyright {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer__formerly {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-style: italic;
}
