:root {
  --primary: #4a697f;
  --secondary: #de4c17;
  --light: #f8f9fa;
  --dark: #333333;
  --h1-fs: clamp(3rem, 10vw, 15rem);
  --h2-fs: clamp(1.25rem, 2.8vw, 3.25rem);
  --p-fs: clamp(0.95rem, 1.4vw, 1.25rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: var(--light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}
.navbar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.navbar nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

nav img {
  max-height: 30px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  transition: color 0.3s;
}
nav a:hover   { color: var(--primary); }
nav a:active  { color: var(--secondary); }

.home {
  display: flex;
  height: 100vh;
}

.home-slika {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-container {
  position: absolute;
  top: 25%;
  left: 17%;
  width: 20rem;
  transition: transform 0.4s ease;
}
.logo-container.hidden {
  transform: translate(-100vw, -100vh);
}

.logo-container .logo {
  display: block;
  width: 100%;
  height: auto;
}

.logo-container .arrow {
  position: absolute;
  bottom: -6rem;
  right: -9rem;
  transform: rotate(219deg);
  width: 11rem;
}

.logo-container .line {
  position: absolute;
  width: 2rem;
  height: auto;
  transform-origin: center bottom;
  opacity: 0;
}
.logo-container:hover .line,
.logo-container:hover .arrow {
  opacity: 1;
}
.logo-container .line1 { top:-28%;  left:-1%;  transform: translate(-50%,0) rotate(313deg); }
.logo-container .line2 { top:-34%;  left:55%;  transform: translate(-100%,0) rotate(2deg);   }
.logo-container .line3 { top:-16%;  left:95%;  transform: translate(-100%,-50%) rotate(34deg); }
.logo-container .line4 { top:22%;   left:-18%; transform: translate(-100%,-100%) rotate(286deg); }
.logo-container .line5 { top:26%;   left:115%; transform: translate(-50%,-100%) rotate(72deg);  }

.logo-container .tekst {
  position: absolute;
  top: 119%;
  left: 168%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  font-size: 2rem;
  color: var(--dark);
}

.home-tekst {
  width: 50%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: end;
}

.home-tekst h1 {
  font-size: 15rem;
  font-weight: bold;
  line-height: normal;
}
.home-tekst h3 {
  font-size: 5rem;
  margin-bottom: 5rem;
  font-weight: normal;
  line-height: normal;
}
.home-tekst p {
  font-size: 1.3rem;
}
.home-tekst .mansi {
  font-size: 1rem;
}

.Kakopomagamo {
  margin-top: 10rem;
  margin-bottom: 5rem;
}
.Kakopomagamo h2 {
  font-size: 7rem;
  margin-left: 5rem;
  margin-bottom: 2rem;
  color: var(--dark);
}

.wrapperbox .rowbox {
  display: flex;
  flex-wrap: wrap;
}

.wrapperbox .box {
  flex: 0 0 25%;
  aspect-ratio: 1 / 1;
  background-color: var(--light);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dark);
  padding: 0 1rem;
}
.wrapperbox .box:not(.no-zoom) {
  transition: transform 0.3s ease;
  transform-origin: center center;
  z-index: 1;
}
.wrapperbox .box.zoomed {
  transform: scale(1.1);
  z-index: 10;
}
.wrapperbox .box.no-zoom {
  transition: none;
}
.wrapperbox .box.no-zoom:hover {
  transform: none;
  z-index: 1;
}

.wrapperbox .box h3 {
  font-size: var(--h2-fs);
  font-weight: normal;
  line-height: 1;
  margin: 10px;
  word-break: break-word;
  hyphens: auto;
}
.wrapperbox .box p {
  font-size: var(--p-fs);
  line-height: 1.4;
  margin: 10px;
}
.wrapperbox .box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wrapperbox .rowbox:last-child .box {
  flex: 0 0 25%;
  aspect-ratio: 1 / 1;
}
.wrapperbox .rowbox:last-child .box:last-child {
  flex: 0 0 50%;
  aspect-ratio: 2 / 1;
}

/* === MOBILNO: 2 v vrstici + nižji kvadrati === */
@media (max-width: 600px) {
  .wrapperbox .box {
    flex: 0 0 50%;
    aspect-ratio: 4 / 3; /* nižji, da ne zasedejo preveč višine */
  }
  .wrapperbox .rowbox:last-child .box:last-child {
    flex: 0 0 100%;
    aspect-ratio: 2 / 1;
  }
}

.ZakajKdosmo {
  margin-top: 10rem;
  margin-bottom: 10rem;
}

.wrapper {
  display: flex;
  min-height: 40vh;
}

.wrapper h2 {
  font-size: 5rem;
  transition: opacity 0.3s ease;
}

.wrapper p {
  font-size: 1.5rem;
}

.wrapper .Zakaj,
.wrapper .Kdosmo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: flex 0.3s ease, opacity 0.3s ease;
}
.wrapper .Zakaj {
  background-color: var(--primary);
  color: var(--light);
}
.wrapper .Kdosmo {
  background-color: var(--secondary);
  color: var(--dark);
}

.wrapper .Zakaj:not(.active),
.wrapper .Kdosmo:not(.active) {
  flex: 0.8;
  opacity: 0.7;
  cursor: pointer;
}
.wrapper .Zakaj.active,
.wrapper .Kdosmo.active {
  flex: 2;
  opacity: 1;
}

.wrapper .Zakaj h2,
.wrapper .Kdosmo h2 {
  transition: opacity 0.3s ease;
}
.wrapper .Zakaj p,
.wrapper .Kdosmo p {
  display: none;
  padding: 1rem;
  transition: opacity 0.5s ease; 
}
.wrapper .Zakaj.active h2,
.wrapper .Kdosmo.active h2 {
  opacity: 0;
  display: none;
}
.wrapper .Zakaj.active p,
.wrapper .Kdosmo.active p {
  display: block;
  opacity: 1;
  margin: 0 50px;
}

#rotator-container {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  height: 1.6em;
  line-height: 1.6em;
  overflow: hidden;
  width: 10ch;
  text-align: center;
  font-weight: bold;
}
.rotator-word {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: block;
  text-align: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
  font-weight: bold;
}

.Pisitenam {
  position: relative;
  margin-top: 5rem;
}

#Pisitenam {
  scroll-margin-top: 6rem;
}

.Pisitenam h2 {
  font-size: 7rem;
  margin-left: 5rem;
  line-height: 5rem;
  color: var(--dark);
}
.Pisitenam h3 {
  font-size: 2rem;
  margin-left: 5rem;
  margin-bottom: 2rem;
  color: var(--dark);
}
.Pisitenam .arrow {
  position: absolute;
  top: 28%;
  left: 45%;
  transform: translate(-50%, -50%) rotate(60deg);
  width: 22rem;
}
.Pisitenam .vizitka {
  position: absolute;
  top: 37%;
  right: 4%;
}
.Pisitenam .email {
  text-align: center;
  font-size: 10rem;
  margin-top: 20vh;
}
.Pisitenam .email a {
  color: var(--dark);
  transition: color 0.3s;
}
.Pisitenam .email a:hover  { color: var(--primary); }
.Pisitenam .email a:active { color: var(--secondary); }

.footer {
  margin-top: 30vh;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  background-color: var(--dark);
  color: var(--light);
}

.hamburger {
  display: none;
  cursor: pointer;
}
@media (max-width: 768px) {
  .navbar ul {
    display: none;
    flex-direction: column;
  }
  .hamburger {
    display: block;
  }
}

.home {
  flex-direction: column;
  text-align: center;
}
.home-slika,
.home-tekst {
  width: 100%;
}
.home-tekst h1 {
  font-size: var(--h1-fs);
}
.home-tekst h3 {
  font-size: var(--h2-fs);
}
.home-tekst p {
  font-size: var(--p-fs);
}
.logo-container {
  position: static;
  transform: none;
  width: 80%;
  max-width: 400px;
  margin: 0 auto;
}
.logo-container .arrow,
.logo-container .line,
.logo-container .tekst {
  display: none;
}
@media (min-width: 1024px) {
  .home {
    flex-direction: row;
    text-align: end;
  }
  .home-slika,
  .home-tekst {
    width: 50%;
  }
  .logo-container {
    position: absolute;
    top: 25%;
    left: 17%;
    width: 20rem;
    margin: 0;
  }
  .logo-container .arrow,
  .logo-container .line,
  .logo-container .tekst {
    display: block;
  }
}

@media (max-width: 1024px) {
  .wrapperbox .box {
    flex: 1 1 50%;
  }
}
@media (max-width: 600px) {
  .wrapperbox .box {
    flex: 0 0 50%;
    aspect-ratio: 4 / 3; /* isto kot zgoraj – za doslednost */
  }
}

.wrapper {
  flex-direction: column;
}
@media (min-width: 768px) {
  .wrapper {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  .Pisitenam .vizitka,
  .Pisitenam .arrow,
  .Pisitenam .email {
    position: static;
    transform: none;
    margin: 2rem auto;
    text-align: center;
  }
  .Pisitenam .email {
    font-size: var(--p-fs);
  }
}

.navbar ul.visible {
  display: flex;
}
@media (max-width: 768px) {
  .navbar ul {
    display: none;
  }
  .navbar ul.visible {
    display: flex;
    flex-direction: column;
  }
}

.wrapperbox .box h3 { font-size: var(--h2-fs); }
.wrapperbox .box p  { font-size: var(--p-fs); }

@media (max-width: 1024px) {
  .wrapperbox .rowbox:last-child .box:last-child {
    flex: 1 1 100%;
  }
}

#Kakopomagamo {
  scroll-margin-top: 6rem;
  padding-top: 6rem;
}

@media (max-width: 1024px) {
  .wrapperbox .rowbox:last-child .box {
    flex: 1 1 50%;
  }
  .wrapperbox .rowbox:last-child .box:last-child {
    flex: 1 1 100%;
  }
}

.Pisitenam .email a {
  font-size: clamp(2rem, 10vw, 10rem);
}

@media (max-width: 768px) {
  .wrapperbox .box {
    flex: 1 1 50%;
  }
  .wrapperbox .rowbox:last-child .box:last-child {
    flex: 1 1 100%;
  }
}
@media (max-width: 480px) {
  .wrapperbox .box {
    flex: 0 0 50%;
    aspect-ratio: 4 / 3; /* ohrani 2 v vrstici tudi pod 480px */
  }
}

@media (max-width: 1700px) {
  .Pisitenam .arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .Pisitenam h2 {
    line-height: 1.2;
  }
}

@media (max-width: 768px) {
  .Kakopomagamo h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
}

@media (max-width: 768px) {
  .ZakajKdosmo { margin-bottom: 4rem; }
}

@media (max-width: 400px) {
  .wrapperbox .box {
    flex: 0 0 100%;
    aspect-ratio: auto;
  }
}

@media (max-width: 600px) {
  .wrapperbox .rowbox {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .wrapperbox .box {
    aspect-ratio: auto !important;
    min-height: clamp(220px, 48vw, 420px);
    flex: initial !important;
  }

  .wrapperbox .rowbox:last-child .box:last-child {
    grid-column: span 2;
  }

  .wrapperbox .box p {
    hyphens: auto;
    word-break: break-word;
  }
}

@media (max-width: 400px) {
  .wrapperbox .rowbox { grid-template-columns: repeat(2, 1fr); }
  .wrapperbox .box { min-height: clamp(240px, 58vw, 460px); }
}


@media (max-width: 1024px) {
  .home-slika {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
  }
  .logo-container {
    position: static !important;
    width: 62% !important;
    max-width: 240px !important;
    margin: 0 auto !important;
    transform: none !important;
  }
  .logo-container .logo {
    width: 100%;
    height: auto;
    image-rendering: auto;
  }
}


@media (max-width: 600px) {
  .logo-container {
    width: 58% !important;
    max-width: 220px !important;
  }
}