/* Custom Styles for JAMO Textile Corporate Website */

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f3f3;
}

::-webkit-scrollbar-thumb {
  background: #c3c6d5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #811433;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  background: #ffffff;
  color: #1b1c1c;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #811433;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left-color: #00a859;
}

.toast.error {
  border-left-color: #ba1a1a;
}

/* Modal Backdrop & Animation */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-box {
  transform: scale(1) translateY(0);
}

/* Active Nav Link Styling */
.nav-link.active {
  color: #5e001f;
  font-weight: 700;
  border-bottom: 2px solid #5e001f;
}

/* Tab active states */
.tab-btn.active {
  background-color: #811433 !important;
  color: #ffffff !important;
}

/* Card hover elevations */
.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
}

/* Site Header: solid by default (article page), transparent over the hero video */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #efeded;
}

.site-header .logo-light {
  display: none;
}

.site-header.is-overlay {
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.site-header.is-overlay .logo-dark {
  display: none;
}

.site-header.is-overlay .logo-light {
  display: block;
}

.site-header.is-overlay .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.site-header.is-overlay .nav-link:hover,
.site-header.is-overlay .nav-link.active {
  color: #ffffff;
  border-color: #ffffff;
}

.site-header.is-overlay .lang-toggle {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.site-header.is-overlay .lang-toggle button {
  color: rgba(255, 255, 255, 0.85);
}

.site-header.is-overlay .lang-toggle button.text-primary {
  color: #811433;
}

.site-header.is-overlay #mobile-menu-btn {
  color: #ffffff;
}

.site-header.is-overlay #mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Partner Logo Marquee: top row moves left, bottom row moves right */
.marquee-row {
  overflow: hidden;
  /* Fade logos out at both edges */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  will-change: transform;
}

/* The track holds the logo set several times; moving it by exactly half loops seamlessly */
.marquee-left {
  animation: marquee-left var(--marquee-duration, 100s) linear infinite;
}

.marquee-right {
  animation: marquee-right var(--marquee-duration, 100s) linear infinite;
}

.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 0.5rem)); }
}

@keyframes marquee-right {
  from { transform: translateX(calc(-50% - 0.5rem)); }
  to { transform: translateX(0); }
}

.marquee-item {
  flex: 0 0 auto;
  width: 11rem;
  height: 6rem;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid rgba(239, 237, 237, 0.6);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.marquee-item img {
  max-width: 100%;
  max-height: 3rem;
  object-fit: contain;
}

@media (max-width: 639px) {
  .marquee-item {
    width: 8rem;
    height: 4.5rem;
    padding: 0.75rem 1rem;
  }

  .marquee-item img {
    max-height: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* Print Styles */
@media print {
  header, footer, #toast-container, .no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
