:root {
    --primary: #84bcdd;
    --primary-dark: #2c7bac;
    --primary-light: #A3D4EE;
    --secondary: #00E5D4;
    --accent: #FFC107;
    --dark: #000000;
    --light: #FFFFFF;
    --bg-light: #f1f2f4;
    --bg-white: #ffffff;
    --text-dark: #212121;
    --text-main: #424242;
    --text-medium: #555555;
    --text-light: #757575;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-white: #ffffff;
    --heading-color: var(--text-white);
    --gradient-primary: linear-gradient(135deg, #84bcdd 0%, #6BA4C5 100%);
    --gradient-secondary: linear-gradient(90deg, #212121 0%, #424242 100%);
    --gradient-hero: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
    --gradient-cta: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
    --gradient-blue: linear-gradient(135deg, #3949ab, #5c6bc0);
    --container-max-width: 1400px;
    --section-padding-large: 100px 0;
    --section-padding-medium: 80px 0;
    --section-padding-small: 50px 0;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 50px;
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-text: 0 2px 4px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
    --primary-blue: #1a2980;
    --secondary-blue: #23395d;
    --accent-blue: #84bcdd;
    --light-blue: #5dade2;
    --dark-blue: #010D2E;
    --text-gray: #555555;
    --border-color: var(--text-white);
}

/* ==========================================================================
   BLOG PAGE STYLES
   ========================================================================== */



/* Hero Section */
.blog-hero {
    background: url('/static/assets/hero.jpeg') center 40% / cover no-repeat;
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 5rem 0 0 0;
    min-height: 95vh;
    display: flex;
    align-items: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}


.blog-hero .container {
    position: relative;
    z-index: 10;
}

.blog-hero h1 {
    font-size: 56px;
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 900;
}

.blog-hero p {
    color: var(--text-white);
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: var(--bg-white);
}

/* Featured Post */
.featured-post {
    display: flex;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    text-decoration: none;
    transition: all 0.3s ease;
    align-items: center;
    gap: 40px;
}

.featured-post:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.featured-image {
    flex: 0 0 300px;
    height: 200px;
    background: linear-gradient(135deg, rgba(26, 41, 128, 0.1) 0%, rgba(132, 188, 221, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-icon {
    font-size: 80px;
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.featured-post:hover .featured-icon {
    color: var(--text-light);
}

.featured-content {
    flex: 1;
}

.featured-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(132, 188, 221, 0.1);
    border: 2px solid var(--accent-blue);
    border-radius: 50px;
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.featured-post h2 {
    color: var(--primary-blue);
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 700;
}

.featured-post p {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-btn {
    padding: 12px 35px;
    background: var(--accent-blue);
    color: var(--text-light) !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-blue);
}

.featured-post:hover .read-btn {
    background: var(--text-light);
    color: var(--accent-blue) !important;
}

.blog-date {
    color: var(--text-gray);
    font-size: 14px;
}

.blog-date i {
    color: var(--accent-blue);
    margin-right: 8px;
}

.featured-post:hover h2,
.featured-post:hover p,
.featured-post:hover .blog-date {
    color: var(--text-light);
}

.featured-post:hover .blog-date i {
    color: var(--text-light);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.blog-card:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.blog-image {
    height: 180px;
    background: linear-gradient(135deg, rgba(26, 41, 128, 0.1) 0%, rgba(132, 188, 221, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.blog-icon {
    font-size: 60px;
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-icon {
    color: var(--text-light);
}

.blog-card-content {
    text-align: center;
    overflow: hidden;
}

.blog-card-tag {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(132, 188, 221, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 50px;
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.blog-card:hover .blog-card-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-color: var(--text-light);
}

.blog-card h3 {
    color: var(--primary-blue);
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.blog-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.read-more i {
    transition: transform 0.3s ease;
}

.blog-card:hover .read-more {
    color: var(--text-light);
}

.blog-card:hover .read-more i {
    transform: translateX(5px);
}

.blog-card:hover h3,
.blog-card:hover p {
    color: var(--text-light);
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-posts i {
    font-size: 64px;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.no-posts h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 24px;
}

.no-posts p {
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
}

/* Pagination */
.blog-pagination {
    text-align: center;
    margin-top: 60px;
}

.pagination {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    margin: 0;
}

.page-link,
.page-item.active .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-light);
}

.page-item.active .page-link {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 992px) {
    .featured-post {
        flex-direction: column;
        text-align: center;
    }

    .featured-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }

    .featured-meta {
        flex-direction: column;
        gap: 20px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================
   QUILL EDITOR WHITE MODE FIX
   ========================================================== */

/* Toolbar */
.ql-toolbar.ql-snow {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px 8px 0 0;
}

/* Toolbar Icons */
.ql-toolbar button svg {
    fill: #333 !important;
}

.ql-toolbar button:hover svg {
    fill: #84bcdd !important;
}

/* Editor Container */
.ql-container.ql-snow {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px;
}

/* Editor Text Area */
.ql-editor {
    background: #ffffff !important;
    color: #212121 !important;
    font-size: 16px;
    line-height: 1.6;
    min-height: 200px;
}

/* Placeholder */
.ql-editor.ql-blank::before {
    color: #999 !important;
}

/* Fix Dark Theme Override */
.blog-form-container .ql-container,
.blog-form-container .ql-toolbar {
    background: #ffffff !important;
}

/* ==========================================================
   QUILL EDITOR FINAL FIX (WHITE WRITING MODE)
   ========================================================== */

/* Force white editor wrapper */
.blog-form-container .ql-toolbar,
.blog-form-container .ql-container {
    background: #ffffff !important;
}

/* Toolbar */
.ql-toolbar.ql-snow {
    background: #ffffff !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 10px 10px 0 0;
    padding: 8px;
}

/* Toolbar icons fix */
.ql-toolbar button svg {
    fill: #333 !important;
}

.ql-toolbar button:hover svg,
.ql-toolbar button.ql-active svg {
    fill: #84bcdd !important;
}

/* Dropdown text color */
.ql-picker-label {
    color: #333 !important;
}

/* Editor container */
.ql-container.ql-snow {
    background: #ffffff !important;
    border: 1px solid #dcdcdc !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px;
}

/* Writing area */
.ql-editor {
    background: #ffffff !important;
    color: #212121 !important;
    font-size: 17px;
    line-height: 1.7;
    min-height: 220px;
    padding: 20px;
}

/* Placeholder */
.ql-editor.ql-blank::before {
    color: #999 !important;
    font-style: normal;
}

/* Headings inside editor */
.ql-editor h1,
.ql-editor h2,
.ql-editor h3 {
    color: #010D2E;
    font-weight: 700;
}

/* Links */
.ql-editor a {
    color: #84bcdd;
}

/* Lists */
.ql-editor ul,
.ql-editor ol {
    padding-left: 20px;
}

/* Optional premium shadow */
.ql-container.ql-snow {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   INFOSYS-STYLE EDITORIAL BLOG DETAIL
   ========================================================================== */

.blog-post-detail {
    background: #ffffff;
    padding-top: 180px;
    /* Definitive space for fixed header */
    padding-bottom: 120px;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.post-editorial-wrapper {
    max-width: 1300px;
    /* Wider for sidebar layout */
    margin: 0 auto;
    padding: 0 40px;
}

.post-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    align-items: start;
}

.post-content-column {
    min-width: 0;
}


/* 1. Category Tag */
.post-editorial-category {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #84bcdd;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    display: block;
}


/* 2. Blog Title */
.post-editorial-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(34px, 5.5vw, 62px);
    color: #010D2E;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 25px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}


/* 3. Post Meta (Minimalist) */
.post-editorial-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 45px;
    padding: 15px 0;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    font-weight: 500;
}

.meta-divider {
    color: #ddd;
}

/* 4. Featured Image */
.post-editorial-image-container {
    margin: 40px 0 60px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.post-editorial-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
}

/* 5. Content Area (Editorial Typography) */
.post-editorial-content {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 21px;
    line-height: 1.85;
    color: #1a1a1a;
    max-width: 800px;
    /* Slightly wider for better rhythm */
    margin: 0 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-editorial-content p {
    margin-bottom: 35px;
    color: #555555 !important;
}

.post-editorial-content ul,
.post-editorial-content ol {
    color: #555555 !important;
    padding-left: 1.8em;
    margin-bottom: 35px;
}

.post-editorial-content li {
    color: #555555 !important;
    margin-bottom: 10px;
    line-height: 1.85;
}

.post-editorial-content strong,
.post-editorial-content b {
    color: #1a1a1a !important;
}

.post-editorial-content span {
    color: inherit !important;
}

.post-editorial-content * {
    color: #555555 !important;
}

.post-editorial-content h1,
.post-editorial-content h2,
.post-editorial-content h3,
.post-editorial-content h4,
.post-editorial-content h5,
.post-editorial-content h6,
.post-editorial-content strong,
.post-editorial-content b {
    color: #1a1a1a !important;
}

/* Sidebar Styling */
.post-sidebar-editorial {
    position: sticky;
    top: 180px;
}

.sidebar-section {
    margin-bottom: 50px;
}

.sidebar-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    color: #010D2E;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #010D2E;
    display: block;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-card {
    display: flex;
    gap: 15px;
    text-decoration: none;
}

.sidebar-card-thumb {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}

.sidebar-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-card-info {
    flex: 1;
}

.sidebar-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #010D2E;
    line-height: 1.4;
    margin-bottom: 5px;
}

.sidebar-card-date {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* Bottom Pagination */
.post-pagination-editorial {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.pagination-link {
    flex: 1;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.pagination-link.prev {
    text-align: left;
    align-items: flex-start;
}

.pagination-link.next {
    text-align: right;
    align-items: flex-end;
}

.pagination-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: #84bcdd;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.pagination-title {
    font-size: 18px;
    font-weight: 800;
    color: #010D2E;
    line-height: 1.3;
}


.post-editorial-content h2,
.post-editorial-content h3 {
    font-family: 'Montserrat', sans-serif;
    color: #010D2E;
    margin: 60px 0 30px;
    font-weight: 800;
}

.post-editorial-content h2 {
    font-size: 34px;
    border-left: 5px solid #84bcdd;
    padding-left: 20px;
}

.post-editorial-content h3 {
    font-size: 28px;
}

.section-block-editorial {
    margin: 80px 0;
}

.section-image-editorial {
    width: 100%;
    border-radius: 4px;
    margin: 40px 0;
}

/* Navigation Link (High End) */
.blog-post-detail footer.post-editorial-footer {
    background: transparent !important;
    /* Critical: Stop global footer from making this black */
    color: inherit;
    padding: 60px 0 0;
    margin-top: 80px;
    border-top: 1px solid #eee;
    text-align: left;
}

.link-back-blog {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: #010D2E;
    text-decoration: none;
    font-weight: 700;
    font-size: 19px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    padding: 10px 0;
}

.link-back-blog i {
    font-size: 20px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.link-back-blog:hover {
    color: #84bcdd;
}

.link-back-blog:hover i {
    transform: translateX(-10px);
}

.link-back-blog::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #84bcdd;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.link-back-blog:hover::after {
    width: 100%;
}


/* Responsive Overrides */
@media (max-width: 1100px) {
    .post-layout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .post-sidebar-editorial {
        position: static;
        margin-top: 60px;
        border-top: 1px solid #eee;
        padding-top: 40px;
    }

    .post-editorial-wrapper {
        max-width: 850px;
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        background: url('/static/assets/Snapchat-1933929992.jpeg') no-repeat center 40%;
        background-size: cover;
        min-height: 95vh;
        padding: 180px 0 100px;
        text-align: center;
        position: relative;
    }

    .blog-hero h1 {
        font-size: 36px;
    }

    .blog-hero p {
        font-size: 16px;
    }

    .featured-post h2 {
        font-size: 26px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-detail {
        padding-top: 140px;
    }

    .post-editorial-title {
        font-size: 32px;
    }

    .post-editorial-content {
        font-size: 18px;
        line-height: 1.75;
    }

    .post-pagination-editorial {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 100px 0 40px;
    }

    .blog-hero h1 {
        font-size: 28px;
    }

    .featured-post {
        padding: 25px;
    }

    .blog-card {
        padding: 25px;
    }

    .featured-image,
    .blog-image {
        height: 150px;
    }

    .featured-icon {
        font-size: 60px;
    }

    .blog-icon {
        font-size: 50px;
    }
}