/* ===========================================
   BLOG PREMIUM COMPONENTS
   Advanced UI Elements & Interactive Features
   =========================================== */

/* ===============================
   READING PROGRESS BAR - PREMIUM WITH PERCENTAGE
   =============================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.reading-progress__bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.reading-progress__percentage {
    position: fixed;
    top: 12px;
    right: 20px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 100%);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    min-width: 60px;
    text-align: center;
}

.reading-progress__percentage.show {
    opacity: 1;
    transform: translateY(0);
}

.reading-progress__percentage::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .reading-progress__percentage {
        right: 12px;
        top: 10px;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

/* ===============================
   BLOG HERO SECTION
   =============================== */

.blog-hero {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.blog-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero__title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.blog-hero__subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .blog-hero {
        padding: var(--space-2xl) 0;
    }
    
    .blog-hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .blog-hero__subtitle {
        font-size: var(--font-size-lg);
    }
}

/* ===============================
   NEWSLETTER SIGNUP
   =============================== */

.newsletter-signup {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    background: white;
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-md);
    border: none;
    outline: none;
    font-size: var(--font-size-base);
    background: transparent;
    color: var(--text-primary);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.newsletter-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-btn {
        justify-content: center;
    }
}

/* ===============================
   BLOG STATS - PREMIUM UX/UI DESIGN
   =============================== */

.blog-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    margin: var(--space-2xl) 0;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 100%);
    border-radius: 24px;
    backdrop-filter: blur(30px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.08),
        0 2px 16px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.blog-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.03),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.blog-stats__item {
    text-align: center;
    position: relative;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: fit-content;
}

.blog-stats__item:hover {
    transform: translateY(-2px);
    background: rgba(102, 126, 234, 0.05);
}

.blog-stats__item--live {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.1) 0%, 
        rgba(21, 128, 61, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.blog-stats__number {
    display: block;
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.blog-stats__item--live .blog-stats__number {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-stats__label {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.live-indicator {
    color: #22c55e;
    font-size: 0.5em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-stats {
        gap: clamp(0.75rem, 3vw, 2rem);
        padding: clamp(1rem, 3vw, 1.5rem);
        margin: var(--space-lg) 0;
        border-radius: 20px;
    }
    
    .blog-stats__item {
        padding: clamp(0.5rem, 2vw, 1rem);
        min-width: 0;
        flex: 1;
    }
    
    .blog-stats__number {
        font-size: clamp(1.25rem, 5vw, 1.875rem);
        margin-bottom: 0.25rem;
    }
    
    .blog-stats__label {
        font-size: clamp(0.625rem, 2.5vw, 0.75rem);
        line-height: 1.3;
    }
    
    .live-indicator {
        font-size: 0.4em;
    }
}

@media (max-width: 480px) {
    .blog-stats {
        gap: clamp(0.5rem, 2vw, 1rem);
        padding: clamp(0.75rem, 2vw, 1.25rem);
        border-radius: 16px;
    }
    
    .blog-stats__item {
        padding: clamp(0.375rem, 1.5vw, 0.75rem);
    }
    
    .blog-stats__number {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    .blog-stats__label {
        font-size: clamp(0.5rem, 2vw, 0.65rem);
        font-weight: 700;
    }
}

/* ===============================
   LOAD MORE & NO RESULTS
   =============================== */

.blog-load-more {
    text-align: center;
    margin: var(--space-3xl) 0;
}

.load-more-btn {
    padding: var(--space-lg) var(--space-2xl);
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-normal);
    font-size: var(--font-size-base);
}

.load-more-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.no-results {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    margin: var(--space-2xl) 0;
}

.no-results__icon {
    font-size: var(--font-size-5xl);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.no-results__title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.no-results__text {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===============================
   SHARE MODAL
   =============================== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(5px);
}

.share-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.share-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--bg-tertiary);
}

.share-modal__header h3 {
    margin: 0;
    color: var(--text-primary);
}

.share-modal__close {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.share-modal__close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.share-modal__body {
    padding: var(--space-xl);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.share-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.share-btn i {
    font-size: var(--font-size-xl);
}

.share-btn span {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Platform specific colors */
.share-btn--whatsapp:hover {
    border-color: #25D366;
    color: #25D366;
}

.share-btn--facebook:hover {
    border-color: #1877F2;
    color: #1877F2;
}

.share-btn--twitter:hover {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.share-btn--linkedin:hover {
    border-color: #0A66C2;
    color: #0A66C2;
}

.share-btn--telegram:hover {
    border-color: #0088CC;
    color: #0088CC;
}

.share-btn--copy:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */

.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 400px;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    backdrop-filter: blur(20px);
}

.toast.show {
    transform: translateX(0);
}

.toast--success {
    background: rgba(72, 187, 120, 0.9);
    color: white;
}

.toast--error {
    background: rgba(245, 101, 101, 0.9);
    color: white;
}

.toast--info {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.toast__icon {
    font-size: var(--font-size-lg);
}

.toast__message {
    flex: 1;
    font-weight: 500;
}

.toast__close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.toast__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }
    
    .toast {
        max-width: none;
    }
}

/* ===============================
   THEME TOGGLE
   =============================== */

.theme-toggle {
    background: none;
    border: 2px solid var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle::after {
    content: '☀️';
    font-size: var(--font-size-base);
}

/* ===============================
   BLOG FOOTER
   =============================== */

.blog-footer {
    background: var(--bg-secondary);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.blog-footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.blog-footer__brand h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.blog-footer__brand p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-base);
}

.blog-footer__links h4 {
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-lg);
}

.blog-footer__links ul {
    list-style: none;
}

.blog-footer__links li {
    margin-bottom: var(--space-sm);
}

.blog-footer__links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
}

.blog-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--bg-tertiary);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.blog-footer__legal {
    display: flex;
    gap: var(--space-lg);
}

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

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

@media (max-width: 768px) {
    .blog-footer__bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .blog-footer__legal {
        gap: var(--space-md);
    }
}

/* ===============================
   RATING STARS COMPONENT
   =============================== */

.rating-stars {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.rating-star {
    color: #ffd700;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.rating-star:hover,
.rating-star.active {
    transform: scale(1.1);
}

.rating-star.empty {
    color: var(--text-muted);
}

.rating-value {
    margin-left: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===============================
   READING TIME & METADATA - PREMIUM DESIGN
   =============================== */

.article-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.95) 100%);
    border-radius: 20px;
    margin: clamp(2rem, 4vw, 3rem) 0;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.08),
        0 2px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.article-meta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.03),
        transparent
    );
    animation: shimmer 4s ease-in-out infinite;
}

.article-meta__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: clamp(1rem, 2vw, 1.25rem);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--text-secondary);
    border: 1px solid rgba(102, 126, 234, 0.08);
    position: relative;
}

.article-meta__item:hover {
    transform: translateY(-2px);
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.article-meta__item i {
    font-size: 1.1em;
    color: var(--primary-color);
    opacity: 0.8;
}

.article-meta__item time {
    font-variant-numeric: tabular-nums;
}

.rating-stars {
    justify-content: center !important;
    flex-wrap: nowrap;
    gap: 0.25rem !important;
    align-items: center;
}

.rating-star {
    color: #fbbf24;
    font-size: 1em;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rating-star.active {
    color: #f59e0b;
    text-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.rating-value {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .article-meta {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: clamp(1rem, 3vw, 1.5rem);
        margin: clamp(1.5rem, 3vw, 2rem) 0;
    }
    
    .article-meta__item {
        padding: 0.875rem 1rem;
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }
    
    .rating-stars {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .article-meta {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 16px;
    }
    
    .article-meta__item {
        padding: 0.75rem;
        border-radius: 10px;
    }
    
    .rating-stars {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 0.2rem !important;
    }
    
    .rating-star {
        font-size: 0.9em;
    }
    
    .rating-value {
        font-size: 0.75em;
        margin-left: 0.25rem;
    }
}

.reading-time {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.reading-time::before {
    content: '📖';
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */

.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-smooth);
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid var(--primary-color);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left-color: var(--success-color);
}

.toast-error {
    border-left-color: var(--error-color);
}

.toast-warning {
    border-left-color: var(--warning-color);
}

.toast-info {
    border-left-color: var(--info-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
}

.toast-content i {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.toast-success .toast-content i {
    color: var(--success-color);
}

.toast-error .toast-content i {
    color: var(--error-color);
}

.toast-warning .toast-content i {
    color: var(--warning-color);
}

.toast-info .toast-content i {
    color: var(--info-color);
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.toast-progress {
    height: 3px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: var(--primary-color);
    animation: toast-progress linear forwards;
    transform-origin: left;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast-success .toast-progress-bar {
    background: var(--success-color);
}

.toast-error .toast-progress-bar {
    background: var(--error-color);
}

.toast-warning .toast-progress-bar {
    background: var(--warning-color);
}

.toast-info .toast-progress-bar {
    background: var(--info-color);
}

/* ===============================
   READING PROGRESS BAR
   =============================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: var(--z-sticky);
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.1s ease-out;
}



/* ===============================
   SEARCH SUGGESTIONS
   =============================== */

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: var(--space-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--bg-secondary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-secondary);
}

/* ===============================
   NO RESULTS STATE
   =============================== */

.no-results {
    text-align: center;
    padding: var(--space-3xl);
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.no-results i {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.no-results h3 {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* ===============================
   LOADING STATES
   =============================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===============================
   ACCESSIBILITY CLASSES
   =============================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 6px;
}

/* ===============================
   ANIMATION UTILITIES
   =============================== */

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* ===============================
   TABLE OF CONTENTS MOBILE
   =============================== */

@media (max-width: 768px) {
    .table-contents {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-primary);
        z-index: var(--z-modal);
        transition: left var(--transition-smooth);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }
    
    .table-contents.mobile-show {
        left: 0;
    }
    
    .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    

}

/* ===============================
   RESPONSIVE ADJUSTMENTS
   =============================== */

@media (max-width: 768px) {
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .blog-stats__item {
        padding: var(--space-md);
        background: var(--bg-primary);
        border-radius: var(--radius-lg);
    }
}

/* ===============================
   ARTICLE HEADER ACTIONS
   =============================== */

.article-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-md);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Theme toggle specific styles */
.theme-toggle i {
    transition: transform var(--transition-fast);
}

.theme-toggle:hover i {
    transform: rotate(15deg);
}

/* Bookmark button active state */
.action-btn.bookmarked i {
    color: var(--warning-color);
}

.action-btn.bookmarked i::before {
    content: '\f02e'; /* fas fa-bookmark */
}

/* ===============================
   ARTICLE FLOATING ACTIONS
   =============================== */

.article-floating-actions {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: var(--z-modal);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

.article-floating-actions.show {
    opacity: 1;
    transform: translateY(0);
}

.floating-action-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    font-size: var(--font-size-lg);
}

.floating-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--secondary-color);
}

.floating-action-btn:active {
    transform: translateY(0);
}

.floating-action-btn--secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.floating-action-btn--secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ===============================
   ARTICLE SHARE & ACTIONS
   =============================== */

.article-share {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.article-share h4 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn--whatsapp {
    background: #25d366;
    color: white;
}

.share-btn--twitter {
    background: #1da1f2;
    color: white;
}

.share-btn--facebook {
    background: #4267b2;
    color: white;
}

.share-btn--linkedin {
    background: #0077b5;
    color: white;
}

.share-btn--copy {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.article-rating {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
}

.article-rating h4 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.star-btn:hover,
.star-btn.active {
    color: #ffd700;
    transform: scale(1.1);
}

.article-actions-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
}

/* ===============================
   TOAST NOTIFICATIONS
   =============================== */

.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 9999;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-sm);
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-smooth);
}

.toast--show {
    opacity: 1;
    transform: translateX(0);
}

.toast--success {
    border-left: 4px solid var(--success-color);
}

.toast--success i {
    color: var(--success-color);
}

/* ===============================
   DARK THEME STYLES
   =============================== */

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #404040;
    --primary-color: #8b5cf6;
    --secondary-color: #a855f7;
}

[data-theme="dark"] .action-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .article-share,
[data-theme="dark"] .article-rating {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .share-btn--copy {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

@media (max-width: 768px) {
    .article-actions {
        gap: var(--space-xs);
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .article-floating-actions {
        bottom: var(--space-md);
        right: var(--space-md);
    }
    
    .floating-action-btn {
        width: 48px;
        height: 48px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .article-actions-footer {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }
    
    .toast {
        transform: translateY(-100%);
    }
    
    .toast--show {
        transform: translateY(0);
    }
}

/* ===============================
   PRINT STYLES
   =============================== */

@media print {
    .share-modal,
    .toast-container,
    .newsletter-signup,
    .blog-filters,
    .blog-stats {
        display: none !important;
    }
    
    .blog-hero {
        background: none !important;
    }
    
    .blog-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}