/* ============================
   BLOG LISTING PAGE
   File: blog-styling.css
============================ */

/* BLOG LAYOUT WRAPPER */
.blog-layout {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  align-items: flex-start;
}

/* MAIN CONTENT */
.blog-main {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 40px;
  order: 2;
}

/* SIDEBAR */
.blog-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
  order: 1;
  position: sticky;
  top: 120px;
}

/* Sidebar boxes */
.sidebar-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.sidebar-box h3 {
  font-size: 1.4rem;
  color: #111;
  margin-bottom: 5px;
  border-bottom: 2px solid #b2975a;
  padding-bottom: 6px;
}

.sidebar-box p, 
.sidebar-box ul {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.sidebar-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-box ul li {
  margin-bottom: 10px;
}

.sidebar-box ul li a,
.sidebar-box ul li a:visited {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.sidebar-box ul li a:hover {
  color: #b2975a;
}

.sidebar-box ul li a.current-page {
  font-weight: 600;
  color: #b2975a;
}

/* BLOG POST CARD */
.blog-listing {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.blog-post {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Post Image */
.post-image {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
}

/* Post Content */
.post-content {
  padding: 20px 25px;
}

.post-category {
  display: inline-block;
  background: #b2975a;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.post-title {
  font-size: 1.9rem;
  margin: 0 0 12px;
  color: #111;
  line-height: 1.2;
}

.post-snippet {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 18px;
}

/* Read More Button */
.read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #b2975a;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.read-more-btn:hover {
  background: #a07f42;
  transform: translateY(-2px);
}

/* Hidden full post content (collapsed) */
.post-full-content {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin-top: 0;
  transition: padding 0.5s ease, margin 0.5s ease;
}

/* Expanded state */
.blog-post.expanded .post-full-content {
  max-height: none !important;
  padding: 20px 25px 60px 25px;
  margin-top: 15px;
  background: #fafafa;
  border-radius: 8px;
}

/* Styling inside expanded content */
.post-full-content h2 {
  font-size: 1.5rem;
  color: #111;
  margin: 20px 0 10px;
  line-height: 1.3;
  border-bottom: 1px solid #b2975a;
  padding-bottom: 6px;
}

.post-full-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 15px;
}

.post-full-content ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 15px;
}

.post-full-content ul li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* Close button inside expanded content */
.post-full-content .close-post {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #b2975a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.post-full-content .close-post:hover {
  background: #a07f42;
}

/* Hide Read More button when expanded */
.blog-post.expanded .read-more-btn {
  display: none;
}

/* PAGINATION */
.blog-pagination {
  text-align: center;
  margin-top: 30px;
  font-family: 'Century Gothic', sans-serif;
}

/* Page links */
.page-link {
  display: inline-block;
  margin: 0 6px;
  padding: 10px 16px;
  background: #f5f5f5;
  color: #333;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.page-link:hover {
  background: #b2975a;
  color: #fff;
}

/* Pagination for small screens: stack Previous/Next */
@media (max-width: 480px) {
  .blog-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .blog-pagination .page-link {
    display: block;
    width: 90%;
    text-align: center;
    margin: 0;
  }
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 1024px) {
  .blog-layout {
    flex-direction: column;
  }

  .blog-main {
    order: 2;
  }

  .blog-sidebar {
    order: 1;
    width: 100%;
    position: relative;
    top: auto;
    margin-bottom: 30px;
  }

  .post-image {
    height: 180px;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-snippet {
    font-size: 0.95rem;
  }

  .blog-post.expanded .post-full-content {
    max-height: none;
    padding: 20px 20px 80px 20px;
  }

  .post-full-content {
    transition: all 0.5s ease;
  }

  .blog-pagination .current-page {
    background: #b2975a;
    color: #fff;
    pointer-events: none;
  }
}

/* MOBILE TYPOGRAPHY ADJUSTMENTS */
@media (max-width: 600px) {
  .post-title {
    font-size: 1.6rem;
    line-height: 1.25;
  }

  .post-snippet {
    font-size: 1.05rem;
  }

  .post-full-content p {
    font-size: 1.1rem;
    line-height: 1.75;
  }

  .post-full-content ul li {
    font-size: 1.05rem;
  }
}

/* ============================
   TABLET LAYOUT ADJUSTMENTS
============================ */

/* Tablets: landscape (sidebar on side) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .blog-layout {
    flex-direction: row;
    gap: 30px;
  }

  .blog-sidebar {
    flex: 1;
    position: sticky;
    top: 120px;
  }

  .blog-main {
    flex: 3;
  }

  .post-image {
    height: 250px;
  }
}

/* Tablets: portrait (stack sidebar above posts) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .blog-layout {
    flex-direction: column;
  }

  .blog-sidebar {
    order: 1;
    width: 100%;
    position: relative;
    top: auto;
    margin-bottom: 30px;
  }

  .blog-main {
    order: 2;
    width: 100%;
  }

  .post-image {
    height: 200px;
  }
}
