/* GLOBAL */
main {
  margin: -10vh 5vw 10vh 5vw;
}

.section-title {
  width: max-content;
  margin: 5vh auto;
  padding: 0 5%;
  border-bottom: 1px solid rgb(167, 167, 167);
}

/* GRID LAYOUT */
.main-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  height: auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 20px;
}

.news-item.wide {
  grid-column: span 2;
  background-color: #fff;
  border-radius: 0;
  box-shadow: none;
}

/* NOVICE BREZ SLIKE */
.news-item {
  text-align: left;
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.news-item hr {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid #ccc;
}

.news-item p {
  font-size: 14px;
  color: #555;
}

/* NOVICE S SLIKO */
.news-item.image-news {
  position: relative;
  color: #fff; 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 800 / 535;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.35);
}

.news-item.image-news h3,
.news-item.image-news p {
  margin: 0;
  padding: 0 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.news-item.image-news hr {
  display: none;
}

/* gumb na slikovnih novicah */
.news-item.image-news .read-more-btn {
  align-self: flex-start;
  margin-top: 10px;
  border: 2px solid #fff;
  color: #fff;
  background-color: transparent;
}

/* osnovni gumb */
.read-more-btn {
  position: relative;
  overflow: hidden;
  margin: 0.5vh 0;
  padding: 0.4rem 1rem;
  border: 2px solid #fa9c33;
  border-radius: 20px;
  background-color: #fff;
  z-index: 1;
  transition: color 0.3s ease;
  cursor: pointer;
}

.read-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: #fa9c33;
  z-index: -1;
  transition: width 0.3s ease;
}

.read-more-btn:hover::before {
  width: 100%;
}

.read-more-btn:hover {
  color: white;
}

/* prepišemo ::before za image-news */
.news-item.image-news .read-more-btn::before {
  background-color: #fff;
}

/* ob hoverju belo ozadje + črn tekst */
.news-item.image-news .read-more-btn:hover {
  color: #000;
}

/* DESNI SIDEBAR */
.sidebar {
  background-color: #fff;
  padding: 20px 0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.link-item {
  padding: 15px 0;
  border-radius: 8px;
}

.link-item a {
  text-decoration: none;
  font-weight: 600;
  display: block;
}

.link-item h3 {
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  color: #fa9c33;
  border-bottom: .5px solid #fa9c33;
  padding: 5px 0;
}

#itm-2 {
  background-color: #ffe2b3;
  padding: 20px;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#itm-2 ul {
  background-color: #fff;
  margin: 0;
  padding: 15px 20px;
  list-style: none;
  position: relative;
  top: 4vh;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.link-item li a {
  color: #555;
  font-weight: 100;
}

.link-item li a:hover {
  color: black;
  text-decoration: underline;
  font-weight: 200;
}

/* FILLER GRID */
.filler-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5vw;
  padding: 10vh 0;
}

.filler-item {
  position: relative;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: left;
  color: #333;
  height: auto;
}

.gallery-wrapper {
  aspect-ratio: 800 / 535;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: auto;
  position: relative;
  top: -5vh;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.more-btn {
  position: absolute;
  bottom: 15px;
  left: 15px;
  overflow: hidden;
  padding: 0.4rem 1.2rem;
  border: 2px solid #a3ce73;
  border-radius: 20px;
  background-color: #a4ce739e;
  z-index: 1;
  transition: color 0.3s ease;
  cursor: pointer;
  color: #333;
}

.more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: #a3ce73;
  z-index: -1;
  transition: width 0.3s ease;
}

.more-btn:hover::before {
  width: 100%;
}

.more-btn:hover {
  color: white;
}

/* PAST GRID */
.past-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 20px;
}

.past-item {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  font-weight: 500;
}

/* PAGINATION */
.pagination {
  text-align: center;
  margin-bottom: 2rem;
}

.pagination button {
  margin: 0 5px;
  padding: 8px 12px;
  border: none;
  background-color: #fa9c33;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.pagination button.active {
  background-color: #333;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  main {
    margin: 5vh 5vw;
  }

  .main-grid {
    display: flex;
    flex-direction: column;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-item.wide {
    grid-column: span 1;
  }

  .filler-grid {
    grid-template-columns: 1fr;
    padding: 5vh 0;
  }

  .past-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
  }

  .gallery-wrapper {
    top: 0;
    aspect-ratio: auto;
    height: 250px;
  }

  .gallery-image {
    height: 100%;
  }

  .section-title {
    font-size: 1.4rem;
    padding: 0 2vw;
    text-align: center;
  }

  .link-item h3 {
    font-size: 1rem;
  }

  .read-more-btn, .more-btn {
    width: 100%;
    text-align: center;
  }

  .filler-item {
    position: relative;
    padding-bottom: 4rem;
  }

  .more-btn {
    position: static;
    margin-top: 1rem;
    display: block;
    width: 100%;
    text-align: center;
  }
}

.big-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  height: 50px;
  width: 50px;
  border: 1px solid black;
}
