/* ==========================================================================
   PARENTINGPATCH HOMEPAGE 2025
   Mobile-first: Overlay cards by default, horizontal layouts on desktop
   ========================================================================== */

/* ------------------------------
   WRAPPER
--------------------------------*/
.pp-home-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #f5f5f5;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ------------------------------
   HERO GRID
--------------------------------*/
.pp-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .pp-hero-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ------------------------------
   MAIN HERO - Always overlay style
--------------------------------*/
.pp-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 */
}

@media (min-width: 900px) {
  .pp-hero {
    height: auto;
    padding-bottom: 0;
    min-height: 400px;
  }
}

.pp-hero-media {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pp-hero-media img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  -webkit-object-fit: cover !important;
}

.pp-hero-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  color: #fff;
}

.pp-hero-meta h2,
.pp-hero-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.pp-hero-meta a {
  color: #fff !important;
  text-decoration: none;
}

.pp-hero-meta a:hover {
  text-decoration: underline;
}

.pp-hero-byline,
.pp-hero-meta time {
  font-size: 0.8rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .pp-hero-meta {
    padding: 4rem 1.5rem 1.5rem;
  }
  .pp-hero-meta h2,
  .pp-hero-title {
    font-size: 1.75rem;
  }
}

/* ------------------------------
   RIGHT RAIL - Desktop: horizontal, Mobile: overlay
--------------------------------*/
.pp-hero-rail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem;
}

.pp-rail-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: transparent;
}

.pp-rail-card:hover {
  background: rgba(0,0,0,0.03);
}

a.pp-rail-media {
  display: block;
  flex-shrink: 0;
  width: 100px;
  height: 65px;
  border-radius: 4px;
  overflow: hidden;
}

a.pp-rail-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-object-fit: cover;
}

.pp-rail-card .pp-card-body {
  flex: 1;
  min-width: 0;
}

.pp-rail-title {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  line-height: 1.3;
  font-weight: 600;
}

.pp-rail-title a {
  color: #111;
  text-decoration: none;
}

.pp-rail-title a:hover {
  color: #058d05;
}

.pp-rail-card .pp-meta-line {
  font-size: 0.75rem;
  color: #666;
}

/* Mobile: overlay cards */
@media (max-width: 899px) {
  .pp-hero-rail {
    background: transparent !important;
    padding: 0 !important;
  }

  .pp-rail-card {
    display: block !important;
    position: relative !important;
    padding: 0 !important;
    background: #111 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 0 !important;
    padding-bottom: 62.5% !important; /* 16:10 iOS fallback */
  }

  .pp-rail-card:hover {
    background: #111 !important;
  }

  a.pp-rail-media {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
  }

  a.pp-rail-media img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    -webkit-object-fit: cover !important;
  }

  .pp-rail-card .pp-card-body {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 2.5rem 1rem 0.75rem !important;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%) !important;
  }

  .pp-rail-title {
    font-size: 1rem !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  .pp-rail-title a {
    color: #fff !important;
  }
}

/* ------------------------------
   BELOW GRID - Always overlay cards
--------------------------------*/
.pp-below-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .pp-below-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pp-below-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  height: 0;
  padding-bottom: 62.5%; /* 16:10 */
}

.pp-below-media {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pp-below-media img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  -webkit-object-fit: cover !important;
}

.pp-below-card .pp-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  color: #fff;
}

.pp-below-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
}

.pp-below-title a {
  color: #fff !important;
  text-decoration: none;
}

.pp-below-title a:hover {
  text-decoration: underline;
}

.pp-below-card .pp-meta-line {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}

/* ------------------------------
   CATEGORY SECTIONS
--------------------------------*/
.pp-sec {
  margin: 0;
  padding: 1.25rem 0;
  border-top: 1px solid #ddd;
}

.pp-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pp-sec-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #111;
}

.pp-sec-header h2 a {
  color: inherit;
  text-decoration: none;
}

.pp-sec-header h2 a:hover {
  color: #058d05;
}

.pp-sec-viewall {
  font-size: 0.8rem;
  font-weight: 600;
  color: #058d05;
  text-decoration: none;
}

.pp-sec-viewall:hover {
  text-decoration: underline;
}

.pp-sec-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pp-sec-buttons .pp-btn {
  background: #058d05;
  color: #fff;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.pp-sec-buttons .pp-btn:hover {
  background: #046a04;
}

/* Card grid wrapper */
.pp-card-grid-wrap {
  margin: 0;
  padding: 0;
}

/* Section grid - always overlay cards */
.pp-sec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .pp-sec-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pp-sec-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  height: 0;
  padding-bottom: 75%; /* 4:3 */
}

.pp-sec-media {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pp-sec-media img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  -webkit-object-fit: cover !important;
}

.pp-sec-card .pp-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 0.85rem 0.85rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  color: #fff;
}

.pp-sec-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
}

.pp-sec-title a {
  color: #fff !important;
  text-decoration: none;
}

.pp-sec-title a:hover {
  text-decoration: underline;
}

.pp-sec-card .pp-meta-line {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
}

/* ------------------------------
   LATEST SECTION - Mobile: overlay, Desktop: horizontal rows
--------------------------------*/
.pp-latest {
  margin: 0;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid #ddd;
}

.pp-latest .pp-sec-header {
  margin-bottom: 0.75rem;
}

.pp-latest .pp-sec-header h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #111;
}

.pp-latest-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Mobile default: overlay cards */
.pp-latest-row {
  display: block;
  position: relative;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  height: 0;
  padding-bottom: 62.5%; /* 16:10 */
}

.pp-latest-thumb {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pp-latest-thumb img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  -webkit-object-fit: cover !important;
}

.pp-latest-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
}

.pp-latest-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.pp-latest-title a {
  color: #fff;
  text-decoration: none;
}

.pp-latest-title a:hover {
  text-decoration: underline;
}

.pp-latest .pp-meta-line {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}

/* Desktop: horizontal rows */
@media (min-width: 900px) {
  .pp-latest-row {
    display: grid !important;
    grid-template-columns: 160px 1fr;
    gap: 0.75rem;
    align-items: center;
    background: #fff;
    height: auto !important;
    padding-bottom: 0 !important;
  }

  .pp-latest-row:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .pp-latest-thumb {
    position: relative !important;
    width: 160px !important;
    height: 100px !important;
    border-radius: 4px;
    overflow: hidden;
  }

  .pp-latest-thumb a {
    position: relative !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  .pp-latest-thumb img {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .pp-latest-body {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    padding: 0.5rem 0.75rem 0.5rem 0 !important;
    background: none !important;
  }

  .pp-latest-title a {
    color: #111 !important;
  }

  .pp-latest-title a:hover {
    color: #058d05 !important;
  }

  .pp-latest .pp-meta-line {
    color: #666 !important;
  }
}

/* ------------------------------
   LOAD MORE
--------------------------------*/
.pp-loadmore-wrap {
  text-align: center;
  margin-top: 1rem;
}

.pp-loadmore,
.pp-btn.pp-loadmore {
  background: #058d05;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pp-loadmore:hover {
  background: #046a04;
}

/* ------------------------------
   ACCESSIBILITY
--------------------------------*/
a:focus-visible,
button:focus-visible {
  outline: 3px solid #058d05;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------
   MOBILE ONLY - Hide dates, improve spacing
--------------------------------*/
@media (max-width: 899px) {
  .pp-meta-line,
  .pp-hero-byline {
    display: none !important;
  }
}

/* ------------------------------
   CATEGORY BADGES
--------------------------------*/
.pp-cat-badge {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100 !important;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.pp-cat-news {
  background: rgba(220, 38, 38, 0.9) !important;
}

.pp-cat-parenting {
  background: rgba(59, 130, 246, 0.9) !important;
}

.pp-cat-education {
  background: rgba(168, 85, 247, 0.9) !important;
}

.pp-cat-health {
  background: rgba(34, 197, 94, 0.9) !important;
}

.pp-cat-pregnancy {
  background: rgba(236, 72, 153, 0.9) !important;
}

.pp-cat-entertainment {
  background: rgba(249, 115, 22, 0.9) !important;
}