/**
 * Single post page – Publisher-style layout (RTL two-column).
 */

.am-single-page {
  background: #f2f2f2;
  padding: 24px 0 48px;
}

.am-single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.am-single-article {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── Cover ── */
.am-single-cover-wrap {
  position: relative;
  background: #111;
  line-height: 0;
}

.am-single-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.am-single-cover-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 3px;
  color: #fff;
  background: #159b82;
  text-decoration: none;
  z-index: 2;
}

/* ── Header ── */
.am-single-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #eee;
}

.am-single-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 16px;
  color: #111;
}

.am-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.am-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.am-meta-item i {
  color: #159b82;
  font-size: 13px;
}

.am-meta-item a {
  color: #666;
  text-decoration: none;
}

.am-meta-item a:hover {
  color: #159b82;
}

/* ── Share buttons ── */
.am-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.am-share--header {
  padding-top: 4px;
}

.am-share--footer {
  padding: 18px 28px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.am-share__label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.am-share__label i {
  color: #159b82;
  margin-left: 6px;
}

.am-share__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.am-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.am-share__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}

.am-share__btn--telegram  { background: #0088cc; }
.am-share__btn--whatsapp  { background: #25d366; }
.am-share__btn--linkedin  { background: #0077b5; }
.am-share__btn--twitter   { background: #1da1f2; }
.am-share__btn--facebook  { background: #1877f2; }
.am-share__btn--copy      { background: #555; }

/* ── Content ── */
.am-entry-content {
  padding: 28px;
  font-size: 15px;
  line-height: 1.9;
  color: #333;
}

.am-entry-content p { margin-bottom: 18px; }

.am-entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #159b82;
  color: #111;
}

.am-entry-content h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 26px 0 10px;
  color: #c0392b;
}

.am-entry-content h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.am-entry-content ul,
.am-entry-content ol {
  padding-right: 24px;
  margin-bottom: 18px;
}

.am-entry-content li {
  margin-bottom: 8px;
  line-height: 1.85;
}

.am-entry-content a {
  color: #1565c0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.am-entry-content a:hover { color: #159b82; }

.am-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 20px 0;
}

.am-entry-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: #f0faf7;
  border-right: 4px solid #159b82;
  border-radius: 0 4px 4px 0;
  font-style: normal;
  color: #333;
}

.am-entry-content pre,
.am-entry-content code {
  font-family: 'Courier New', monospace;
  font-size: 13.5px;
  direction: ltr;
  text-align: left;
}

.am-entry-content pre {
  background: #1e1e1e;
  color: #eee;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 20px 0;
}

.am-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.am-entry-content table th,
.am-entry-content table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: right;
}

.am-entry-content table th {
  background: #f5f5f5;
  font-weight: 700;
}

/* ── Tags ── */
.am-single-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  border-top: 1px solid #eee;
  font-size: 13px;
}

.am-single-tags i { color: #159b82; }

.am-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 3px;
  color: #444;
  font-size: 12.5px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.am-tag:hover {
  background: #159b82;
  color: #fff;
}

/* ── Author ── */
.am-author-box {
  display: flex;
  gap: 16px;
  padding: 24px 28px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.am-author-box__avatar img {
  border-radius: 50%;
  display: block;
}

.am-author-box__label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.am-author-box__name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.am-author-box__name a {
  color: #111;
  text-decoration: none;
}

.am-author-box__name a:hover { color: #159b82; }

.am-author-box__bio {
  font-size: 13.5px;
  line-height: 1.75;
  color: #555;
  margin: 0;
}

/* ── Post navigation ── */
.am-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eee;
}

.am-post-nav__item {
  display: block;
  padding: 18px 24px;
  text-decoration: none;
  color: #333;
  border-left: 1px solid #eee;
  transition: background 0.15s;
}

.am-post-nav__item:first-child { border-left: none; }

.am-post-nav__item:hover {
  background: #f5fffe;
  color: #159b82;
}

.am-post-nav__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #159b82;
  font-weight: 600;
  margin-bottom: 6px;
}

.am-post-nav__next .am-post-nav__label {
  justify-content: flex-end;
}

.am-post-nav__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.am-post-nav__next { text-align: left; }

/* ── Related posts ── */
.am-related-posts {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  padding: 24px 28px;
}

.am-related-posts__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #159b82;
  color: #111;
}

.am-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.am-related-card__thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
  margin-bottom: 10px;
}

.am-related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.am-related-card__thumb:hover img { transform: scale(1.04); }

.am-related-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #ddd;
}

.am-related-card__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

.am-related-card__title a {
  color: #111;
  text-decoration: none;
}

.am-related-card__title a:hover { color: #159b82; }

/* ── Comments ── */
.am-comments-wrap {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  padding: 24px 28px;
}

.am-comments-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #159b82;
}

.am-comment-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.am-comment-list .children {
  list-style: none;
  margin: 16px 0 0;
  padding-right: 24px;
  border-right: 2px solid #eee;
}

.am-comment__body {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.am-comment__avatar img {
  border-radius: 50%;
  display: block;
}

.am-comment__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.am-comment__author {
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
}

.am-comment__author a {
  color: #111;
  text-decoration: none;
}

.am-comment__date {
  font-size: 12px;
  color: #888;
}

.am-comment__text {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

.am-comment__reply a {
  font-size: 12.5px;
  color: #159b82;
  font-weight: 600;
  text-decoration: none;
}

.am-comment__awaiting {
  font-size: 13px;
  color: #e65100;
  margin-bottom: 8px;
}

.am-comments-closed {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
}

/* Comment form */
.am-comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.am-comment-form input[type="text"],
.am-comment-form input[type="email"],
.am-comment-form input[type="url"],
.am-comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 14px;
}

.am-comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.am-comment-submit {
  background: #159b82;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.am-comment-submit:hover { background: #0d7a66; }

/* ── Sidebar on single ── */
.am-sidebar--single .am-widget {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.am-sidebar--single .am-widget-title {
  font-size: 15px;
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 2px solid #159b82;
  margin: 0;
  background: #fff;
}

.am-sidebar--single .am-widget-title span {
  display: block;
}

.am-sidebar--single .am-widget-body {
  padding: 14px 16px;
}

.am-sidebar--single .am-featured-post img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
  border-radius: 3px;
}

.am-sidebar--single .am-featured-post__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.am-sidebar--single .am-thumb-post {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.am-sidebar--single .am-thumb-post:last-child { border-bottom: none; }

.am-sidebar--single .am-thumb-post__img img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.am-sidebar--single .am-thumb-post__title {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  display: block;
  color: #111;
  text-decoration: none;
}

.am-sidebar--single .am-thumb-post__date {
  font-size: 11px;
  color: #999;
}

.am-sidebar--single .am-cat-list li a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dotted #ddd;
  font-size: 13px;
  color: #333;
  text-decoration: none;
}

.am-sidebar--single .am-cat-count {
  background: #eee;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: #666;
}

.am-sidebar--single .am-text-links li {
  border-bottom: 1px solid #eee;
  padding: 7px 0;
}

.am-sidebar--single .am-text-links a {
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  text-decoration: none;
}

.am-sidebar--single .am-instagram {
  text-align: center;
  padding: 8px 0;
}

.am-sidebar--single .am-instagram a {
  color: #333;
  text-decoration: none;
}

.am-sidebar--single .am-instagram i {
  font-size: 32px;
  color: #159b82;
  margin-bottom: 8px;
}

.am-sidebar--single .am-instagram p {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .am-single-wrap {
    grid-template-columns: 1fr;
  }

  .am-sidebar--single {
    order: 2;
  }

  .am-related-posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .am-single-header,
  .am-entry-content,
  .am-single-tags,
  .am-share--footer,
  .am-author-box {
    padding-right: 16px;
    padding-left: 16px;
  }

  .am-single-title { font-size: 19px; }

  .am-post-nav {
    grid-template-columns: 1fr;
  }

  .am-post-nav__item {
    border-left: none;
    border-bottom: 1px solid #eee;
  }

  .am-post-nav__next {
    text-align: right;
  }

  .am-post-nav__next .am-post-nav__label {
    justify-content: flex-start;
  }

  .am-related-posts__grid {
    grid-template-columns: 1fr;
  }

  .am-comments-wrap {
    padding: 16px;
  }
}
