@font-face {
  font-family: "diagram";
  src: url("https://devflatdesign.org/wp-content/uploads/2026/02/Diagramm-Regular.ttf");
}

.flat-related-card  {
  position: relative;
  overflow: hidden;
}

.flat-related-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 15px;
}

.flat-related-card__link {
  position: relative;
  display: block;
  text-decoration: none;
  color: #FFFFFF;
  font-family: "diagram";
}

.flat-related-card__link:hover {
  color: #FFFFFF;
}

.flat-related-card__media {
  z-index: 1;
  background: black;
  overflow: hidden;
}

.flat-related-card__media img {
  width: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 400ms ease-in-out, opacity 400ms ease-in-out;
  will-change: transform, opacity;
}

.flat-related-card__link:hover .flat-related-card__media img {
  transform: scale(1.1);
  opacity: 0.9;
}

.flat-related-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 2;
  padding: 32px;
}

.flat-related-card__title {
  margin: 0 0 16px;
  max-width: 259px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.flat-related-card__text {
  max-width: 331px;
  font-size: 16px;
  line-height: 1.6;
}

.flat-related-card__arrow {
  width: 90px;
  height: 70px;
  position: absolute;
  right: 32px;
  bottom: 40px;
  font-size: 72px;
  line-height: 1;
  overflow: hidden;
  z-index: 3;
}

.arrow {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.arrow svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 82px;
  height: 82px;
  transform: translateX(0) translateY(-50%);
  opacity: 1;
  transition: transform 700ms ease, opacity 700ms ease;
  will-change: transform, opacity;
  color: #fff;
  display: block;
}

.arrow_two svg {
  opacity: 1;
  transform: translateX(0) translateY(-50%);
}

.arrow_one svg {
  opacity: 0;
  transform: translateX(-140%) translateY(-50%);
}

.card-carosel.is-animating .arrow_two svg {
  transform: translateX(140%) translateY(-50%);
  opacity: 0;
}

.card-carosel.is-animating .arrow_one svg {
  transform: translateX(0) translateY(-50%);
  opacity: 1;
}

.card-carosel.is-resetting .arrow svg {
  transition: none !important;
}

@media (max-width: 1024px) {
  .flat-related-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .flat-related-cards {
    grid-template-columns: 1fr;
  }

  .flat-related-card__link {
    min-height: 520px;
  }

  .flat-related-card__content {
    padding: 24px;
  }

  .flat-related-card__title {
    font-size: 40px;
    max-width: 240px;
  }

  .flat-related-card__arrow {
    right: 24px;
    bottom: 30px;
    font-size: 54px;
    width: 54px;
    height: 54px;
  }
}



/* material-cards */

.flat-materijal-cards{
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.flat-materijal-card{
  min-width: 0;
}

.flat-materijal-card__link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.flat-related-card__media {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.flat-materoal-card__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.flat-related-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.35s ease;
  pointer-events: none;
}

.flat-materijal-card__link:hover .flat-related-card__overlay {
  background: rgba(0,0,0,0.1);
}

.flat-materijal-card__link:hover img {
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .flat-materijal-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .flat-materijal-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .flat-materijal-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
}
/* FAQ STYLE */

.flat-faq-item{
  border-bottom:1px solid black;
}

.flat-faq-question{
  color:black !important;
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 0 !important; 
  font-size:16px;
  font-weight:600;
  background:none !important;
  border:none;
  cursor:pointer;
}

.flat-faq-arrow{
  width:25px;
}

/* SVG animacija */

.faq-flat-arrow-svg{
  color:black;
  transition: transform 600ms ease;
  transform: rotate(90deg); /* strelica dole */
}

.flat-faq-item.active .faq-flat-arrow-svg{
  transform: rotate(-90deg); /* strelica gore */
}

.flat-faq-answer{
  color:black !important;
  max-height:0;
  overflow:hidden;
  transition:max-height 600ms ease, padding-bottom 600ms ease;
}

.flat-faq-answer p{
  margin:0 0 15px;
}

.flat-faq-item.active .flat-faq-answer{
  max-height:300px;
  padding-bottom: 20px;
}


/* SingleMaterialCard */
.flat-material-gallery {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-height: 520px;
  gap: 10px;
}

.flat-material-gallery__main {
  flex: 0 0 550px;
  max-width: 550px;
}

.flat-material-gallery__thumbs {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  height: 550px;
  max-height: 520px;
  overflow: hidden;
}

.flat-material-gallery__thumbs img {
  width: 100px;
}

@media (max-width: 1500px) {
  .flat-material-gallery__thumbs {
    height: 450px;
    max-height: 420px;
    overflow: hidden;
  }

  .flat-material-gallery__thumbs img {
    width: 80px;
  }

  .flat-material-gallery__main {
    max-width: 520px;
    overflow: hidden;
  }
}

/* TABLET + MOBILE */
@media (max-width: 1024px) {
  
  .flat-material-gallery {
    display: flex;
    flex-direction: column;
    max-height: 820px;
    gap: 12px;
  }

  .flat-material-gallery__main {
    width: 80%;
    order: 1;
    max-width: none;
    flex: 0 0 auto;
  }

  .flat-material-gallery__main .flat-main-image,
  .flat-main-image {
    display: block;
    width: 100%;
    height: auto;
  }

  .flat-material-gallery__thumbs {
    flex-direction: row;
    order: 2;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
    height: auto;
    max-height: none;
    align-content: normal;
  }

  .flat-material-gallery__thumbs img,
  .flat-material-gallery__thumbs .flat-gallery-thumb {
    flex: 0 0 auto;
    width: 94px;
    height: 94px;
    object-fit: cover;
    cursor: pointer;
  }
}

@media (max-width: 767px) {
    .flat-material-gallery__main {
    width: 100%;
   
  }
  .flat-material-gallery {
    gap: 25px;
  }

  .flat-material-gallery__thumbs {
    gap: 8px;
  }

  .flat-material-gallery__thumbs img,
  .flat-material-gallery__thumbs .flat-gallery-thumb {
    width: 78px;
    height: 78px;
  }
}
/*single proizvodi card*/

@media (max-width: 767px) {
    .dargranit-product-variables{
        justify-content: space-around;
     width: 100%;
     gap: 0px 25px;
    }

.dargranit-product-variable__inner {
  width: 60px !important;
  height: 60px !important;
}

.dargranit-product-variable__img {
  width: 60px !important;
  height: 60px !important;
}
}

.dargranit-product-variables {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 0px 12px;
  justify-content: start;
  align-content: start;
}

.dargranit-product-variable:hover,
.dargranit-product-variable.is-active {
  border-color: #111;
}

.dargranit-product-variable {
  padding: 0 !important;
  margin: 18px 0 0 !important;
  border: 1px solid #d8d8d8 !important;
  border-radius: 50% !important;
  
  position: relative !important;
  display: block !important;
  overflow: visible !important;
}

.dargranit-product-variable__inner {
  width: 52px;
  height: 52px;
  display: block !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}

.dargranit-product-variable__img {
  display: block !important;
  width: 52px;
  height: 52px;
  object-fit: cover !important;
  background: blue !important;
}

.dargranit-product-variable__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dargranit-product-variable__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #111;
  transform: translateX(-50%) rotate(45deg);
}

.dargranit-product-variable:hover .dargranit-product-variable__tooltip,
.dargranit-product-variable:focus-visible .dargranit-product-variable__tooltip {
  opacity: 1;
  visibility: visible;
}

.dargranit-product-material-gallery {
  display: none;
}

.dargranit-product-material-gallery.is-active {
  display: block;
}

/*related materijali*/

.flat-related-materials-section {
  width: 100%;
}

.flat-related-materials-heading {
  margin: 0 0 24px;
}

.flat-related-materials-top {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.flat-related-arrow {
  width: 48px;
  height: 48px;
  border: none !important;
  background-color: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.flat-related-arrow svg {
  width: 82px;
  height: 82px;
  display: block;
  flex: 0 0 auto;
}
.flat-related-arrow--prev {
  margin-right: 20px;
}


.flat-related-arrow:hover {
  background: #111;
  color: #fff;
}

.flat-related-materials-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.flat-related-materials-carousel::-webkit-scrollbar {
  display: none;
}

.flat-related-material-card {
  flex: 0 0 calc((100% - 40px) / 2.35);
  scroll-snap-align: start;
}

.flat-related-material-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.flat-related-material-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 4;
  overflow: hidden;
}

.flat-related-material-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flat-related-material-title {
  margin: 12px 0 0;
  font-size: 28px;
  line-height: 1.3;
}

/* 1440+ */
@media (min-width: 1440px) {
  .flat-related-material-card {
    flex: 0 0 calc((100% - 40px) / 2.35);
  }
}

/* desktop/laptop */
@media (min-width: 1025px) and (max-width: 1439px) {
  .flat-related-material-card {
    flex: 0 0 calc((100% - 40px) / 2.35);
  }
}

/* tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .flat-related-material-card {
    flex: 0 0 calc((100% - 20px) / 2.15);
  }

  .flat-related-material-title {
    font-size: 16px;
  }
}

/* mobile */
@media (max-width: 767px) {
  .flat-related-material-card {
    flex: 0 0 82%;
  }

  .flat-related-material-title {
    font-size: 15px;
  }

  .flat-related-materials-top {
    display: none;
  }
}

/* materijali projekta na single projekti */
.flat-related-two-col {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.flat-related-two-col__item {
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
}

.flat-related-two-col__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.flat-related-two-col__image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.flat-related-two-col__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flat-related-two-col__title {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #fff;
}

@media (max-width: 767px) {
  .flat-related-two-col {
    gap: 12px;
  }

  .flat-related-two-col__title {
    font-size: 14px;
    left: 12px;
    bottom: 12px;
  }
}