/*
Theme Name: Nebula Web
Theme URI: https://www.nebula.si
Author: Nebula
Description: Custom blok tema za www.nebula.si — Nebula CGP 2026.
Version: 1.6.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: nebula-web
*/

/* =========================================================
   Tipografske utilitete
   ========================================================= */

/* Brand gradient samo za ključne naslove (pravilo CGP). */
.nb-gradient-text {
  background: linear-gradient(135deg, #6BB8E0, #2090D0 52%, #5A4FCF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Eyebrow/meta: mono, uppercase, .14em. */
.nb-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Oštevilčen sekcijski eyebrow s črtico (»01 · Produkti«). */
.nb-eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nb-eyebrow-line::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* Skrito za bralnike zaslona (a11y). */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Viden fokus (WCAG). */
:focus-visible {
  outline: 2px solid var(--wp--preset--color--azure);
  outline-offset: 2px;
}

/* Brez belih pasov: sekcije se stikajo (header→hero, contact→footer).
   Vsaka sekcija nosi svoj padding, zato vmesni block-gap ni potreben. */
.wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}
.wp-block-post-content > * + * {
  margin-block-start: 0 !important;
}

/* =========================================================
   Hero — gradient mesh + grid overlay
   ========================================================= */
.nb-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 540px at 18% 25%, oklch(40% 0.115 235) 0%, transparent 60%),
    radial-gradient(700px 420px at 85% 70%, oklch(34% 0.13 280 / .55) 0%, transparent 65%),
    linear-gradient(180deg, oklch(11% 0.012 240), oklch(7% 0.008 240));
}
.nb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(900px 600px at 50% 40%, black, transparent);
  mask-image: radial-gradient(900px 600px at 50% 40%, black, transparent);
  pointer-events: none;
}
.nb-hero > * { position: relative; z-index: 1; }

.nb-hero-title { text-wrap: balance; }

/* Počasi vrteč znak v heroju (spoštljiv do reduced-motion). */
.nb-hero-art img {
  animation: nb-spin 48s linear infinite;
}
@keyframes nb-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nb-hero-art img { animation: none; }
}

/* Panel z znakom v heroju. */
.nb-hero-art {
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(32, 144, 208, .18), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 28px;
}

/* Hero statistika — gradientne številke, ločilne črte. */
.nb-hero-stats {
  border-top: 1px solid rgba(255, 255, 255, .10);
}
.nb-hero-stats .wp-block-column:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, .10);
}
.nb-stat-num {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #fff, oklch(80% 0.12 235));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Trak strank/znamk pod herojem. */
.nb-brand-strip {
  border-bottom: 1px solid var(--wp--custom--nb--border--subtle);
}

/* =========================================================
   Kartice
   ========================================================= */
.nb-card {
  border-radius: var(--wp--custom--nb--radius-lg);
  box-shadow: var(--wp--custom--nb--shadow-2);
}

/* Produktna kartica — vizual + hover dvig. */
.nb-prod-card {
  border: 1px solid var(--wp--custom--nb--ink--150);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s var(--wp--custom--nb--ease), box-shadow .2s var(--wp--custom--nb--ease), border-color .2s;
}
.nb-prod-card:hover {
  border-color: var(--wp--preset--color--azure);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px -16px rgba(11, 22, 34, .14);
}
.nb-prod-tile {
  margin: 0;
}
.nb-prod-tile img,
.nb-prod-tile .nb-svg-live {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.nb-prod-footer {
  border-top: 1px solid var(--wp--custom--nb--ink--100);
}

/* Servisne / cert kartice. */
.nb-svc-card,
.nb-cert-card {
  background: #fff;
  border: 1px solid var(--wp--custom--nb--ink--150);
  border-radius: 14px;
}

/* Subtilna gradientna črta na vrhu kartice (poudarek brez teže). */
.nb-accent-top {
  position: relative;
  overflow: hidden;
}
.nb-accent-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #6BB8E0, #2090D0 52%, #5A4FCF);
}
.nb-cert-seal {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.1;
  text-align: center;
}
.nb-cert-seal.is-iso {
  background: oklch(97.8% 0.018 235);
  color: var(--wp--custom--nb--azure--700);
  border: 1px solid oklch(88% 0.072 235);
}
.nb-cert-seal.is-sme {
  background: oklch(95% 0.06 155);
  color: oklch(40% 0.13 155);
  border: 1px solid oklch(85% 0.10 155);
}
.nb-cert-seal.is-cloud {
  background: oklch(95% 0.05 280);
  color: oklch(45% 0.16 280);
  border: 1px solid oklch(85% 0.10 280);
}

/* Značke s sliko (SIQ, Nebula oblak) — širši format, slika zapolni. */
.nb-cert-seal img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.nb-cert-seal.is-iso:has(img),
.nb-cert-seal.is-cloud:has(img) {
  width: 72px;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
}
.nb-cert-seal.is-iso:has(img) {
  width: 84px;
  display: block;
}
.nb-cert-caption {
  display: block;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--wp--custom--nb--ink--500);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
}
/* Uradni Business Excellent SME pečat — širok logotip. */
.nb-cert-seal.is-sme:has(img) {
  width: 168px;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
}
a.nb-cert-link {
  color: inherit;
  text-decoration: none;
}
a.nb-cert-link:hover h3,
h3 a.nb-cert-link:hover {
  color: var(--wp--custom--nb--azure--700);
}
a.nb-cert-link:hover img {
  box-shadow: var(--wp--custom--nb--shadow-2);
}

/* =========================================================
   Temni CES stripe — stebri v 1px mreži
   ========================================================= */
.nb-pillars {
  gap: 1px !important;
  background: rgba(255, 255, 255, .10);
  border-radius: 14px;
  overflow: hidden;
}
.nb-pillars .wp-block-column {
  background: var(--wp--preset--color--ink-1000);
  padding: 24px;
  margin: 0 !important;
}

/* =========================================================
   Timeline — horizontalna črta s pikami
   ========================================================= */
.nb-timeline {
  position: relative;
}
.nb-timeline::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--wp--custom--nb--ink--200);
}
.nb-timeline .wp-block-column {
  position: relative;
  padding-top: 40px;
}
.nb-timeline .wp-block-column::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wp--preset--color--azure);
  box-shadow: 0 0 0 4px var(--wp--custom--nb--ink--50);
  z-index: 1;
}
.nb-timeline .wp-block-column.is-now::before {
  background: oklch(70% 0.18 155);
  box-shadow: 0 0 0 4px var(--wp--custom--nb--ink--50), 0 0 16px oklch(70% 0.18 155 / .5);
}
@media (max-width: 781px) {
  .nb-timeline::before { display: none; }
}

/* =========================================================
   Slike zaslonov — okvir
   ========================================================= */
.nb-screen {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--wp--custom--nb--border--subtle);
  box-shadow: var(--wp--custom--nb--shadow-3);
}
.nb-screen img { display: block; width: 100%; height: auto; }

/* Na temni podlagi. */
.nb-screen-dark {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, .5);
}
.nb-screen-dark img, .nb-screen-dark .nb-svg-live { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }

/* =========================================================
   Temna kontaktna sekcija
   ========================================================= */
.nb-contact a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.nb-contact a:hover { border-bottom-color: #fff; }

/* =========================================================
   Pravne strani (Pravilnik o zasebnosti) — berljivo oblikovanje
   ========================================================= */
.nb-legal { color: var(--wp--custom--nb--ink--700); }
.nb-legal > h1 { margin-bottom: 0.6em; }
.nb-legal h2 {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--wp--custom--nb--ink--200);
  color: var(--wp--custom--nb--ink--900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.nb-legal h3 {
  margin-top: 1.8rem;
  color: var(--wp--custom--nb--ink--800);
}
.nb-legal p { line-height: 1.7; margin: 0.85em 0; }
.nb-legal :is(ul, ol) { margin: 0.85em 0 0.85em 1.3em; line-height: 1.7; }
.nb-legal li { margin: 0.3em 0; }
.nb-legal li::marker { color: var(--wp--preset--color--azure-700); }
.nb-legal a { color: var(--wp--preset--color--azure-700); text-decoration: underline; text-underline-offset: 2px; }
.nb-legal a:hover { text-decoration: none; }
.nb-legal strong { color: var(--wp--custom--nb--ink--1000); font-weight: 600; }

/* Tabele (piškotki, roki hrambe, kategorije podatkov ...) */
.nb-legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3rem 0;
  font-size: 0.94em;
  border: 1px solid var(--wp--custom--nb--ink--200);
}
.nb-legal :is(th, td) {
  border: 1px solid var(--wp--custom--nb--ink--200);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.nb-legal th {
  background: var(--wp--custom--nb--ink--100);
  color: var(--wp--custom--nb--ink--900);
  font-weight: 600;
}
.nb-legal tbody tr:nth-child(even) td { background: var(--wp--custom--nb--ink--50); }
@media (max-width: 600px) {
  .nb-legal table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* =========================================================
   Enotna vodoravna poravnava polnoširinskih sekcij
   (nekatere sekcije nimajo inline odmika — tu ga poenotimo na 24px,
    da so naslovi in besedila vseh sekcij enako poravnani, zlasti na mobilnem)
   ========================================================= */
.wp-block-group.alignfull {
  padding-left: var(--wp--preset--spacing--24);
  padding-right: var(--wp--preset--spacing--24);
}

/* =========================================================
   Header / navigacija na temnem
   ========================================================= */
.nb-header {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nb-header .wp-block-navigation a:hover {
  color: #fff;
}

/* =========================================================
   Scroll reveal — subtilen fade-in/slide-up (JS doda razrede)
   ========================================================= */
.nb-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms var(--wp--custom--nb--ease), transform 600ms var(--wp--custom--nb--ease);
  will-change: opacity, transform;
}
.nb-reveal.is-revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .nb-reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Sticky header z blur ozadjem
   ========================================================= */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 99;
}
body.admin-bar header.wp-block-template-part { top: 32px; }
.nb-header {
  background: rgba(11, 22, 34, 0.78) !important;
}
/* blur SAMO na namizju: backdrop-filter ustvari "containing block", zaradi
   katerega bi bil mobilni meni (position:fixed) ujet znotraj glave. */
@media (min-width: 782px) {
  .nb-header {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

/* =========================================================
   Mobilni meni — poln zaslon, elegantno
   ========================================================= */
@media (max-width: 781px) {
  /* Hamburger gumb */
  .nb-header .wp-block-navigation__responsive-container-open {
    color: var(--wp--preset--color--paper, #fff);
    padding: 4px;
  }
  .nb-header .wp-block-navigation__responsive-container-open svg { fill: currentColor; width: 28px; height: 28px; }

  /* Overlay čez cel zaslon z nežnim gradientom za globino */
  .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: var(--wp--preset--color--ink-1000, #0b1622) !important;
    background-image: radial-gradient(115% 75% at 100% 0%, rgba(78, 167, 218, 0.16), transparent 58%);
  }
  body.admin-bar .wp-block-navigation__responsive-container.is-menu-open { top: 46px; }

  /* Vsebina od zgoraj, zmeren rob */
  .is-menu-open .wp-block-navigation__responsive-container-content {
    width: 100%;
    display: block;
    padding: clamp(78px, 18vw, 96px) 28px 40px;
  }
  .is-menu-open .wp-block-navigation__container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 360px;
  }

  /* Postavke — zmerne, lahke, s subtilnimi ločili in stagger animacijo */
  .is-menu-open .wp-block-navigation-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateY(8px);
    animation: nb-menu-in 360ms var(--wp--custom--nb--ease, cubic-bezier(.22,1,.36,1)) forwards;
  }
  .is-menu-open .wp-block-navigation-item:nth-child(1) { animation-delay: 50ms; }
  .is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 90ms; }
  .is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 130ms; }
  .is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 170ms; }
  .is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: 210ms; }
  .is-menu-open .wp-block-navigation-item:nth-child(6) { animation-delay: 250ms; }

  .is-menu-open .wp-block-navigation-item__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 2px;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.86);
    transition: color 180ms ease, padding-left 180ms ease;
  }
  .is-menu-open .wp-block-navigation-item__content::after {
    content: "→";
    font-size: 0.85em;
    color: var(--wp--preset--color--azure, #4ea7da);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .is-menu-open .wp-block-navigation-item__content:hover,
  .is-menu-open .wp-block-navigation-item__content:focus {
    color: #fff;
    padding-left: 6px;
  }
  .is-menu-open .wp-block-navigation-item__content:hover::after,
  .is-menu-open .wp-block-navigation-item__content:focus::after {
    opacity: 1;
    transform: none;
  }

  /* Gumb za zapiranje */
  .wp-block-navigation__responsive-container-close {
    top: clamp(20px, 6vw, 28px);
    right: 24px;
    width: 44px;
    height: 44px;
    color: #fff;
  }
  .wp-block-navigation__responsive-container-close svg { width: 26px; height: 26px; }

  @keyframes nb-menu-in {
    to { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .is-menu-open .wp-block-navigation-item { animation: none; opacity: 1; transform: none; }
  }
}

/* =========================================================
   Interaktivne skice (inline SVG prek JS)
   ========================================================= */
.nb-svg-live {
  display: block;
  width: 100%;
  height: auto;
}
.nb-svg-live :is(path, circle, rect)[stroke^="url(#acc"],
.nb-svg-live :is(path, circle, rect)[fill^="url(#acc"] {
  transition: filter 250ms var(--wp--custom--nb--ease), transform 250ms var(--wp--custom--nb--ease);
  transform-box: fill-box;
  transform-origin: center;
}
.nb-svg-live :is(path, rect)[stroke^="url(#acc"]:hover {
  filter: drop-shadow(0 0 8px rgba(78, 167, 218, 0.95));
}
.nb-svg-live circle[stroke^="url(#acc"]:hover {
  filter: drop-shadow(0 0 10px rgba(78, 167, 218, 0.95));
  transform: scale(1.08);
}
.nb-svg-live text:hover {
  fill: #ffffff;
}
.nb-svg-live text.nb-hot {
  cursor: help;
}
.nb-svg-live text.nb-hot:hover {
  fill: #ffffff;
}

/* Stilizirana bučica (tooltip) za interaktivne skice. */
.nb-tip {
  position: absolute;
  z-index: 200;
  max-width: 240px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--wp--preset--color--ink-1000);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  box-shadow: var(--wp--custom--nb--shadow-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms var(--wp--custom--nb--ease);
}
.nb-tip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: var(--wp--preset--color--ink-1000);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* =========================================================
   Odzivnost — tipografija in razmiki na manjših zaslonih
   ========================================================= */
@media (max-width: 781px) {
  .has-display-font-size { font-size: 40px !important; line-height: 1.06 !important; }
  .has-h-1-font-size { font-size: 30px !important; line-height: 1.1 !important; }
  .has-h-2-font-size { font-size: 24px !important; }
  .has-h-3-font-size { font-size: 19px !important; }
  h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
  main .wp-block-group.alignfull {
    padding-top: var(--wp--preset--spacing--48) !important;
    padding-bottom: var(--wp--preset--spacing--48) !important;
  }
  .nb-hero-stats .wp-block-column:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    padding-bottom: var(--wp--preset--spacing--16);
  }
}
@media (max-width: 480px) {
  .has-display-font-size { font-size: 34px !important; }
  .has-h-1-font-size { font-size: 27px !important; }
}

/* Gumbi — sekundarni »ghost« na temnem. */
.nb-btn-ghost .wp-block-button__link {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
}
.nb-btn-light .wp-block-button__link {
  background: #fff;
  color: var(--wp--preset--color--ink-1000);
}
