/*
 * Blog UI
 * Laravel Blade + Bootstrap 5.3
 * Custom CSS intentionally stays small: Bootstrap owns the grid and spacing.
 */
:root {
    --blog-brand: #198754;
    --blog-brand-dark: #146c43;
    --blog-brand-soft: #eaf7f0;
    --blog-text: #1f2937;
    --blog-muted: #6b7280;
    --blog-heading: #172033;
    --blog-border-light: #e5e7eb;
    --blog-border-dark: #d1d5db;
    --blog-surface: #ffffff;
    --blog-page: #f7f8fa;
    --blog-radius: .65rem;
    --blog-shadow: 0 2px 10px rgba(15, 23, 42, .055);
}

html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--blog-text);
    background: var(--blog-page);
}

a { color: var(--blog-brand); }
a:hover { color: var(--blog-brand-dark); }

.top-spacer { margin-top: 92px; }

/* Header */
.navbar {
    min-height: 60px;
    border-color: var(--blog-border-dark) !important;
    /* box-shadow: 0 1px 8px rgba(15, 23, 42, .035); */
        background: var(--blog-page);
    /* isolation: isolate; */
}
/* .navbar .container-xxl,
.navbar .container-xl { min-height: 60px; } */
.navbar-brand.logo { margin-left: 0 !important; }
.navbar-brand.logo img { display: block; max-height: 58px; width: auto; }
.nav-right .icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: .35rem;
    color: #344054;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    text-decoration: none;
}
.nav-right .icon-link:hover,
.nav-right .icon-link:focus-visible {
    color: var(--blog-brand-dark);
    background: var(--blog-brand-soft);
    border-color: #b8dfca;
}
.nav-right .icon-link i { margin: 0; font-size: 15px; }

/* Blog layout: Bootstrap owns the grid; these classes own blog component styling. */
.blog-list,
.blog-post { background: var(--blog-page) !important; }
/* .blog-list > .container-xl,
.blog-post > .container-xl { max-width: 1240px; } */
.blog-layout {
    --bs-gutter-x: 24px;
    align-items: flex-start;
}
.blog-sidebar-left,
.blog-main,
.blog-sidebar-right {
    min-width: 0;
}

/* Sidebar */
.blog-sidebar-left .widget,
.blog-sidebar-right .widget {
    position: sticky;
    top: 94px;
}
.widget-box {
    margin-bottom: 18px;
    padding: 18px;
    background: var(--blog-surface);
    border: 1px solid var(--blog-border) !important;
    border-radius: var(--blog-radius) !important;
    box-shadow: var(--blog-shadow) !important;
}
.widget-box h3 {
    margin: 0 0 12px;
    color: var(--blog-heading);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}
.widget-box h3 span { display: inline; }
.widget-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.widget-box li { margin: 0; border-bottom: 1px solid #f0f1f3; }
.widget-box li:last-child { border-bottom: 0; }
.widget-box li a {
    display: block;
    padding: 8px 0;
    color: #4b5563;
    font-size: .875rem;
    line-height: 1.4;
    text-decoration: none;
}
.widget-box li a:hover { color: var(--blog-brand-dark); }
.tag-cloud {
    display: flex !important;
    flex-wrap: wrap;
    gap: 7px;
}
.widget-box ul.tag-cloud li { border: 0; }
.widget-box ul.tag-cloud li a {
    display: inline-block;
    padding: 3px 5px;
    color: var(--blog-brand-dark);
    background: var(--blog-brand-soft);
    border-color: #b8dfca;
    /* color: #4b5563;
    background: #f4f6f8;
    border: 1px solid #e6e9ed; */
    border-radius: 999px;
    font-size: .70rem;
}

.widget-box ul.tag-cloud li a:hover {
    /* color: var(--blog-brand-dark);
    background: var(--blog-brand-soft);
    border-color: #b8dfca; */
    color: #4b5563;
    background: #f4f6f8;
    border: 1px solid #e6e9ed;
}

/* Search */
.search-box { position: relative; }
.search-box .search { display: flex; }
.search-box input {
    min-height: 42px;
    border: 1px solid var(--blog-border) !important;
    border-right: 0 !important;
    border-radius: var(--blog-radius) 0 0 var(--blog-radius);
    box-shadow: none !important;
}
.search-box button {
    width: 44px;
    min-width: 44px;
    border: 1px solid var(--blog-border);
    border-left: 0;
    border-radius: 0 var(--blog-radius) var(--blog-radius) 0;
    color: #fff;
    background: var(--blog-brand);
}
.search-box button:hover { background: var(--blog-brand-dark); }
.search-box button:focus-visible,
.search-box input:focus { z-index: 2; }

/* Buttons - one consistent blog action color */
.widget-box .btn-primary,
.blog-list .btn-primary,
.blog-post .btn-primary,
.newsletter-frm .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--blog-brand);
    --bs-btn-border-color: var(--blog-brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--blog-brand-dark);
    --bs-btn-hover-border-color: var(--blog-brand-dark);
    --bs-btn-active-bg: var(--blog-brand-dark);
    --bs-btn-active-border-color: var(--blog-brand-dark);
}

/* Listing */
.blog-list { padding-top: 28px !important; padding-bottom: 42px !important; }
.blog-list .blog-post-summary {
    overflow: hidden;
    margin-bottom: 18px !important;
    background: var(--blog-surface) !important;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow) !important;
}
.blog-post-summary img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 310px;
    object-fit: cover;
}
.blog-post-summary .post-title {
    margin-bottom: 8px !important;
    color: var(--blog-heading);
    font-size: 1.22rem !important;
    line-height: 1.35;
}
.blog-post-summary .post-title a { color: inherit; }
.blog-post-summary .post-title a:hover { color: var(--blog-brand-dark); }
.blog-post-summary .post-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 10px !important;
    color: var(--blog-muted);
    font-size: .78rem;
}
.blog-post-summary .post-details strong { color: #4b5563; font-weight: 600; }
.blog-post-summary .post-summary {
    margin-bottom: 14px;
    color: #4b5563;
    font-size: .92rem;
    line-height: 1.65;
}
.blog-post-summary .btn { font-size: .82rem; font-weight: 600; }
.blog-list .alert { border-radius: var(--blog-radius); }
.blog-list .pagination { margin-bottom: 0; }
.blog-list .pagination .page-link { color: var(--blog-brand-dark); }
.blog-list .pagination .active .page-link {
    color: #fff;
    background: var(--blog-brand);
    border-color: var(--blog-brand);
}

/* Single post */
.blog-post { padding-top: 28px !important; padding-bottom: 42px !important; }
.blog-post article {
    overflow: hidden;
    padding: 28px !important;
    background: var(--blog-surface) !important;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
}
.blog-post article > header { background: transparent !important; }
.blog-post .title {
    margin: 0 0 12px !important;
    color: var(--blog-heading);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.18;
    letter-spacing: -.025em;
}
.blog-post .title a { color: inherit; text-decoration: none; }
.blog-post .title a:hover { color: var(--blog-brand-dark); }
.blog-post .post-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding-bottom: 18px;
    color: var(--blog-muted);
    border-bottom: 1px solid var(--blog-border);
    font-size: .82rem;
}
.blog-post .author-info,
.blog-post .detail-item { display: inline-flex; align-items: center; gap: 6px; }
.blog-post .post-details i { color: var(--blog-brand); }
.blog-post .image-thumbnail { margin-top: 20px; }
.blog-post .image-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border: 0 !important;
    border-radius: .55rem;
    box-shadow: none !important;
}
.blog-post .body {
    padding-top: 24px !important;
    color: #283242;
    font-size: 1rem;
    line-height: 1.85;
}
.blog-post .body > :first-child { margin-top: 0; }
.blog-post .body h2,
.blog-post .body h3,
.blog-post .body h4,
.blog-post .body h5 {
    margin-top: 2rem;
    margin-bottom: .75rem;
    color: var(--blog-heading);
    line-height: 1.3;
}
.blog-post .body h2 { font-size: 1.55rem; }
.blog-post .body h3 { font-size: 1.3rem; }
.blog-post .body h4 { font-size: 1.1rem; }
.blog-post .body p { margin-bottom: 1.15rem; }
.blog-post .body a { text-underline-offset: 2px; }
.blog-post .body img {
    max-width: 100%;
    height: auto;
    border-radius: .45rem;
}
.blog-post .body blockquote {
    margin: 1.5rem 0;
    padding: 12px 18px;
    color: #4b5563;
    background: #f7faf8;
    border-left: 4px solid var(--blog-brand);
}
.blog-post .body pre {
    overflow-x: auto;
    padding: 14px 16px;
    color: #e5e7eb;
    background: #172033;
    border-radius: .5rem;
}
.blog-post .body code { color: #9a3412; }
.blog-post .body pre code { color: inherit; }
.blog-post .body table { width: 100%; margin: 1.5rem 0; }
.blog-post .body th,
.blog-post .body td { padding: .6rem .7rem; border: 1px solid var(--blog-border); }
.blog-post .body th { background: #f8fafc; }
.blog-post article > section { margin-top: 28px !important; }
.blog-post article > section > .bg-white {
    padding: 22px !important;
    background: #fafbfc !important;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius) !important;
    box-shadow: none !important;
}

/* Floating controls */
.whatsapp-botm,
.scroll-to-top {
    width: 42px;
    height: 42px;
    display: inline-flex;
    position:fixed;
    align-items: center;
    justify-content: center;
    right: 20px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 1000111111;
}
.whatsapp-botm { bottom: 70px; padding: 0; background: #25d366; }
.whatsapp-botm i { margin: 0 !important; font-size: 22px; color: #fff; }
/* .scroll-to-top { bottom: 72px; padding: 0; color: #fff; background: rgba(31, 41, 55, .78);display:none; } */
/* .scroll-to-top:hover { color: #fff; background: var(--blog-brand); } */

#backToTop {
  position: fixed;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  color: #fff; background: rgba(31, 41, 55, .78);
  bottom: 20px;
  right: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10001111;
}

/* Hidden state */
#backToTop.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px); /* Optional: slight slide-down effect */
}

#backToTop:hover { color: #fff; background: var(--blog-brand); }

/* Social rail */
#socialSidenav { position: fixed; top: 200px; left: 0; z-index: 900; }
#socialSidenav a {
    display: block;
    width: 40px;
    margin-left: -10px;
    padding: 7px 8px;
    color: #fff;
    border-radius: 0 6px 6px 0;
    text-align: right;
    text-decoration: none;
    transition: margin-left .2s ease;
    cursor: pointer;
}
#socialSidenav a:hover { margin-left: 0; }

#facebook { background-color: #3b5999; }

#pinterest {
    background-color: #c8232c;
}
#twitter {
    background-color: #1da1f2;
}

#googleplus {
    background-color: #dd4b39;
}

#linkedin {
    background-color: #0077b5;
}

#youtube {
    background-color: #cd201f;
}

#whatsapp { background-color: #25D366;}

#mailto {
    background-color: #959595;
}

#instagram {
    background-color: #4c5fd7
}


/* Footer */
.footer-spl h6,
.page-footer h6 { color: #434343; font-size: .9rem; }
.footer-spl a,
.page-footer a { color: #7a7f87; }
.footer-spl a:hover,
.page-footer a:hover { color: var(--blog-brand-dark); text-decoration: none !important; }
.page-footer { color: #8a9099; font-size: .82rem; line-height: 1.7; }
.page-footer .social-box { background: var(--blog-brand); }

/* Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(25, 135, 84, .28);
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .top-spacer { margin-top: 84px; }
    .blog-layout { --bs-gutter-x: 18px; }
    .blog-sidebar-left .widget,
    .blog-sidebar-right .widget { position: static; }
    .blog-sidebar-left { order: 2; }
    .blog-main { order: 1; }
    .blog-sidebar-right { order: 3; }
}

@media (max-width: 767.98px) {
    .top-spacer { margin-top: 78px; }
    .navbar.fixed-top,
    .navbar .container-xxl,
    .navbar .container-xl { min-height: 68px; }
    .navbar-brand.logo img { max-height: 48px; }
    .nav-right { padding-top: 0 !important; padding-bottom: 0 !important; }
    .nav-right .icon-link { width: 34px; height: 34px; }
    .blog-list > .container-xl,
    .blog-post > .container-xl { padding-left: 14px; padding-right: 14px; }
    .blog-layout { --bs-gutter-x: 0; }
    .blog-sidebar-left,
    .blog-main,
    .blog-sidebar-right { width: 100%; }
    .blog-list .blog-post-summary { margin-bottom: 14px !important; }
    .blog-post article { padding: 20px !important; }
    .blog-post .title { font-size: 1.7rem; }
    .blog-post .body { font-size: .96rem; line-height: 1.75; }
    #socialSidenav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Left sidebar: remove the white widget containers. Keep the right sidebar unchanged. */
.blog-sidebar .widget-box {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.blog-sidebar .widget-box h3 {
    padding-left: 0;
    padding-right: 0;
}
