/* ================================================
   Nowy układ przepisu - nowoczesny design
   ================================================ */

.recipe-hero-image {
  margin-bottom: 25px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.recipe-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
}

@media (min-width: 992px) {
  .recipe-hero-image img {
    max-height: 600px;
  }
}

.recipe-meta-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .recipe-meta-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .recipe-meta-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }
}

.recipe-meta-card {
  background: #ffffff;
  border: 2px solid #f0ebf8;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

@media (min-width: 992px) {
  .recipe-meta-card {
    flex: 1;
    min-width: 200px;
  }
}

.recipe-meta-card:hover {
  border-color: #6f5c93;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 92, 147, 0.15);
}

.recipe-meta-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6f5c93 0%, #8570ac 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-meta-card__icon svg {
  color: #ffffff;
}

.recipe-meta-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.recipe-meta-card__label {
  font-size: 12px;
  color: #6b568f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-meta-card__value {
  font-size: 16px;
  font-weight: 700;
  color: #2d2d2d;
}

.recipe-meta-card__value a {
  color: #6b568f;
  text-decoration: none;
  transition: color 0.2s ease;
}

.recipe-meta-card__value a:hover {
  color: #000000;
}

.recipe-meta-card__value a:not(:last-child):after {
  content: ', ';
}

.recipe-description {
  font-size: 15px;
  line-height: 1.7;
  color: #4a4a4a;
  margin-bottom: 30px;
  padding: 20px;
  background: #fafafa;
  border-radius: 10px;
  border-left: 4px solid #6f5c93;
}

.recipe-rating-box {
  background: #ffffff;
  border: 2px solid #f0ebf8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.recipe-rating-label {
  font-size: 16px;
  font-weight: 600;
  color: #6b568f;
}

.recipe-rating-info {
  font-size: 13px;
  color: #999;
  font-style: italic;
}

.ingredients--checkable {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.ingredients--checkable li {
  margin-bottom: 10px;
}

.ingredient-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 15px;
  background: #ffffff;
  border: 2px solid #f0ebf8;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.ingredient-checkbox:hover {
  background: #fafafa;
  border-color: #6f5c93;
}

.ingredient-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #6f5c93;
}

.ingredient-checkbox input[type="checkbox"]:checked + .ingredient-text {
  text-decoration: line-through;
  color: #999;
}

.ingredient-checkbox .ingredient-text {
  flex: 1;
  transition: all 0.2s ease;
}

.ingredient-checkbox .ingredient-text a {
  color: #6b568f;
  text-decoration: none;
}

.ingredient-checkbox .ingredient-text a:hover {
  color: #000000;
}

.recipe-instructions {
  font-size: 15px;
  line-height: 1.8;
  color: #4a4a4a;
  margin-bottom: 30px;
}

.recipe-instructions p {
  margin-bottom: 15px;
}

.recipe-instructions ol,
.recipe-instructions ul {
  margin-bottom: 15px;
  padding-left: 25px;
}

.recipe-instructions ol li,
.recipe-instructions ul li {
  margin-bottom: 10px;
}

.recipe-actions {
  margin: 30px 0 20px 0;
  display: flex;
  justify-content: center;
}

.recipe-additional-info {
  text-align: center;
  font-size: 13px;
  color: #6b568f;
  margin-bottom: 30px;
  padding: 15px;
  background: #fafafa;
  border-radius: 8px;
}

.recipe-additional-info span {
  display: inline;
  margin: 0 8px;
}

.recipe-additional-info .separator {
  color: #ccc;
  margin: 0 10px;
}

.recipe-additional-info strong {
  color: #2d2d2d;
}

.btn-print-recipe {
  background: linear-gradient(135deg, #6f5c93 0%, #8570ac 100%);
  color: #ffffff;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(111, 92, 147, 0.3);
}

.btn-print-recipe:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(111, 92, 147, 0.4);
}

.btn-print-recipe:active {
  transform: translateY(0);
}

.btn-print-recipe svg {
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .recipe-hero-image {
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }
}

/* Print styles */
@media print {
  /* Ukryj elementy niepotrzebne w druku */
  .recipe-actions,
  .sidebar,
  .btn-print-recipe,
  header,
  nav,
  .footer,
  .recipe-details-box,
  .recipe-meta-cards,
  .recipe-additional-info,
  .recipe-rating-box,
  h3.headline {
    display: none !important;
  }

  h1.headline {
    background: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 5px !important;
    display: block !important;
  }

  /* Reset kolorów na czarno-białe */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    border-color: #ccc !important;
  }

  /* Zmniejsz marginesy i padding */
  body {
    margin: 0;
    padding: 10px;
    font-size: 10pt;
    line-height: 1.4;
  }

  /* Tytuły */
  h1, h1.headline {
    font-size: 14pt;
    margin: 0 0 8px 0;
    padding: 0;
  }

  h1 span {
    display: inline !important;
  }

  h2 {
    font-size: 11pt;
    margin: 8px 0 4px 0;
    padding: 0;
  }

  h3 {
    font-size: 10pt;
    margin: 6px 0 3px 0;
    padding: 0;
  }

  /* Zdjęcie główne */
  .recipe-hero-image {
    margin: 5px 0;
    border-radius: 0;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .recipe-hero-image img {
    max-height: 200px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }

  /* Ukryj sekcję z podobnymi przepisami */
  h3.headline + .row {
    display: none !important;
  }

  /* Opis */
  .recipe-description {
    font-size: 9pt;
    margin: 8px 0;
    padding: 5px;
    border-left: 2px solid #ccc !important;
    background: white !important;
    page-break-inside: avoid;
  }

  /* Składniki */
  .ingredients--checkable {
    margin: 5px 0;
    padding: 0;
  }

  .ingredients--checkable li {
    margin-bottom: 3px;
  }

  .ingredient-checkbox {
    display: flex;
    padding: 3px 5px;
    border: 1px solid #ccc !important;
    border-radius: 2px;
    background: white !important;
    font-size: 9pt;
  }

  .ingredient-checkbox input[type="checkbox"] {
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 1px solid #000 !important;
    flex-shrink: 0;
  }

  .ingredient-checkbox .ingredient-text {
    font-size: 9pt;
  }

  /* Instrukcje */
  .recipe-instructions {
    font-size: 9pt;
    line-height: 1.5;
    margin: 8px 0;
  }

  .recipe-instructions p {
    margin-bottom: 6px;
  }

  .recipe-instructions ol,
  .recipe-instructions ul {
    margin: 5px 0;
    padding-left: 15px;
  }

  .recipe-instructions li {
    margin-bottom: 4px;
  }

  /* Galeria */
  .gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin: 8px 0;
    page-break-inside: avoid;
  }

  .gallery__image img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: cover;
  }

  /* Layout */
  .row {
    margin: 0;
  }

  .col-lg-8 {
    width: 100%;
    padding: 0;
  }

  /* Unikaj łamania stron w kluczowych miejscach */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  ul, ol {
    page-break-inside: avoid;
  }
}
