/* ================================================
   SHIKSHA INFOTECH - BLOG STYLES
   Professional, SEO-Optimized, Mobile-First Responsive
   ================================================ */

/* CSS Variables for Consistency */
:root {
    --primary-color: #010ED0;
    --primary-dark: #0008a3;
    --secondary-color: #242627;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #888888;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --success-color: #28a745;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --content-width: 800px;
}

/* Reset & Base Styles */
.blog-page * {
    box-sizing: border-box;
}

.blog-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-white);
}

/* ================================================
   BLOG HEADER / HERO SECTION
   ================================================ */
.blog-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.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 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.3;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    margin: 0 auto;
}

.blog-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: var(--transition);
}

.blog-category:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.blog-title {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.blog-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

/* ================================================
   FEATURED IMAGE
   ================================================ */
.blog-featured-image {
    max-width: var(--max-width);
    margin: -40px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
}

/* ================================================
   MAIN CONTENT AREA
   ================================================ */
.blog-content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.blog-main-content {
    max-width: var(--content-width);
}

/* Article Content Styling */
.blog-article {
    background: var(--bg-white);
    padding: 0;
}

.blog-article p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--text-color);
}

.blog-article p:first-of-type {
    font-size: 19px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Headings */
.blog-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 48px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    line-height: 1.3;
}

.blog-article h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 36px 0 16px;
    line-height: 1.4;
}

.blog-article h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 28px 0 12px;
}

/* Lists */
.blog-article ul,
.blog-article ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.blog-article li {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 12px;
    color: var(--text-color);
}

.blog-article li strong {
    color: var(--secondary-color);
}

/* Links */
.blog-article a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.blog-article a:hover {
    border-bottom-color: var(--primary-color);
}

/* Blockquotes */
.blog-article blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4f8 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-light);
}

/* Highlight Boxes */
.blog-highlight-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 1px solid rgba(1, 14, 208, 0.15);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin: 32px 0;
}

.blog-highlight-box.success {
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
    border-color: rgba(40, 167, 69, 0.2);
}

.blog-highlight-box h4 {
    margin-top: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stats/Metrics Grid */
.blog-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.blog-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.blog-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.blog-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.blog-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Cards */
.blog-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.blog-feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
}

.blog-feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.blog-feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
    font-size: 24px;
}

.blog-feature-card h4 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.blog-feature-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

/* ================================================
   SIDEBAR
   ================================================ */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--secondary-color);
}

/* Table of Contents */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border-left: 2px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
    background: var(--bg-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Related Posts */
.related-post-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.related-post-content h4 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.4;
}

.related-post-content h4 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-post-content h4 a:hover {
    color: var(--primary-color);
}

.related-post-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* CTA Widget */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
}

.sidebar-cta h3 {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.3);
}

.sidebar-cta p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-bottom: 16px;
}

.sidebar-cta .cta-button {
    display: inline-block;
    background: #fff;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
    text-align: center;
}

.sidebar-cta .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ================================================
   TAGS SECTION
   ================================================ */
.blog-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.blog-tags-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.blog-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.blog-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ================================================
   AUTHOR BOX
   ================================================ */
.blog-author-box {
    display: flex;
    gap: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 40px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.author-title {
    color: var(--primary-color);
    font-size: 13px;
    margin-bottom: 8px;
}

.author-bio {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* ================================================
   CTA SECTION
   ================================================ */
.blog-cta-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 48px;
}

.blog-cta-section h2 {
    color: #fff;
    font-size: 1.75rem;
    margin: 0 0 16px;
    border: none;
    padding: 0;
}

.blog-cta-section p {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
}

.blog-cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 14, 208, 0.4);
}

/* ================================================
   BREADCRUMBS
   ================================================ */
.blog-breadcrumbs {
    background: var(--bg-light);
    padding: 12px 20px;
    font-size: 13px;
}

.blog-breadcrumbs-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.blog-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.blog-breadcrumbs a:hover {
    color: var(--primary-color);
}

.blog-breadcrumbs span {
    color: var(--text-muted);
    margin: 0 8px;
}

.blog-breadcrumbs .current {
    color: var(--text-color);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .blog-content-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
    
    .blog-title {
        font-size: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-hero {
        padding: 40px 16px 60px;
    }
    
    .blog-title {
        font-size: 1.6rem;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .blog-featured-image {
        margin-top: -30px;
        padding: 0 16px;
    }
    
    .blog-content-wrapper {
        padding: 24px 16px;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .blog-article h2 {
        font-size: 1.4rem;
        margin-top: 32px;
    }
    
    .blog-article h3 {
        font-size: 1.2rem;
    }
    
    .blog-article p {
        font-size: 16px;
    }
    
    .blog-article p:first-of-type {
        font-size: 17px;
    }
    
    .blog-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .blog-stat-card {
        padding: 16px;
    }
    
    .blog-stat-number {
        font-size: 1.8rem;
    }
    
    .blog-features-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-cta-section {
        padding: 40px 24px;
    }
    
    .blog-cta-section h2 {
        font-size: 1.4rem;
    }
    
    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .blog-title {
        font-size: 1.4rem;
    }
    
    .blog-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-category {
        font-size: 11px;
        padding: 5px 12px;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    .blog-sidebar,
    .blog-cta-section,
    .sidebar-cta,
    .blog-breadcrumbs {
        display: none;
    }
    
    .blog-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .blog-hero {
        background: none;
        color: #000;
        padding: 20px 0;
    }
    
    .blog-title {
        color: #000;
        text-shadow: none;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */
.blog-article a:focus,
.blog-tag:focus,
.blog-category:focus,
.toc-list a:focus,
.blog-cta-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 10px;
}

/* ================================================
   DARK MODE SUPPORT (Optional)
   ================================================ */
@media (prefers-color-scheme: dark) {
    .blog-page.dark-mode-enabled {
        --bg-white: #1a1a2e;
        --bg-light: #16213e;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --border-color: #333;
    }
}
