/**
 * Phap Thoai Styling
 * Custom styles for phap-thoai post type and album-phap-thoai taxonomy
 */

/* ==========================================================================
   Archive Page - Main archive listing albums and posts
   ========================================================================== */

.phap-thoai-archive-container {
  margin-bottom: 2rem;
}

.phap-thoai-album-section {
  margin-bottom: 3rem;
  /* padding-bottom: 2rem; */
  border-bottom: 1px solid rgba(34, 104, 165, 0.2);
}

.phap-thoai-album-section:last-child {
  border-bottom: none;
}

.phap-thoai-album-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--global-palette1);
  font-weight: 600;
}

.phap-thoai-album-title a {
  color: var(--global-palette1);
  text-decoration: none;
}

.phap-thoai-album-title a:hover {
  color: var(--global-palette-highlight);
}

.phap-thoai-count {
  font-size: 0.9rem;
  color: var(--global-palette5);
  font-weight: normal;
  margin-left: 0.5rem;
}

.phap-thoai-album-description {
  margin-bottom: 1rem;
  color: var(--global-palette4);
  font-style: italic;
}

.phap-thoai-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.phap-thoai-item {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phap-thoai-item:last-child {
  border-bottom: none;
}

.phap-thoai-link {
  color: var(--global-palette4);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  margin-right: 1rem;
}

.phap-thoai-link:hover {
  color: var(--global-palette1);
}

.phap-thoai-date {
  font-size: 0.85rem;
  color: var(--global-palette5);
  white-space: nowrap;
}

.phap-thoai-view-all {
  text-align: center;
  margin-top: 1rem;
}

.view-all-link {
  display: inline-block;
  font-size: 14px;
  color: var(--global-palette1, #0073aa);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--global-palette1, #0073aa);
  border-radius: 4px;
  transition: all 0.2s ease;
  background: white;
}

.view-all-link:hover {
  background: var(--global-palette1, #0073aa);
  color: white;
  text-decoration: none;
}

/* ==========================================================================
   Taxonomy Archive - Album cards and individual album listing
   ========================================================================== */

/* Grid layout for album cards */
.album-phap-thoai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.type-album-phap-thoai {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.type-album-phap-thoai:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.type-album-phap-thoai .entry-content-wrap {
  padding: 0;
  background: white;
}

.type-album-phap-thoai .entry-featured-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.album-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.type-album-phap-thoai:hover .album-featured-image {
  transform: scale(1.05);
}

.type-album-phap-thoai .entry-header {
  padding: 1rem 1rem 0.5rem;
  margin: 0;
}

.type-album-phap-thoai .entry-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--global-palette1);
  font-weight: 600;
}

.type-album-phap-thoai .entry-title a {
  color: var(--global-palette1);
  text-decoration: none;
}

.type-album-phap-thoai .entry-title a:hover {
  color: var(--global-palette-highlight);
}

.type-album-phap-thoai .entry-summary {
  padding: 0 1rem 0.5rem;
  color: var(--global-palette4);
  font-size: 0.9rem;
  line-height: 1.5;
}

.type-album-phap-thoai .entry-meta {
  padding: 0 1rem 0.5rem;
  color: var(--global-palette5);
  font-size: 0.85rem;
}

.album-post-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.album-post-count i {
  color: var(--global-palette-highlight);
}

.entry-actions {
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.album-view-link {
  display: inline-block;
  background: var(--global-palette1);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.album-view-link:hover {
  background: var(--global-palette-highlight);
  color: white;
}

/* Simple list layout for individual album */
.album-phap-thoai-single {
  max-width: 100%;
}

.album-description {
  background: var(--global-palette9, #f8f9fa);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--global-palette1);
}

.album-info {
  margin-bottom: 2rem;
  padding: 1rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.album-info .album-post-count {
  margin: 0;
  color: var(--global-palette4);
  font-size: 1rem;
}

.phap-thoai-list-container {
  margin-bottom: 2rem;
}

.phap-thoai-simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phap-thoai-simple-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phap-thoai-simple-item:hover {
  border-color: var(--global-palette1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.phap-thoai-number {
  font-weight: 600;
  /* color: var(--global-palette1); */
  font-size: 1.1rem;
  margin-right: 1rem;
  min-width: 2rem;
  text-align: center;
  background: var(--global-palette9, #f8f9fa);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phap-thoai-content {
  flex: 1;
}

.phap-thoai-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.phap-thoai-title a {
  /* color: var(--global-palette1); */
  text-decoration: none;
  transition: color 0.2s ease;
}

.phap-thoai-title a:hover {
  color: var(--global-palette-highlight);
}

.phap-thoai-meta {
  color: var(--global-palette5);
  font-size: 0.9rem;
  line-height: 1.4;
}

.phap-thoai-separator {
  margin: 0 0.5rem;
}

.phap-thoai-excerpt {
  color: var(--global-palette4);
}

.album-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.back-to-archive,
.back-to-albums {
  display: inline-block;
  color: var(--global-palette1);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--global-palette1);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.back-to-archive:hover,
.back-to-albums:hover {
  background: var(--global-palette1);
  color: white;
}

.no-albums-message,
.no-posts-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--global-palette4);
}

.no-albums-message h2,
.no-posts-message h2 {
  color: var(--global-palette1);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Single Post - Related posts section
   ========================================================================== */

.phap-thoai-related-section {
  margin-top: 5rem;
  padding: 2rem;
  background: var(--global-palette9, #f8f9fa);
  border-radius: 8px;
  border-top: 4px solid var(--global-palette1);
}

.related-section-title {
  font-size: 1.3rem;
  color: var(--global-palette1);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.related-section-title a {
  color: var(--global-palette-highlight);
  text-decoration: none;
}

.related-section-title a:hover {
  text-decoration: underline;
}

.related-phap-thoai-list {
  margin-bottom: 2rem;
}

.phap-thoai-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phap-thoai-related-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phap-thoai-related-item:hover {
  border-color: var(--global-palette1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-item-number {
  font-weight: 600;
  color: white;
  font-size: 0.8rem;
  margin-right: 1rem;
  min-width: 1.5rem;
  text-align: center;
  background: var(--global-palette-highlight);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.related-item-content {
  flex: 1;
}

.related-item-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.related-item-title a {
  /* color: var(--global-palette1); */
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-item-title a:hover {
  color: var(--global-palette-highlight);
}

.related-item-meta {
  color: var(--global-palette5);
  font-size: 0.85rem;
  line-height: 1.4;
}

.related-item-date {
  font-weight: 500;
}

.related-item-separator {
  margin: 0 0.5rem;
}

.related-item-excerpt {
  color: var(--global-palette4);
}

.related-navigation {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.view-full-album {
  display: inline-block;
  background: var(--global-palette1);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.view-full-album:hover {
  background: var(--global-palette-highlight);
  color: white;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  /* Archive page responsive */
  .phap-thoai-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .phap-thoai-link {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  .phap-thoai-date {
    font-size: 0.8rem;
  }

  .phap-thoai-album-title {
    font-size: 1.25rem;
  }

  .view-all-link {
    font-size: 12px;
    padding: 6px 12px;
  }

  /* Album cards responsive */
  .album-phap-thoai-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .type-album-phap-thoai .entry-featured-image {
    height: 150px;
  }

  .type-album-phap-thoai .entry-title {
    font-size: 1.1rem;
  }

  /* Simple list responsive */
  .phap-thoai-simple-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .phap-thoai-number {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .album-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .back-to-archive,
  .back-to-albums {
    width: 100%;
    text-align: center;
  }

  /* Single post responsive */
  .phap-thoai-related-section {
    margin-top: 2rem;
    padding: 1.5rem;
  }

  .related-section-title {
    font-size: 1.1rem;
  }

  .phap-thoai-related-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-item-number {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* Album cards mobile */
  .type-album-phap-thoai .entry-header,
  .type-album-phap-thoai .entry-summary,
  .type-album-phap-thoai .entry-meta,
  .entry-actions {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Simple list mobile */
  .album-description,
  .album-info,
  .phap-thoai-simple-item {
    padding: 1rem;
  }

  .phap-thoai-title {
    font-size: 1rem;
  }

  /* Single post mobile */
  .phap-thoai-related-section {
    padding: 1rem;
  }

  .phap-thoai-related-item {
    padding: 0.75rem;
  }

  .related-item-title {
    font-size: 0.9rem;
  }

  .view-full-album {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
