/* GLOBAL */
* {
  box-sizing: border-box;
}

body:not(#admin) {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f4f4;
  color: #333;
}

body:not(#admin) .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
}

h1 {
  text-align: center;
  color: #007bff;
}

.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
}

/* RECIPE BOX */

.recipe-box {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.recipe-box:hover {
  transform: translateY(-5px);
}

.recipe-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-content h2 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: #333;
}

.recipe-content p {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 10px;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipe-content a {
  align-self: flex-start;
  margin-top: auto;
  color: #fff;
  background: #28a745;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s;
}

.recipe-content a:hover {
  background: #218838;
}

.recipe-box {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.read-more {
  align-self: flex-start;
  margin-top: auto;
  color: #fff;
  background: #28a745;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s;
}

.recipe-box:hover .read-more {
  background: #218838;
}

/* PAGINATION */

.pagination {
  text-align: center;
  margin: 30px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 3px;
  background: #007bff;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s;
}

.pagination a:hover {
  background: #0056b3;
}

.pagination .current {
  background: #6c757d;
}

.pagination .disabled {
  background: #ccc;
  pointer-events: none;
}

/* SINGLE RECIPE */

.single-recipe {
  max-width: 800px;
  margin: 40px auto;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.single-recipe h1 {
  color: #007bff;
  margin-bottom: 10px;
}

.single-recipe .category {
  font-size: 0.95rem;
  color: #6c757d;
  margin-bottom: 20px;
}

.full-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 20px;
}

.single-recipe .description {
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 30px;
  white-space: pre-wrap;
}

.single-recipe .description p {
  margin: 0 0 12px 0;
}

.single-recipe .description ol {
  margin: 0 0 12px 1.5em;
  padding: 0;
}

.single-recipe .description li {
  margin-bottom: 8px;
}

/* BUTTON */

.back-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #007bff;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.back-btn:hover {
  background: #0056b3;
}

/* NAVBAR */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #4CAF50;
  padding: 10px 20px;
  color: white;
  flex-wrap: wrap;
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.navbar .nav-links li {
  display: inline;
}

.navbar .nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
}

.navbar .nav-links a:hover {
  color: #f0f0f0;
}

/* DROPDOWN */

.navbar .dropdown {
  position: relative;
}

.navbar .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #4CAF50;
  border-radius: 5px;
  min-width: 180px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  list-style: none;
  z-index: 1000;
}

.navbar .dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #fff;
}

.navbar .dropdown:hover .dropdown-menu {
  display: block;
}

/* SEARCH */

.search-form {
  text-align: center;
  margin: 20px 0;
}

.search-form input[type="text"] {
  width: 60%;
  max-width: 400px;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 5px;
}

.search-form input[type="text"]:focus {
  border-color: #4CAF50;
}

.search-form button {
  padding: 10px 20px;
  margin-left: 8px;
  font-size: 16px;
  background-color: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.search-form button:hover {
  background-color: #45a049;
}

/* HERO */

.hero {
  position: relative;
  text-align: center;
  color: white;
}

.hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.5);
  padding: 20px 30px;
  border-radius: 8px;
}

/* FOOTER */

.footer {
  background-color: #222;
  color: #eee;
  padding: 15px 0;
  text-align: center;
  font-size: 0.9em;
  margin-top: 40px;
}

.footer a {
  color: #ffd700;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE */

/* TABLET */

@media (max-width: 900px) {

.container,
body:not(#admin) .container {
  grid-template-columns: repeat(2, 1fr);
}

.navbar .nav-links {
  flex-direction: column;
  width: 100%;
  display: none;
}

.navbar .nav-links.active {
  display: flex;
}

.menu-toggle {
  display: block;
}

}

/* TELEFON */

@media (max-width: 600px) {

.container,
body:not(#admin) .container {
  grid-template-columns: 1fr;
  gap: 15px;
  padding: 0 10px;
}

.recipe-box {
  width: 100%;
}

.recipe-box img {
  width: 100%;
  height: auto;
}

.hero img {
  height: 220px;
}

.hero-text {
  width: 90%;
  font-size: 14px;
  padding: 10px;
}

.search-form {
  padding: 0 10px;
}

.search-form input[type="text"],
.search-form button {
  width: 100%;
}

.search-form button {
  margin-top: 10px;
  margin-left: 0;
}

.pagination a,
.pagination span {
  padding: 6px 10px;
  font-size: 14px;
}

}