/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  font-size: 15px;
  color: rgb(96, 101, 105);
  line-height: 1.6;
  background-color: #fff;
}

a {
  color: rgb(229, 78, 83);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container for readable content width */
.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Index Page Styles */
.index-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.index-header {
  text-align: center;
  margin-bottom: 2em;
  padding: 2em 0;
}

.logo-image {
  max-width: 100%;
  height: auto;
  max-height: 200px;
}

.welcome-section {
  text-align: center;
  margin-bottom: 3em;
  padding: 0 20px;
}

.welcome-section h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: rgb(96, 101, 105);
  font-weight: bold;
}

.welcome-section p {
  font-size: 16px;
  line-height: 1.8;
  color: rgb(96, 101, 105);
  max-width: 700px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid rgba(96, 101, 105, 0.2);
}

.category-nav {
  margin-top: 1.5em;
  font-size: 14px;
}

.category-nav a {
  color: rgb(229, 78, 83);
  text-decoration: none;
}

.category-nav a:hover {
  text-decoration: underline;
}

/* Post Cards */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.post-card {
  position: relative;
  display: flex;
  background-color: #fff;
  border: 1px solid rgba(96, 101, 105, 0.1);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card:hover .post-card-title {
  color: rgb(229, 78, 83);
}

/* Stretched link on top so the card is clickable; labels sit above it so they link to category */
.post-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
}

.post-card-link:hover {
  text-decoration: none;
}

.post-card-categories .post-category-label {
  position: relative;
  z-index: 2;
}

.post-card-image {
  flex: 0 0 25%;
  width: 25%;
  overflow: hidden;
  background-color: #f5f5f5;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 150px;
  background-color: #e0e0e0;
}

.post-card-content {
  flex: 0 0 75%;
  width: 75%;
  padding: 1.5em;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  color: rgb(96, 101, 105);
  font-weight: bold;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.75em;
}

.post-card-date {
  font-size: 13px;
  color: rgb(166, 166, 166);
}

.post-card-categories .post-category-label {
  font-size: 11px;
  padding: 0.15em 0.5em;
}

.post-card-excerpt {
  font-size: 14px;
  color: rgb(96, 101, 105);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .index-container {
    padding: 15px;
  }
  
  .post-card {
    flex-direction: column;
  }
  
  .post-card-image {
    flex: 0 0 100%;
    width: 100%;
    height: 200px;
  }
  
  .post-card-content {
    flex: 0 0 100%;
    width: 100%;
  }
  
  .post-card-title {
    font-size: 1.25em;
  }
}

/* Post Header */
.post-header {
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid rgba(96, 101, 105, 0.2);
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: rgb(229, 78, 83);
  text-decoration: none;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Post Layout Styles */
.cover-image-wrapper {
  margin-bottom: 2em;
  text-align: center;
}

.cover-image {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

article h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: rgb(96, 101, 105);
  font-weight: bold;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 1.5em;
}

.post-date {
  color: rgb(96, 101, 105);
  opacity: 0.7;
}

.post-categories {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35em;
}

.post-category-label {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  /* Fallback for any category not in the list below */
  color: #b53a32;
  background-color: rgba(181, 58, 50, 0.12);
}

.post-category-label:hover {
  text-decoration: none;
  background-color: rgba(181, 58, 50, 0.22);
}

/* Category-specific colours (same tone, distinctly recognisable) */
.post-category-picture-log {
  color: #b53a32;
  background-color: rgba(181, 58, 50, 0.12);
}
.post-category-picture-log:hover {
  background-color: rgba(181, 58, 50, 0.22);
}

.post-category-big-emma-diaries {
  color: #9a6b0a;
  background-color: rgba(154, 107, 10, 0.12);
}
.post-category-big-emma-diaries:hover {
  background-color: rgba(154, 107, 10, 0.22);
}

.post-category-travel {
  color: #0d9488;
  background-color: rgba(13, 148, 136, 0.12);
}
.post-category-travel:hover {
  background-color: rgba(13, 148, 136, 0.22);
}

.post-category-writing {
  color: #1d4ed8;
  background-color: rgba(29, 78, 216, 0.12);
}
.post-category-writing:hover {
  background-color: rgba(29, 78, 216, 0.22);
}

.post-category-vanlife {
  color: #c2410c;
  background-color: rgba(194, 65, 12, 0.12);
}
.post-category-vanlife:hover {
  background-color: rgba(194, 65, 12, 0.22);
}

.post-category-language-and-culture {
  color: #6d28d9;
  background-color: rgba(109, 40, 217, 0.12);
}
.post-category-language-and-culture:hover {
  background-color: rgba(109, 40, 217, 0.22);
}

.post-category-popular-questions {
  color: #475569;
  background-color: rgba(71, 85, 105, 0.12);
}
.post-category-popular-questions:hover {
  background-color: rgba(71, 85, 105, 0.22);
}

.post-category-the-bus {
  color: #92400e;
  background-color: rgba(146, 64, 14, 0.12);
}
.post-category-the-bus:hover {
  background-color: rgba(146, 64, 14, 0.22);
}

.post-category-guest-posts {
  color: #047857;
  background-color: rgba(4, 120, 87, 0.12);
}
.post-category-guest-posts:hover {
  background-color: rgba(4, 120, 87, 0.22);
}

.post-content {
  color: rgb(96, 101, 105);
}

.post-content p {
  margin-bottom: 1em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: rgb(96, 101, 105);
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1em 0;
}

/* Figure and Caption Styles */
.post-content figure {
  margin: 1.5em 0;
  text-align: center;
}

.post-content figure img {
  margin: 0;
  display: block;
}

.post-content figure figcaption {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-style: italic;
  color: rgb(166, 166, 166);
  margin-top: 0.5em;
  line-height: 1.4;
  text-align: center;
}

/* Figure alignment classes */
.post-content figure.align-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.post-content figure.align-right {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
  max-width: 50%;
}

.post-content figure.align-left {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
  max-width: 50%;
}

@media (max-width: 768px) {
  .post-content figure.align-right,
  .post-content figure.align-left {
    float: none;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
  }
}

/* Footer Styles */
.site-footer {
  margin-top: 4em;
  padding: 2em 20px;
  border-top: 1px solid rgba(96, 101, 105, 0.2);
  background-color: #f9f9f9;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: rgb(166, 166, 166);
}

.footer-content p {
  margin: 0.5em 0;
}

.footer-content a {
  color: rgb(229, 78, 83);
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 1.5em 15px;
  }
}

.post-content ul,
.post-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.post-content li {
  margin-bottom: 0.5em;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .content-container {
    padding: 15px;
  }
  
  article h1 {
    font-size: 1.75em;
  }
  
  .cover-image {
    max-height: 300px;
  }
}

