/*
 Theme Name:   GP Affiliate Pro
 Theme URI:    https://wplitetheme.com/gp-affiliate-pro/
 Description:  GP Affiliate a GeneratePress child theme which is specially designed for affiliate blog websites.
 Author:       WPLiteTheme.com
 Author URI:   https://wplitetheme.com
 Template:     generatepress
 Version:      1.2
*/

/* Main nav shadow (safe) */
.main-navigation {
	box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

/* Categories Headline */
.inb-hp-heading:before {
    border-top: 2px solid var(--text-1, #333);
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
}
.inb-home-heading:before {
    border-top: 1px solid var(--border-color, #e5e7eb);
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
}

/* Banner block */
.wplite-banner-ads {
	margin-bottom: 15px;
}

/* WP Image spacing (global) */
.size-auto, .size-full, .size-large, .size-medium, .size-thumbnail {
	margin-bottom: 20px;
}

/* Elementor page override to avoid spacing conflicts with widgets */
.elementor-page .size-auto,
.elementor-page .size-full,
.elementor-page .size-large,
.elementor-page .size-medium,
.elementor-page .size-thumbnail {
	margin-bottom: 0;
}

/* Gutenberg/GenerateBlocks images */
.gb-container .wp-block-image img {
	border-radius: 5px;
	margin-bottom: 5px;
}

/* Prevent sticky widgets & GB tweaks interfering on Elementor pages */
.elementor-page .sticky-container,
.elementor-page .sticky-container > .gb-inside-container {
	position: static;
	top: auto;
}

/* Sticky widgets */
.auto-width.gb-query-loop-wrapper {
    flex: 1;
}
@media (min-width: 768px) {
	.sticky-container > .gb-inside-container,
	.sticky-container {
		position: sticky;
		top: 80px;
	}
	#right-sidebar .inside-right-sidebar {
		height: 100%;
	}
}

/* Category dropdown width */
select#wp-block-categories-1 {
    width: 100%;
}

/* Rank Math breadcrumb */
.rank-math-breadcrumb p {
	background: #e5e8ec;
	color: #000000;
	padding: 5px 10px;
	border-radius: 4px;
    font-size: 11px;
	font-weight: 700;
}
@media (max-width: 768px){
	.rank-math-breadcrumb p {
		margin: 0px 10px;
	}
}

/* Table of contents */
#toc_container li a {
    display: block;
    width: 100%;
    color: var(--link-text, #2563eb);
    padding: 10px 1em;
    border-top: 1px solid #aaa;
}
#toc_container {
    background: #f9f9f900;
    border: 1px solid #aaa;
    padding: 0px;
}
#toc_container span.toc_toggle {
    font-weight: 400;
    background: #fff;
    padding: 3px 20px;
    font-size: 18px;
    text-transform: capitalize;
    text-align: center;
    display: block;
}

/* Post Date */
.post-dates {
    font-size: 12px;
	font-weight: 400;
    color: var(--text-1, #333);
}

/* social-sharing-icon - fixed element (add safe stacking) */
.sticky-social-icons {
     position: fixed !important;
     right: 0 !important;
     top: 45% !important;
     z-index: 100; /* below Elementor popups which often use 999+ */
}

/* Optional: hide sticky social on small screens to avoid overlap */
@media (max-width: 768px){
	.sticky-social-icons { display: none; }
}

/* WhatsApp Highlight */
.whatsapphighlight {
	animation: WPLiteTheme-GreenBorderAnimation 1s infinite;
}
@keyframes WPLiteTheme-GreenBorderAnimation {
	0% { border-color: transparent; }
	50% { border-color: #25d366; }
	100% { border-color: transparent; }
}

/* Tag Cloud */
.widget_epcl_tag_cloud a, .widget_tag_cloud a, .wp-block-tag-cloud a {
    font-size: 12px !important;
    margin-bottom: 8px;
    margin-right: 8px;
}
.widget_epcl_tag_cloud a, .widget_tag_cloud a, .wp-block-tag-cloud a,  div.tags a{
    color: #333333;
    display: inline-block;
    padding: 4px 15px;
    line-height: 1.2;
    margin-right: 10px;
    background: #fff;
    border: 1px solid #333333;
    border-radius: 25px;
}

/* Social Share wrapper */
.wpjankari-social-wrapper {
    margin: 5px;
    font-size: 0;
    text-align: center;
	display: flex;
    flex-wrap: wrap;
}
.wpjankari-social-sharing {
	padding: 8px;
	margin: 4px;
	border-radius: 3px;
    flex: 1;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
}
.wpjankari-social-sharing:hover {
	transform: translateY(-3px);
	border: none;
	box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px,
	            rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}
@media only screen and (max-width: 600px) {
    .wpjankari-social-sharing {
		display: inline-block;
    }
}
.wpjankari-social-sharing svg {
    position: relative;
    top: 0.15em;
    display: inline-block;
}
.wpjankari-social-facebook {
    fill: #fff;
    background-color: rgba(59, 89, 152, 1);
}
.wpjankari-social-twitter {
    fill: #fff;
    background-color: rgba(0, 0, 0);
}
.wpjankari-social-whatsapp {
    fill: #fff;
    background-color: rgba(37, 211, 102, 1);
}
.wpjankari-social-telegram {
    fill: #fff;
    background-color: rgb(2, 126, 189);
}
.wpjankari-social-more {
    fill: #fff;
    background-color: rgba(0, 0, 0);
}

/* 1) Make all images safely responsive everywhere */
img { max-width: 100%; height: auto; }

/* 2) Social share grid: 2 columns on phones, 1 column on very small phones */
@media (max-width: 600px){
  .wpjankari-social-wrapper{ display:flex; flex-wrap:wrap; }
  .wpjankari-social-sharing{ flex: 0 0 48%; } /* two per row */
}
@media (max-width: 400px){
  .wpjankari-social-sharing{ flex: 0 0 100%; } /* one per row */
}

/* 3) TOC: slightly tighter on mobile */
@media (max-width: 600px){
  #toc_container span.toc_toggle{ font-size:16px; padding: 3px 14px; }
  #toc_container li a{ padding: 8px 0.9em; }
}

/* 4) Tag chips: prevent layout overflow on wrap-heavy lines */
.widget_epcl_tag_cloud a,
.widget_tag_cloud a,
.wp-block-tag-cloud a,
div.tags a{
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 5) Optional: search/archive title scales down a touch on small screens */
@media (max-width: 480px){
  .search-title{ font-size: 1.25rem; line-height: 1.3; }
}

/* 6) Reduce motion for users who prefer less animation */
@media (prefers-reduced-motion: reduce){
  .whatsapphighlight{ animation: none; }
}

/* 7) Avoid the fixed social bar covering footer on very short screens */
@media (max-height: 560px){
  .sticky-social-icons{ top: 38% !important; }
}
