/* =============== RESET =============== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

a {
  color: white;
  text-decoration: none;
}

a:hover {
  color: #ffcc66;
}

/* =============== OSNOVNO =============== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #222;
  line-height: 1.6;
}

/* =============== HEADER + NAV =============== */
header {
  background-color: #003366;
  color: white;
  padding-bottom: 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #003366;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #66ccff;
}

#hamburger {
  display: none;
}


@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  nav-menu ul {
    flex-direction: column;
    gap: 10px;
  }
}


@media (max-width: 768px) {

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #003366;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 10px 0;
  }

  .nav-menu.active {
    display: block;

  }

  #hamburger {
    display: block;
    font-size: 24px;
    background: white;
    border: none;
    cursor: pointer;
    align-content: end;

  }

  .logo.hidden {
    display: none;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 10px;
  }

  .nav-menu li a {
    display: block;
    padding: 10px 20px;
  }
}

.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  background: linear-gradient(90deg, #004080, #007acc);
}

@media (max-width: 768px) {
  .banner {
    flex-direction: column;
  }
}

.welcome {
  font-size: 2em;
  font-weight: bold;
}

.banner-content {
  font-size: 1.5em;
  opacity: 0;
  width: 50%;
  transform: translateY(30px);
  animation: prikazi 1.5s ease-in forwards;
  animation-delay: 0,5s;
}

@keyframes prikazi {
  from{
    opacity: 0;
    transform: translateY(30px);
  }
  to{
    opacity:1;
    transform: translateY(0);
  }
}



@media (max-width: 768px) {
  .banner-content {
    font-size: 1em;
  }
}

main {
  flex: 1;
  padding: 20px;
  background-color: #f9f9f9a2;
  text-align: center;
}


footer {
  background-color: #003366;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  flex-wrap: wrap;
}

.footer-left p {
  margin: 3px 0;
}

.footer-right a {
  color: #66ccff;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s ease;
}

.footer-right a:hover {
  color: white;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer-right a {
    margin: 0 10px;
  }
}

@media (max-width: 360px) {
  footer {
    flex-direction: column-reverse;
  }

  .footer-right {
    display: flex;
    flex-direction: column;
  }

}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .info-row {
    flex-direction: column;
  }
}

.box {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.box.about {
  flex: 0 1 45%;
}

.box.link {
  flex: 0 1 45%;
}

.box.large {
  flex: 0 1 50%;
}

.box.mid {
  flex: 0 1 40%;
}

.box1 {
  background-color: #004080;
  height: 25%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.box11 img {
  width: 10%;
  height: 10%;
  object-fit: contain;
  display: block;
}

.box4 a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background-color: #004080;
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
}


.box.about img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.box.link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-fit: contain;
}

.box11 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.box11 img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}


.box2 img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: cover;
}

.box3,
.box4 {
  width: 100%;
  word-wrap: break-word;
}

.box4 a {
  display: inline-block;
  margin-top: 10px;
}


.box.large {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vesti-sadrzaj {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

}

@media (max-width: 360px) {
  .vesti-sadrzaj {
    flex-direction: column;
    align-items: center;
  }
}

.box.large a {
  display: inline-block;
  width: auto;
  color: #004080;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
}

.box.mid a {
  display: inline-block;
  width: auto;
  color: #004080;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
}

.vesti-sadrzaj img {
  max-width: 200px;
  width: 100%;
  height: auto;

}

/* .slideshow {
  position: relative;
  width: 400px;
  height: 250px;
  overflow: hidden;
} */

/* .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: fade 9s infinite;
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 3s; }
.slide:nth-child(3) { animation-delay: 6s; }
.slide:nth-child(4) { animation-delay: 9s; }

@keyframes fade {
  0%, 33%   { opacity: 1; }
  33.1%, 100% { opacity: 0; }
} */


.box.mid{
  animation-name: pozadina;
  animation-duration: 5s;
  animation-delay: 1s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.obavestenja{
  /* animation-name: tekst; */
  animation-duration: 5s;
  animation-delay: 1s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes pozadina {
  from {background-color: #007acc;}
  to {background-color: #737678;}
}

@keyframes tekst {
  from {font-size: 0.75em;}
  to {font-size: 1.5em;}
}

/* =============== O nama =============== */

.container-nama {
  background-color: #bacbdb;
  margin-left: 15%;
  margin-right: 15%;
  padding: 50px;
  gap: 20px;

}



.nama-img {
  padding: 50px;
  background-color: #bacbdb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 10px;
  justify-content: center;
}


@media (max-width: 768px) {
  .nama-img {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
}

@media (max-width: 360px) {
  .container-nama {
    margin-left: 0;
    margin-right: 0;
  }

  .nama-img {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(6, auto);
  }
}


.nama-img img {
  width: 100%;
  height: auto;
  display: block;
}


.nama-img img:hover {
  transform: scale(1.8);
  z-index: 2;
}




/* =============== Servisi=============== */
.servisi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: 20px;
  padding: 10px;
}

@media (max-width: 768px) {
  .servisi-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(8, auto);
  }
}



.servisi-grid a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background-color: #004080;
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
}

.servisi-kartica {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background-color: #66ccff;
  border: 2px solid #222;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: white;
}

.servisi-kartica img {
  width: 100%;
  max-width: 200px;
  height: 100%;
  max-height: 300px;
}

@media (max-width: 360px) {
  .servisi-grid h2 {
    font-size: 1em;
  }

  .servisi-kartica img {
    max-width: 100px;
  }
}


/* =============== vesti =============== */

.vesti-main {
  background-color: #eef3f8;
}

.sadrzaj {
  display: flex;
  gap: 20px;
  padding: 20px;
}

@media (max-width: 768px) {
  .sadrzaj {
    flex-direction: column;
  }
}

.posts {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.obavestenja {
  flex: 1;
  background-color: #040a5f;
  padding: 20px;
  color: white;
  border-radius: 8px;
}

.post {
  background-color: #004080;
  padding: 15px;
  border-radius: 8px;
  color: white;
}

.article-header {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.naslovna-slika img {
  width: 200px;
  height: auto;
  border-radius: 8px;
}

.slike_post {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.slike_post img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: cover;
}

.slike_post img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slike_post img:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

article#art1.feat-img {
  background-image: url('../images/skola.jpg');
  background-size: cover;
  background-position: center;
}

#content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5%;
}

#posts {
  width: 70%;
}

.obavestenja {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
}

.obavestenja h3 {
  margin-bottom: 15px;
  color: #003366;
}

.obavestenja-sadrzaj {
  background-color: #f3f6fa;
  border: 1px solid #d9e2ef;
  border-radius: 5px;
  padding: 10px 15px;
  margin-bottom: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.obavestenja-sadrzaj:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.obavestenja-sadrzaj h4 {
  margin: 0;
  color: #004080;
  font-size: 1rem;
}

.obavestenja-sadrzaj p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: #666;
}


@media (max-width: 360px) {
  .vesti-main {
    margin-left: 0;
    margin-right: 0;
  }

  .sadrzaj {
    padding: 0;
  }

  .article-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .slike_post {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(4, auto);
  }

  .post p{
    font-size: 0.75em;
  }
  .formatiranje {

    text-align: left;      /* da ne bude justify */
    white-space: pre-wrap; /* zadrži format ali dozvoli lom reda */
    overflow-wrap: break-word;

}
}

.formatiranje {

    text-align: left;      /* da ne bude justify */
    white-space: pre-wrap; /* zadrži format ali dozvoli lom reda */
    overflow-wrap: break-word;

}

/* =============== Kontakt =============== */

.kontakt-raspored {
  display: flex;
  flex-direction: row;
}

.kontakt-struktura {
  display: flex;
  flex: 5;
  flex-direction: column;
  margin-bottom: 40px;
}


.kontakt-struktura>* {
  margin-bottom: 40px;
}


.kontakt-struktura a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background-color: #004080;
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
}

.osnovne-informacije {
  font-size: 32px;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
  border: 10px solid #003366;
  border-radius: 15px;
  margin: 0 auto;
  background-color: #f9f9f9;
}

.moja-forma {
  font-size: 18px;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;
  border: 10px solid #003366;
  border-radius: 15px;
  margin: 0 auto;
  background-color: #f9f9f9;
}

.moja-forma input,
.moja-forma button {
  font-size: 16px;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.moja-forma input[type="submit"],
.moja-forma input[type="reset"] {
  width: auto;
  padding: 10px 20px;
  margin-right: 10px;
  cursor: pointer;
}



.tabela {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tabela a {
  display: inline-block;
  width: auto;
  padding: 8px 15px;
  background-color: #004080;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  text-align: center;
}

.side-nav {
  flex: 1;
  background-color: #225170;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  height: fit-content;
  max-height: calc(100vh - 1rem);
  overflow-y: auto;
  width: 240px;
}

.kontakt-struktura-section {
  display: none;
}

.kontakt-struktura-section.active {
  display: block;
}

@media (max-width: 768px) {
  .kontakt-raspored {
    display: flex;
    flex-direction: column;
  }

  .kontakt-raspored img {
    display: none;
  }
}

@media (max-width: 360px) {
  .osnovne-informacije{
    font-size: 24px;
  }

  .forma{
    display: flex;
    flex-direction: column;
    max-width: 260px;
  }

  .moja-forma{
    font-size: 12px;
  }
}
/* =============== Nastavnici =============== */

.nastavnici-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, auto);
  gap: 20px;
  padding: 10px;
}

@media (max-width: 768px) {
  .nastavnici-grid {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(15, auto);
  }

}

.nastavnici-grid a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background-color: #004080;
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
}

.nastavnici-kartica {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background-color: #a2dbf8;
  border: 2px solid #222;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: white;
}

.nastavnici-kartica img {
  width: 100%;
  max-width: 200px;
  height: 100%;
  max-height: 300px;
  display: block;
}

@media (max-width: 360px){
  main{
    padding: 0;
  }
  .nastavnici-kartica h2{
    font-size: 1em;
  }
  .nastavnici-kartica p{
    font-size: 0.75em;
  }
}



