/* ===== RESET STILOVA ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* Push footer down */
}

/* ===== VARIJABLE ===== */
:root {
  --primary-color: #CD853F;
  --accent-color: #CD853F;
  --bg-color: #fcf4dc;
  --text-color: #000000;
  --card-bg: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.3s ease;
  --font-main: 'Segoe UI', sans-serif;
  --btn-bg: linear-gradient(145deg, #d18d8d, #e73737);
  --btn-hover-bg: var(--accent-color);
  --filter-bg: #fce9b2;
  --filter-border: #ff0000;
}

/* ===== OSNOVNI STILOVI ===== */
body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 60px; /* desktop */
  background-color: #DDB67D;
  padding-top: 1.5rem;
  overflow-y: auto;  /* ovo je ključno */
  overflow-x: hidden;
  box-sizing: border-box;
  transition: width var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar:hover {
  width: 200px;
}
.sidebar img {
  margin-bottom: auto; /* push the ul down */
  padding-top: 1.5rem;
  display: block;
  width: 60px;
  margin: 0 auto 1.5rem;
  transition: transform var(--transition);
  transform-origin: center;
}
.sidebar:hover img {
  transform: scale(3);
}
.sidebar ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 1rem;
  transform: translateY(-15%);
}

.sidebar ul li {
  padding: 0.8rem 1rem;
  white-space: nowrap;
  display: flex;
  align-items: center;   /* vertical centering */
  justify-content: center; /* horizontal centering */
}

.sidebar ul li a {
  display: block;
  color: #fff;
  font-size: 1.3rem;
  opacity: 1;  /* make sure they're visible */
  pointer-events: auto;
  text-decoration: none;
  transition: opacity var(--transition);
  text-align: center;  /* center text inside anchor */
  width: 100%;
}
.sidebar:not(:hover) ul li a {
  opacity: 0;
  pointer-events: none;
}
.sidebar ul li a.active {
  font-weight: 600;
  text-decoration: underline;
}
.sidebar ul li a {
  opacity: 1;
  pointer-events: auto;
}

/* ===== SADRŽAJ ===== */
.main-content {
  margin-left: 60px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: margin-left var(--transition);
}
.sidebar:hover ~ .main-content {
  margin-left: 200px;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(120deg, var(--accent-color), var(--primary-color));
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.hero p {
  font-size: 1rem;
  font-weight: 500;
}

/* ===== DUGME ZA TAGOVE ===== */
#toggleTagsBtn {
  background: var(--btn-bg);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46,125,50,0.25);
  transition: background var(--transition), transform var(--transition);
  margin-bottom: 1rem;
}
#toggleTagsBtn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-2px) scale(1.02);
}
#toggleTagsBtn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(46,125,50,0.2);
}

/* ===== FILTER FORMA ===== */
.filter-form {
  background: var(--filter-bg);
  border: 1px solid var(--filter-border);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: none;
  transition: opacity var(--transition);
}
.filter-form.show {
  display: block;
  opacity: 1;
}
.filter-form h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-tags input[type="checkbox"] {
  display: none;
  color: purple
}
.filter-tags label {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background-color: #efdddd;
  border: 1px solid #663636;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-size: 0.9rem;
}
.filter-tags input[type="checkbox"]:checked + label {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  font-weight: bold;
  box-shadow: 0 0 0 2px rgba(129,199,132,0.3);
}
.filter-tags label:hover {
  background-color: #ffffff;
}
.filter-submit {
  margin-top: 1rem;
}
.filter-submit button {
  background: var(--btn-bg);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.filter-submit button:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-1px);
}

/* ===== SEKCIJSKI NASLOVI ===== */
h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* ===== NAJSKUPLJE JELO ===== */
section[style*="background: #fff4e6"] {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.refresh-button {
  background: var(--btn-bg);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
/* ===== KARTICE ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  width: 100%;
}
/* ===== KARTICE ===== */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 280px;
  min-height: 280px;
  position: relative; /* Add this for absolute positioning if needed */
}
/* ===== EXPANDABLE INGREDIENTS ===== */
.ingredients-container {
  position: relative;
  max-height: 3.6em; /* Approximately 2 lines of text */
  overflow: hidden;
  transition: max-height var(--transition);
  line-height: 1.4;
}

.ingredients-container.expanded {
  max-height: none;
}

.ingredients-toggle .arrow {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}



.ingredients-wrapper.open .ingredients-toggle .arrow {
  transform: rotate(90deg);
}


/* Ingredients wrapper */
.ingredients-wrapper {
  position: relative;
  margin: 0.5rem 0;
  line-height: 1.4; /* Set consistent line height */
}

/* Ingredients preview - strictly 2 lines */
.ingredients-preview {
  font-size: 0.9rem;
  line-height: 1.4em; /* Must match parent line-height */
  height: 2.8em; /* Exactly 2 lines (1.4 x 2) */
  overflow: hidden;
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
}

/* WebKit browsers (Chrome, Safari) - primary method */
.ingredients-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Firefox fallback - more precise gradient */
@supports not (-webkit-line-clamp: 2) {
  .ingredients-preview {
    display: block;
  }
  .ingredients-preview::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30%;
    height: 1.4em;
    background: linear-gradient(to right, rgba(235, 221, 181, 0), var(--card-bg) 60%);
  }
}

/* Dugme će se prikazati samo ako je potrebno */
.ingredients-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0;
  display: none; /* Početno sakriveno */
}

.ingredients-toggle.show {
  display: inline-block; /* Prikaži samo ako je potrebno */
}

/* Ostali CSS za popup ostaje isti kao u prethodnom odgovoru */
.ingredients-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ingredients-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  background: rgb(171, 93, 62);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.popup-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.popup-content p {
  white-space: pre-line;
}
.ingredients-toggle.active .arrow {
  transform: rotate(90deg);
}


/* Add this new class to push tags to bottom */
.dish-tags {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  background-color: #000000;
  border-radius: 12px;
  padding: 4px 8px;
  display: inline-block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.card h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
}
.card p {
  font-size: 0.95rem;
  line-height: 1.2;
}
.card h4 {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

/* ===== VARIJANTE ===== */
.variant-selector {
  position: relative;
}
.variant-toggle {
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.variant-toggle .arrow {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}
.variant-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: absolute;
  z-index: 10;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
}
.variant-list li {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.variant-list li:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}
.variant-selector.open .variant-list {
  display: block;
}
.variant-selector.open .variant-toggle .arrow {
  transform: rotate(90deg);
}


/* Card improvements */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 250px; /* changed from height to min-height */
  position: relative;
}



.ingredients-list {
  display: none;
  padding: 0.8rem 0;
  position: relative;
  z-index: 1;
}

.ingredients-wrapper.open .ingredients-list {
  display: block;
}

/* Footer fixes */
footer {
  background-color: var(--bg-color);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 1rem; /* reduced from 1.3rem */
  color: #000000;
  margin-top: 2rem;
  width: 100%;
}

/* ===== RESPONSIVNOST ===== */
/* Dugme za otvaranje sidebar-a (hamburger) */
.sidebar-toggle-label {
  position: fixed;
  top: 1rem;
  left: 1rem;
  font-size: 2rem;
  z-index: 1100; /* veći z-index da je iznad svega */
  cursor: pointer;
  color: #000;
  display: none; /* sakriveno na desktopu */
  user-select: none;
}

/* Dugme za zatvaranje sidebar-a (x) */
.sidebar-close-label {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  display: none;
  user-select: none;
}

/* Mobilni prikaz */
@media (max-width: 768px) {
  /* Prikaz hamburger dugmeta */
  .sidebar-toggle-label {
    display: block;
  }

  /* Prikaz dugmeta za zatvaranje u sidebar-u */
  .sidebar-close-label {
    z-index: 1110;
    cursor: pointer;
    user-select: none;
  }
  /* Sakriven sidebar levo van ekrana */
  .sidebar {
    overflow-x: hidden;
    box-sizing: border-box;
      pointer-events: auto; /* osiguraj da sidebar prima klikove */
  z-index: 1100; /* da je iznad hamburgera */
    will-change: transform;
    left: 0;
    transform: translateX(-100%);
    transition: transform var(--transition);
    position: fixed; /* fiksiran da bude preko svega */
    top: 0;
    height: 100%;
    width: 100%; /* preko celog ekrana */
    background-color: rgba(0, 0, 0, 0.9);
    padding: 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto; /* da može skrolovati ako je sadržaj veći */
  }

  /* Kada je checkbox čekiran, sidebar se pomera na ekran */
  #sidebarToggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  /* Linkovi u sidebar-u na mobilnom su puni širine, veći font i bela boja */
  .sidebar ul {
    max-width: 100%;
    box-sizing: border-box;
    transform: none !important; /* ukloni translate sa desktop verzije */
    align-items: flex-start;
    width: 100%;
    padding-left: 0;
    margin-top: 3rem; /* razmak od vrha za close dugme */
  }

  .sidebar ul li {
    width: 100%;
    padding: 1rem 0;
  }

  .sidebar ul li a {
    opacity: 1 !important;
    font-size: 1.5rem;
    color: #fff;
    text-align: left;
      pointer-events: auto;
  position: relative;
  z-index: 1101;
  }

  /* Sakrij marginu glavnog sadržaja da zauzima ceo ekran */
  .main-content {
    margin-left: 0 !important;
  }

  /* Onemogući hover efekat za desktop sidebar širinu */
  .sidebar:hover {
    width: 60px !important;
  }
}

.about-content {
  max-width: 800px; /* Adjust this value as needed */
  margin: 0 auto; /* This centers the content */
  padding: 0 1rem; /* Adds some padding on the sides */
}

.about-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-content ul {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.about-content p {
  margin-bottom: 1rem;
}
.bold-large {
  font-weight: bold;
  font-size: 1.3em; /* or whatever size you want */
}/* Restaurant Cards */
/* ===== RESTAURANT IMAGE SLIDER ===== */
.restaurants-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 2rem;
  width: 100%;
}

.restaurant-card {
    height: 100%;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover {
  transform: translateY(-5px);
}

/* Image Slider Container */
.image-slider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.slider-container {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slider-image {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Navigation Arrows */
.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 10px;
  box-sizing: border-box;
  z-index: 2;
}

.slider-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Dots Navigation */
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background var(--transition);
}

.slider-dot.active {
  background: white;
}

/* Restaurant Info */
.restaurant-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.restaurant-info h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.restaurant-contact {
  margin-bottom: 1rem;
  flex-grow: 1;
}

.restaurant-contact p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
}

.restaurant-social {
  display: flex;
  padding-top: 1rem;
  gap: 1rem;
  margin-top: auto;
}

.restaurant-social a {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: color var(--transition);
}

.restaurant-social a:hover {
  color: var(--accent-color);
}

/* Fallback for no images */
.no-images {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .restaurants-container {
    grid-template-columns: 1fr;
      align-items: stretch;
  }
  
  .image-slider {
    height: 250px;
  }
}