/* ==========================================================================
   Home News / Novosti
   ========================================================================== */

.me-home-news {
  margin: 44px 0 56px;
}

.me-home-news .sub-title {
  position: relative;
  margin: 0 0 24px;
  padding: 0 0 14px;
  color: #142033;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.me-home-news .sub-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 86px;
  height: 4px;
  background: #0b63b6;
  border-radius: 999px;
}

.me-home-news > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.me-home-news .item {
  position: relative;
  background: #ffffff;
  border: 1px solid #dfe7f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 36, 64, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.me-home-news .item:hover {
  transform: translateY(-6px);
  border-color: #bfd5ec;
  box-shadow: 0 24px 54px rgba(15, 36, 64, 0.16);
}

.me-home-news .image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e9eef5;
}

.me-home-news .image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 25, 45, 0) 45%,
    rgba(10, 25, 45, 0.28) 100%
  );
  pointer-events: none;
}

.me-home-news .image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.me-home-news .item:hover .image img {
  transform: scale(1.06);
}

.me-home-news .product-name {
  margin: 0;
  padding: 18px 18px 8px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.18;
}

.me-home-news .product-name a {
  color: #0b63b6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.me-home-news .product-name a:hover {
  color: #d62828;
}

.me-home-news .desc {
  padding: 0 18px 22px;
  color: #425466;
  font-size: 15px;
  line-height: 1.6;
}

.me-home-news .desc::after {
  content: "Pročitaj više";
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: #d62828;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.me-home-news .item:hover .desc::after {
  color: #0b63b6;
}

/* Responsive */
@media (max-width: 1100px) {
  .me-home-news > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .me-home-news > div {
    grid-template-columns: 1fr;
  }

  .me-home-news .sub-title {
    font-size: 26px;
  }
}

/* ==========================================================================
   Brands section - static premium grid
   ========================================================================== */


.me-brands-section {
  margin-top: 70px;
}

.me-section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  color: #142033;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.me-section-title:after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: #0b63b6;
  margin: 16px auto 0;
  border-radius: 999px;
}

.me-brands-section {
  margin: 70px 0 64px;
}

.me-brands-section .bx-wrapper,
.me-brands-section .bx-viewport {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 auto !important;
}

/* Hide old bxSlider arrows */
.me-brands-section .bx-controls,
.me-brands-section .bx-controls-direction,
.me-brands-section .bx-prev,
.me-brands-section .bx-next {
  display: none !important;
}

/* Turn old bxslider ul into grid */
.me-brands-section .bxslider {
  width: 100% !important;
  transform: none !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

/* Reset inline bxSlider styles */
.me-brands-section .bxslider .item {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  list-style: none;
}

.me-brands-section .bxslider .item a {
  height: 138px;
  background: #ffffff;
  border: 1px solid #dfe7f0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  box-shadow: 0 12px 30px rgba(15, 36, 64, 0.07);
  transition: all 0.25s ease;
}

.me-brands-section .bxslider .item a:hover {
  transform: translateY(-6px);
  border-color: #bcd5ee;
  box-shadow: 0 22px 46px rgba(15, 36, 64, 0.15);
}

.me-brands-section .bxslider .item img {
  max-width: 78%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: all 0.25s ease;
}

.me-brands-section .bxslider .item a:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.06);
}

@media (max-width: 1200px) {
  .me-brands-section .bxslider {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .me-brands-section .bxslider {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .me-brands-section .bxslider .item a {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .me-brands-section .bxslider {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Before footer MetaSlider + CTA
   ========================================================================== */

.before-footer {
  max-width: 1320px;
  margin: 54px auto 70px;
  padding: 0 24px;
}

.before-footer .widget {
  margin: 0;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #dfe7f0;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 36, 64, 0.1);
}

.before-footer .metaslider,
.before-footer .flexslider,
.before-footer .flex-viewport {
  width: 100% !important;
  max-width: 100% !important;
  height: 170px !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.before-footer .metaslider .slides,
.before-footer .metaslider .slides > li,
.before-footer .metaslider .slides > li > a {
  height: 170px !important;
}

.before-footer .metaslider img {
  display: block !important;
  width: 100% !important;
  height: 170px !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #ffffff !important;
  padding: 24px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* sakrij default navigaciju */
.before-footer .flex-control-nav,
.before-footer .flex-direction-nav {
  display: none !important;
}

/* CTA dugme ispod slidera */
.before-footer .widget::after {
  content: "Pogledajte referentne cene  →";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin-top: 24px;
  background: linear-gradient(135deg, #0b63b6, #0050a8);
  color: #ffffff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 28px rgba(11, 99, 182, 0.22);
}

/* Mobile */
@media (max-width: 768px) {
  .before-footer {
    margin: 36px auto 52px;
    padding: 0 18px;
  }

  .before-footer .widget {
    padding: 18px;
  }

  .before-footer .metaslider,
  .before-footer .flexslider,
  .before-footer .flex-viewport,
  .before-footer .metaslider .slides,
  .before-footer .metaslider .slides > li,
  .before-footer .metaslider .slides > li > a,
  .before-footer .metaslider img {
    height: 110px !important;
  }

  .before-footer .metaslider img {
    padding: 14px !important;
  }

  .before-footer .widget::after {
    min-height: 54px;
    font-size: 13px;
  }
}