/* ==========================================================================
   Prateeksha Post Grid — Frontend Styles
   Scoped to .ppg-wrapper so there's zero global leakage.
   ========================================================================== */

/* ── Reset baseline ─────────────────────────────────────────────────────── */
.ppg-wrapper *,
.ppg-wrapper *::before,
.ppg-wrapper *::after {
  box-sizing: border-box;
}

.ppg-wrapper {
  --ppg-radius: 8px;
  --ppg-gap: 24px;
  --ppg-transition: 0.25s ease;
  --ppg-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --ppg-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* ── Grid layout (classic + cards) ─────────────────────────────────────── */
.ppg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ppg-gap);
}

/* ── List layout (image-left skin) ─────────────────────────────────────── */
.ppg-list {
  display: flex;
  flex-direction: column;
  gap: var(--ppg-gap);
}

/* ── Post Item ──────────────────────────────────────────────────────────── */
.ppg-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--ppg-radius);
  background-color: #fff;
  transition:
    transform var(--ppg-transition),
    box-shadow var(--ppg-transition),
    background-color var(--ppg-transition),
    border-color var(--ppg-transition);
}

/* Lift on hover (class toggled by setting) */
.ppg-lift-hover .ppg-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--ppg-shadow-hover);
}

/* Full-card clickable overlay */
.ppg-item__overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* ── Media wrapper ──────────────────────────────────────────────────────── */
.ppg-item__media {
  flex-shrink: 0;
  overflow: hidden;
}

.ppg-item__media-inner {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.ppg-item__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--ppg-transition), opacity var(--ppg-transition);
}

/* Image hover: zoom */
.ppg-img-hover-zoom .ppg-item:hover .ppg-item__img {
  transform: scale(1.05);
}

/* Image hover: dim */
.ppg-img-hover-dim .ppg-item:hover .ppg-item__img {
  opacity: 0.75;
}

/* ── Content ────────────────────────────────────────────────────────────── */
.ppg-item__content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Title ──────────────────────────────────────────────────────────────── */
.ppg-item__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
}

.ppg-item__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ppg-transition);
}

.ppg-item__title a:hover {
  color: #0a58ca;
}

/* ── Meta ───────────────────────────────────────────────────────────────── */
.ppg-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 10px;
  order: -1; /* meta above title by default */
}

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

.ppg-item__meta a:hover {
  text-decoration: underline;
}

.ppg-meta-sep {
  color: #ccc;
}

/* ── Excerpt ────────────────────────────────────────────────────────────── */
.ppg-item__excerpt {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #555;
}

/* ── Read More ──────────────────────────────────────────────────────────── */
.ppg-item__read-more {
  display: inline-block;
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: #0a58ca;
  transition: color var(--ppg-transition);
}

.ppg-item__read-more:hover {
  color: #084298;
}

/* ── No posts ───────────────────────────────────────────────────────────── */
.ppg-no-posts {
  color: #888;
  font-style: italic;
}

/* ── Load More / Pagination ─────────────────────────────────────────────── */
.ppg-load-more-wrap {
  margin-top: 32px;
  text-align: center;
}

.ppg-load-more-btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background-color: #0a58ca;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--ppg-transition), opacity var(--ppg-transition);
}

.ppg-load-more-btn:hover {
  background-color: #084298;
}

.ppg-load-more-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ppg-pagination {
  margin-top: 32px;
}

.ppg-pagination .page-numbers {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.ppg-pagination .page-numbers li a,
.ppg-pagination .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  font-size: 0.875rem;
  text-decoration: none;
  color: #333;
  border: 1px solid #ddd;
  transition: background-color var(--ppg-transition), color var(--ppg-transition);
}

.ppg-pagination .page-numbers li .current,
.ppg-pagination .page-numbers li a:hover {
  background-color: #0a58ca;
  color: #fff;
  border-color: #0a58ca;
}

/* ==========================================================================
   Skin: Classic / Grid
   ========================================================================== */
.ppg-skin-classic .ppg-item {
  box-shadow: var(--ppg-shadow);
}

.ppg-skin-classic .ppg-item__media {
  /* image fills full width at top */
}

.ppg-skin-classic .ppg-item__media-inner {
  height: 200px;
}

/* ==========================================================================
   Skin: Cards
   ========================================================================== */
.ppg-skin-cards .ppg-item {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.ppg-skin-cards .ppg-item__media-inner {
  height: 220px;
}

.ppg-skin-cards .ppg-item__content {
  padding: 24px;
}

/* ==========================================================================
   Skin: Image Left + Content Right
   ========================================================================== */
.ppg-skin-image-left .ppg-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

.ppg-skin-image-left .ppg-item__media {
  flex: 0 0 40%;
  max-width: 40%;
  position: relative;
  overflow: hidden;
}

.ppg-skin-image-left .ppg-item__media-inner {
  height: 100%;
  min-height: 180px;
}

.ppg-skin-image-left .ppg-item__media-inner img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* When no image is present, content takes full width */
.ppg-skin-image-left .ppg-item:not(:has(.ppg-item__media)) .ppg-item__content,
.ppg-skin-image-left .ppg-item--no-media .ppg-item__content {
  width: 100%;
}

.ppg-skin-image-left .ppg-item__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 28px;
  min-width: 0; /* prevent flex blowout */
}

/* Meta sits above title in image-left skin */
.ppg-skin-image-left .ppg-item__meta {
  order: -1;
}

/* Subtle divider line between rows */
.ppg-skin-image-left .ppg-item + .ppg-item {
  border-top: 1px solid #f0f0f0;
}

/* Box shadow for the list layout */
.ppg-skin-image-left .ppg-item {
  box-shadow: var(--ppg-shadow);
  border-radius: var(--ppg-radius);
  overflow: hidden;
}

/* Image rounded corners only on the left side */
.ppg-skin-image-left .ppg-item__media-inner {
  border-radius: 0;
}

/* ==========================================================================
   RTL support
   ========================================================================== */
[dir="rtl"] .ppg-skin-image-left .ppg-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .ppg-skin-image-left .ppg-item__media {
  margin-right: 0;
}

/* ==========================================================================
   Responsive — Tablet  (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .ppg-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ppg-skin-image-left .ppg-item__media {
    flex: 0 0 38%;
    max-width: 38%;
  }
}

/* ==========================================================================
   Responsive — Mobile  (≤ 767px)
   ========================================================================== */
@media (max-width: 767px) {
  .ppg-grid {
    grid-template-columns: 1fr;
  }

  /* Stack image above content on mobile for image-left skin */
  .ppg-mobile-stack.ppg-skin-image-left .ppg-item {
    flex-direction: column;
  }

  .ppg-mobile-stack.ppg-skin-image-left .ppg-item__media {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .ppg-mobile-stack.ppg-skin-image-left .ppg-item__media-inner {
    height: 220px;
    min-height: 0;
  }

  .ppg-mobile-stack.ppg-skin-image-left .ppg-item__media-inner img {
    height: 220px;
  }

  .ppg-mobile-stack.ppg-skin-image-left .ppg-item__content {
    padding: 18px 20px;
  }

  [dir="rtl"] .ppg-mobile-stack.ppg-skin-image-left .ppg-item {
    flex-direction: column;
  }

  .ppg-load-more-btn {
    width: 100%;
  }
}

/* ==========================================================================
   Elementor editor visibility helpers
   ========================================================================== */
.elementor-editor-active .ppg-item__overlay-link {
  pointer-events: none;
}

/* ==========================================================================
   Widget: Prateeksha Hero Split
   ========================================================================== */
.hs-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background-color: #5a1010;
  min-height: 480px;
}

/* Image on the right (default) */
.hs-wrapper.hs-img-right {
  flex-direction: row;
}

/* Image on the left */
.hs-wrapper.hs-img-left {
  flex-direction: row-reverse;
}

/* Content column */
.hs-content-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  z-index: 1;
}

/* Eyebrow */
.hs-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c9a84c;
  margin: 0 0 12px;
}

/* Heading */
.hs-heading {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 20px;
}

/* Gold divider line */
.hs-divider {
  width: 50px;
  height: 3px;
  background-color: #c9a84c;
  margin-bottom: 24px;
  border-radius: 2px;
}

/* Description */
.hs-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e8ddd0;
  margin-bottom: 32px;
  max-width: 480px;
}

.hs-description p {
  margin: 0;
}

/* Button */
.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #c9a84c;
  border: 2px solid #c9a84c;
  border-radius: 30px;
  transition: background-color 0.25s ease, color 0.25s ease;
  align-self: flex-start;
}

.hs-btn:hover {
  background-color: #c9a84c;
  color: #fff;
}

.hs-btn-arrow {
  font-size: 1.1em;
  line-height: 1;
}

/* Image column */
.hs-image-col {
  flex: 0 0 55%;
  max-width: 55%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dotted ring accent */
.hs-dot-ring {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 2px dashed #c9a84c;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Image shape container */
.hs-img-shape {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hs-img-shape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Circle clip */
.hs-shape-circle {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  width: 85%;
  height: auto;
  margin: auto;
}

/* Semicircle: flat on the left, curved on the right */
.hs-shape-semicircle {
  border-radius: 0 50% 50% 0 / 0 50% 50% 0;
  width: 100%;
  height: 100%;
}

/* Rectangle with slight radius */
.hs-shape-rectangle {
  border-radius: 12px;
  width: 90%;
  margin: auto;
}

/* RTL */
[dir="rtl"] .hs-wrapper.hs-img-right { flex-direction: row-reverse; }
[dir="rtl"] .hs-wrapper.hs-img-left  { flex-direction: row; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hs-content-col { padding: 40px; }
}

@media (max-width: 767px) {
  .hs-wrapper,
  .hs-wrapper.hs-img-right,
  .hs-wrapper.hs-img-left {
    flex-direction: column;
  }

  .hs-image-col {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    min-height: 260px;
  }

  .hs-shape-circle {
    width: 70%;
    margin: 20px auto;
  }

  .hs-content-col {
    padding: 36px 24px;
  }
}

/* ==========================================================================
   Widget: Prateeksha Icon Cards
   ========================================================================== */
.ic-grid-wrapper {
  background-color: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
}

.ic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Card */
.ic-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
}

/* Card image */
.ic-card__img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.ic-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.ic-card:hover .ic-card__img-wrap img {
  transform: scale(1.04);
}

/* Icon badge area — sits between image and body, centred */
.ic-card__icon-area {
  display: flex;
  justify-content: center;
  /* negative top margin pulls icon badge up to straddle the image/body boundary */
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.ic-card__icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #6b1f1f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.ic-card__icon-wrap i {
  font-size: 22px;
  color: #c9a84c;
}

.ic-card__icon-wrap svg {
  width: 22px;
  height: 22px;
  fill: #c9a84c;
}

/* Card body */
.ic-card__body {
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Title */
.ic-card__title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b1f1f;
  margin: 12px 0 8px;
}

/* Description */
.ic-card__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #444;
  margin: 0 0 16px;
  flex: 1;
}

/* Link */
.ic-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #6b1f1f;
  transition: color 0.2s ease;
  margin-top: auto;
}

.ic-card__link:hover {
  color: #c9a84c;
}

.ic-link-arrow {
  font-size: 1.1em;
  line-height: 1;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ic-grid-wrapper {
    padding: 28px;
  }
}

@media (max-width: 767px) {
  .ic-grid {
    grid-template-columns: 1fr;
  }
  .ic-grid-wrapper {
    padding: 20px;
  }
}
