/* ================================================
   GRID DE TARJETAS (POETAS Y POEMAS)
   ================================================ */

.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1024px) {
  .lp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lp-grid {
    grid-template-columns: 1fr;
  }
}

/* Grid específico para poemas (4 columnas en pantallas grandes) */
.lp-grid--poemas {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .lp-grid--poemas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .lp-grid--poemas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lp-grid--poemas {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   TARJETAS DE POETAS
   ================================================ */

.lp-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.lp-card__media {
  aspect-ratio: 4/3;
  background: #f2f2f2;
  overflow: hidden;
}

.lp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.lp-card:hover .lp-card__media img {
  transform: scale(1.05);
}

.lp-card__thumb--ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f3f3f3 0, #ecebeb 50%, #f3f3f3 100%);
}

.lp-card__content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lp-card__title {
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #111;
}

.lp-card__title span {
  color: #dfa11a; /* dorado */
}

.lp-card__meta {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 10px 0;
}

.lp-card__poemas-count {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 10px 0;
  font-style: italic;
}

.lp-card__excerpt {
  color: #333;
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.lp-card__btn {
  display: inline-block;
  align-self: flex-start;
  background: #dfa11a;
  color: #111;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.lp-card__btn:hover {
  background: #c98f17;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(223, 161, 26, 0.3);
}

.lp-card__social {
  margin: 10px 0;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.lp-card__social a {
  margin-right: 12px;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lp-card__social a:hover {
  color: #dfa11a;
}

/* ================================================
   TARJETAS DE POEMAS
   ================================================ */

.lp-poema-card {
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  position: relative;
}

.lp-poema-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dfa11a 0%, #f4c542 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lp-poema-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: #dfa11a;
}

.lp-poema-card:hover::before {
  opacity: 1;
}

.lp-poema-card__content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.lp-poema-card__author-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  border: 2px solid #dfa11a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lp-poema-card__author-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-poema-card__title {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #111;
  font-family: 'Georgia', serif;
}

.lp-poema-card__author {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 16px 0;
  font-style: italic;
}

.lp-poema-card__author span {
  color: #dfa11a;
  font-weight: 600;
  font-style: normal;
}

.lp-poema-card__author a {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.lp-poema-card__author a:hover {
  opacity: 0.7;
}

.lp-poema-card__preview {
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: 8px;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin: 0 0 20px 0;
  flex-grow: 1;
  border-left: 3px solid #dfa11a;
  position: relative;
  overflow: hidden;
}

.lp-poema-card__preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
}

.lp-poema-card__btn {
  display: inline-block;
  align-self: flex-start;
  background: #dfa11a;
  color: #111;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.lp-poema-card__btn:hover {
  background: #c98f17;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(223, 161, 26, 0.3);
}

/* ================================================
   PÁGINA INDIVIDUAL DE POEMA
   ================================================ */

.lp-poema-single {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.lp-poema-single__header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #dfa11a;
}

.lp-poema-single__title {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: #111;
  font-family: 'Georgia', serif;
}

.lp-poema-single__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.lp-poema-single__author-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #dfa11a;
}

.lp-poema-single__author-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-poema-single__author-info {
  text-align: left;
}

.lp-poema-single__author-label {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.lp-poema-single__author-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.lp-poema-single__author-name a {
  color: #dfa11a;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.lp-poema-single__author-name a:hover {
  opacity: 0.7;
}

.lp-poema-single__content {
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #dfa11a;
  font-family: 'Georgia', serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  white-space: pre-wrap;
}

.lp-poema-single__back {
  margin-top: 40px;
  text-align: center;
}

.lp-poema-single__back-btn {
  display: inline-block;
  background: #dfa11a;
  color: #111;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.lp-poema-single__back-btn:hover {
  background: #c98f17;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(223, 161, 26, 0.3);
}

/* ================================================
   SCROLL SUAVE
   ================================================ */

html {
  scroll-behavior: smooth;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */

@media (max-width: 768px) {
  .lp-poema-single__title {
    font-size: 2rem;
  }

  .lp-poema-single__content {
    padding: 24px;
    font-size: 1rem;
  }

  .lp-poema-card__title {
    font-size: 1.1rem;
  }

  .lp-poema-card__preview {
    font-size: 0.9rem;
    padding: 12px;
  }
}

/* ================================================
   ANIMACIONES OPCIONALES
   ================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lp-card,
.lp-poema-card {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.lp-card:nth-child(1),
.lp-poema-card:nth-child(1) {
  animation-delay: 0s;
}
.lp-card:nth-child(2),
.lp-poema-card:nth-child(2) {
  animation-delay: 0.1s;
}
.lp-card:nth-child(3),
.lp-poema-card:nth-child(3) {
  animation-delay: 0.2s;
}
.lp-card:nth-child(4),
.lp-poema-card:nth-child(4) {
  animation-delay: 0.3s;
}
.lp-card:nth-child(5),
.lp-poema-card:nth-child(5) {
  animation-delay: 0.4s;
}
.lp-card:nth-child(6),
.lp-poema-card:nth-child(6) {
  animation-delay: 0.5s;
}

/* ================================================
   ESTILOS PARA EL ADMIN
   ================================================ */

.lpr-poema-row {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.lpr-poema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dfa11a;
}

.lpr-poema-header h4 {
  margin: 0;
  color: #333;
  font-size: 16px;
}

.lpr-remove-poema {
  background: #dc3232;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
}

.lpr-remove-poema:hover {
  background: #a00;
}

.lpr-remove-poema .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.lpr-poema-content {
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

#lpr-add-poema {
  margin-top: 10px;
}



.lpr-poema-lazy {
        min-height: 300px;
        position: relative;
    }
    
    .lpr-poema-placeholder {
        padding: 40px;
        text-align: center;
        color: #999;
    }
    
    .lpr-poema-placeholder::after {
        content: '';
        display: block;
        width: 40px;
        height: 40px;
        margin: 20px auto;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #dfa11a;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .lpr-poema-real-content {
        display: none;
    }