/* Magazine Single Post Layout Styles */

/* Main Content */
.main-content.magazine-single {
  padding: 60px 0 100px;
  background-color: #fff;
}

/* Two Column Layout */
.magazine-single-layout {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 70px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Left Column: Main Article */
.single-article-main {
  position: relative;
}

/* Article Header */
.article-header {
  margin-bottom: 40px;
}

.article-category {
  font-size: 11px;
  font-weight: 700;
  color: #b17931;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  display: inline-block;
}

.article-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.3;
  color: #1a1a1a;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: #999;
  font-weight: 500;
}

/* Featured Image */
.article-featured-image {
  margin-bottom: 50px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Article Body */
.article-body {
  font-size: 17px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 60px;
}

.article-body p {
  margin-bottom: 1.8em;
}

.article-body h2 {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 50px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #003257;
}

.article-body h3 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 40px 0 20px;
}

.article-body h4 {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 30px 0 16px;
}

.article-body ul,
.article-body ol {
  margin: 24px 0 24px 30px;
}

.article-body li {
  margin-bottom: 12px;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 24px 30px;
  background-color: #f8f9fa;
  border-left: 4px solid #b17931;
  font-size: 18px;
  font-style: italic;
  color: #555;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 32px 0;
}

.article-body a {
  color: #003257;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.article-body a:hover {
  color: #b17931;
}

/* Social Share */
.article-social-share {
  padding: 40px 0;
  border-top: 2px solid #e8e8e8;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 40px;
}

.share-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: #f0f0f0;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn.x:hover {
  background-color: #1da1f2;
  color: #fff;
}

.share-btn.facebook:hover {
  background-color: #1877f2;
  color: #fff;
}

.share-btn.line:hover {
  background-color: #00b900;
  color: #fff;
}

.share-btn.instagram:hover {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: #fff;
}

.share-btn.copy-url:hover {
  background-color: #003257;
  color: #fff;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 50px;
}

.tag-item {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f0f0f0;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tag-item a {
  color: inherit;
  text-decoration: none;
  transition: color;
}

.tag-item:hover {
  background-color: #b17931;
  color: #fff;
}

/* Comments */
.article-comments {
  margin-top: 40px;
  padding-top: 40px;
}

.comments-area {
  max-width: 100%;
}

.comments-title {
  font-size: 24px;
  font-weight: 700;
  color: #003257;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid #b17931;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
}

.comment-list .comment {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.comment-list .comment:last-child {
  border-bottom: none;
}

.comment-body {
  display: flex;
  gap: 15px;
}

.comment-author-avatar {
  flex-shrink: 0;
}

.comment-author-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
}

.comment-content-wrapper {
  flex: 1;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-author-name {
  font-weight: 700;
  font-size: 14px;
  color: #003257;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-number {
  display: inline-block;
  padding: 2px 8px;
  background-color: #003257;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.comment-reply-to {
  margin-bottom: 8px;
}

.reply-to-link {
  display: inline-block;
  padding: 3px 10px;
  background-color: #f0f0f0;
  color: #003257;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.reply-to-link:hover {
  background-color: #003257;
  color: #fff;
}

.comment-author-name a {
  color: #003257;
  text-decoration: none;
}

.comment-author-name a:hover {
  color: #b17931;
}

.comment-metadata {
  font-size: 12px;
  color: #999;
}

.comment-awaiting-moderation {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  background-color: #ffc107;
  color: #333;
  font-size: 11px;
  border-radius: 3px;
  font-weight: 600;
}

.comment-text {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #333;
  font-size: 14px;
}

.comment-reply a {
  display: inline-block;
  padding: 5px 12px;
  background-color: #003257;
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.comment-reply a:hover {
  background-color: #b17931;
  color: #fff;
}

.children {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
  margin-left: 55px;
  border-left: 2px solid #e0e0e0;
  padding-left: 20px;
}

.children .children {
  margin-left: 0;
  border-left: none;
  padding-left: 0;
}

.no-comments {
  padding: 30px;
  text-align: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  color: #666;
}

/* Comment Form */
.comment-respond {
  margin-top: 40px;
}

.comment-reply-title {
  font-size: 20px;
  font-weight: 700;
  color: #003257;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid #b17931;
}

.comment-form {
  display: grid;
  gap: 20px;
}

.comment-form p {
  margin: 0;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.comment-form .required {
  color: #e74c3c;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #003257;
  box-shadow: 0 0 0 3px rgba(0, 50, 87, 0.1);
}

.comment-form textarea {
  resize: vertical;
  min-height: 150px;
}

.comment-form .submit-button {
  display: inline-block;
  padding: 12px 32px;
  background-color: #003257;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.comment-form .submit-button:hover {
  background-color: #b17931;
  transform: translateY(-2px);
}

.comment-form .submit-button:active {
  transform: translateY(0);
}

.form-submit {
  margin-top: 10px;
}

/* Inline Reply Form */
.inline-reply-form {
  margin-top: 15px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.reply-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.reply-form-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #003257;
  margin: 0;
}

.cancel-reply-btn {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-reply-btn:hover {
  background-color: #fff;
  color: #003257;
  border-color: #003257;
}

.reply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  min-height: 100px;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.reply-textarea:focus {
  outline: none;
  border-color: #003257;
  box-shadow: 0 0 0 3px rgba(0, 50, 87, 0.1);
}

.reply-submit-btn {
  align-self: flex-end;
  padding: 10px 24px;
  background-color: #003257;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.reply-submit-btn:hover {
  background-color: #b17931;
}

.reply-submit-btn:active {
  transform: translateY(0);
}

.reply-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Comment Mobile Responsive */
@media (max-width: 767px) {
  .comment-body {
    flex-direction: column;
    gap: 15px;
  }

  .children {
    margin-left: 30px;
    padding-left: 15px;
  }

  .children .children {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
  }

  .comment-reply-title {
    font-size: 18px;
  }
}

/* Right Column: Sidebar */
.single-article-sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 50px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid #b17931;
}

/* Popular Posts */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.popular-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.popular-rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #003257;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50%;
}

.popular-link {
  flex: 1;
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.popular-link:hover {
  opacity: 0.8;
}

.popular-image {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 6px;
  background-color: #f5f5f5;
}

.popular-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.popular-link:hover .popular-image img {
  transform: scale(1.08);
}

.popular-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popular-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-popular {
  font-size: 14px;
  color: #999;
  text-align: center;
  padding: 20px 0;
}

/* Related Posts */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.related-item {
  display: block;
}

.related-link {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.related-link:hover {
  opacity: 0.8;
}

.related-image {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  overflow: hidden;
  border-radius: 6px;
  background-color: #f5f5f5;
}

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

.related-link:hover .related-image img {
  transform: scale(1.08);
}

.related-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-size: 12px;
  color: #999;
}

.no-related {
  font-size: 14px;
  color: #999;
  text-align: center;
  padding: 20px 0;
}

/* Categories Section */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  margin: 0;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background-color: #f8f9fa;
  border-radius: 6px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-link:hover {
  background-color: #003257;
  color: #fff;
}

.category-count {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

.category-link:hover .category-count {
  color: rgba(255, 255, 255, 0.7);
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
  .magazine-single-layout {
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
  }

  .article-title {
    font-size: 36px;
  }

  .article-body {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: 28px;
  }

  .article-body h3 {
    font-size: 24px;
  }
}

/* Mobile Responsive (max-width: 767px) */
@media (max-width: 767px) {
  .main-content.magazine-single {
    padding: 40px 0 70px;
  }

  /* Stack columns vertically on mobile */
  .magazine-single-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .article-header {
    margin-bottom: 30px;
  }

  .article-title {
    font-size: 28px;
    margin-bottom: 18px;
  }

  .article-meta {
    gap: 16px;
    font-size: 13px;
  }

  .article-featured-image {
    margin-bottom: 40px;
  }

  .article-body {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 50px;
  }

  .article-body h2 {
    font-size: 24px;
    margin: 40px 0 20px;
  }

  .article-body h3 {
    font-size: 21px;
    margin: 32px 0 16px;
  }

  .article-body h4 {
    font-size: 19px;
    margin: 24px 0 14px;
  }

  .article-social-share {
    padding: 30px 0;
    margin-bottom: 30px;
  }

  .share-buttons {
    gap: 10px;
  }

  .share-btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .article-tags {
    margin-bottom: 40px;
  }

  .article-comments {
    margin-top: 50px;
    padding-top: 50px;
  }

  /* Sidebar - No sticky on mobile */
  .single-article-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .sidebar-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
  }

  .sidebar-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .popular-image,
  .related-image {
    width: 75px;
    height: 75px;
  }

  .popular-title,
  .related-title {
    font-size: 14px;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .article-title {
    font-size: 24px;
  }

  .article-body {
    font-size: 14px;
  }

  .article-body h2 {
    font-size: 22px;
  }

  .article-body h3 {
    font-size: 19px;
  }

  .article-body h4 {
    font-size: 17px;
  }

  .share-btn {
    padding: 8px 14px;
    font-size: 11px;
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
  }

  .share-btn svg {
    width: 14px;
    height: 14px;
  }

  .popular-image,
  .related-image {
    width: 65px;
    height: 65px;
  }

  .popular-title,
  .related-title {
    font-size: 13px;
  }

  .category-link {
    font-size: 13px;
    padding: 10px 12px;
  }
}

/* Landscape Tablet (768px - 1024px, landscape) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .magazine-single-layout {
    grid-template-columns: 1.6fr 1fr;
  }

  .single-article-sidebar {
    max-height: calc(100vh - 80px);
  }
}
