/*
 * Custom styles
 *
 * Site-wide overrides and page-specific styles extracted from inline
 * <style> blocks in index.html, photos.md, and all-posts.md.
 */

/* Existing site-wide overrides */
.sidebar-about h1 a {
  line-height: normal;
}

blockquote {
    background-color: #f9f9f9;
    border-left: 4px solid #ac4142;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
    color: #313131;
}


/* ==========================================================================
   Home page (index.html)
   ========================================================================== */

.intro-section {
  margin-bottom: 3rem;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 42rem;
}

.intro-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.intro-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #313131;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
}

.intro-section p {
  margin-bottom: 1rem;
}

.read-more-link {
  color: #ac4142;
  text-decoration: none;
  font-weight: bold;
}

.read-more-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .intro-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }
}

/* "View All Posts" button */
#viewAllPostsBtn {
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #ac4142;
  color: white;
  text-decoration: none;
  text-align: center;
  font-family: "PT Sans", sans-serif;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#viewAllPostsBtn:hover {
  transform: translateY(-2px);
  background-color: #d85c58;
}


/* ==========================================================================
   Photos page (photos.md)
   ========================================================================== */

/* Masonry Gallery — brick-wall effect with white grout lines */
.gallery {
  display: flex;
  gap: 12px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.gallery-column {
  flex: 1 1 0;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.gallery-item {
  width: 100%;
  display: block;
  margin: 0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery-item:hover {
  opacity: 0.8;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: default;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #ddd;
}

/* "Load More" button */
#loadMoreBtn {
  display: block;
  width: fit-content;
  margin: 30px auto;
  padding: 10px 20px;
  background-color: #ac4142;
  color: white;
  text-decoration: none;
  text-align: center;
  font-family: "PT Sans", sans-serif;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#loadMoreBtn:hover {
  transform: translateY(-2px);
  background-color: #d85c58;
}

/* Gallery responsive — column count handled by JS */
@media (max-width: 600px) {
  .close {
    font-size: 30px;
    top: 10px;
    right: 20px;
  }
}


/* ==========================================================================
   All Posts page (all-posts.md)
   ========================================================================== */

/* Tag filter row */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 20px 0;
}

.tag-btn {
  background-color: #ac4142;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tag-btn:hover {
  background-color: #c25455;
}

.tag-btn.active {
  background-color: #313131;
}

/* Tag pills on each post */
.post-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.tag-pill {
  display: inline-block;
  background-color: #f0f0f0;
  color: #666;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background-color: #e0e0e0;
  color: #333;
}

.tag-pill.active {
  background-color: #313131;
  color: white;
}


/* ==========================================================================
   Post image sizing
   ========================================================================== */

/* Standard landscape photos (85% width) */
.post-body img,
.post-entry img {
  max-width: 85%;
  height: auto;
}

/* Wide screenshots/graphics — keep full width */
.img-wide img {
  max-width: 100%;
}

/* Portrait post images (50% width) */
.img-portrait img {
  max-width: 50%;
  height: auto;
  display: block;
}

/* Near-square post image (70% width) */
.img-square img {
  max-width: 70%;
  height: auto;
  display: block;
}

/* Image grid for consecutive images */
.img-grid {
  margin: 1rem 0;
}

.img-grid .img-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.img-grid .img-row:last-child {
  margin-bottom: 0;
}

.img-grid .img-row img {
  width: 48%;
  max-width: 48%;
  height: auto;
  margin: 0;
  display: block;
  object-fit: contain;
  border-radius: 0;
}


/* ==========================================================================
   Post footer columns (tags + related posts side by side)
   ========================================================================== */

.post-footer-columns {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 0.7em;
}

.post-footer-columns > section.related:first-child {
  flex: 1 1 0;
  min-width: 0;
}

.post-footer-columns > section.related:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .post-footer-columns {
    flex-direction: column;
    gap: 0;
  }
}

/* Shrink tag icon to match text */
.post-footer-columns .icon svg {
  height: 11px;
  width: 11px;
  vertical-align: middle;
}


/* ==========================================================================
   Post & page navigation (prev/next pills)
   ========================================================================== */

.post-navigation,
.page-navigation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  gap: 1rem;
}

.post-nav-link,
.page-nav-link {
  flex: 1 1 0;
  max-width: max-content;
  background-color: #ac4142;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-align: left;
  text-wrap: balance;
}

.post-nav-link:hover,
.page-nav-link:hover {
  background-color: #d85c58;
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.post-nav-older,
.page-nav-older {
  margin-left: auto;
}

.post-nav-newer,
.page-nav-newer {
  margin-right: auto;
}

/* Post meta layout */
.post-meta {
  margin-top: -.5rem;
  margin-bottom: 1rem;
}

.post-meta-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.post-meta .post-date {
  display: inline;
  margin: 0;
}

.post-meta .post-categories {
  display: inline;
}

/* Audio player for post voice playback */
.post-audio {
  margin-left: 12px;
}

.post-audio-btn {
  background: none;
  border: 1px solid #ac4142;
  color: #ac4142;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  vertical-align: baseline;
  line-height: 1.4;
}

.post-audio-arrow {
  font-size: 0.55em;
}

.post-audio-btn:hover {
  background-color: #ac4142;
  color: white;
}

.post-audio-player {
  display: none;
  margin-top: 8px;
}

.post-audio-player.open {
  display: block;
}

.post-audio-player audio {
  width: 100%;
}

@media (max-width: 600px) {
  .post-meta-line {
    flex-wrap: wrap;
  }

  .post-meta .post-date,
  .post-audio {
    flex-shrink: 0;
  }

  .post-meta .post-categories {
    flex-basis: 100%;
    order: 1;
    margin-top: 2px;
  }

  .post-categories-sep {
    display: none;
  }

  .post-pdf {
    flex-shrink: 0;
  }
}

/* PDF download button — matches audio button style */
.post-pdf {
  margin-left: 8px;
}

.post-pdf-btn {
  background: none;
  border: 1px solid #ac4142;
  color: #ac4142;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  vertical-align: baseline;
  line-height: 1.4;
  text-decoration: none;
  display: inline-block;
}

.post-pdf-icon {
  font-size: 0.7em;
  font-weight: 900;
}

.post-pdf-btn:hover {
  background-color: #ac4142;
  color: white;
}
