/* =============================================
   Indusroof Blog — Custom Styles
   Child theme: Indusroof/default
   ============================================= */

/* ----- Hero Blueprint Grid Background ----- */
.blog-hero-grid {
    background-image:
        linear-gradient(rgba(30, 58, 95, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 58, 95, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ----- Category Filter Scrollbar ----- */
.blog-scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.blog-scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ----- Line Clamp Utilities ----- */
.blog-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----- Reading Progress Bar ----- */
.blog-progress-bar {
    transition: width 50ms linear;
}

/* ----- Blog Post Content Prose Styling ----- */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #F8FAFC;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1E3A5F;
    scroll-margin-top: 5rem;
}
.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5rem;
}
.blog-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.blog-content p {
    color: #CBD5E1;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.blog-content a {
    color: #29ABE2;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}
.blog-content a:hover {
    color: #5BC4F0;
}
.blog-content strong {
    color: #F8FAFC;
    font-weight: 600;
}
.blog-content em {
    font-style: italic;
}
.blog-content ul,
.blog-content ol {
    color: #CBD5E1;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.blog-content ul {
    list-style-type: disc;
}
.blog-content ol {
    list-style-type: decimal;
}
.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}
.blog-content li::marker {
    color: #29ABE2;
}
.blog-content blockquote {
    border-left: 3px solid #29ABE2;
    background: rgba(41, 171, 226, 0.06);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #CBD5E1;
    font-style: italic;
}
.blog-content blockquote p:last-child {
    margin-bottom: 0;
}
.blog-content pre {
    background: #0D1A2D;
    border: 1px solid #1E3A5F;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}
.blog-content code {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}
.blog-content :not(pre) > code {
    background: rgba(41, 171, 226, 0.1);
    color: #5BC4F0;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}
.blog-content th {
    background: #112240;
    color: #F8FAFC;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #29ABE2;
}
.blog-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1E3A5F;
    color: #CBD5E1;
}
.blog-content tr:hover td {
    background: rgba(17, 34, 64, 0.5);
}
.blog-content hr {
    border: none;
    border-top: 1px solid #1E3A5F;
    margin: 2rem 0;
}

/* ----- FAQ Accordion (if present in post content) ----- */
.blog-content details {
    background: #112240;
    border: 1px solid #1E3A5F;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.blog-content summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: background 0.15s;
}
.blog-content summary:hover {
    background: rgba(41, 171, 226, 0.05);
}
.blog-content summary::-webkit-details-marker {
    display: none;
}
.blog-content summary::after {
    content: '+';
    font-size: 1.25rem;
    color: #29ABE2;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
}
.blog-content details[open] summary::after {
    content: '\2212';
}
.blog-content details > div,
.blog-content details > p {
    padding: 0 1.25rem 1rem;
}

/* ----- Post Card Hover Animations ----- */
.blog-card-hover {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.blog-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ----- CTA Banner Grid Texture ----- */
.blog-cta-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ----- Sidebar Sticky ----- */
@media (min-width: 1024px) {
    .blog-sidebar-sticky {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
    .blog-sidebar-sticky::-webkit-scrollbar {
        width: 3px;
    }
    .blog-sidebar-sticky::-webkit-scrollbar-track {
        background: transparent;
    }
    .blog-sidebar-sticky::-webkit-scrollbar-thumb {
        background: #1E3A5F;
        border-radius: 3px;
    }
}

/* ----- Mobile TOC Transitions ----- */
.blog-toc-mobile {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.blog-toc-mobile.open {
    max-height: 500px;
}

/* ----- Active TOC Item ----- */
.blog-toc-item {
    transition: color 0.15s, border-color 0.15s;
}
.blog-toc-item.active {
    color: #29ABE2;
    border-left-color: #29ABE2;
}

/* ----- Pagination Styling Override ----- */
.blog-pagination .pages {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
}
.blog-pagination .pages .item {
    list-style: none;
}
.blog-pagination .pages .item a,
.blog-pagination .pages .item strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}
.blog-pagination .pages .item a {
    background: #112240;
    border: 1px solid #1E3A5F;
    color: #94A3B8;
}
.blog-pagination .pages .item a:hover {
    border-color: #29ABE2;
    color: #29ABE2;
    background: rgba(41, 171, 226, 0.08);
}
.blog-pagination .pages .item.current strong {
    background: #29ABE2;
    color: #0B1120;
    border: 1px solid #29ABE2;
}
.blog-pagination .pages .action.previous,
.blog-pagination .pages .action.next {
    font-size: 0;
}
.blog-pagination .pages .action.previous::before {
    content: '\2190';
    font-size: 1rem;
}
.blog-pagination .pages .action.next::before {
    content: '\2192';
    font-size: 1rem;
}
