/* Custom header and floating WhatsApp styles extracted from views for maintainability */

/* Sticky header styles: when body.sticky-active is present, fix the menu bar and show compact logo */
body.sticky-active #header-sticky {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    width: 100%;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1100;
    transition: top 0.2s ease;
}

/* compact logo shown in sticky mode on large screens */
#header-sticky .logo-small { display: none !important; }
body.sticky-active #header-sticky .logo-small { display: block !important; }

/* reduce padding in sticky mode to save vertical space */
body.sticky-active .header-mid, body.sticky-active .header-top { display: none !important; }

/* keep menu items readable when sticky */
body.sticky-active #header-sticky .main-menu ul li a { color: #222 !important; }

/* ensure sticky doesn't cover content */
.sticky-placeholder { height:0; }
body.sticky-active .sticky-placeholder { height: auto; }

/* WhatsApp floating button */
.whatsapp-fixed{
    position: fixed;
    right: 18px;
    bottom: 80px; /* sits above scroll-to-top button */
    z-index: 9999999;
    pointer-events: auto;
    touch-action: manipulation;
}
.whatsapp-fixed a{ display:inline-block; background:transparent; border-radius:50%; width:56px; height:56px; text-align:center; line-height:56px; box-shadow:0 6px 18px rgba(0,0,0,0.15); }
.whatsapp-fixed img{ display:block; width:56px; height:56px; border-radius:50%; }

@media (max-width:480px){
    .whatsapp-fixed{ right:12px; bottom:78px; }
    .whatsapp-fixed a, .whatsapp-fixed img{ width:52px; height:52px; }
}

/* Align sticky header items in a single horizontal row */
body.sticky-active #header-sticky .second-menu .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px; /* more breathing room between logo and menu */
}

/* Make logo and compact logo occupy minimal width */
body.sticky-active #header-sticky .logo,
body.sticky-active #header-sticky .logo-small {
    flex: 0 0 auto;
    display: block;
}

/* Make main menu expand to take available space and keep items on one line */
body.sticky-active #header-sticky .main-menu {
    flex: 1 1 auto;
}
body.sticky-active #header-sticky .main-menu ul {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 40px; /* increase spacing between menu items */
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}
body.sticky-active #header-sticky .main-menu ul li { display: inline-block; }

/* Ensure CTA stays to the right and doesn't wrap */
body.sticky-active #header-sticky .top-btn {
    flex: 0 0 auto;
    margin-left: 12px;
}

/* Small screens: revert to vertical stack for space */
@media (max-width: 991px){
    body.sticky-active #header-sticky .second-menu .row {
        display: block;
    }
    body.sticky-active #header-sticky .main-menu ul { display: block !important; }
}

/* Stronger compatibility with Bootstrap grid: force flex layout on sticky and normalize column flex behavior */
body.sticky-active #header-sticky {
    display: block; /* keep block for full width fixed behavior */
}
body.sticky-active #header-sticky .container { width: 100%; }
body.sticky-active #header-sticky .second-menu { width: 100%; }
body.sticky-active #header-sticky .second-menu .row {
    margin-left: 0; margin-right: 0; /* override bootstrap negative margins */
    display: flex !important;
    align-items: center;
}

/* Column sizing: logo (left), menu (center), cta (right) */
/* Reset bootstrap column widths inside sticky row so flex controls layout */
body.sticky-active #header-sticky .second-menu .row > [class*="col-"] {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
}

body.sticky-active #header-sticky .col-lg-2.logo,
body.sticky-active #header-sticky .col-lg-2.d-md-block.d-lg-none { flex: 0 0 140px; max-width: 160px; }
body.sticky-active #header-sticky .logo-small { flex: 0 0 140px; max-width: 160px; }
body.sticky-active #header-sticky .main-menu { flex: 1 1 auto; text-align: center; }
body.sticky-active #header-sticky .col-xl-3, body.sticky-active #header-sticky .col-lg-3 { flex: 0 0 220px; max-width: 260px; text-align: right; }

/* compact logo image height */
body.sticky-active #header-sticky .logo-small img { height: 48px; object-fit: contain; }

/* reduce vertical padding inside sticky bar so it sits tight */
body.sticky-active #header-sticky { padding-top: 6px; padding-bottom: 6px; }

/* Limit the sticky menu width so it doesn't expand too far across the page */
body.sticky-active #header-sticky .main-menu {
    /* prefer a fixed comfortable width, let it shrink if space limited */
    flex: 0 1 720px !important;
    max-width: 780px !important;
    margin-left: 8px;
    margin-right: 8px;
}

/* If there's still lots of empty space, center the menu content within its box */
body.sticky-active #header-sticky .main-menu > nav { display:flex; justify-content:center; }

/* Slightly reduce menu-item gap to pack items tighter when width limited */
body.sticky-active #header-sticky .main-menu ul { gap: 20px; }

/* Ensure menu links don't wrap and are vertically centered */
body.sticky-active #header-sticky .main-menu ul { display:flex !important; gap:24px; align-items:center; justify-content:center; }
body.sticky-active #header-sticky .main-menu ul li a { white-space: nowrap; }

/* Fallback when there's not enough space - gracefully hide CTA instead of breaking */
@media (max-width: 1200px){
    body.sticky-active #header-sticky .col-xl-3, body.sticky-active #header-sticky .col-lg-3 { display: none; }
}

/* small screens: reduce gap to avoid overflow */
@media (max-width: 1400px){
    body.sticky-active #header-sticky .second-menu .row { gap: 18px; }
    body.sticky-active #header-sticky .main-menu ul { gap: 18px; }
}

/* Final overrides to ensure compact sticky menu and remove conflicting declarations */
body.sticky-active #header-sticky .second-menu .row { gap: 20px !important; }
body.sticky-active #header-sticky .second-menu .row > [class*="col-"] { flex: 0 0 auto !important; width: auto !important; }
body.sticky-active #header-sticky .main-menu {
    flex: 0 1 560px !important;
    max-width: 560px !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
}
body.sticky-active #header-sticky .main-menu > nav { display:flex; justify-content:center; }
body.sticky-active #header-sticky .main-menu ul { display:flex !important; gap:16px !important; align-items:center; justify-content:center; }
body.sticky-active #header-sticky .main-menu ul li { display:inline-block; }
body.sticky-active #header-sticky .main-menu ul li a { white-space:nowrap; }

@media (max-width: 1200px){
    body.sticky-active #header-sticky .main-menu { max-width: 480px !important; flex: 0 1 480px !important; }
}
/* Ensure the CTA (top-btn) uses the site's dark-blue on hover */
.top-btn:hover,
body.sticky-active #header-sticky .top-btn:hover {
    background-color: #162542 !important; /* site dark-blue */
    color: #ffffff !important;
    border-color: #162542 !important;
}

/* Blog listing styles (approximate Libras demo) */
.blog-main .single-post {
    border-bottom: 1px solid #f1f3f6;
    padding-bottom: 22px;
}
.blog-main .post-thumb img { border-radius: 6px; display:block; }
.blog-main .post-body h3 { font-size: 20px; margin-bottom: 6px; font-weight:700; }
.blog-main .post-body .meta { color:#8895a6; font-size:13px; }
.blog-main .post-body p { color:#6b6f76; margin-bottom: 10px; }
.blog-main .ss-btn { background:#162542; color:#fff; padding:8px 12px; border-radius:4px; }
.blog-main .ss-btn:hover{ background:#0b2036; color:#fff; }

/* Sidebar widgets */
.sidebar-widget .widget-title, .widget .widget-title { font-size:18px; margin-bottom:14px; font-weight:700; color:#162542; }
.sidebar-widget .widget { background:#fff; padding:18px; box-shadow:0 6px 20px rgba(16,24,40,0.04); border-radius:6px; }
.sidebar-widget .recent-item a { color:#162542; display:block; }
.sidebar-widget .recent-item .post-date { display:block; color:#8895a6; font-size:12px; }

/* Pagination */
.pagination { display:flex; gap:8px; list-style:none; padding:0; }
.pagination .page-item a{ display:inline-block; padding:8px 12px; border:1px solid #e6e9ee; color:#162542; border-radius:4px; }
.pagination .page-item.active a{ background:#162542; color:#fff; border-color:#162542; }

/* Small responsive tweaks */
@media (max-width: 991px){
    .blog-main .post-thumb { margin-bottom:10px; }
    .blog-main .single-post { flex-direction:column; }
}

/* Date badge overlay */
.post-date-badge{
    position:absolute;
    right:18px;
    bottom:18px;
    background:#b68c5a;
    color:#fff;
    padding:10px 16px;
    border-radius:4px;
    font-weight:600;
    display:inline-flex;
    gap:8px;
    align-items:center;
}
.post-date-badge i{ font-size:14px; }

/* meta row styles */
.post-meta .meta-item{ color:#6f7682; margin-right:18px; font-size:14px; display:inline-flex; align-items:center; gap:8px; }
.post-meta .meta-item i{ background:#f6f7f9; color:#9aa0aa; padding:8px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; }

/* Title and excerpt */
.post-title{ font-family: 'PT Serif', serif; font-size:32px; color:#162542; margin:6px 0 12px; font-weight:700; }
.post-title a{ color:inherit; text-decoration:none; }
.post-excerpt{ color:#6b6f76; line-height:1.7; margin-bottom:14px; }

/* Sidebar search style like demo */
.widget_search .search-form{ display:flex; gap:0; }
.widget_search .search-form input[type="search"]{ flex:1 1 auto; padding:18px; border:1px solid #eee; border-right:0; border-radius:4px 0 0 4px; }
.widget_search .search-form input[type="submit"]{ background:#b68c5a; color:#fff; border:none; padding:0 22px; border-radius:0 4px 4px 0; }

/* Follow icons round */
.widget-social a{ display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:50%; border:1px solid #eee; margin-right:8px; color:#6b6f76; }

/* Categories list style */
.widget_categories ul{ padding-left:0; list-style:none; }

/* Mobile-specific overrides: ensure sticky header stacks and doesn't force flex on small screens */
@media (max-width: 991px){
    body.sticky-active #header-sticky .second-menu .row {
        display: block !important;
        gap: 0 !important;
    }
    body.sticky-active #header-sticky .main-menu {
        flex: 1 1 auto !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    body.sticky-active #header-sticky .main-menu ul {
        display: block !important;
        gap: initial !important;
        margin: 0 !important;
    }
    /* allow CTA to stack below menu on very small screens rather than breaking layout */
    body.sticky-active #header-sticky .top-btn { display: block !important; margin: 10px 0 0 0 !important; }
    /* Ensure compact logo (logo-small) stays hidden on small screens to avoid duplicate logos */
    body.sticky-active #header-sticky .logo-small { display: none !important; }
}
.widget_categories ul li{ border-bottom:1px solid #f1f3f6; padding:12px 0; display:flex; justify-content:space-between; align-items:center; }

/* Additional refinements: spacing, post container, meta icon size */
.single-post{ background: transparent; }
.single-post .img-wrap{ overflow: hidden; border-radius:4px; }
.post-meta .meta-item{ color:#6f7682; margin-right:22px; font-size:14px; display:inline-flex; align-items:center; gap:10px; }
.post-meta .meta-item i{ background:#fff; color:#b68c5a; padding:10px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 6px 18px rgba(0,0,0,0.04); }
.post-meta .meta-item:first-child i{ background:#fff; }
.post-meta{ margin-bottom:18px; }

/* Make the date badge slightly larger and more prominent like the demo */
.post-date-badge{ background:#b28958; padding:12px 18px; font-size:14px; box-shadow:0 6px 18px rgba(0,0,0,0.08); }

/* Post title larger on desktop */
@media (min-width: 992px){
    .post-title{ font-size:34px; }
}

/* Slightly lift the read more button and keep it consistent */
.ss-btn{ border-radius:4px; padding:10px 14px; font-size:14px; }




