/* Article Page Styles */

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Article Hero Section */
.article-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 3rem;
}

.article-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-hero:hover .hero-img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 2;
}

.article-hero-content {
    position: relative;
    z-index: 3;
    color: white;
    padding: 2rem 0;
    animation: slideUpFade 1s ease-out;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-category {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.9;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInRight 1s ease-out 0.3s both;
}

.article-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideInLeft 1s ease-out 0.6s both;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
}

.publish-date {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-actions {
    display: flex;
    gap: 0.5rem;
    animation: slideInRight 1s ease-out 0.9s both;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Article Layout */
.article-content-section {
    padding: 2rem 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.article-main {
    animation: fadeInUp 1s ease-out;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 3rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-weight: 700;
    scroll-margin-top: 100px;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
}

.article-content blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
}

/* Article Tags */
.article-tags {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.tags-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag-item:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Social Share */
.social-share {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    color: white;
}

.share-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.share-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

.share-btn.facebook:hover { background: #3b5998; }
.share-btn.twitter:hover { background: #1da1f2; }
.share-btn.whatsapp:hover { background: #25d366; }
.share-btn.telegram:hover { background: #0088cc; }

/* Author Bio */
.author-bio {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.author-bio-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    flex-shrink: 0;
}

.author-bio-name {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.author-bio-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-bio-social {
    display: flex;
    gap: 0.5rem;
}

.author-social-link {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Sidebar */
.article-sidebar {
    animation: fadeInRight 1s ease-out 0.5s both;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.widget-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

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

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    color: #666;
    text-decoration: none;
    padding: 0.3rem 0;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding-left: 0.5rem;
}

.toc-link:hover {
    color: var(--primary-color);
    background: #f8f9fa;
    padding-left: 1rem;
}

.toc-level-2 .toc-link { padding-left: 1rem; }
.toc-level-3 .toc-link { padding-left: 1.5rem; }
.toc-level-4 .toc-link { padding-left: 2rem; }

.no-toc {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Related Articles */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    transition: all 0.3s ease;
}

.related-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-link:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.related-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    color: #333;
}

.related-date {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Popular Articles */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-article {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.popular-article:hover {
    background: #f8f9fa;
}

.popular-number {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popular-title a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.popular-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.popular-views {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-description {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.newsletter-input {
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
}

.newsletter-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.newsletter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Comments Section */
.comments-section {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-top: 3rem;
}

.comments-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.comment-form-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.submit-comment-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-comment-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-comment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-main {
        order: 1;
    }
    
    .article-sidebar {
        order: 2;
    }
    
    .sidebar-widget {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .article-hero {
        height: 50vh;
        min-height: 400px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-actions {
        width: 100%;
        justify-content: center;
    }
    
    .author-bio-content {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .sidebar-widget {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .action-btn,
    .share-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .article-hero-content {
        padding: 1rem 0;
    }
}