/* ==========================================================================
   components.css — dugmad, linkovi, tabla sa preklopnim slovima, trake
   ========================================================================== */

/* Dugmad ----------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 17px 26px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  transition: background 0.48s var(--ease), color 0.48s var(--ease),
    border-color 0.48s var(--ease), transform 0.55s var(--ease);
}

.btn--lg {
  padding: 18px 30px;
}

.btn--lime {
  background: var(--c-lime);
  color: var(--c-forest);
}

.btn--lime:hover {
  background: var(--c-cream);
}

.btn--outline-light {
  border-color: rgba(244, 241, 232, 0.55);
  color: var(--c-cream);
}

.btn--outline-light:hover {
  background: var(--c-cream);
  border-color: var(--c-cream);
  color: var(--c-forest);
}

.btn--dark {
  background: var(--c-forest);
  color: var(--c-cream);
}

.btn--dark:hover {
  background: var(--c-lime);
  color: var(--c-forest);
}

.btn--outline-dark {
  border-color: var(--c-forest);
  color: var(--c-forest);
}

.btn--outline-dark:hover {
  background: var(--c-forest);
  color: var(--c-cream);
}

/* Link sa donjom linijom ---------------------------------------------- */

.text-link {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.48s var(--ease), border-color 0.48s var(--ease);
}

.text-link--lime {
  color: var(--c-lime);
}

.text-link--lime:hover {
  color: var(--c-cream);
}

.text-link--dark:hover {
  color: var(--c-green);
}

/* Okrugle strelice (galerija, kalendar) -------------------------------- */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--c-forest);
  background: transparent;
  color: var(--c-forest);
  font-size: 20px;
  transition: background 0.48s var(--ease), color 0.48s var(--ease),
    border-color 0.48s var(--ease);
}

.icon-btn:hover {
  background: var(--c-forest);
  color: var(--c-cream);
}

.icon-btn--filled {
  background: var(--c-forest);
  color: var(--c-cream);
}

.icon-btn--filled:hover {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: var(--c-forest);
}

/* Traka napretka (auto-promena slajdova) -------------------------------- */

.progress-tab {
  display: block;
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: var(--c-cream);
  font-family: inherit;
  text-align: left;
}

.progress-tab__bar {
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  background: rgba(244, 241, 232, 0.25);
}

.progress-tab__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-lime);
  transform: scaleX(0);
  transform-origin: left;
}

.progress-tab.is-active .progress-tab__bar::after {
  animation: tab-progress var(--autoplay, 5.4s) linear both;
}

.is-manual .progress-tab.is-active .progress-tab__bar::after {
  animation: none;
  transform: scaleX(1);
}

.progress-tab__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding-top: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.6s ease-in-out;
}

.progress-tab.is-active .progress-tab__label {
  opacity: 1;
}

.progress-tab__no {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--c-lime);
}

@keyframes tab-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Tabla sa preklopnim slovima ------------------------------------------- */

.board {
  --b: 1px; /* jedinica skaliranja: širina table / 464 */
  display: grid;
  grid-template-columns: repeat(16, calc(var(--b) * 24));
  grid-auto-rows: calc(var(--b) * 36);
  gap: calc(var(--b) * 4) calc(var(--b) * 3);
  width: max-content;
  padding: calc(var(--b) * 16);
  border-radius: calc(var(--b) * 6);
  background: var(--c-forest);
  box-shadow: 0 24px 48px rgba(14, 42, 31, 0.35),
    inset 0 0 0 1px rgba(244, 241, 232, 0.14);
}

.board__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--b) * 3);
  font-family: var(--font-sans);
  font-size: calc(var(--b) * 22);
  font-weight: 600;
  line-height: 1;
  color: var(--c-cream);
  background: linear-gradient(
    180deg,
    #1b4634 0,
    #1b4634 calc(50% - 1px),
    #050f0a calc(50% - 1px),
    #050f0a calc(50% + 1px),
    #122f23 calc(50% + 1px)
  );
}

.board__cell--accent {
  color: var(--c-lime);
}

/* Beskonačna traka sa rečima -------------------------------------------- */

.marquee {
  padding: clamp(28px, 4vw, 56px) 0;
  overflow: hidden;
  background: var(--c-cream);
  border-bottom: 1px solid rgba(14, 42, 31, 0.18);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}

.marquee__track:hover {
  animation-play-state: paused;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.4vw, 56px);
  padding-right: clamp(24px, 3.4vw, 56px);
}

.marquee__word {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8.4vw, 132px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--c-forest);
}

.marquee__word--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--c-forest);
}

.marquee__word--green {
  color: var(--c-green);
  font-style: italic;
}

.marquee__ball {
  flex: none;
  width: clamp(28px, 3.6vw, 56px);
  height: clamp(28px, 3.6vw, 56px);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

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

  .progress-tab.is-active .progress-tab__bar::after {
    animation: none;
    transform: scaleX(1);
  }
}
