/* Estilos Generales */
body {
  margin-left: 1rem;
  margin-right: 1em;
  color: rgb(91, 92, 93);
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Header y Navegación */
.navbar {
  background-color: #f8f9fa;
}

.navbar-brand {
  font-size: 1.5rem;
  margin-left: 0.5rem;
  width: 75%;
}

.logo {
  width: 14%;
}

.logo2 {
  width: 40%;
}

.navbar-toggler {
  align-items: center;
}

.navbar-nav .nav-link {
  font-size: 1.2rem;
  margin-right: 1rem;
}

.dropdown-menu {
  background-color: #f8f9fa;
}

.dropdown-item {
  font-size: 1.2rem;
  color: rgb(91, 92, 93);
}

.nav-item.dropdown .nav-link.dropdown-toggle::after {
  display: none;
}

.usuario {
  width: 45px;
}

@media screen and (max-width: 1200px) {
  .navbar-brand {
    margin-left: 0.5rem;
    width: 75%;
  }
  
  .logo {
    width: 24%;
  }

  .logo2 {
    width: 60%;
  }

  .navbar-nav .nav-link {
    font-size: 1.2rem;
    margin-right: 1rem;
  }
}

/* Estructura del Blog */
.main-content {
  display: flex;
  flex-direction: row;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex: 0 0 20%;
  padding: 20px;
  background-color: #f797bc4e;
  margin-right: 20px;
}

.post-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 20px;
  flex: 1;
}

.post-content {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  margin-left: 6%;
  margin-right: 6%;
  transition: transform 0.3s ease;
  flex-basis: calc(38% - 10px); /* Reducción del tamaño en un 20% */
}

.post-content:hover {
  transform: scale(1.02);
}

.post-content img {
  width: 100%; /* Se asegura de que la imagen ocupe el 100% del ancho del contenedor */
  height: 160px; /* Reducción del tamaño en un 20% */
  object-fit: cover; /* Asegura que la imagen se ajuste bien dentro del contenedor */
}

.post-content h2 {
  margin: 0;
  padding: 12px; /* Ajuste proporcional del padding */
  background-color: rgba(0, 0, 0, 0.03);
  font-size: 1.25rem; /* Ajuste proporcional del tamaño de fuente */
}

.post-content p {
  padding: 12px; /* Ajuste proporcional del padding */
  color: #666;
  line-height: 1.5;
  font-size: 0.9rem; /* Ajuste proporcional del tamaño de fuente */
}

/* Pie de cada post (compartir + visitas) */
.post-footer {
  display: flex;
  justify-content: space-between; /* Asegura que los botones de compartir estén a la izquierda y las visitas a la derecha */
  align-items: center;            /* Centra verticalmente ambos elementos */
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Botones de compartir */
.share-buttons a {
  color: #666;
  font-size: 18px;
  margin-right: 10px;          /* Espacio entre los íconos de compartir */
  transition: color 0.3s ease;
}

/* Asegura que los íconos de compartir estén en una fila */
.share-buttons {
  display: flex;
}

/* Contador de vistas */
.view-count {
  color: #666;
  font-size: 14px;
  margin-left: auto;           /* Empuja el contador de visitas al extremo derecho */
}

/* Botón de Like */
.like-button {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #666;
  font-size: 16px;
  transition: color 0.2s;
}

.like-button .like-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  transition: transform 0.2s;
}

.like-button .like-icon .fas {
  position: absolute;
  opacity: 0;
  transition: opacity 0.2s;
}

.like-button.liked .like-icon .fas {
  opacity: 1;
}

.like-button.liked .like-icon .far {
  opacity: 0;
}

.like-button:hover {
  color: #e91e63;
}

.like-button:hover .like-icon {
  transform: scale(1.2);
}

/* Estilos Responsivos */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .post-content {
    flex-basis: 100%;
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
  }
}

/*----------------------------------------------------------------------------- FOOTER PIE DE PÁGINA ------------------------------------------------------------------------*/
/* Estilos del footer */
.footer {
    padding: 50px 0; /* Espacio entre los contenidos y el borde inferior */
    display: flex; /* Los elementos hijos del contenedor se muestran en línea */
}

.footer-logo {
    margin-right: 25px; /* Margen derecho para separar el logo de otros contenidos */
    margin-left: 25px; /* Margen derecho para separar el logo de otros contenidos */
    float: left;
}

.footer-logo img {
    width: 100%; /* Ancho completo de la imagen */
    max-width: 100px; /* Ancho máximo de la imagen */
}

.footer-info {
    margin-right: 40px; /* Margen derecho para separar de otros contenidos */
} 

.footer-info h3 {
    font-size: 20px; /* Tamaño de fuente */
    margin-bottom: 10px; /* Margen inferior */
}

.footer-info p {
    font-size: 16px; /* Tamaño de fuente */
    line-height: 1.5; /* Espacio entre líneas */
    margin-bottom: 10px; /* Margen inferior */
}

.footer-links {
    float: left;
}

.footer-links h3 {
    font-size: 20px; /* Tamaño de fuente */
    margin-bottom: 10px; /* Margen inferior */
}

.footer-links p {
    margin-bottom: 10px; /* Margen inferior para separar de otros elementos */
}

/* Redes sociales del footer */
.footer-social {
    display: flex;
    align-items: center;
    margin-left: 30%; /* Margen derecho para separar de otros contenidos */
}

.footer-social p {
    float: left;
    justify-content: center; /* Agregado para centrar los elementos horizontalmente */
}

.footer-social a {
    display: flex; /* Los contenidos se muestran en línea */
    align-items: center; /* Los contenidos se centran verticalmente */
    justify-content: center; /* Los contenidos se centran horizontalmente */
    height: 4em; /* Altura de los contenidos */
    width: 4em; /* Ancho de los contenidos */
    background-color: #fff; /* Color de fondo */  
    margin-right: 20px;
    margin-left: 2px;
}

.footer-social img {
    max-width: 100%;
    height: auto; /* Agregado para hacer la imagen responsive */
}

@media screen and (max-width: 1200px) {
  .footer {
    flex-direction: column; /* Los elementos hijos se muestran en una sola columna */
    text-align: center; /* El texto se centra horizontalmente */
    align-items: center;
  }

  .footer-logo,
  .footer-info,
  .footer-links,
  .footer-social {
    margin-bottom: 50px; /* Margen inferior para separar de otros elementos */
    align-items: center;
  }

  .footer-logo {
    margin-right: 0; /* Sin margen derecho */
  }

  .logo-footer {
    width: 100px;
  }

  .footer-info {
    margin-right: 0; /* Sin margen derecho */
  }

  .footer-links {
    margin-right: 0; /* Sin margen derecho */
  }

  .footer-social p {
    padding: 0;
    display: flex; /* Agregado para mostrar los elementos hijos en línea */
    justify-content: center; /* Agregado para centrar los elementos horizontalmente */
  }

  .footer-social {
    margin-left: 0px;
  }

  .footer-social a {
    display: flex; /* Los contenidos se muestran en línea */
    align-items: center; /* Los contenidos se centran verticalmente */
    justify-content: center; /* Los contenidos se centran horizontalmente */
    height: 5em; /* Altura de los contenidos */
    width: 5em; /* Ancho de los contenidos */
    background-color: #fff; /* Color de fondo */ 
    margin: auto;
    margin-left: 1em;
  }

  .footer-social img {
    max-width: 100%;
    height: auto; /* Agregado para hacer la imagen responsive */
  }
}

@media (max-width: 568px) {
  .footer p {
    font-size: 11px;
  }

  .footer h3 {
    font-size: 12px;
  }

  .footer-social a {
    height: 3em; /* Altura de los contenidos */
    width: 3em; /* Ancho de los contenidos */
  }
}

@media (min-width: 568px) and (max-width: 800px) {
  .footer h3 {
    font-size: 14px;
  }

  .footer p {
    font-size: 13px;
  }
}
