/* =========================================
   SerbianCamp - Components
   Header, Footer, Buttons, Cards, Forms
   ========================================= */

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease);
  white-space: nowrap;
  position: relative;
  isolation: isolate;
}

.btn--primary {
  background: var(--bordo);
  color: var(--bela-mek);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: var(--bordo-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: transparent;
  color: var(--bela-mek);
  border-color: rgba(255, 252, 245, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 252, 245, 0.08);
}

.btn--secondary:hover {
  border-color: var(--bela-mek);
  background: rgba(255, 252, 245, 0.16);
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--zlato);
  color: var(--royal-blue-dark);
  box-shadow: var(--shadow-md);
}

.btn--gold:hover {
  background: var(--zlato-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--ghost {
  background: transparent;
  color: var(--royal-blue);
  border-color: var(--royal-blue);
}

.btn--ghost:hover {
  background: var(--royal-blue);
  color: var(--bela-mek);
}

.btn--text {
  padding: 8px 0;
  background: transparent;
  color: var(--bordo);
  border: none;
  font-weight: 600;
}

.btn--text:hover {
  color: var(--bordo-dark);
  gap: 12px;
}

.btn--lg {
  padding: 18px 36px;
  font-size: var(--text-lg);
}

.btn--xl {
  padding: 22px 44px;
  font-size: var(--text-xl);
  letter-spacing: 0.02em;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease);
}

.btn:hover .btn__icon--arrow {
  transform: translateX(4px);
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  transition: background var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease),
              padding var(--duration-base) var(--ease),
              top var(--duration-base) var(--ease);
  padding: 16px 0;
}

/* WP admin bar offset - kad je korisnik ulogovan, gurni fiksne elemente ispod admin bara */
.admin-bar .site-header { top: 32px; }
.admin-bar .scroll-progress { top: 32px; }
.admin-bar .site-nav.is-open {
  top: calc(var(--header-height) + 32px);
  height: calc(100vh - var(--header-height) - 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .scroll-progress { top: 46px; }
  .admin-bar .site-nav.is-open {
    top: calc(var(--header-height) + 46px);
    height: calc(100vh - var(--header-height) - 46px);
  }
}

@media screen and (max-width: 600px) {
  .admin-bar .site-header { top: 46px; }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Transparent (preko hero-a) */
.site-header--transparent {
  background: transparent;
}

.site-header--transparent .site-header__nav-link,
.site-header--transparent .site-logo,
.site-header--transparent .lang-toggle,
.site-header--transparent .menu-toggle {
  color: var(--bela-mek);
}

/* Solid (na scroll) */
.site-header--solid {
  background: rgba(245, 233, 211, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.site-header--solid .site-header__nav-link,
.site-header--solid .site-logo,
.site-header--solid .lang-toggle,
.site-header--solid .menu-toggle {
  color: var(--royal-blue);
}

/* Logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color var(--duration-base) var(--ease);
}

.site-logo__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-logo__name {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
}

.site-logo__sub {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.65;
  line-height: 1;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav__list {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.site-header__nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 6px 2px;
  transition: color var(--duration-base) var(--ease);
}

.site-header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--zlato);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-base) var(--ease);
}

.site-header__nav-link:hover::after,
.site-header__nav-link.is-active::after {
  transform: scaleX(1);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Lang toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  padding: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.site-header--solid .lang-toggle {
  background: transparent;
  border-color: var(--linija);
}

.lang-toggle__btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: inherit;
  opacity: 0.6;
  transition: all var(--duration-base) var(--ease);
}

.lang-toggle__btn.is-active {
  background: var(--zlato);
  color: var(--royal-blue-dark);
  opacity: 1;
}

/* Header donate button */
.site-header .btn--header-cta {
  padding: 10px 22px;
  font-size: var(--text-sm);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: inherit;
}

.menu-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.menu-toggle__bars span {
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease),
              opacity var(--duration-base) var(--ease);
}

.menu-toggle.is-open .menu-toggle__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .menu-toggle__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav.is-open {
    display: flex;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--header-height));
    background: var(--royal-blue);
    flex-direction: column;
    padding: var(--space-5) var(--container-padding);
    overflow-y: auto;
    gap: 0;
    z-index: var(--z-modal);
  }

  .site-nav.is-open .site-nav__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
    align-items: stretch;
  }

  .site-nav.is-open .site-header__nav-link {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-2xl);
    font-family: var(--font-heading);
    color: var(--bela-mek);
    text-align: center;
    border-bottom: 1px solid rgba(255, 252, 245, 0.15);
  }

  .site-nav.is-open .site-header__nav-link::after {
    display: none;
  }

  .site-nav.is-open .btn--header-cta {
    display: inline-flex;
    margin-top: var(--space-4);
    align-self: center;
    padding: 14px 32px;
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .site-logo__sub {
    display: none;
  }
  .site-logo__name {
    font-size: var(--text-base);
  }
  .site-logo__mark {
    width: 32px;
    height: 32px;
  }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--royal-blue-dark);
  color: var(--pergament);
  padding: var(--space-7) 0 var(--space-3);
  position: relative;
}

/* Footer top: zvanična srpska tricolor traka (crveno-plavo-belo) */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background:
    linear-gradient(
      180deg,
      var(--sr-red) 0%,
      var(--sr-red) 33.34%,
      var(--sr-blue) 33.34%,
      var(--sr-blue) 66.66%,
      var(--sr-white) 66.66%,
      var(--sr-white) 100%
    );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.site-footer__col h5 {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--zlato);
  margin-bottom: var(--space-3);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--bela-mek);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.footer-tag {
  color: rgba(245, 233, 211, 0.7);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 32ch;
  margin-bottom: var(--space-3);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social__link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(245, 233, 211, 0.08);
  color: var(--pergament);
  transition: background var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease);
}

.footer-social__link:hover {
  background: var(--zlato);
  color: var(--royal-blue-dark);
  transform: translateY(-2px);
}

.footer-social__link svg {
  width: 18px;
  height: 18px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: rgba(245, 233, 211, 0.75);
  font-size: var(--text-sm);
  transition: color var(--duration-base) var(--ease);
}

.footer-nav a:hover {
  color: var(--zlato);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(245, 233, 211, 0.85);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.footer-contact__item svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  color: var(--zlato);
}

.footer-contact__item a:hover {
  color: var(--zlato);
}

.footer-newsletter__intro {
  color: rgba(245, 233, 211, 0.7);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.footer-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-newsletter__field {
  position: relative;
}

.footer-newsletter__input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(245, 233, 211, 0.08);
  border: 1px solid rgba(245, 233, 211, 0.15);
  border-radius: var(--radius-md);
  color: var(--bela-mek);
  font-size: var(--text-sm);
  transition: border-color var(--duration-base) var(--ease),
              background var(--duration-base) var(--ease);
}

.footer-newsletter__input::placeholder {
  color: rgba(245, 233, 211, 0.4);
}

.footer-newsletter__input:focus {
  outline: none;
  border-color: var(--zlato);
  background: rgba(245, 233, 211, 0.12);
}

.footer-newsletter__btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--zlato);
  color: var(--royal-blue-dark);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  transition: background var(--duration-base) var(--ease);
}

.footer-newsletter__btn:hover {
  background: var(--zlato-light);
}

.site-footer__bottom {
  padding-top: var(--space-3);
  border-top: 1px solid rgba(245, 233, 211, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(245, 233, 211, 0.5);
  letter-spacing: 0.04em;
}

.footer-credits {
  font-size: var(--text-xs);
  color: rgba(245, 233, 211, 0.5);
  letter-spacing: 0.04em;
}

.footer-credits strong {
  color: var(--zlato-light);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    justify-content: center;
    text-align: center;
  }
}

/* =========================================
   CARDS (general)
   ========================================= */
.card {
  background: var(--bela-mek);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
  position: relative;
  overflow: hidden;
}

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

/* =========================================
   SCROLL PROGRESS BAR
   Tanak bar na vrhu - vizualni feedback skrola
   ========================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0% 50%;
  background: linear-gradient(
    90deg,
    var(--sr-red) 0%,
    var(--zlato) 50%,
    var(--sr-blue) 100%
  );
  z-index: var(--z-toast);
  pointer-events: none;
  will-change: transform;
}

/* =========================================
   TOAST (lang toggle notif)
   ========================================= */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--royal-blue-dark);
  color: var(--bela-mek);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  opacity: 0;
  transition: transform var(--duration-base) var(--ease),
              opacity var(--duration-base) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--zlato);
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast__icon {
  width: 16px;
  height: 16px;
  color: var(--zlato);
  flex-shrink: 0;
}
