/* ================= Page Title ================= */
/* Center the main page title and add spacing above and below */
.articles-page-header h1 {
    text-align: center;
    margin-top: 10rem;
    margin-bottom: 2rem;
}

/* Page content container aligned to grid, centered with max width */
.articles-page-header .page-content {
    max-width: 1440px;
    margin: 0 auto 4rem auto;
    padding: 0 1rem;
    text-align: left;
}

/* ================= Posts Grid ================= */
/* Layout for all posts in a 3-column grid with spacing */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* ================= Post Card ================= */
/* Basic card layout for each post */
.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect for post card: lift and shadow */
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Fixed height image with centered content */
.post-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center;
  background-color: #eee;
}

/* Padding for content inside the card */
.post-card-content {
  padding: 1rem;
}

/* Post title with 2-line minimum height, ellipsis if overflow */
.post-card-title {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;                /* line height */
  min-height: calc(1.2em * 2);     /* minimum 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;           /* clamp text to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Excerpt text below title */
.post-card-excerpt {
  font-size: 1.5rem;
  color: #555;
  margin-top: 15px;
}

/* ================= Load More Button ================= */
.load-more-wrapper {
  text-align: center;
  margin: 4rem 0;
}

.btn-load-more {
  padding: 0.75rem 1.5rem;
  background: var(--primary-text-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-load-more:hover {
  background: var(--ghost-accent-color);
}

/* ================= Mobile Responsiveness ================= */
@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;  /* single column on small screens */
    gap: 2rem;
    padding: 0 1rem;
  }

  .post-card-image {
    height: 180px;  /* smaller image height for mobile */
  }

  .post-card-title {
    font-size: 2rem;
    min-height: calc(1.2em * 2);   /* maintain 2-line minimum */
  }

  .post-card-excerpt {
    font-size: 1.5rem;
  }
}

/* ================= Author Snippet ================= */
/* Outer container for author card */
.author-card-snippet {
    display: flex;
    align-items: flex-start;
    border: 1px solid #ddd;
    padding: 1rem;
    max-width: 100%;
    margin: 1rem auto;
    border-radius: 8px;
    gap: 1rem;
}

/* Author snippet used in code blocks */
.author-snippet-code {
    max-width: 35%;
    margin: 10rem auto;
}

/* Author profile image */
.author-card-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Container for author name, bio, socials */
.author-card-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Author name styling */
.author-card-name {
    font-weight: bold;
    margin: 0;
    font-size: 1.4em;
}

/* Author bio styling */
.author-card-bio {
    font-size: 1.5rem;
    color: #555;
    margin: 0.60rem 0 0.5rem 0;
}

/* Wrapper for socials and "view full profile" link */
.author-card-socials-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* wrap on small screens */
    gap: 0.5rem;
    margin-top: 0.60rem;
}

/* Social links container */
.author-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Individual social link styling */
.author-card-links a {
    text-decoration: none;
    font-size: 1.5rem;
    color: #B98E66;
    border: 2px solid #B98E66;
    padding: 2px 6px;
    border-radius: 15px;
}

/* Hover effect for social links */
.author-card-links a:hover {
    text-decoration: none;
    color: white;
    background-color: #B98E66;
}

/* "View full profile" link aligned to the right */
.author-profile-link {
    text-decoration: none !important;
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
    color: var(--ghost-accent-color);
    margin-right: 40px;
}


/*NO COMENTADO DESDE AQUI PARA ABAJO*/

.share-link {
  background-color: var(--ghost-accent-color) !important;
}

.skeleton {
    background: #eee;
    color: transparent;
    border-radius: 4px;
    animation: pulse 1.2s infinite ease-in-out;
}

/* photo skeleton */
.author-card-photo.skeleton {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

/* name, bio, links skeleton */
.author-card-name.skeleton,
.author-card-bio.skeleton,
.author-card-links a.skeleton,
.author-profile-link.skeleton {
    height: 16px;
    width: 80%;
    margin-bottom: 0.5rem;
}

.author-card-bio.skeleton { width: 60%; }
.author-card-links a.skeleton {
    display: inline-block;
    height: 24px;
    width: 40px;        /* ancho aproximado de botón */
    border-radius: 12px;
    border: none !important;
    background: #eee;
    animation: pulse 1.2s infinite ease-in-out;
    text-decoration: none; /* opcional */
}

/* pulse animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
