/*
Theme Name:     LovePanky Child
Theme URI:      https://www.lovepanky.com
Template:       kadence
Author:         Vin Serai
Author URI:     n/a
Description:    Custom child theme for LovePanky.com with ad placements, layout overrides, and performance upgrades.
Version:        1.0.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/

/* ========================================
   FONT OPTIMIZATION FOR CORE WEB VITALS
   ======================================== */

/* Font display swap for faster rendering */
body, h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, select {
    font-display: swap;
}

/* Optimized fallback fonts for Roboto */
body, .entry-content, p, span, div, a, button, input, textarea, select {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* CSS-based italics (faster than loading italic font files) */
.italic-text, em, i, blockquote, cite {
    font-style: italic;
}

/* Author short bio styling */
.author-short-bio {
    font-style: italic;
    color: #666;
    margin-top: 0.5em;
    line-height: 1.4;
}

/* Reviewer section font size and style to match author byline */

/* ========================================
   EXISTING STYLES
   ======================================== */

.pagination .page-numbers{
    border-radius: 0;
    font-family: Jost;
}

@media(min-width:1024px){
   body:not(.blog) .kb-posts-style-unboxed .entry-content-wrap{
        margin-left: 30px!important;
    } 
}

/* ========================================
   AUTHOR AVATAR OPTIMIZATION
   ======================================== */

/* Force author avatar size on all devices */
.author-avatar-img,
.entry-meta-flex .author-avatar img,
.entry-meta-flex .author-avatar-img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-block !important;
}

/* Remove any flexbox shrinking on mobile */
.entry-meta-left,
.entry-meta-flex .author-avatar {
    flex-shrink: 0 !important;
}

/* Prevent image scaling in flex containers on small screens */
@media (max-width: 600px) {
    .entry-meta-flex .author-avatar,
    .entry-meta-flex .author-avatar-img {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
    }
}

/* Fine-tune vertical alignment of author avatar and name */
.entry-meta-flex .entry-meta-left {
    display: flex;
    align-items: center;
    gap: 0.5em;
    min-height: 38px;
}

.entry-meta-flex .author-avatar,
.entry-meta-flex .author-name {
    display: flex;
    align-items: center;
    height: 38px;
    line-height: 38px;
}

.entry-meta-flex .author-name {
    font-size: 1rem;
    position: relative;
    top: 1px;
}

/* Hide the first TOC item in LuckyWP TOC only on single posts */
.single .lwptoc_items > .lwptoc_itemWrap > .lwptoc_item:first-child {
    display: none !important;
}

/* Make TOC items bold and increase spacing in LuckyWP TOC */
.lwptoc_item_label {
    font-weight: 600;
}
.lwptoc_item {
    margin-bottom: 0.5em;
}

/* Remove left padding from LuckyWP TOC and align with article text */
.lwptoc_i,
.lwptoc_items,
.lwptoc_itemWrap {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.lwptoc_i {
    box-sizing: border-box;
}

/* Optional: If you want to match the article's text alignment exactly */
.lwptoc_i {
    width: 100%;
    max-width: none;
}

/* Adjusted size of the author photo in the author box at the bottom of posts */
.entry-author-avatar img.avatar {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto !important;
}

@media (max-width: 600px) {
    .entry-author-avatar img.avatar {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
        max-width: 120px !important;
        max-height: 120px !important;
    }
}

/* Force reviewer bio to match author bio font size and line height */
.entry-meta-flex .author-short-bio {
    font-size: 12px !important;
    line-height: 17px !important;
    color: #666 !important;
    font-style: italic !important;
    font-weight: 400 !important;
    margin-top: 7.5px !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    display: flex !important;
    align-items: center !important;
}

@media (max-width: 600px) {
  .entry-meta-flex .reviewer-bio-inline {
    font-size: 13px !important;
    line-height: 18px !important;
  }
}

.reviewer-verified-badge {
  height: 1.44em;        /* 20% larger than before */
  width: auto;
  margin-right: 0.4em;
  vertical-align: middle;
  display: inline-block;
}

/* ========================================
   ENHANCED AUTHOR ARCHIVE DESCRIPTION
   ======================================== */

/* Enhanced author archive description styling */
.enhanced-author-archive-description {
    position: relative;
    overflow: hidden;
}

.enhanced-author-archive-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    opacity: 1;
}

/* Ensure all content inside appears above the ::before pseudo-element */
.enhanced-author-archive-description > * {
    position: relative;
    z-index: 1;
}

/* Mobile-specific fix to ensure background is visible */
@media (max-width: 768px) {
    .enhanced-author-archive-description {
        background: linear-gradient(135deg, #f5f3fb 0%, #faf8f6 100%) !important;
    }
    
    .enhanced-author-archive-description::before {
        display: none !important;
    }
    
    .enhanced-author-archive-description > * {
        position: relative !important;
        z-index: 1 !important;
    }
}

/* Author archive stats animation */
.author-archive-stats .stat-item {
    transition: transform 0.3s ease;
}

.author-archive-stats .stat-item:hover {
    transform: translateY(-2px);
}

/* Social links animation */
.author-archive-social-links .social-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Archive container improvements */
.archive-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Author breadcrumb styling */
.author-breadcrumb {
    background: rgba(255, 255, 255, 0.8);
}

/* ========================================
   WPLUCKY TABLE OF CONTENTS STYLING
   ======================================== */

/* Apply the same curved cornered box effect to Table of Contents */
.lwptoc_i {
    background: linear-gradient(135deg, #f5f3fb 0%, #faf8f6 100%) !important;
    border-radius: 15px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15) !important;
    border: none !important;
}

/* Style the TOC title */
.lwptoc_title {
    color: #020202 !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
}

/* Style the TOC list */
.lwptoc_items {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Style TOC list items */
.lwptoc_item {
    margin: 1.38rem 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* Style TOC links */
.lwptoc_item a,
.lwptoc_item_label {
    color: #a43aed !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

/* Force tighter line spacing for multi-line TOC items */
.lwptoc_item {
    line-height: 1.3 !important;
}

.lwptoc_item a,
.lwptoc_item_label,
.lwptoc_item span {
    line-height: 1.3 !important;
}

.lwptoc_item a:hover,
.lwptoc_item_label:hover {
    color: #DB48E7 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* Style nested TOC items (sub-headings) */
.lwptoc_item .lwptoc_item {
    margin-left: 1.5rem !important;
    margin-top: 0.5rem !important;
}

.lwptoc_item .lwptoc_item {
    margin: 0.5rem 0 !important;
    font-size: 0.95rem !important;
}

/* Responsive adjustments for TOC */
@media (max-width: 768px) {
    .lwptoc_i {
        padding: 1.5rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .lwptoc_title {
        font-size: 1.3rem !important;
    }
}

/* Container for author meta - ensures date and author info stack vertically */
.entry-author-meta-container {
  display: block !important;
  width: 100% !important;
}

/* Updated On date wrapper - appears above author info */
.entry-date-wrapper {
  display: block !important;
  width: 100% !important;
  margin-bottom: 1.25em !important;
  line-height: 1.3;
}

.entry-date {
  line-height: 1.3;
}

/* Author meta row: avatar and text alignment fix */
.entry-meta-flex {
  display: flex !important;
  width: 100% !important;
  align-items: center;      /* Vertically center everything */
  gap: 0.5em;
  flex-wrap: nowrap;        /* Prevent wrapping - keep avatar and name together */
}

/* Override parent theme flex - force container to break out with maximum specificity */
body .entry-meta > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-dot > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-slash > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-dash > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-vline > .entry-author-meta-container {
  display: block !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
}

/* Force date wrapper to be block - override parent theme's inline-flex on children */
body .entry-meta .entry-author-meta-container .entry-date-wrapper,
body .entry-author-meta-container .entry-date-wrapper,
body .entry-meta > .entry-author-meta-container > .entry-date-wrapper,
.entry-meta .entry-author-meta-container > .entry-date-wrapper {
  display: block !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  margin-bottom: 1.25em !important;
}

/* Force author flex to be block within container - override parent theme's inline-flex */
body .entry-meta .entry-author-meta-container .entry-meta-flex,
body .entry-meta > .entry-author-meta-container > .entry-meta-flex,
.entry-meta .entry-author-meta-container > .entry-meta-flex {
  display: flex !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* CRITICAL: Override parent theme's .entry-meta > * { display: inline-flex } for our container's children */
body .entry-meta > .entry-author-meta-container > *,
.entry-meta > .entry-author-meta-container > * {
  display: block !important;
}

/* But keep entry-meta-flex as flex for its internal layout */
body .entry-meta > .entry-author-meta-container > .entry-meta-flex,
.entry-meta > .entry-author-meta-container > .entry-meta-flex {
  display: flex !important;
}

/* Hide parent theme divider */
body .entry-meta > .entry-author-meta-container::after {
  display: none !important;
  content: none !important;
}

/* Maximum specificity override - ensure container breaks out of parent flex */
body .entry-meta.entry-meta-divider-dot > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-slash > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-dash > .entry-author-meta-container,
body .entry-meta.entry-meta-divider-vline > .entry-author-meta-container,
body .entry-meta > .entry-author-meta-container {
  display: block !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  clear: both !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  order: -999 !important;
}

.author-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 0.5em;      /* Space between avatar and text */
}

.author-meta-text {
  display: flex;
  flex-direction: row;   /* Always in a row */
  align-items: center;
  gap: 0.5em;
  min-width: 0;
  flex-wrap: nowrap;     /* Prevent wrapping */
}

.author-name {
  line-height: 1.3;
  white-space: nowrap;   /* Prevent author name from wrapping */
}

/* Prevent breadcrumbs from wrapping and reduce CLS on desktop and mobile */
.breadcrumbs,
.breadcrumb,
.kb-breadcrumbs,
.kt-breadcrumbs {
  white-space: nowrap !important;
  overflow-x: auto !important;
  text-overflow: ellipsis !important;
  display: block !important;
  min-height: 2.2em;
  max-width: 100vw;
}

@media (max-width: 600px) {
  h1.entry-title, .entry-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-weight: 700 !important;
  }
}

/* Reviewer badge and avatar images should always have width and height set in HTML for zero CLS. */

/* Increase min-height of meta row for desktop to further reduce CLS */
@media (min-width: 601px) {
  .entry-meta-flex {
    min-height: 3.5em; /* Adjust as needed for your tallest meta row */
  }
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;   /* <-- This will center the links horizontally */
  margin-top: 0.5em;
  flex-wrap: wrap;           /* Allows wrapping on small screens if needed */
}

.footer-links-row a.footer-link {
  color: #fff !important;
  text-decoration: none !important;
  margin-right: 1.2em;
  font-size: 0.95em;
  transition: color 0.2s;
  vertical-align: middle;
  white-space: nowrap;
}

.footer-links-row a.footer-link:last-child {
  margin-right: 0;
}

.footer-links-row a.footer-link:hover,
.footer-links-row a.footer-link:focus {
  color: #a43aed !important;
  text-decoration: none !important;
}

@media (max-width: 600px) {
  .footer-links-row a.footer-link {
    font-size: 0.85em;
    margin-right: 0.8em;
  }
}

/* About Us full-width background */
.lp-aboutus-bg { /* full-width section bg */ }
/* About Us centered content box */
.lp-aboutus-content-box { /* centered content box */ }
/* Card-style section for About Us and info pages */
.lp-card-section { /* card section with shadow */ }

/* About Us: Add padding and center align to first h1 */
.lp-aboutus-content-box h1:first-child {
  padding-top: 40px;
  padding-bottom: 32px;
  text-align: center;
}
/* Ensure center alignment works for headings */
.lp-aboutus-content-box .has-text-align-center {
  text-align: center !important;
}
/* Card section: increase left/right padding */
.lp-card-section {
  padding-left: 40px;
  padding-right: 40px;
}
@media (max-width: 800px) {
  .lp-card-section {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Card section: subtle lift and color pop on hover (desktop) */
@media (hover: hover) and (pointer: fine) {
  .lp-card-section {
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s, background 0.25s;
  }
  .lp-card-section:hover, .lp-card-section:focus-within {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 8px 32px rgba(162,89,230,0.18), 0 2px 8px rgba(80,0,120,0.10);
    border-left: 5px solid #a259e6;
    background: #f7f2fd;
  }
}
/* Card section: color pop on tap/active/focus (mobile) */
@media (hover: none) and (pointer: coarse) {
  .lp-card-section {
    transition: background 0.25s, border-color 0.25s;
  }
  .lp-card-section:active, .lp-card-section:focus-within {
    background: #f7f2fd;
    border-left: 5px solid #a259e6;
  }
}
/* Card section: add left border for animation (default transparent) */
.lp-card-section {
  border-left: 5px solid transparent;
}

/* LovePanky Blockquote Style */
blockquote {
  border-left: 4px solid #a43aed; /* LovePanky purple */
  background: #f7f2fd;            /* very light purple background */
  color: #222;                    /* readable text */
  font-style: normal;             /* remove italics */
  font-size: 1.1em;               /* slightly larger text */
  padding: 1em 1.5em;
  margin: 2em 0;
  border-radius: 8px;             /* soft corners */
  position: relative;
}

blockquote::before {
  content: "“";
  color: #DB48E7;                 /* accent purple */
  font-size: 2.5em;
  position: absolute;
  left: 16px;
  top: 0.1em;
  opacity: 0.15;
  font-family: serif;
  pointer-events: none;
}

/* ========================================
   MOBILE FONT OPTIMIZATION FOR SINGLE POSTS
   ======================================== */

/* Mobile-specific heading changes for single posts */
@media (max-width: 768px) {
    /* H1 - Page/Post title */
    .single .entry-title,
    .single h1.entry-title,
    .single .entry-content h1 {
        font-size: 30px !important; /* Changed from 40px */
        line-height: 1.2 !important;
    }
    
    /* H2 - Mobile only changes */
    .single .entry-content h2,
    .single h2 {
        font-size: 22px !important; /* Changed from 30px */
        color: #7A2BC7 !important; /* Changed from #333333 */
        line-height: 1.3 !important;
    }
    
    /* H3 - Mobile only changes */
    .single .entry-content h3,
    .single h3 {
        font-size: 20px !important; /* Changed from 24px */
        color: #9841E5 !important; /* Changed from #333333 */
        line-height: 1.3 !important;
    }
    
    /* H4 - Mobile only changes */
    .single .entry-content h4,
    .single h4 {
        font-size: 20px !important; /* Changed from 22px */
        line-height: 1.3 !important;
    }
    
    /* Ensure proper font family for all headings */
    .single .entry-content h1,
    .single .entry-content h2,
    .single .entry-content h3,
    .single .entry-content h4,
    .single h1.entry-title,
    .single h2,
    .single h3,
    .single h4 {
        font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        font-weight: 600 !important;
    }
}

/* ========================================
   DESKTOP COLOR OPTIMIZATION FOR SINGLE POSTS
   ======================================== */

/* Desktop color changes for single posts (keeping existing font sizes) */
@media (min-width: 769px) {
    /* H2 - Desktop color change only */
    .single .entry-content h2,
    .single h2 {
        color: #7A2BC7 !important; /* Changed from #333333 to match mobile */
    }
    
    /* H3 - Desktop color change only */
    .single .entry-content h3,
    .single h3 {
        color: #9841E5 !important; /* Changed from #333333 to match mobile */
    }
    
    /* H1 and H4 - Keep existing theme customizer settings */
    .single .entry-title,
    .single h1.entry-title,
    .single .entry-content h1 {
        /* Keep existing 40px from theme customizer */
    }
    
    .single .entry-content h4,
    .single h4 {
        /* Keep existing 22px from theme customizer */
    }
}

/* ========================================
   ENHANCED RELATED POSTS LIST STYLING
   ======================================== */

/* Style for related posts lists within article content - purple links */
.entry-content ul li a {
    color: #a43aed !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    display: inline-block;
    position: relative;
    border-radius: 3px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.entry-content ul li a:hover,
.entry-content ul li a:focus {
    color: #DB48E7 !important;
    background-color: rgba(164, 58, 237, 0.08);
    transform: translateX(3px);
    font-weight: 600 !important;
}

/* Reduce line-height within each list item (brings multi-line text closer) */
.entry-content ul li {
    line-height: 1.35 !important; /* Tighter line spacing within items */
    margin-bottom: 1.3em !important; /* Increased spacing between bullets */
    margin-top: 0;
}

.entry-content ul li a {
    line-height: 1.35 !important;
}

/* Replace circular bullets with custom arrow/heart style */
.entry-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.entry-content ul li {
    position: relative;
    padding-left: 2em !important;
    padding-bottom: 0.2em;
}

/* OPTION 1: Arrow bullet (currently active) - Modern and directional */
.entry-content ul li::before {
    content: "▶" !important;
    position: absolute;
    left: 0;
    top: 0;
    color: #a43aed !important;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.35;
    transition: all 0.3s ease;
    transform: translateY(1px);
}

/* Animate arrow on hover */
.entry-content ul li:hover::before {
    color: #DB48E7 !important;
    transform: translate(3px, 1px);
}

/* OPTION 2: Heart bullet (commented out - uncomment to use instead) */
/*
.entry-content ul li::before {
    content: "♥" !important;
    position: absolute;
    left: 0;
    top: 0;
    color: #a43aed !important;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.35;
    transition: all 0.3s ease;
    transform: translateY(1px);
}
.entry-content ul li:hover::before {
    color: #DB48E7 !important;
    transform: scale(1.1) translateY(1px);
}
*/

/* OPTION 3: Diamond style (commented out - uncomment to use instead) */
/*
.entry-content ul li::before {
    content: "◆" !important;
    position: absolute;
    left: 0;
    top: 0;
    color: #a43aed !important;
    font-size: 0.7em;
    font-weight: 600;
    line-height: 1.35;
    transition: all 0.3s ease;
    transform: translateY(3px);
}
.entry-content ul li:hover::before {
    color: #DB48E7 !important;
    transform: translate(3px, 3px) rotate(45deg);
}
*/

/* Mobile adjustments */
@media (max-width: 768px) {
    .entry-content ul li {
        margin-bottom: 1.1em !important;
        padding-left: 1.75em !important;
        line-height: 1.3 !important;
    }
    
    .entry-content ul li a {
        line-height: 1.3 !important;
    }
    
    .entry-content ul li::before {
        font-size: 0.8em;
    }
}

/* ========================================
   END OF STYLES
   ======================================== */
