/**
 * Enhanced Blog Styles for GPTDetector Theme
 * Professional UI/UX Design for Blog Posts and Archives
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.post-hero {
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    font-size: 1rem;
    opacity: 0.95;
}

.hero-meta .author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-meta .author-info img {
    border-radius: 50%;
    border: 2px solid #fff;
}

.hero-meta i {
    margin-right: 5px;
    opacity: 0.8;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumb-wrapper {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 40px;
}

.breadcrumbs {
    margin: 0;
}

.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumbs li.separator {
    margin: 0 10px;
    color: #6c757d;
}

.breadcrumbs a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #007bff;
}

.breadcrumbs .current {
    color: #212529;
    font-weight: 600;
}

/* ==========================================================================
   Reading Progress Bar
   ========================================================================== */

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #00c6ff);
    z-index: 9999;
    transition: width 0.3s ease;
    width: 0%;
}

/* ==========================================================================
   Enhanced Typography
   ========================================================================== */

.enhanced-typography {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Light mode text color */
[data-theme="light"] .enhanced-typography {
    color: #333;
}

/* Dark mode text color */
[data-theme="dark"] .enhanced-typography {
    color: #ffffff;
}

/* Dark mode header colors */
[data-theme="dark"] .enhanced-typography h1 {
    color: #ffffff;
}

[data-theme="dark"] .enhanced-typography h2 {
    color: #ffffff;
}

[data-theme="dark"] .enhanced-typography h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .enhanced-typography h4 {
    color: #d0d0d0;
}

[data-theme="dark"] .enhanced-typography h5 {
    color: #c0c0c0;
}

[data-theme="dark"] .enhanced-typography h6 {
    color: #b0b0b0;
}

[data-theme="dark"] .enhanced-typography blockquote {
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    border-left-color: #00c6ff;
}

[data-theme="dark"] .enhanced-typography code {
    background: rgba(255, 255, 255, 0.1);
    color: #ff79c6;
}

/* Dark mode gradient for h2 accent */
[data-theme="dark"] .enhanced-typography h2::before {
    background: linear-gradient(180deg, #00c6ff, #00ffcc);
}

.enhanced-typography p {
    margin-bottom: 1.5rem;
}

.enhanced-typography h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--text-primary, #212529);
    line-height: 1.2;
}

.enhanced-typography h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary, #212529);
    position: relative;
    padding-left: 20px;
}

.enhanced-typography h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--gradient-primary, linear-gradient(180deg, #007bff, #00c6ff));
}

.enhanced-typography h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary, #333);
}

.enhanced-typography h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary, #495057);
}

.enhanced-typography h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #495057);
}

.enhanced-typography h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary, #6c757d);
}

.enhanced-typography blockquote {
    border-left: 4px solid var(--primary-color, #007bff);
    padding: 20px 30px;
    margin: 2rem 0;
    background: var(--bg-secondary, #f8f9fa);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-secondary, #495057);
    position: relative;
}

.enhanced-typography blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: var(--primary-color, #007bff);
    opacity: 0.2;
}

.enhanced-typography ul,
.enhanced-typography ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.enhanced-typography li {
    margin-bottom: 0.75rem;
}

.enhanced-typography code {
    background: var(--bg-code, #f4f4f4);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--text-code, #d63384);
}

.enhanced-typography pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.enhanced-typography img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 3rem;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #212529;
}

.toc-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-content li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.toc-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #007bff;
}

.toc-content a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-content a:hover {
    color: #007bff;
}

/* ==========================================================================
   Social Share
   ========================================================================== */

.social-share {
    padding: 30px;
    background: var(--bg-card, #FEFDFB);
    border: 1px solid var(--border-color, #D0CCC6);
    border-radius: 10px;
    margin: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.social-share h4 {
    color: var(--text-primary, #212529);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.9);
    color: #0A0F1C;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.share-buttons a:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.share-twitter:hover { background: #1DA1F2 !important; color: #fff !important; }
.share-facebook:hover { background: #1877F2 !important; color: #fff !important; }
.share-linkedin:hover { background: #0A66C2 !important; color: #fff !important; }
.share-email:hover { background: #EA4335 !important; color: #fff !important; }

/* ==========================================================================
   Enhanced Author Box
   ========================================================================== */

.author-box.enhanced {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin: 3rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.author-box.enhanced .author-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.author-box.enhanced .author-info {
    flex: 1;
}

.author-box.enhanced h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
}

.author-box.enhanced p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-box.enhanced .author-meta {
    display: flex;
    gap: 20px;
}

.author-box.enhanced .author-link,
.author-box.enhanced .author-website {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-box.enhanced .author-link:hover,
.author-box.enhanced .author-website:hover {
    color: #0056b3;
}

/* ==========================================================================
   Enhanced Post Navigation
   ========================================================================== */

.post-navigation.enhanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 3rem 0;
}

.post-navigation.enhanced .nav-previous,
.post-navigation.enhanced .nav-next {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-navigation.enhanced .nav-previous:hover,
.post-navigation.enhanced .nav-next:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.post-navigation.enhanced .nav-next {
    text-align: right;
}

.post-navigation.enhanced a {
    text-decoration: none;
    display: block;
}

.post-navigation.enhanced .nav-indicator {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-navigation.enhanced .nav-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
}

/* ==========================================================================
   Enhanced Related Posts
   ========================================================================== */

.related-posts.enhanced {
    margin: 4rem 0;
}

.related-posts.enhanced h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #212529;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.related-post-card .related-post-link {
    text-decoration: none;
    display: block;
}

.related-post-card .related-post-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.related-post-card .related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-thumbnail img {
    transform: scale(1.1);
}

.related-post-card .related-post-thumbnail .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-post-card:hover .overlay {
    opacity: 1;
}

.related-post-card .related-post-content {
    padding: 20px;
}

.related-post-card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: #212529;
    line-height: 1.3;
}

.related-post-card .related-post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.related-post-card p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

/* ==========================================================================
   Enhanced Sidebar
   ========================================================================== */

.sidebar.enhanced {
    padding-left: 40px;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar.enhanced .widget {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.sidebar.enhanced .widget-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #212529;
    position: relative;
    padding-bottom: 10px;
}

.sidebar.enhanced .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #00c6ff);
}

/* Search Widget */
.widget-search .search-form {
    display: flex;
    gap: 0;
}

.widget-search .search-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 25px 0 0 25px;
    font-size: 0.95rem;
}

.widget-search .search-submit {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.widget-search .search-submit:hover {
    transform: scale(1.05);
}

/* Popular Posts Widget */
.popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-posts a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.popular-posts a:hover {
    opacity: 0.8;
}

.popular-posts .post-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.popular-posts .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.popular-posts .post-info h4 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    color: #212529;
    line-height: 1.3;
}

.popular-posts time {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Newsletter Widget */
.widget-newsletter {
    background: linear-gradient(135deg, #00D9FF 0%, #00F5A0 100%);
    color: #0A0F1C;
}

.widget-newsletter .widget-title {
    color: #0A0F1C;
}

.widget-newsletter .widget-title::after {
    background: rgba(10, 15, 28, 0.3);
}

.widget-newsletter p {
    margin-bottom: 20px;
    opacity: 0.85;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(10,15,28,0.2);
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
    color: #0A0F1C;
    margin-bottom: 15px;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(10,15,28,0.5);
}

.newsletter-form button {
    width: 100%;
    padding: 12px 20px;
    background: #0A0F1C;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #2A3344;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .content-wrapper.sidebar-right,
    .content-wrapper.sidebar-left {
        flex-direction: column;
    }

    .sidebar.enhanced {
        padding-left: 0;
        margin-top: 40px;
    }

    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 10px;
    }

    .post-navigation.enhanced {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .author-box.enhanced {
        flex-direction: column;
        text-align: center;
    }

    .author-box.enhanced .author-avatar {
        margin: 0 auto;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-buttons a {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .enhanced-typography {
        font-size: 1rem;
    }

    .enhanced-typography h2 {
        font-size: 1.5rem;
    }

    .enhanced-typography h3 {
        font-size: 1.25rem;
    }
}