/* ==========================================================================
   Consolidated Custom Layouts CSS (Header, Footer, Page Loader, Single Post)
   ========================================================================== */

/* --- GLOBAL STICKY HEADER PADDING --- */
body { padding-top: 130px !important; }
@media (max-width: 991px) { body { padding-top: 135px !important; } }

/* ==========================================================================
   1. Header Styles (from rd-pearl-header)
   ========================================================================== */
.rd-perfect-header {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 999999;
    font-family: "Noto Serif Bengali", serif;
    background: #e0e5ec;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: block; visibility: visible;
}

.rd-top { padding: 10px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.15); }
.rd-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; }

.rd-logo img { height: 50px; width: auto; display: block; }
.rd-center { text-align: center; flex: 1; color: #334d6e; }
.rd-date { font-size: 15px; font-weight: 600; margin-bottom: 5px; color: #5a6e8a; }

/* Social Icons */
.rd-social { display: inline-flex; align-items: center; }
.rd-social a { width: 32px; height: 32px; margin: 0 6px; border-radius: 50%; background: #e0e5ec; box-shadow: 3px 3px 6px #bebebe, -3px -3px 6px #ffffff; display: inline-flex; justify-content: center; align-items: center; font-size: 16px; transition: all 0.2s; }
.rd-social a:hover { box-shadow: inset 2px 2px 4px #bebebe, inset -2px -2px 4px #ffffff; transform: scale(0.98); }

.rd-social a.rd-facebook i, .rd-mobile-social-bar a.rd-facebook i { color: #1877F2 !important; }
.rd-social a.rd-x i, .rd-mobile-social-bar a.rd-x i { color: #000000 !important; }
.rd-social a.rd-youtube i, .rd-mobile-social-bar a.rd-youtube i { color: #FF0000 !important; }
.rd-social a.rd-linkedin i, .rd-mobile-social-bar a.rd-linkedin i { color: #0A66C2 !important; }
.rd-social a.rd-instagram i, .rd-mobile-social-bar a.rd-instagram i { color: #E4405F !important; }

/* Search Trigger */
.rd-search-trigger {
    font-size: 18px; color: #334d6e; cursor: pointer;
    width: 35px; height: 35px; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; background: #e0e5ec;
    box-shadow: 3px 3px 6px #bebebe, -3px -3px 6px #ffffff;
    transition: 0.3s;
    margin-left: 10px;
}
.rd-search-trigger:hover { color: #d32f2f; box-shadow: inset 2px 2px 5px #bebebe, inset -2px -2px 5px #ffffff; }

/* Full Width Search Popup */
.rd-search-overlay {
    display: none; 
    position: fixed; top: 0; left: 0; width: 100%; height: 150px;
    background: #e0e5ec; 
    z-index: 1000000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    align-items: center; justify-content: center;
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { top: -150px; } to { top: 0; } }

.rd-search-form-wrap {
    width: 100%; max-width: 800px; position: relative; padding: 0 20px;
}
.rd-search-input {
    width: 100%; padding: 15px 20px; font-size: 24px; border: none; 
    background: transparent; border-bottom: 2px solid #334d6e;
    color: #334d6e; font-family: inherit; outline: none;
}
.rd-search-input::placeholder { color: #999; }

.rd-search-close {
    position: absolute; top: 20px; right: 30px; font-size: 30px; color: #d32f2f; cursor: pointer; transition: 0.3s;
}
.rd-search-close:hover { transform: rotate(90deg); }

/* Navigation */
.rd-nav { padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.15); }
.rd-menu ul { display: flex; list-style: none; padding: 0; margin: 0; justify-content: center; flex-wrap: wrap; position: relative; }
.rd-menu > ul > li { position: relative; margin: 0 2px; padding-bottom: 10px; margin-bottom: -10px; }
.rd-menu a { color: #334d6e; text-decoration: none; font-weight: 700; font-size: 18px; padding: 8px 18px; border-radius: 20px; transition: all 0.3s; display: flex; align-items: center; gap: 5px; }
.rd-menu a:hover, .rd-menu .current-menu-item > a, .rd-menu li:hover > a { color: #fff; background: #d32f2f; box-shadow: inset 3px 3px 6px #a82525, inset -3px -3px 6px #fe3939; }

/* Dropdown */
.rd-menu ul.sub-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #e0e5ec; min-width: 220px; padding: 15px;
    border-radius: 15px; box-shadow: 5px 5px 10px #bebebe, -5px -5px 10px #ffffff;
    flex-direction: column; z-index: 1000; margin-top: 5px; text-align: left;
}
.rd-menu ul.sub-menu::before { content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent; }
.rd-menu li:hover > ul.sub-menu { display: flex; }
.rd-menu ul.sub-menu li { margin: 5px 0; width: 100%; padding: 0; margin-bottom: 0; }
.rd-menu ul.sub-menu a { font-size: 16px; padding: 8px 15px; background: transparent; box-shadow: none; border-radius: 10px; color: #334d6e; width: 100%; }
.rd-menu ul.sub-menu a:hover { color: #334d6e; background: #e0e5ec; box-shadow: inset 3px 3px 6px #bebebe, inset -3px -3px 6px #ffffff; }

/* Mobile Header */
@media (max-width: 991px) {
    .rd-logo.rd-logo-right, .rd-center { display: none; }
    .rd-top { height: 65px; display: flex; align-items: center; padding: 0; }
    .rd-top .rd-wrap { width: 100%; }
    .rd-logo img { height: 48px; width: auto; } 
    
    .rd-mobile-right-col { display: flex; flex-direction: column; align-items: flex-end; }
    .rd-mobile-social-bar { display: flex; gap: 6px; margin-bottom: 4px; align-items: center; }
    .rd-mobile-social-bar a { width: 26px; height: 26px; font-size: 12px; border-radius: 50%; background: #e0e5ec; box-shadow: 2px 2px 4px #bebebe, -2px -2px 4px #ffffff; display: inline-flex; justify-content: center; align-items: center; }
    .rd-mobile-date { font-size: 14px; font-weight: 500; color: #5a6e8a; }
    
    .rd-search-trigger { 
        width: 26px; height: 26px; font-size: 12px; margin-left: 6px; 
        box-shadow: 2px 2px 4px #bebebe, -2px -2px 4px #ffffff;
    }

    .rd-nav { height: auto; overflow: hidden; display: block; padding: 0; border-bottom: 1px solid rgba(0,0,0,0.1); }
    .rd-menu { width: 100%; overflow-x: auto; white-space: nowrap; padding: 7px 15px; -webkit-overflow-scrolling: touch; display: flex; align-items: center; }
    .rd-menu::-webkit-scrollbar { height: 6px; display: block; }
    .rd-menu::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
    .rd-menu::-webkit-scrollbar-thumb { background-color: #d32f2f; border-radius: 6px; }
    .rd-menu ul { display: inline-flex; flex-wrap: nowrap; gap: 12px; margin: 0; padding-right: 20px; }
    .rd-menu > ul > li { padding-bottom: 0; margin-bottom: 0; }
    .rd-menu a { font-size: 16px; padding: 6px 16px; background: #e0e5ec; box-shadow: 3px 3px 6px #bebebe, -3px -3px 6px #ffffff; border-radius: 20px; margin: 0; white-space: nowrap; height: 36px; display: flex; align-items: center; }
    .rd-menu ul.sub-menu { display: none !important; }
}
@media (min-width: 992px) { .rd-mobile-right-col { display: none; } }

/* ==========================================================================
   2. Footer Styles (from rd-custom-footer)
   ========================================================================== */
#rd-minimal-footer {
    background-color: #e0e5ec;
    color: #334d6e;
    font-family: 'Merriweather', serif;
    padding: 60px 0 0 0;
    border-top: 3px solid #d32f2f;
    text-align: center;
    margin-top: 50px;
}

.rd-footer-wrap { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

.rd-footer-logo { margin-bottom: 10px; }
.rd-footer-logo img { height: 70px; width: auto; display: inline-block; transition: 0.3s; }
.rd-footer-logo img:hover { transform: scale(1.05); }

.rd-footer-slogan {
    font-size: 14px; font-weight: 700; color: #d32f2f; 
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px; display: block;
}

.rd-footer-desc {
    font-size: 16px; line-height: 1.8; color: #5a6e8a;
    max-width: 850px; margin: 0 auto 30px auto;
    font-weight: 400;
}

.rd-social-icons {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 35px;
}
.rd-social-icons a {
    display: inline-flex; justify-content: center; align-items: center;
    width: 45px; height: 45px; border-radius: 50%;
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #b8bec7, -6px -6px 12px #ffffff;
    transition: all 0.3s ease; text-decoration: none; font-size: 20px;
}
.rd-social-icons a:hover { transform: translateY(-3px); }

.rd-social-icons a.rd-facebook:hover { background: #1877F2; color: #fff; box-shadow: none; } 
.rd-social-icons a.rd-facebook i { color: #1877F2; } 
.rd-social-icons a.rd-facebook:hover i { color: #fff; }

.rd-social-icons a.rd-instagram:hover { background: #E4405F; color: #fff; box-shadow: none; } 
.rd-social-icons a.rd-instagram i { color: #E4405F; } 
.rd-social-icons a.rd-instagram:hover i { color: #fff; }

.rd-social-icons a.rd-youtube:hover { background: #FF0000; color: #fff; box-shadow: none; } 
.rd-social-icons a.rd-youtube i { color: #FF0000; } 
.rd-social-icons a.rd-youtube:hover i { color: #fff; }

.rd-social-icons a.rd-linkedin:hover { background: #0A66C2; color: #fff; box-shadow: none; } 
.rd-social-icons a.rd-linkedin i { color: #0A66C2; } 
.rd-social-icons a.rd-linkedin:hover i { color: #fff; }

.rd-footer-menu { margin-bottom: 25px; }
.rd-footer-menu ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 25px;
}
.rd-footer-menu a {
    text-decoration: none; color: #334d6e;
    font-size: 16px; font-weight: 700; position: relative; transition: 0.3s;
}
.rd-footer-menu a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 50%; background-color: #d32f2f;
    transition: all 0.3s; transform: translateX(-50%);
}
.rd-footer-menu a:hover { color: #d32f2f; }
.rd-footer-menu a:hover::after { width: 100%; }

.rd-footer-address {
    font-size: 16px; color: #5a6e8a;
    margin-bottom: 30px; line-height: 1.6; font-weight: 400;
}

.rd-footer-contact {
    display: flex; justify-content: center; gap: 60px; margin-bottom: 50px; 
    font-size: 16px; color: #334d6e; font-weight: 700; text-align: left;
}
.rd-contact-col { display: flex; flex-direction: column; gap: 12px; }
.rd-contact-item { display: flex; align-items: center; gap: 10px; }
.rd-contact-item i { color: #d32f2f; font-size: 16px; width: 20px; text-align: center; }

.rd-credit-bar {
    background-color: #dbe2e8; padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 14px; color: #5a6e8a;
}
.rd-credit-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.rd-credit-inner a { color: #334d6e; text-decoration: none; font-weight: 700; }
.rd-credit-inner a:hover { color: #d32f2f; }

@media (max-width: 768px) {
    #rd-minimal-footer { padding-top: 40px; }
    .rd-footer-logo img { height: 60px; }
    .rd-footer-desc { font-size: 15px; padding: 0 10px; margin-bottom: 30px; text-align: justify; text-align-last: center; }
    
    .rd-footer-menu ul { gap: 15px 15px; }
    .rd-footer-menu a { font-size: 15px; }
    .rd-footer-address { font-size: 15px; padding: 0 10px; margin-bottom: 30px; }

    .rd-footer-contact { flex-direction: column; gap: 15px; margin-bottom: 40px; text-align: center; align-items: center; }
    .rd-contact-col { align-items: center; gap: 10px; }
    
    .rd-credit-inner { flex-direction: column; gap: 10px; text-align: center; }
}

/* ==========================================================================
   3. Page Loader Styles (from rd-page-loader)
   ========================================================================== */
#rd-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999999;
    display: none;
    justify-content: center;
    align-items: center;
}
.rd-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.rd-spinner div {
    transform-origin: 40px 40px;
    animation: rd-spin 1.2s linear infinite;
}
.rd-spinner div:after {
    content: ' ';
    display: block;
    position: absolute;
    top: 3px;
    left: 37px;
    width: 6px;
    height: 18px;
    border-radius: 20%;
    background: #d32f2f;
}
.rd-spinner div:nth-child(1) { transform: rotate(0deg); animation-delay: -1.1s; }
.rd-spinner div:nth-child(2) { transform: rotate(30deg); animation-delay: -1s; }
.rd-spinner div:nth-child(3) { transform: rotate(60deg); animation-delay: -0.9s; }
.rd-spinner div:nth-child(4) { transform: rotate(90deg); animation-delay: -0.8s; }
.rd-spinner div:nth-child(5) { transform: rotate(120deg); animation-delay: -0.7s; }
.rd-spinner div:nth-child(6) { transform: rotate(150deg); animation-delay: -0.6s; }
.rd-spinner div:nth-child(7) { transform: rotate(180deg); animation-delay: -0.5s; }
.rd-spinner div:nth-child(8) { transform: rotate(210deg); animation-delay: -0.4s; }
.rd-spinner div:nth-child(9) { transform: rotate(240deg); animation-delay: -0.3s; }
.rd-spinner div:nth-child(10) { transform: rotate(270deg); animation-delay: -0.2s; }
.rd-spinner div:nth-child(11) { transform: rotate(300deg); animation-delay: -0.1s; }
.rd-spinner div:nth-child(12) { transform: rotate(330deg); animation-delay: 0s; }

@keyframes rd-spin {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   4. Single Post Styles (from rd-single-post)
   ========================================================================== */
.rd-wrapper * { box-sizing: border-box; }

.rd-container {
    max-width: 1200px; margin: 0 auto; padding: 20px 15px 40px 15px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; position: relative;
}
.rd-main-content { width: 66%; flex: 0 0 66%; }
.rd-sidebar { width: 31%; flex: 0 0 31%; }

.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 150px;
    z-index: 10;
}

.neumorphism-ui {
    background: #e0e5ec; border-radius: 15px; padding: 30px;
    box-shadow: 8px 8px 16px #b8bec7, -8px -8px 16px #ffffff; margin-bottom: 30px;
}

.entry-title { font-size: 36px; font-weight: 700; color: #334d6e; line-height: 1.4; margin-bottom: 10px; margin-top: 0; }

.entry-meta-bar { display: flex; align-items: center; gap: 15px; font-size: 14px; color: #666; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); flex-wrap: wrap; }
.entry-meta-bar span { display: flex; align-items: center; gap: 5px; }
.post-feature-image-wrapper img { width: 100%; height: auto; border-radius: 10px; display: block; box-shadow: 5px 5px 10px #b8bec7, -5px -5px 10px #ffffff; }
.entry-content { font-size: 18px; line-height: 1.8; color: #444; margin-top: 25px; text-align: justify; }

.entry-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid #d1d9e6; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.share-wrapper { display: flex; align-items: center; gap: 10px; }

.share-buttons a, .copy-link-btn, .qr-code-btn, .print-button {
    width: 40px; height: 40px; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; background: #e0e5ec; color: #334d6e; font-size: 16px; text-decoration: none; border: none; cursor: pointer;
    box-shadow: 5px 5px 10px #b8bec7, -5px -5px 10px #ffffff; transition: all 0.3s ease;
}
.share-buttons a:hover, .copy-link-btn:hover, .qr-code-btn:hover, .print-button:hover {
    color: #d32f2f; box-shadow: inset 3px 3px 6px #b8bec7, inset -3px -3px 6px #ffffff; transform: translateY(-2px);
}

.print-button { 
    width: auto; padding: 0 20px; border-radius: 20px; gap: 8px; font-weight: 600; 
    font-family: 'Noto Serif Bengali', serif !important; 
}

.related-posts-section { margin-top: 40px; }
.section-title { font-size: 24px; font-weight: 700; color: #334d6e; margin-bottom: 25px; padding-left: 10px; border-left: 5px solid #d32f2f; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.related-post-card { background: #e0e5ec; border-radius: 10px; overflow: hidden; box-shadow: 6px 6px 12px #b8bec7, -6px -6px 12px #ffffff; transition: transform 0.3s; }
.related-post-card:hover { transform: translateY(-5px); }
.related-post-card a { text-decoration: none; color: inherit; }
.related-post-thumbnail { width: 100%; height: 180px; overflow: hidden; }
.related-post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.related-post-card:hover img { transform: scale(1.1); }
.related-post-title { font-size: 16px; font-weight: 700; padding: 15px; margin: 0; color: #334d6e; line-height: 1.4; }

.widget-title { font-size: 22px; margin-top: 0; margin-bottom: 20px; color: #334d6e; border-bottom: 1px solid #ccc; padding-bottom: 10px; }
.sidebar-post-item { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.sidebar-post-item:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
.sidebar-post-title { font-size: 16px; margin: 5px 0; }
.sidebar-post-title a { text-decoration: none; color: #444; font-weight: 600; transition: color 0.2s; }
.sidebar-post-title a:hover { color: #d32f2f; }
.sidebar-post-meta { font-size: 13px; color: #777; margin-top: 5px; display: block; }
.sidebar-cat-tag { font-size: 11px; background: #d32f2f; color: #fff; padding: 2px 8px; border-radius: 4px; text-decoration: none; display: inline-block; margin-bottom: 5px; }

.rd-qr-popup {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.rd-qr-box {
    background: #e0e5ec; padding: 40px; border-radius: 20px; text-align: center; position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.5);
    width: 350px; 
}
.rd-qr-close {
    position: absolute; top: 10px; right: 15px; font-size: 28px; cursor: pointer; color: #334d6e; font-weight: bold;
}
.rd-qr-title { font-size: 20px; font-weight: 700; color: #334d6e; margin-bottom: 25px; }
#rd-qr-canvas { margin: 0 auto 25px auto; background: #fff; padding: 15px; border-radius: 10px; display: inline-block; }
.rd-qr-download {
    background: #d32f2f; color: #fff; padding: 10px 25px; border-radius: 25px; text-decoration: none; font-weight: 600; display: inline-block;
    box-shadow: 3px 3px 6px #b8bec7; transition: 0.3s;
}
.rd-qr-download:hover { background: #b71c1c; }

@media (max-width: 991px) {
    .rd-main-content, .rd-sidebar { width: 100%; flex: 0 0 100%; }
    .rd-sidebar { margin-top: 20px; }
    .sticky-sidebar { position: static; } 
    .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .entry-footer { justify-content: center; flex-direction: column; gap: 15px; }
    .share-wrapper { flex-wrap: wrap; justify-content: center; }
    .rd-author-meta { display: none !important; }
}
@media (max-width: 600px) {
    .related-posts-grid { grid-template-columns: 1fr; }
    .entry-title { font-size: 26px; }
}
