/* =========================================================
   FINAL BLOG LISTING + SINGLE POST PAGE CSS
   ========================================================= */

/* -------------------------
   ROOT VARIABLES
-------------------------- */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #19c37d;
  --title-color: #0f172a;
  --text-color: #64748b;
  --dark-text: #334155;
  --white-color: #ffffff;
  --border-color: #e5e7eb;
  --bg-light: #f8fbff;
  --bg-soft: #f1f5f9;
  --shadow-sm: 0 8px 25px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 55px rgba(15, 23, 42, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --transition: all 0.35s ease;
}

/* -------------------------
   GLOBAL RESET / HELPERS
-------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

a,
button {
  transition: var(--transition);
}

body {
  overflow-x: hidden;
}

/* =========================================================
   COMMON PAGE HEADER
   ========================================================= */
.custom-page-header {
  position: relative;
  padding: 110px 0 90px;
  background: linear-gradient(135deg, #0d6efd 0%, #1e3a8a 100%);
  overflow: hidden;
}

.custom-page-header::before,
.custom-page-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
}

.custom-page-header::before {
  width: 220px;
  height: 220px;
  top: -50px;
  left: -60px;
}

.custom-page-header::after {
  width: 300px;
  height: 300px;
  right: -80px;
  bottom: -100px;
}

.header-content-box {
  position: relative;
  z-index: 1;
  text-align: center;
}

.header-content-box h1,
.header-title {
  margin: 0 0 15px;
  color: var(--white-color);
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  word-break: break-word;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb-wrapper {
  display: flex;
  justify-content: center;
}

.breadcrumb {
  margin: 0;
  padding: 12px 22px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.breadcrumb-item {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-item a {
  color: var(--white-color);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #dbeafe;
}

.breadcrumb-item.active {
  color: #dbeafe;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(255, 255, 255, 0.7);
  padding: 0 10px;
}

/* =========================================================
   BLOG LISTING PAGE
   ========================================================= */
.our-blog {
  padding: 100px 0;
  background: var(--bg-light);
}

.section-row {
  margin-bottom: 50px;
}

.section-title h3 {
  margin: 0 0 12px;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title h2 {
  margin: 0;
  color: var(--title-color);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
}

.our-blog .row > [class*="col-"] {
  display: flex;
}

/* Blog Card */
.post-item {
  width: 100%;
  height: 100%;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

.post-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.post-featured-image {
  position: relative;
  overflow: hidden;
}

.post-featured-image a {
  display: block;
  position: relative;
}

.post-featured-image a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 110, 253, 0.18), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: var(--transition);
}

.post-item:hover .post-featured-image a::after {
  opacity: 1;
}

.post-featured-image figure {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.post-item:hover .post-featured-image img {
  transform: scale(1.08);
}

.post-item-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 18px;
}

.post-item-content h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.post-item-content h3 a {
  color: var(--title-color);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item-content h3 a:hover {
  color: var(--primary-color);
}

.post-item-btn {
  margin-top: auto;
}

.readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  color: var(--white-color);
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.readmore-btn::after {
  content: "→";
  font-size: 16px;
  transition: var(--transition);
}

.readmore-btn:hover {
  color: var(--white-color);
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--secondary-color), #10b981);
}

.readmore-btn:hover::after {
  transform: translateX(4px);
}

.our-blog > .container > .row:last-child > p,
.our-blog .no-posts-message {
  width: 100%;
  text-align: center;
  color: var(--text-color);
  font-size: 18px;
  margin-top: 20px;
}

/* =========================================================
   SINGLE POST PAGE
   ========================================================= */
.page-single-post {
  position: relative;
  padding: 100px 0;
  background: linear-gradient(to bottom, #f8fbff 0%, #ffffff 100%);
}

/* Featured Image */
.page-single-post .post-image {
  position: relative;
  z-index: 2;
}

.page-single-post .post-image figure {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
}

.page-single-post .post-image img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
  display: block;
}

/* Content Card */
.page-single-post .post-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 950px;
  margin: -70px auto 0;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 45px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.page-single-post .post-entry {
  width: 100%;
}

.page-single-post .post-entry > h3 {
  margin: 0 0 24px;
  color: var(--title-color);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.4px;
  word-break: break-word;
}

.page-single-post .single-content {
  width: 100%;
}

.page-single-post .single-content > *:first-child {
  margin-top: 0;
}

.page-single-post .single-content > *:last-child {
  margin-bottom: 0;
}

/* Paragraphs */
.page-single-post .post-entry p,
.page-single-post .single-content p {
  margin: 0 0 20px;
  color: var(--dark-text);
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: break-word;
}
.post-entry blockquote p {
  color: #f2f4f5 !important;
}

/* Headings */
.page-single-post .single-content h1,
.page-single-post .single-content h2,
.page-single-post .single-content h3,
.page-single-post .single-content h4,
.page-single-post .single-content h5,
.page-single-post .single-content h6 {
  margin: 28px 0 14px;
  color: var(--title-color);
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: break-word;
}

.page-single-post .single-content h1 {
  font-size: 36px;
}

.page-single-post .single-content h2 {
  font-size: 30px;
}

.page-single-post .single-content h3 {
  font-size: 24px;
}

.page-single-post .single-content h4 {
  font-size: 20px;
}

.page-single-post .single-content h5 {
  font-size: 18px;
}

.page-single-post .single-content h6 {
  font-size: 16px;
}

/* Lists */
.page-single-post .single-content ul,
.page-single-post .single-content ol {
  margin: 0 0 24px 22px;
  padding: 0;
}

.page-single-post .single-content li {
  margin-bottom: 10px;
  color: var(--dark-text);
  font-size: 17px;
  line-height: 1.8;
}

/* Links */
.page-single-post .single-content a,
.page-single-post .post-entry a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.page-single-post .single-content a:hover,
.page-single-post .post-entry a:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

/* Images inside content */
.page-single-post .single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 20px 0;
  display: block;
}

/* WordPress image blocks */
.page-single-post .wp-block-image,
.page-single-post .wp-caption {
  margin: 24px 0;
}

.page-single-post .wp-caption-text {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-color);
  text-align: center;
}

/* WordPress alignments */
.page-single-post .alignleft {
  float: left;
  margin: 10px 25px 20px 0;
}

.page-single-post .alignright {
  float: right;
  margin: 10px 0 20px 25px;
}

.page-single-post .aligncenter {
  display: block;
  margin: 20px auto;
}

/* Blockquote */
.page-single-post blockquote {
  position: relative;
  margin: 35px 0;
  padding: 30px 30px 30px 70px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-left: 5px solid var(--primary-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.page-single-post blockquote::before {
  content: "“";
  position: absolute;
  left: 22px;
  top: 12px;
  font-size: 60px;
  line-height: 1;
  color: rgba(13, 110, 253, 0.2);
  font-weight: 900;
}

.page-single-post blockquote p {
  margin: 0;
  color: var(--title-color);
  font-size: 20px;
  line-height: 1.7;
  font-weight: 600;
}

/* Tables */
.page-single-post .single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  border-radius: 14px;
}

.page-single-post .single-content table th,
.page-single-post .single-content table td {
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  text-align: left;
}

.page-single-post .single-content table th {
  background: #eff6ff;
  color: var(--title-color);
  font-weight: 700;
}

.page-single-post .single-content table td {
  background: #fff;
  color: var(--dark-text);
}

/* Code / Pre */
.page-single-post .single-content pre {
  margin: 24px 0;
  padding: 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 14px;
}

.page-single-post .single-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 90%;
}

/* iframe/video/embed */
.page-single-post .single-content iframe,
.page-single-post .single-content video,
.page-single-post .single-content embed {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 16px;
  margin: 20px 0;
}

/* Optional post meta */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 50px;
  background: #eff6ff;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
  .custom-page-header {
    padding: 90px 0 70px;
  }

  .our-blog,
  .page-single-post {
    padding: 80px 0;
  }

  .post-item-content h3 {
    font-size: 20px;
  }

  .page-single-post .post-content {
    padding: 35px;
    margin-top: -50px;
  }

  .page-single-post .post-image img {
    max-height: 480px;
  }
}

@media (max-width: 767px) {
  .custom-page-header {
    padding: 70px 0 60px;
  }

  .header-content-box h1,
  .header-title {
    font-size: 32px;
  }

  .breadcrumb {
    padding: 10px 16px;
  }

  .our-blog,
  .page-single-post {
    padding: 70px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .post-item-body {
    padding: 20px;
  }

  .post-item-content h3 {
    font-size: 18px;
  }

  .readmore-btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .page-single-post .post-image figure {
    border-radius: 20px;
  }

  .page-single-post .post-content {
    padding: 25px 20px;
    margin: 20px auto 0;
    border-radius: 20px;
  }

  .page-single-post .post-entry > h3 {
    font-size: 26px;
  }

  .page-single-post .post-entry p,
  .page-single-post .single-content p,
  .page-single-post .single-content li {
    font-size: 16px;
    line-height: 1.8;
  }

  .page-single-post .single-content h1 {
    font-size: 28px;
  }

  .page-single-post .single-content h2 {
    font-size: 24px;
  }

  .page-single-post .single-content h3 {
    font-size: 21px;
  }

  .page-single-post blockquote {
    padding: 24px 20px 24px 55px;
  }

  .page-single-post blockquote p {
    font-size: 17px;
  }

  .page-single-post blockquote::before {
    font-size: 44px;
    left: 18px;
    top: 14px;
  }

  .page-single-post .alignleft,
  .page-single-post .alignright {
    float: none;
    display: block;
    margin: 20px auto;
  }
}

@media (max-width: 575px) {
  .header-content-box h1,
  .header-title {
    font-size: 28px;
  }

  .section-title h3 {
    font-size: 16px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .post-featured-image figure {
    aspect-ratio: 16 / 11;
  }

  .page-single-post .post-image img {
    max-height: 300px;
  }

  .page-single-post .post-entry > h3 {
    font-size: 22px;
  }

  .page-single-post .post-content {
    padding: 20px 15px;
  }
}
