/* ========================================
   SINGLE POST TEMPLATE
   ======================================== */

.single-post {
  background-color: #fff;
  padding: 2rem 0;
}

.single-post__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */

.single-post__header {
  margin-bottom: 2rem;
  text-align: left;
}

.single-post__categories {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.single-post__category {
  font: 500 1rem/1 var(--primary-font);
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  border-radius: 2rem;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;

  &:hover {
    background-color: var(--secondary-color);
    color: #fff;
  }
}

.single-post__title {
  font: 800 2rem/1.1 var(--primary-font);
  color: var(--secondary-color);
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.single-post__subtitle {
  font: 500 1.125rem/1.4 var(--secondary-font);
  color: rgba(0, 0, 0, 0.7);
  margin: 0 0 1.5rem 0;
}

.single-post__meta-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  gap: 1rem;
  flex-wrap: wrap;
}

.single-post__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.single-post__author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.single-post__author-name {
  font: 600 1rem/1 var(--secondary-font);
  color: var(--secondary-color);
  font-style: italic;
}

.single-post__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.single-post__date,
.single-post__reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font: 500 0.875rem/1 var(--secondary-font);
  color: var(--black-color);
}

/* ========================================
   LAYOUT
   ======================================== */

.single-post__layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ========================================
   CONTENT
   ======================================== */

.single-post__content {
  flex: 1;
}

/* Introdução com imagem flutuante */
.single-post__intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.single-post__intro-text {
  font: 400 1rem/1.5 var(--secondary-font);
  color: var(--secondary-color);
}

.single-post__featured-wrapper {
  margin: 2rem 0 0 0;
}

.single-post__share-floating {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.single-post__featured-image {
  border-radius: 8px;
  overflow: hidden;
  margin: 0;
}

.single-post__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.single-post__body {
  font: 400 1.125rem/1.7 var(--secondary-font);
  color: var(--secondary-color);

  /* Tipografia do conteúdo */
  h2 {
    font: 700 1.75rem/1.2 var(--primary-font);
    color: var(--secondary-color);
    margin: 2.5rem 0 1rem 0;
    letter-spacing: -0.01em;
  }

  h3 {
    font: 700 1.5rem/1.3 var(--primary-font);
    color: var(--secondary-color);
    margin: 2rem 0 1rem 0;
  }

  h4 {
    font: 600 1.25rem/1.4 var(--primary-font);
    color: var(--secondary-color);
    margin: 1.5rem 0 0.75rem 0;
  }

  p {
    margin: 0 0 1.5rem 0;
  }

  a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;

    &:hover {
      color: var(--secondary-color);
    }
  }

  ul,
  ol {
    margin: 0 0 1.5rem 0;
    padding-left: 2rem;

    li {
      margin-bottom: 0.75rem;
    }
  }

  blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background-color: rgba(180, 201, 65, 0.1);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: rgba(0, 0, 0, 0.8);
  }

  img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
  }

  code {
    font-family: "Courier New", monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
  }

  pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;

    code {
      background: none;
      padding: 0;
    }
  }

  strong {
    font-weight: 700;
  }

  em {
    font-style: italic;
  }
}

/* ========================================
   FOOTER
   ======================================== */

.single-post__footer {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.single-post__tags-label {
  font: 600 1.125rem/1 var(--secondary-font);
  color: var(--secondary-color);
}

.single-post__tag {
  font: 700 1rem/1 var(--secondary-font);
  color: #0168b1;
}

.single-post__tag-separator {
  margin-right: 0.25rem;
}

.single-post__tag:last-of-type .single-post__tag-separator {
  display: none;
}

/* ========================================
   SIDEBAR
   ======================================== */

.single-post__sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Compartilhar */
.single-post__share {
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.single-post__share-title {
  font: 700 1.25rem/1 var(--primary-font);
  color: var(--secondary-color);
  margin: 0 0 1rem 0;
}

.single-post__share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.single-post__share-button {
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  transition: all 0.3s ease;
  text-decoration: none;

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  &--facebook:hover {
    background-color: #1877f2;
    color: #fff;
  }

  &--twitter:hover {
    background-color: #1da1f2;
    color: #fff;
  }

  &--linkedin:hover {
    background-color: #0a66c2;
    color: #fff;
  }

  &--whatsapp:hover {
    background-color: #25d366;
    color: #fff;
  }
}

/* Posts Relacionados */
.single-post__related {
  padding: 1.5rem;
  background-color: rgba(180, 201, 65, 0.05);
  border-radius: 8px;
}

.single-post__related-title {
  font: 700 1.25rem/1 var(--primary-font);
  color: var(--secondary-color);
  margin: 0 0 1rem 0;
}

.single-post__related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.single-post__related-item {
  padding-left: 1.5rem;
  position: relative;

  &::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
  }
}

.single-post__related-link {
  font: 600 1rem/1.4 var(--secondary-font);
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;

  &:hover {
    color: var(--primary-color);
  }
}

/* ========================================
   RATE MY POST - CUSTOMIZAÇÃO
   ======================================== */
.rmp-rating-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;

  .rmp-rating-widget__not-rated {
    font: 400 1rem/1 var(--secondary-font);
    color: (--secondary-color);
  }
}

/* Ocultar o texto padrão de resultados */
.rmp-rating-widget__results.js-rmp-results {
  font: 600 1.125rem/1.4 var(--secondary-font);
  color: var(--secondary-color);
}
.rmp-widgets-container.rmp-wp-plugin.rmp-main-container
  .rmp-rating-widget__hover-text {
  display: none;
}
/* Estrelas em laranja */
.rmp-rating-widget .rmp-icon--full-highlight,
.rmp-results-widget .rmp-icon--full-highlight {
  color: #ffa500 !important;
}

/* ========================================
   TABLET - 768px+
   ======================================== */
@media (min-width: 768px) {
  .single-post {
    padding: 3rem 0;
  }

  .single-post__header {
    margin-bottom: 3rem;
  }

  .single-post__title {
    font-size: 3rem;
  }

  .single-post__meta {
    font-size: 1rem;
  }

  .single-post__body {
    font-size: 1.25rem;

    h2 {
      font-size: 2.25rem;
    }

    h3 {
      font-size: 1.75rem;
    }

    h4 {
      font-size: 1.5rem;
    }
  }
}

/* ========================================
   DESKTOP - 1024px+
   ======================================== */
@media (min-width: 1024px) {
  .single-post {
    padding: 4rem 0 0;
  }

  .single-post__layout {
    flex-direction: row;
    gap: 4rem;
  }

  .single-post__content {
    flex: 1;
    max-width: 800px;
  }

  .single-post__sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
  }

  .single-post__title {
    font-size: 3.5rem;
  }
  .single-post__subtitle {
    margin-bottom: 3rem;
  }
  .single-post__category {
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
  }

  /* Imagem flutuante à direita com botões verdes */
  .single-post__intro-wrapper {
    display: flex;
    gap: 32px;
  }
  .single-post__intro {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  .single-post__meta-wrapper {
    width: 100%;
  }
  .single-post__meta {
    flex-direction: row;
    gap: 24px;
  }
  .single-post__intro-text {
    flex: 1;
  }

  .single-post__featured-wrapper {
    flex: 0 0 450px;
    margin: 0;
  }

  .single-post__share-floating {
    padding: 0 0.75rem 0.75rem;
    border-radius: 8px 8px 0 0;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 0;
  }

  .single-post__share-button {
    width: 36px;
    height: 36px;
    cursor: pointer;
  }
  .single-post__featured-image {
    border-radius: 12px;
  }
  .single-post__layout {
    margin-top: -5rem;
  }

  .rmp-rating-widget {
    flex-direction: row;
  }
}
/* ========================================
   DESKTOP LAPTOP - 1200px+
   ======================================== */
@media (min-width: 1200px) {
  .single-post__title {
    font-size: 5rem;
  }
  .single-post__subtitle {
    font-size: 1.75rem;
  }
  .single-post__author-avatar {
    width: 72px;
    height: 72px;
  }
  .single-post__author-name {
    font-size: 1.25rem;
  }
  .single-post__intro-text {
    font-size: 1.125rem;
  }
  .single-post__date,
  .single-post__reading-time {
    font-size: 1.125rem;
    gap: 0.5rem;

    img {
      width: 14px;
      height: 14px;
    }
  }
  .single-post__featured-wrapper {
    flex: 0 0 500px;
  }
}
