/*
 * Blog pages (/blogs/). Layout follows the live agents.teenpattistars.io blog:
 * white page, breadcrumbs, three-column cards, and a post page with a sidebar.
 * The header and footer come from styles.css.
 */
.blog-page {
  --blog-ink: #333;
  --blog-muted: #6b6b6b;
  --blog-line: #e6e6e6;
  --blog-accent: #571037;
  --blog-link: #12a1bf;
  background: #fff;
  color: var(--blog-ink);
  font-family: "Roboto", "Inter", sans-serif;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.blog-main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 45px 70px;
}

/* Breadcrumbs and page heading */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 52px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-hidden] {
  font-weight: 400;
}

.blog-head {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--blog-line);
}

.blog-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.blog-head h1 {
  margin: 0;
  color: #1b1b1b;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.blog-search {
  display: flex;
  gap: 8px;
}

.blog-search input {
  width: min(260px, 60vw);
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fff;
  color: var(--blog-ink);
  font: inherit;
  font-size: 15px;
}

.blog-search input:focus {
  outline: 2px solid var(--blog-accent);
  outline-offset: 0;
  border-color: transparent;
}

.blog-search button {
  padding: 10px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--blog-accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.blog-search button:hover {
  filter: brightness(1.15);
}

.blog-status {
  margin: 30px 0 0;
  color: var(--blog-muted);
  font-size: 16px;
}

.blog-status a {
  color: var(--blog-accent);
}

/* Cards */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 30px;
  padding-top: 80px;
}

.blog-card {
  min-width: 0;
}

.blog-card-image {
  display: block;
  aspect-ratio: 43 / 24;
  overflow: hidden;
  background: #eee;
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.03);
}

.blog-card-image--empty {
  background: linear-gradient(135deg, #571037, #8a2a5a);
}

.blog-card-title {
  margin: 27px 0 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 33px;
}

.blog-card-title a {
  color: #333;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--blog-accent);
}

.blog-card-excerpt {
  display: -webkit-box;
  margin: 15px 0 0;
  overflow: hidden;
  color: #555;
  font-size: 15px;
  line-height: 24px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.blog-card-more {
  display: inline-block;
  margin-top: 30px;
  color: #8a8a8a;
  font-size: 14px;
  text-decoration: none;
}

.blog-card-more:hover {
  color: var(--blog-accent);
}

/* Pagination */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 70px;
}

.pagination a,
.pagination-current,
.pagination-gap {
  min-width: 40px;
  padding: 9px 14px;
  border: 1px solid var(--blog-line);
  border-radius: 4px;
  color: #444;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}

.pagination-gap {
  border-color: transparent;
}

.pagination a:hover {
  border-color: var(--blog-accent);
  color: var(--blog-accent);
}

.pagination-current {
  border-color: var(--blog-accent);
  background: var(--blog-accent);
  color: #fff;
  font-weight: 700;
}

/* Post page */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0 40px;
  align-items: start;
}

.post {
  min-width: 0;
  padding-right: 10px;
}

/* A plain page (such as /big-agent-india/) has no sidebar, so its text sits in one centred column. */
.page-article {
  width: min(900px, 100%);
  margin: 0 auto;
  padding-right: 0;
}

.post-title {
  margin: 38px 0 0;
  color: #333;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--blog-muted);
  font-size: 14px;
}

.post-meta-dot {
  color: #bbb;
}

.post-content {
  max-width: 900px;
  margin-top: 36px;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content p {
  margin: 0 0 1.2em;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 1.8em 0 0.6em;
  color: #222;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 120px;
}

.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 23px; }
.post-content h4 { font-size: 19px; }
.post-content h5,
.post-content h6 { font-size: 17px; }

.post-content a {
  color: var(--blog-link);
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: var(--blog-accent);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.5em;
}

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

.post-content li > ul,
.post-content li > ol {
  margin: 0.4em 0 0;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto;
}

.post-content blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--blog-accent);
  color: #555;
}

.post-content figure {
  margin: 1.6em 0;
}

.post-content figcaption {
  color: var(--blog-muted);
  font-size: 14px;
  text-align: center;
}

.post-content pre {
  padding: 16px;
  overflow-x: auto;
  border-radius: 6px;
  background: #f5f5f5;
  font-size: 14px;
}

.post-content table {
  display: block;
  width: 100%;
  margin: 1.6em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.post-content th,
.post-content td {
  min-width: 120px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.post-content th {
  background: #f5f0f3;
}

.post-content .toc {
  margin: 1.6em 0;
  padding: 18px 22px;
  border: 1px solid #e3d6dd;
  border-radius: 6px;
  background: #faf6f8;
  font-size: 16px;
  line-height: 1.6;
}

.post-content .toc summary {
  color: var(--blog-accent);
  font-weight: 700;
  cursor: pointer;
}

.post-content .toc ol,
.post-content .toc ul {
  margin: 10px 0 0;
}

.post-content .toc li {
  margin-bottom: 4px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 900px;
  margin: 40px 0 0;
}

.post-tags a {
  padding: 5px 12px;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  color: #555;
  font-size: 13px;
  text-decoration: none;
}

.post-tags a:hover {
  border-color: var(--blog-accent);
  color: var(--blog-accent);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--blog-line);
}

.post-nav a {
  color: #333;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.post-nav a:hover {
  color: var(--blog-accent);
}

.post-nav span {
  display: block;
  margin-bottom: 4px;
  color: var(--blog-muted);
  font-size: 13px;
  font-weight: 400;
}

.post-nav-newer {
  text-align: right;
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 130px;
  margin-top: 38px;
  padding-left: 30px;
  border-left: 1px solid var(--blog-line);
}

.widget + .widget {
  margin-top: 50px;
}

.widget-title {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--blog-line);
  color: #333;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar .blog-search {
  flex-wrap: wrap;
}

.sidebar .blog-search input {
  width: 100%;
}

.widget-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-list li + li {
  margin-top: 14px;
}

.widget-list a {
  color: #555;
  font-size: 15px;
  line-height: 1.5;
  text-underline-offset: 2px;
}

.widget-list a:hover {
  color: var(--blog-accent);
}

/* Smaller screens */

@media (max-width: 1100px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    margin-top: 60px;
    padding: 40px 0 0;
    border-top: 1px solid var(--blog-line);
    border-left: 0;
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .blog-main {
    padding: 0 18px 50px;
  }

  .breadcrumbs {
    padding-top: 30px;
  }

  .blog-head {
    padding-bottom: 26px;
  }

  .blog-head h1 {
    font-size: 30px;
  }

  .blog-search {
    width: 100%;
  }

  .blog-search input {
    flex: 1;
    width: auto;
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding-top: 40px;
  }

  .post-title {
    margin-top: 24px;
    font-size: 25px;
  }

  .post-content {
    font-size: 16px;
  }

  .post-content h2 { font-size: 24px; }
  .post-content h3 { font-size: 20px; }

  .post-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-nav-newer {
    text-align: left;
  }
}
