/* Global font */
body, #sgf-filter, #sgf-grid {
  font-family: 'Roboto', sans-serif;
}

/* Filter bar */
#sgf-filter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

#sgf-search,
#sgf-category {
  flex: 1;
  max-width: 300px;
  padding: 12px 15px;
  font-size: 15px;
  border: 2px solid #003366;
  border-radius: 6px;
  background: #f9f9f9 !important; /* svetlosiva pozadina */
  color: #222 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

  /* ukloni default stil browsera za select */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* shadow efekat da polje lebdi */
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Fokus efekat */
#sgf-search:focus,
#sgf-category:focus {
  border-color: #004080;
  box-shadow: 0 10px 24px rgba(0,64,128,0.4);
  outline: none;
}

/* Strelica za select */
#sgf-category {
  background: #f9f9f9 url("data:image/svg+xml;utf8,<svg fill='%23003366' height='24' viewBox='0 0 24 24' width='24'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
  background-size: 16px;
  padding-right: 30px;
}


/* Grid */
#sgf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0; /* razmak iznad i ispod */
  clear: both;    /* da ne prelazi preko okolnog teksta */
}

/* Item cards */
.sgf-item {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.sgf-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.sgf-item img {
  width: 100%;
  height: 250px;       /* fiksna visina slike */
  object-fit: contain;   /* da se lepo popuni */
  border-radius: 6px;
  margin-bottom: 12px;
}

.sgf-item h3 {
  font-size: 16px;
  margin: 8px 0;
  color: #003366;
}

.sgf-item p {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.sgf-item a {
  margin-top: auto;    /* dugme ide na dno kartice */
  display: inline-block;
  padding: 8px 14px;
  background: #004080;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.sgf-item a:hover {
  background: #001a33;
}

/* Load more button */
#sgf-load-more {
  margin: 30px auto;
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  background: #004080;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#sgf-load-more:hover {
  background: #001a33;
}

 /* Responsive */
@media (max-width: 1024px) {
  #sgf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #sgf-filter {
    flex-direction: column;
    gap: 12px;
  }

  #sgf-search,
  #sgf-category {
    max-width: 100%;
    width: 100%;
  }

  #sgf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sgf-item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  #sgf-filter {
    flex-direction: column;
    gap: 10px;
    position: static; 
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #f9f9f9;
    padding: 10px 12px;
  }

  #sgf-search,
  #sgf-category {
    max-width: 100%;
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
  }

  #sgf-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 120px;      /* razmak od filtera */
    padding-bottom: 50px;  /* stabilan razmak na dnu */
    position: relative;
    z-index: 1;
  }

  .sgf-item img {
    height: 180px;
  }

  .sgf-item h3 {
    font-size: 15px;
  }

  .sgf-item p {
    font-size: 12px;
  }

  .sgf-item a {
    padding: 7px 12px;
    font-size: 14px;
  }

  #sgf-load-more {
    width: 100%;
    font-size: 15px;
    padding: 10px;
  }
  
  .sgf-item img {
    object-fit: contain;
    width: 100%;
    height: 300px !important;
  }
  
}