h1, h2, h3, h4{
    font-family: "Montserrat", sans-serif;
    font-size: 32px;
}

html, body, #root {
    width: 100%;
    overflow-x: hidden; /* ako je sadržaj širi od ekrana, ne prikazuje horizontalni scroll bar */
    font-family: "Inter", sans-serif;
    margin: 0;
    min-height: 100%;
    background-color:#FAF6EF;
    color:#1A1A1A;
}

.home-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 32px 40px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.navbar-logo {
  height: 70px;
  width: auto;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* stavlja prvi element na lijevu stranu a drugi na desnu stranu */
  padding: 0 30px;
  background-color: #FFFDF9;
  border-bottom: 1px solid #E8DFD0;
}

.navbar ul{
  font-family: "Montserrat", sans-serif;
  display: flex;
  font-weight: 400;
  align-items: center;
  gap: 25px;
}

.navbar ul li{
    list-style: none;
    font-size: 20px;
    font-weight: 500;
}

.navbar h2 a, .navbar ul li a {
  color: #B33A1E;
  text-decoration: none;
}
.navbarLink {
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
} /*background je koje svojstvo animirati, ease je tip animacije, 0.15s je trajanje animacije*/

.navbarLink.active {
  background: #B33A1E;
  color: #FAF6EF;
}

.navbar ul li a:not(.active):hover{/*ako stranica nije aktivna onda se promijeni boja kad se hovera*/
    background: #B33A1E;
    color: #FAF6EF;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/*ZA MOBILNI NAVBAR*/
.navbar .menu {
    display: none;
    position: absolute; 
    top: 0.75rem;
    right: 0.5rem;
    flex-direction: column;
    justify-content: space-between;
    width: 2.25rem;
    height: 2rem;
    gap: 4px;
    margin: 35px 20px 0 0;
}

.navbar .menu span {
    height: 0.4rem;
    width: 100%;
    background-color: #B33A1E;
    border-radius: 0.2rem;
    margin: 0;
}

/*SEARCH BAR*/
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #E8DFD0;
  border-radius: 20px;
  background-color: #FFFDF9;
  margin-top: 20px;
}

.search-input {
  border: none;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #1A1A1A;
  background-color: transparent;
  width: 100%;
}

/*CATEGORY SECTION*/
.category-section {
  margin-top: 48px;
}

.category-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid #B33A1E;
  padding-bottom: 10px;
}

.category-header h2 {
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.category-count {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: #A8998A;
  margin-left: auto;
}

/*RECIPE CARD*/
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /*automatski računa koliko kolona (kartica) stane u grid na temelju minimalne širine kartice (260px) i raspoložive širine grid-a*/
  gap: 20px;
}


.recipe-card-container {
  position: relative;
  background: #FFFDF9;
  border: 1px solid #E8DFD0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  max-width: 260px;
}

.recipe-card-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -8px rgba(61, 90, 69, 0.25);
}

.accent-bar {
  position: absolute;
  top: 0;
  left: 20px;
  width: 28px;
  height: 6px;
  border-radius: 0 0 3px 3px;
}

.recipe-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 18px 18px;
}

.recipe-card-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #F0F0E4; /* fallback dok se slika učita ili ako fali */
}

.recipe-card-title {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 600;
  color: #2B2620;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.recipe-card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #F0F0E4; /* fallback dok se slika učita ili ako fali */
}

.recipe-card-time {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: #8B6F5C;
  margin: 0 0 10px 0;
}

.recipe-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.recipe-card-tag {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  color: #5C6B4F;
  background: #F0F0E4;
  padding: 3px 10px;
  border-radius: 20px;
}

/*CATEGORY PAGE*/
.category-page {
  max-width: 1250px;
  margin: 0 auto;
  padding: 2rem;
  background: #FAF3EB;
}

.category-page-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--category-color, #B33A1E);
  padding-bottom: 10px;
}

.category-page-header h2 {
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  color: #2B2620;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.category-card {
  background: #FFFDF9;
  border: 1px solid #EDE4D6;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.category-card-bar {
  height: 5px;
}

.category-card-content {
  padding: 1.1rem 1rem;
  text-align: center;
}

.category-card-name {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: 16px;
  color: #2B2620;
  margin: 10px 0 4px;
}

.category-card-icon {
  width: 40px;
  height: 40px;
}

.category-card-count {
  font-size: 12px;
  color: #8A7F6E;
  margin: 0;
}

.recipe-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/*RECIPE PAGE*/
.recipe-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 32px 40px; 
}

.recipe-page-header {
  margin-bottom: 20px;
}

.recipe-page-link{
  background: none;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  color: #2B2620;
  border: none;
  gap: 6px;
  margin-bottom: 20px;
  cursor: pointer;
  padding: 0;
}

.recipe-page-image {
  width: 100%;
  height: 420px;
  object-fit: contain; /* zadržava omjer slike i smanjuje je da stane u okvir */
  background-color: #F0F0E4;
  border-radius: 10px;
  display: block;
}

.recipe-title-text {
  display: flex;
  font-family: "Fraunces", serif;
}

.recipe-description {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #2B2620;
  display: flex;
  border-width: 2px 0 2px 0;
  border-style: solid;
  border-color: #EFE7D8;

}

.recipe-description-item {
  margin-right: 50px;
  padding: 20px 0;
  text-align: center;
}


.recipe-details {
  display: flex;
  font-size: 15px;
  padding: 20px 0;
  justify-content: space-between;
}

.recipe-details-item {
  flex: 1;
  margin-right: 20px;
  font-family: "Inter", sans-serif;
}

.recipe-time{
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 600;
}

.recipe-details-item h3{
  font-family: "Fraunces", serif;
  font-size: 24px;
  color: #2B2620;
  font-weight: 600;
  margin-bottom: 20px;
}

.recipe-details-item ol {
  padding-left: 20px;
  margin:0;
}

.recipe-details-item ol li {
  margin: 7px 0;
  line-height: 1.5;
}

.ingredient-group {
  margin-bottom: 20px;
  list-style: none;
}

.ingredient-group h4 {
  font-family: "Fraunces", serif;
  font-size: 20px;
  color: #2B2620;
  margin-bottom: 10px;
}

.ingredient-group ul {
  padding: 0;
  margin: 0;
}

.ingredient-row {
  display: flex;
  justify-content: space-between; /*stavlja prvi element na lijevu stranu a drugi na desnu stranu*/
  padding: 8px;
  border-bottom: 1px solid #EFE7D8;
  list-style: none;
}

@media (max-width: 768px) {
  .navbar .menu {
    display: flex;
  }

  .navbar {
    flex-direction: column;
    align-items: start;
  }

  .navbar ul {
    flex-direction: column;
    width: 100%;
    display: none;
    margin-bottom: 0.25rem;
  }

  .navbar ul.open {
    display: flex;
  }

  .navbar ul li {
    width: 100%;
    text-align: center;
  }

    /*RECIPE PAGE*/
    .recipe-details {
        flex-direction: column;
    }

    .recipe-details-item {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .recipe-details-item:last-child {
        margin-bottom: 0;
    }
}