/* استایل کلی صفحه */
.recipe-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* هدر دستور پخت */
.recipe-header {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
}

.recipe-image {
  flex: 1;
  min-width: 300px;
  max-height: 400px;
  overflow: hidden;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.recipe-image:hover img {
  transform: scale(1.03);
}

.recipe-container {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.ingredients-box {
    flex: 0 0 300px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
    max-height: 80vh;
}

.ingredients-box h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ingredients-box h2 span {
    font-size: 1rem;
    color: #777;
}

.ingredients-scroll {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* استایل اسکرول بار */
.ingredients-scroll::-webkit-scrollbar {
    width: 6px;
}

.ingredients-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ingredients-scroll::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 10px;
}

.ingredients-scroll::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

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

.ingredients-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    line-height: 1.6;
}

.ingredient-name {
    font-weight: 500;
}

.ingredient-quantity {
    color: #e74c3c;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 15px;
}

.instructions-box {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
}

.instructions-box h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* طراحی ریسپانسیو */
@media (max-width: 768px) {
    .recipe-container {
        flex-direction: column;
    }
    
    .ingredients-box {
        position: static;
        flex: 1;
        max-height: none;
    }
    
    .ingredients-scroll {
        max-height: none;
    }
}
.meta-details span {
  font-size: 13px;
  line-height: 16px;
}
.recipe-meta {
  flex: 1;
  min-width: 300px;
  padding: 25px;
}

.recipe-meta h1 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.meta-description p {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.meta-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
}

.detail-item i {
  color: #e74c3c;
}

.rating .stars {
  color: #f1c40f;
  margin-left: 5px;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.recipe-tags .tag {
  background: #f5f5f5;
  padding: 5px 12px;
  border-radius: 20px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.recipe-tags .tag:hover {
  background: #e74c3c;
  color: white;
}

/* محتوای اصلی */
.recipe-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .recipe-content {
    grid-template-columns: 1fr;
  }
}

.ingredients-section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  align-self: start;
  position: sticky;
  top: 20px;
}

.ingredients-section h2,
.instructions-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredients-list {
  list-style: none;
  padding: 0;
}

.ingredients-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}

.ingredient-name {
  font-weight: 500;
}

.ingredient-quantity {
  color: #e74c3c;
}

.instructions-section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.steps-list li {
  counter-increment: step-counter;
  margin-bottom: 25px;
  position: relative;
  padding-left: 50px;
}

.steps-list li h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.steps-list li h3::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 35px;
  height: 35px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.recipe-notes {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
  border-right: 4px solid #e74c3c;
}

/* استایل جداول در محتوا */
.full-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.full-content th, 
.full-content td {
  padding: 12px 15px;
  text-align: right;
  border-bottom: 1px solid #ddd;
}

.full-content th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.full-content tr:hover {
  background-color: #f5f5f5;
}

.full-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
}

/* بخش‌های دیگر */
.social-share {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-buttons a, 
.share-buttons button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.share-buttons a:hover,
.share-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.telegram { background: #0088cc; }
.whatsapp { background: #25D366; }
.copy-link { background: #555; }

.related-recipes {
  margin-bottom: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.related-recipe {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
}

.related-recipe:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.related-image {
  height: 180px;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-recipe:hover .related-image img {
  transform: scale(1.05);
}

.related-info {
  padding: 15px;
}

.related-info h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.related-meta {
  color: #777;
  font-size: 0.9rem;
}

/* بخش نظرات */
.comments-section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.comment-count {
  background: #e74c3c;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.comments-list {
  margin-bottom: 30px;
}

.comment {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.comment:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #2c3e50;
}

.comment-date {
  color: #777;
  font-size: 0.9rem;
}

.comment-content p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

.no-comments {
  text-align: center;
  padding: 30px;
  color: #777;
}

.no-comments i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #ddd;
}

.comment-form {
  margin-top: 30px;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.rating-input .stars i {
  cursor: pointer;
  color: #ddd;
  transition: all 0.2s;
}

.rating-input .stars i.active,
.rating-input .stars i:hover {
  color: #f1c40f;
}

.comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  min-height: 120px;
  margin-bottom: 15px;
  font-family: inherit;
}

.login-required {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 5px;
}

.login-required a {
  color: #e74c3c;
  text-decoration: none;
}

.login-required a:hover {
  text-decoration: underline;
}