/* Dodaci za WordPress (originalni dizajn je u style.css) */

.admin-bar #navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar #navbar { top: 46px; } }

.nav-menu li { list-style: none; }

/* Kontakt forma */
.tq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cpop__error { font-size: 0.85rem; font-weight: 300; color: #c0503c; margin: 0; }
.cpop__submit[disabled] { opacity: 0.6; cursor: progress; }

/* Reference */
.ref-card { position: relative; }
.ref-card .project-card__logo-wrap { top: 16px; right: 16px; }
.ref-card__footer button.ref-card__link { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-body); }
.ref-card__footer button.ref-card__link:hover { color: var(--accent-hover); }
.tq-empty { text-align: center; color: var(--text-secondary); font-weight: 300; padding: 40px 0; }
.tq-empty[hidden] { display: none; }

/* Pojedinačna referenca */
.tq-prose { max-width: 760px; margin: 0 auto 56px; font-weight: 300; line-height: 1.8; color: var(--text-secondary); }
.tq-prose p { margin-bottom: 1.1em; }
.tq-prose h2, .tq-prose h3 { font-family: var(--font-display); font-weight: 400; color: var(--text-primary); margin: 1.4em 0 .5em; }
.tq-prose a { color: var(--accent); }
.tq-post { padding: 32px 0; border-bottom: 1px solid var(--border-light); }
.tq-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tq-gallery-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--dark-card); cursor: zoom-in; padding: 0; }
.tq-gallery-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tq-gallery-item span { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.7s var(--ease); }
.tq-gallery-item:hover span { transform: scale(1.05); }
.tq-ref-actions { margin-top: 48px; justify-content: center; }
.tq-404 { min-height: 70vh; display: flex; align-items: center; }
.tq-404 .cta-buttons { justify-content: center; margin-top: 32px; }

@media (max-width: 768px) {
  .tq-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Katalog: format strane kao u štampanom katalogu (2250 × 1861 po strani) */
.flipbook-scene {
  width: min(92vw, 1280px, calc(76vh * 4500 / 1861));
  height: auto;
  aspect-ratio: 4500 / 1861;
}
@media (max-width: 768px) {
  .flipbook-scene { width: 96vw; height: auto; }
}
@media (max-width: 480px) {
  .flipbook-scene { width: 98vw; height: auto; }
}
.fb-cat-page { width: 100%; height: 100%; background: #e2e7ef; }
.fb-cat-page img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Logotipi klijenata i dobavljača */
.marquee-track--logos { animation-duration: 70s; }
.partner-logo--img { min-width: 0; padding: 0 44px; height: 90px; filter: grayscale(100%) opacity(0.6); }
.partner-logo--img img { display: block; max-height: 58px; max-width: 170px; width: auto; height: auto; }
@media (max-width: 768px) {
  .partner-logo--img { padding: 0 26px; height: 70px; }
  .partner-logo--img img { max-height: 44px; max-width: 130px; }
}

/* Katalozi po kategorijama (strana Reference) */
.tq-catalogs { padding: 96px 0 72px; background: var(--off-white); }
.tq-catalogs .section-header { text-align: center; margin-bottom: 48px; }
.tq-catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tq-catalog-card {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.3;
  border: 0; padding: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--dark); cursor: pointer; text-align: left; font: inherit; color: #fff;
}
.tq-catalog-card__img {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform 0.8s var(--ease);
}
.tq-catalog-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 21, 32, 0.85) 0%, rgba(10, 21, 32, 0.15) 60%, rgba(10, 21, 32, 0.05) 100%);
}
.tq-catalog-card:hover .tq-catalog-card__img, .tq-catalog-card:focus-visible .tq-catalog-card__img { transform: scale(1.06); }
.tq-catalog-card__body { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.tq-catalog-card__title {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; line-height: 1.1;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tq-catalog-card__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.tq-catalog-card__cta svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.tq-catalog-card:hover .tq-catalog-card__cta svg { transform: translateX(4px); }
.tq-catalog-card.is-soon { cursor: default; background: linear-gradient(150deg, #1d3346, #0f1e2b); }
.tq-catalog-card.is-soon::after { background: none; }
.tq-catalog-card.is-soon .tq-catalog-card__cta { color: rgba(255, 255, 255, 0.5); }
@media (max-width: 1024px) { .tq-catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .tq-catalogs { padding: 64px 0 48px; }
  .tq-catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tq-catalog-card__body { left: 14px; right: 14px; bottom: 14px; }
  .tq-catalog-card__title { font-size: 1.15rem; }
}

/* =====================================================
   Katalog kao prava knjiga (savijanje strane)
   ===================================================== */
.tq-book {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 56px 16px 20px;
  background: radial-gradient(ellipse at center, #1c2f40 0%, #0a1520 70%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.tq-book[hidden] { display: none; }
.tq-book.is-open { opacity: 1; }
.tq-book__stage { width: 100%; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tq-book__wrap { width: min(94vw, calc(76vh * 2800 / 1158), 1600px); }
.tq-book__book { margin: 0 auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55)); }
.tq-page { background: #f4f2ee; overflow: hidden; }
.tq-page__inner { width: 100%; height: 100%; position: relative; overflow: hidden; }
.tq-page__inner > * { width: 100%; height: 100%; }
.tq-page .fb-cat-page img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
/* blaga senka pregiba (kao kod štampanog kataloga) */
.tq-page .tq-page__inner::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none;
}
.tq-page.--left .tq-page__inner::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.18), transparent); }
.tq-page.--right .tq-page__inner::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.18), transparent); }
.tq-page[data-density="hard"] { background: #e9e6e0; }
.tq-book__close {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.18); cursor: pointer;
}
.tq-book__close:hover { background: rgba(255,255,255,0.2); }
.tq-book__nav { display: flex; align-items: center; gap: 18px; color: rgba(255,255,255,0.8); }
.tq-book__btn {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.2); cursor: pointer;
  transition: background 0.2s ease;
}
.tq-book__btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.tq-book__btn:disabled { opacity: 0.3; cursor: default; }
.tq-book__counter { min-width: 140px; text-align: center; font-size: 0.82rem; letter-spacing: 0.08em; }
.tq-book__hint { margin: 0; font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); text-align: center; }
@media (max-width: 768px) {
  .tq-book { padding: 60px 8px 14px; gap: 12px; }
  .tq-book__wrap { width: min(96vw, calc(70vh * 1400 / 1158)); }
  .tq-book__hint { display: none; }
}

/* 5 kataloga: 3 + 2 na desktopu, centrirano */
.tq-catalog-grid { grid-template-columns: repeat(6, 1fr); }
.tq-catalog-grid > * { grid-column: span 2; }
.tq-catalog-grid > *:nth-child(4) { grid-column: 2 / span 2; }
@media (max-width: 768px) {
  .tq-catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .tq-catalog-grid > *, .tq-catalog-grid > *:nth-child(4) { grid-column: auto; }
  .tq-catalog-grid > *:nth-child(5) { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
}
.post-type-archive-referenca .tq-catalogs { padding-bottom: 120px; }
.admin-bar .tq-book { top: 32px; }
@media (max-width: 782px) { .admin-bar .tq-book { top: 46px; } }

/* =====================================================
   Galerije projekata kao luksuzna knjiga
   ===================================================== */
.tq-book--gallery { background: radial-gradient(ellipse at center, #22303b 0%, #0b141c 72%); }
.tq-gp { width: 100%; height: 100%; position: relative; background: #f3efe8; color: #142332; overflow: hidden; }
/* papirna tekstura */
.tq-gp::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.7), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(170,150,120,0.12), transparent 60%);
}
.tq-gp__frame {
  position: absolute; inset: 7%; border: 1px solid rgba(20, 35, 50, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2.2%;
  padding: 6%;
}
.tq-gp__frame::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(20, 35, 50, 0.08); pointer-events: none; }
.tq-gp__logo { max-width: 38%; max-height: 22%; width: auto; height: auto; object-fit: contain; filter: brightness(0); opacity: 0.78; margin-bottom: 4%; }
.tq-gp__label { font-family: var(--font-body); font-size: clamp(8px, 0.9vw, 12px); letter-spacing: 0.42em; text-transform: uppercase; color: var(--accent); }
.tq-gp__title { font-family: var(--font-display); font-weight: 300; font-size: clamp(20px, 3.6vw, 54px); line-height: 1.05; letter-spacing: 0.04em; margin: 0; color: #142332; }
.tq-gp__rule { display: block; width: 18%; height: 1px; background: linear-gradient(90deg, transparent, #b29a6a, transparent); margin: 2% 0; }
.tq-gp__loc { font-family: var(--font-display); font-style: italic; font-size: clamp(12px, 1.5vw, 22px); color: rgba(20, 35, 50, 0.7); }
.tq-gp__brand { position: absolute; bottom: 7%; left: 0; right: 0; display: flex; justify-content: center; }
.tq-gp__brand img { height: clamp(12px, 1.6vw, 24px); width: auto; opacity: 0.55; }

/* strana sa fotografijom: passe-partout */
.tq-gp--photo { display: flex; flex-direction: column; padding: 6.5% 7% 4.5%; }
.tq-gp__photo {
  position: relative; flex: 1 1 auto; min-height: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
}
.tq-gp__photo img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 12px 28px rgba(20, 35, 50, 0.22);
  outline: 1px solid rgba(255,255,255,0.6); outline-offset: -6px;
}
.tq-gp__caption {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  margin-top: 3.2%; padding-top: 2.4%; border-top: 1px solid rgba(20, 35, 50, 0.14);
  font-family: var(--font-display); font-size: clamp(9px, 1.05vw, 15px); letter-spacing: 0.12em; color: rgba(20, 35, 50, 0.62);
}
.tq-gp__caption span:first-child { text-transform: uppercase; letter-spacing: 0.24em; font-family: var(--font-body); font-size: 0.8em; }
.tq-gp__caption span:last-child { font-style: italic; }

/* korice: tamnije, tvrde */
.tq-gp--cover, .tq-gp--end { background: #ece5da; }
.tq-gp__end-logo { max-width: 46%; height: auto; opacity: 0.85; }
.tq-gp__end-text { font-family: var(--font-display); font-style: italic; font-size: clamp(14px, 2vw, 28px); margin: 0; color: #142332; }
.tq-gp__cta {
  margin-top: 3%; display: inline-block; padding: 0.9em 2.2em; font-family: var(--font-body);
  font-size: clamp(8px, 0.85vw, 12px); letter-spacing: 0.3em; text-transform: uppercase;
  color: #fff; background: #142332; text-decoration: none; transition: background 0.3s ease;
}
.tq-gp__cta:hover { background: var(--accent); }
