/* === ARTICLE === */
.post__single-entry {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* === TÍTULOS === */
.post__single-entry h1 {
  font-size: 24pt;
  /* ≈ 32px */
  font-weight: 700;
  line-height: 1.3;
  margin: 2.5rem 0 1.2rem;
  color: #133d68;
  text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);
}

.post__single-entry h2 {
  font-size: 18pt;
  /* ≈ 24px */
  font-weight: 600;
  line-height: 1.4;
  margin: 2rem 0 1rem;
  color: #133d68;
}

.post__single-entry h3 {
  font-size: 14pt;
  /* ≈ 18.7px */
  font-weight: 600;
  margin: 1.8rem 0 1rem;
  color: #133d68;
}

.post__single-entry h4 {
  font-size: 12pt;
  font-weight: 600;
  color: #1e4465;
  font-style: italic;
  margin: 1.4rem 0 0.8rem;
}

.post__single-entry p {
  font-size: 11pt;
  /* ≈ 14.7px */
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: #333;
}

.post__single-entry a {
  color: #0074cc;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
  font-weight: 500;
}

.post__single-entry a:hover,
.post__single-entry a:focus {
  color: #2e9f2e;
}

/* === IMAGEN DESTACADA === */
.featured-image {
  margin-bottom: 1.5rem;
}

.post__single-entry .featured-image img {
  width: 100%;
  max-height: 450px;
  /* Altura máxima para evitar imágenes enormes */
  object-fit: cover;
  /* Cubre el espacio sin deformar, recorta si es necesario */
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* === METADATOS Y BOTONES === */
.post-meta-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  border-top: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  padding: 1rem 0;
  gap: 1rem;
}

.meta-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 0.95rem;
  color: #555;
}

.meta-left .author-name {
  font-weight: 600;
}

.meta-left .post-date {
  font-style: italic;
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.2rem;
}

.meta-right {
  display: flex;
  align-items: center;
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.open-comments-button {
  background-color: #03a9f4;
  background-image: linear-gradient(to right, #03a9f4, #2196f3);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorStr="#03A9F4", endColorStr="#2196F3", gradientType="1");
  -ms-box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  -o-box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  color: white;
  border: none;
  padding: 5px 10px;
  margin-top: 0;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  -ms-transition: all 300ms ease-in-out;
  -o-transition: all 300ms ease-in-out;
}

.open-comments-button:hover {
  background-color: #03a9f4;
  background-image: linear-gradient(to right, #03a9f4, #2196f3);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorStr="#03A9F4", endColorStr="#2196F3", gradientType="1");
  -ms-box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
  -o-box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
  box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
}

.a2a_svg {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.a2a_svg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

.a2a_s_facebook {
  background-image: linear-gradient(to right, #0866ff, #0059d1) !important;
}

.a2a_s_x {
  background-image: linear-gradient(to right, #000, #1a1a1a) !important;
}

.a2a_s_whatsapp {
  background-image: linear-gradient(to right, #25d366, #128c7e) !important;
}

/* === CONTENIDO === */
.entry-content {
  line-height: 1.7;
  font-size: 1rem;
  color: #333;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

/* === OVERLAY DE COMENTARIOS (SLIDEOUT) === */
.comments-slideout {
  position: fixed;
  padding: 0 1rem;
  top: 0px;
  right: 0;
  width: min(100%, 808px);
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.comments-slideout.show {
  transform: translateX(0%);
}

/* === CABECERA DE COMENTARIOS === */
.comments-header {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #eee;
  background-color: #fff;
  z-index: 100;
}

.comments-header h2 {
  color: #005f8d;
  font-size: 14pt;
  font-weight: 500;
  margin: 0;
}

/* === REACCIONES (placeholder) === */
.comments-reactions {
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.comments-reactions p {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.comments-responses-count {
  font-size: 0.9rem;
  color: #666;
}

/* === META BARRA: CONTADOR DE COMENTARIOS E ICONO === */
.comments-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  font-size: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.comments-count {
  font-weight: 600;
}

.comments-meta-bar .comments-icon .fas:before {
  font-size: 1.2rem;
  color: #0073aa;
}

/* === FORMULARIO DE COMENTARIOS === */
#respond {
  padding: 1rem;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.comment-form {
  display: flex;
  flex-direction: column;
}

.comment-form label {
  margin-top: 1rem;
}

.comment-form textarea {
  height: 2.5rem;
  resize: none;
  overflow-y: auto;
  max-height: 6.5rem;
}

.comment-form input[type="submit"] {
  margin-top: 1rem;
  background-color: #0073aa;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 3px;
  cursor: pointer;
}

.comment-form input[type="submit"]:hover {
  background-color: #005f8d;
}

.textarea-wrapper {
  position: relative;
}

.textarea-wrapper textarea {
  height: 2.5rem;
  max-height: 6.5rem;
  resize: none;
  overflow-y: auto;
  width: 100%;
  padding-right: 3rem;
}

#char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.8rem;
  color: #0073aa;
  pointer-events: none;
}

/* === Etiquetas flotantes mejoradas === */
.floating-label {
  position: relative;
  margin-top: 1rem;
}

.floating-label input {
  width: 100%;
  padding: 1.25rem 0.5rem 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  box-sizing: border-box;
}

.floating-label textarea {
  width: 100%;
  padding: 1.25rem 0.5rem 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fafafa;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.floating-label label {
  position: absolute;
  top: -6px;
  left: 0.5rem;
  font-size: 1rem;
  color: #999;
  background-color: #fafafa;
  padding: 0 4px;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1;
}

.floating-label input:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:focus,
.floating-label textarea:not(:placeholder-shown) {
  border: 1px solid #0073aa !important;
  outline: none;
}

.floating-label input:focus+label,
.floating-label input:not(:placeholder-shown)+label,
.floating-label textarea:focus+label,
.floating-label textarea:not(:placeholder-shown)+label {
  top: -1.5rem;
  font-size: 0.75rem;
  color: #0073aa;
  transform: none;
  padding: 0 6px;
  background-color: #fafafa;
}

/* === COMENTARIOS LISTADO === */
.commentlist {
  list-style: none;
  padding: 0 1rem;
  margin: 0;
}

.commentlist .comment {
  border-bottom: 1px solid #ddd;
  padding: 0.8rem 0;
  margin: 0;
}

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

.commentlist .children {
  display: none;
  /* Ocultar respuestas por defecto */
}

.comment-author {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.comment-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.comment-metadata a {
  pointer-events: none;
  color: var(--color-texto);
  text-decoration: none;
  cursor: default;
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.logged-in-as a {
  font-weight: 600;
  text-decoration: none;
  color: #0074cc;
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  -ms-transition: all 300ms ease-in-out;
  -o-transition: all 300ms ease-in-out;
}

.logged-in-as a:hover {
  color: #2e8b57;
}

/* === RESPONDER LINK === */
.comment-reply-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0074cc;
  text-decoration: none;
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in;
  -moz-transition: all 300ms ease-in;
  -ms-transition: all 300ms ease-in;
  -o-transition: all 300ms ease-in;
}

.comment-reply-link:hover {
  color: #2e8b57;
}

/* === BOTÓN MOSTRAR MÁS COMENTARIOS === */
.comments-navigation {
  text-align: center;
  padding: 1rem;
}

#load-more-comments {
  background-color: transparent;
  border: 2px solid #0073aa;
  color: #0073aa;
  padding: 0.5rem 1.2rem;
  margin: 1rem auto;
  font-size: 0.95rem;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease-in-out;
  -webkit-transition: all 0.25s ease-in-out;
  -moz-transition: all 0.25s ease-in-out;
  -ms-transition: all 0.25s ease-in-out;
  -o-transition: all 0.25s ease-in-out;
}

#load-more-comments:hover {
  background-color: #0073aa;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* === BOTÓN MOSTRAR/OCULTAR RESPUESTAS === */
.toggle-replies {
  margin: 0.5rem 1rem;
  background-color: transparent;
  border: none;
  color: #0073aa;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.toggle-replies:hover {
  color: #fff;
}

#cancel-comment-reply-link {
  color: #0074cc;
  text-decoration: none;
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  -ms-transition: all 300ms ease-in-out;
  -o-transition: all 300ms ease-in-out;
}

#cancel-comment-reply-link:hover {
  color: #2e8b57;
}

/* === FORMULARIO DE COMENTARIOS COMPACTO Y MODERNO === */
#respond {
  padding: 1rem;
  border-top: 1px solid #eee;
  background-color: #fafafa;
  border-radius: 8px;
  margin-top: 1rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
}

/* GRUPO PARA NOMBRE Y EMAIL EN DOS COLUMNAS */
.comment-form .form-fields-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-form .form-fields-row>div {
  flex: 1;
}

.comment-form input[type="text"],
.comment-form input[type="email"] {
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  height: 42px;
  transition: border 0.2s ease;
}

/* TEXTAREA */
.comment-form textarea {
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  resize: vertical;
  min-height: 100px;
  transition: border 0.2s ease;
}

/* BOTÓN OCULTO HASTA HACER FOCUS */
.comment-form input[type="submit"] {
  display: none;
  /* Se muestra al enfocar el textarea por JS */
  margin: 0;
  background-color: #0073aa;
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  width: auto;
  align-self: center;
  /* <-- centrado en el formulario */
}

/* ETIQUETAS ACCESIBLES PERO OCULTAS VISUALMENTE */
label.screen-reader-text {
  position: absolute;
  left: -9999px;
}

/* === MEDIA QUERY: DOS COLUMNAS EN PANTALLAS >600px === */
@media (min-width: 600px) {
  .comment-form .form-fields-row {
    flex-direction: row;
    gap: 1rem;
  }
}

/* Estilos del navegador entre artículos */
.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 3rem;
  padding-top: 5rem;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  max-width: 48%;
}

.post-navigation a {
  text-decoration: none;
  color: #1e1e64;
  font-weight: 600;
  display: inline-block;
}

.post-navigation .nav-button {
  background-color: #03a9f4;
  background-image: linear-gradient(to right, #03a9f4, #2196f3);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorStr="#03A9F4", endColorStr="#2196F3", gradientType="1");
  -ms-box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  -o-box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  box-shadow: 0 5px 5px rgba(33, 150, 243, 0.3);
  color: #fff;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 0.5rem;
  transition: all 300ms ease-in-out;
  -webkit-transition: all 300ms ease-in-out;
  -moz-transition: all 300ms ease-in-out;
  -ms-transition: all 300ms ease-in-out;
  -o-transition: all 300ms ease-in-out;
}

.post-navigation .nav-button:hover {
  border: unset;
  background-color: #03a9f4;
  background-image: linear-gradient(to right, #03a9f4, #2196f3);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorStr="#03A9F4", endColorStr="#2196F3", gradientType="1");
  -ms-box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
  -o-box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
  box-shadow: 0 5px 10px rgba(33, 150, 243, 0.8);
}

/* Estilos de reacciones */
.emoji-reactions-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 1rem auto;
  max-width: 650px;
}

.emoji-reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.emoji-reaction:hover {
  transform: scale(1.1);
}

.emoji-reaction .emoji {
  font-size: 2rem;
}

.emoji-reaction .reaction-label {
  font-size: 10pt;
  color: #444;
}

.emoji-reaction .reaction-count {
  display: none;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
}

body.reaction-voted .emoji-reaction .reaction-count {
  display: block;
}

.reaction-total {
  display: block;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 10pt;
  color: #333;
}

/* Compensar la admin bar cuando estás logueado */
.admin-bar #comments-slideout {
  top: 32px;
  height: calc(100% - 32px);
}

@media (max-width: 782px) {
  .admin-bar #comments-slideout {
    top: 46px;
    height: calc(100% - 46px);
  }
}