/* ======================================= */
/* 1. FLOATING SHARE BUTTONS               */
/* ======================================= */

#keb-floating-share {
    position: fixed;
    top: 30%; /* Desktop: Screen ke center mein */
    left: 0;
    z-index: 99999; /* Z-index bahut high rakha, taaki footer se upar rahe */
    display: flex;
    flex-direction: column;
    padding: 5px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    background-color: #fff;
    border-radius: 0 5px 5px 0;
}

#keb-floating-share a {
    text-decoration: none;
    padding: 10px 10px 10px 15px;
    color: #444;
    font-size: 20px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#keb-floating-share a:hover {
    transform: translateX(3px);
}

/* Social media colours for better branding */
#keb-floating-share a .fa-whatsapp { color: #25D366; }
#keb-floating-share a .fa-facebook-f { color: #1877F2; }
#keb-floating-share a .fa-x-twitter { color: #000; }
#keb-floating-share a .fa-envelope { color: #fbbc05; }


/* Mobile adjustment for Share Buttons (FIXED POSITION) */
@media (max-width: 768px) {
    #keb-floating-share {
        top: auto;
        /* FIX: Footer Marquee (approx 70px) + gap ke liye 75px bottom se rakha */
        bottom: 75px; 
        left: 5px;
        flex-direction: row; /* Horizontal kiya */
        border-radius: 5px;
        padding: 0;
    }

    #keb-floating-share a {
        padding: 8px 10px;
        font-size: 18px;
    }
    #keb-floating-share a:hover {
        transform: none; /* Mobile par transform hataya */
    }
}


/* ======================================= */
/* 2. RELATED POSTS WIDGET                 */
/* ======================================= */

#keb-related-posts {
    border-top: 2px solid #d90f0f;
    margin-top: 30px;
    padding-top: 20px;
}

#keb-related-posts h3 {
    font-size: 22px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.keb-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop par 3 columns */
    gap: 20px;
}

.keb-post-item {
    display: block;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.keb-post-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.keb-post-thumb {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.keb-post-title {
    display: block;
    padding: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    min-height: 45px; /* Thoda space diya title ke liye */
}

/* Tablet/Mobile Adjustment for Related Posts */
@media (max-width: 768px) {
    .keb-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet/Mobile par 2 columns */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .keb-posts-grid {
        grid-template-columns: 1fr; /* Chhote mobile par 1 column */
    }
}
@media (max-width: 768px) {
    
    /* 1. FLOATING SHARE BUTTONS FIX (Vertical, Bottom-Right) */
    #keb-floating-share {
        top: auto;
        /* Position Fix: Footer Marquee (approx 70px) se 10px upar rakha */
        bottom: 80px; 
        right: 10px; /* Right side mein chipkaya */
        left: auto; /* Left se hataya */
        
        flex-direction: column; /* Wapas Vertical (column) kiya */
        border-radius: 5px; /* Poora border radius diya */
        padding: 5px; /* Padding adjust ki */
        z-index: 99999; 
    }

    #keb-floating-share a {
        padding: 8px; /* Padding kam ki */
        font-size: 18px;
    }
    #keb-floating-share a:hover {
        transform: none; 
    }

    /* 2. RELATED POSTS GRID FIX */
    .keb-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet/Mobile par 2 columns */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    /* Chhote mobile par, related posts ko 1 column mein kar diya */
    .keb-posts-grid {
        grid-template-columns: 1fr; 
    }
}