/* ===================================
   ORACNOOS - Tag Pages & Tag Cloud
   Tag listing + Tag cloud widget
   =================================== */

/* ===================================
   TAG HERO (Tag Page)
   =================================== */

.tag-hero {
    padding: var(--spacing-3xl) 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.tag-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M10 10 L20 20 M20 10 L10 20" stroke="rgba(255,255,255,0.05)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.tag-hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.tag-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: tagIconFloat 3s ease-in-out infinite;
}

.tag-icon i {
    font-size: 3rem;
    color: white;
}

@keyframes tagIconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(10deg);
    }
}

.tag-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: white;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tag-count {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ===================================
   TAG ARTICLES SECTION
   =================================== */

.tag-articles {
    padding: var(--spacing-3xl) 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

/* ===================================
   ARTICLE CARD (Same as author page)
   =================================== */

.article-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.15);
    transition: all var(--transition-bounce);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow-hover);
    border-color: rgba(0, 229, 255, 0.4);
}

.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.1) 0%,
        rgba(255, 64, 129, 0.1) 100%
    );
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-card-image img {
    transform: scale(1.1);
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-card-content {
    padding: var(--spacing-lg);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.3rem 0.8rem;
    background: rgba(0, 229, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    text-transform: uppercase;
}

.article-date {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.article-card-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-base);
}

.article-card:hover .article-card-title {
    color: var(--primary-color);
}

.article-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.reading-time,
.view-count {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ===================================
   NO ARTICLES STATE
   =================================== */

.no-articles {
    text-align: center;
    padding: var(--spacing-3xl);
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 229, 255, 0.1);
}

.no-articles i {
    font-size: var(--font-size-4xl);
    color: rgba(0, 229, 255, 0.3);
    margin-bottom: var(--spacing-md);
}

.no-articles p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

/* ===================================
   RELATED TAGS SECTION
   =================================== */

.related-tags-section {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-3xl);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.section-title i {
    color: var(--primary-color);
}

/* ===================================
   TAG CLOUD (Widget & Tag Page)
   =================================== */

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-bounce);
}

/* Size variants based on count (data attribute) */
.tag-badge[data-count="1"],
.tag-badge[data-count="2"],
.tag-badge[data-count="3"] {
    font-size: var(--font-size-xs);
}

.tag-badge[data-count="4"],
.tag-badge[data-count="5"],
.tag-badge[data-count="6"],
.tag-badge[data-count="7"],
.tag-badge[data-count="8"],
.tag-badge[data-count="9"],
.tag-badge[data-count="10"] {
    font-size: var(--font-size-sm);
}

/* Hover effects */
.tag-badge:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow-hover);
}

.tag-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.3rem;
    background: rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.tag-badge:hover .tag-count-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ===================================
   TAG CLOUD WIDGET (Sidebar)
   =================================== */

.tag-cloud-widget {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid rgba(0, 229, 255, 0.15);
    margin-bottom: var(--spacing-xl);
}

.tag-cloud-widget .tag-cloud-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(0, 229, 255, 0.2);
}

.tag-cloud-widget .tag-cloud-header h3 {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.tag-cloud-widget .tag-cloud-header h3 i {
    color: var(--primary-color);
}

/* ===================================
   ANIMATIONS
   =================================== */

.article-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

.tag-badge {
    animation: fadeIn 0.3s ease-out backwards;
}

.tag-badge:nth-child(1) { animation-delay: 0.05s; }
.tag-badge:nth-child(2) { animation-delay: 0.1s; }
.tag-badge:nth-child(3) { animation-delay: 0.15s; }
.tag-badge:nth-child(4) { animation-delay: 0.2s; }
.tag-badge:nth-child(5) { animation-delay: 0.25s; }
.tag-badge:nth-child(6) { animation-delay: 0.3s; }
.tag-badge:nth-child(7) { animation-delay: 0.35s; }
.tag-badge:nth-child(8) { animation-delay: 0.4s; }
.tag-badge:nth-child(9) { animation-delay: 0.45s; }
.tag-badge:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tag-hero {
        padding: var(--spacing-2xl) 0;
    }
    
    .tag-icon {
        width: 80px;
        height: 80px;
    }
    
    .tag-icon i {
        font-size: 2rem;
    }
    
    .tag-title {
        font-size: var(--font-size-3xl);
    }
    
    .tag-count {
        font-size: var(--font-size-base);
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .tag-cloud-widget {
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .tag-title {
        font-size: var(--font-size-2xl);
    }
    
    .tag-badge {
        font-size: var(--font-size-xs);
        padding: 0.4rem 0.8rem;
    }
}

/* ===================================
   DARK MODE
   =================================== */

[data-theme="dark"] .article-card {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .article-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .tag-cloud-widget {
    background: rgba(255, 255, 255, 0.03);
}

/* ===================================
   PRINT
   =================================== */

@media print {
    .tag-cloud-widget,
    .related-tags-section {
        display: none;
    }
    
    .tag-hero {
        background: white;
        color: black;
    }
    
    .tag-title,
    .tag-count {
        color: black;
    }
}

/* ===================================
   TAG CONTENT DESCRIPTION
   =================================== */

.tag-content-description {
    padding: var(--spacing-3xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.tag-description-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.tag-description-content h2 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary-cyan);
}

.tag-description-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: var(--spacing-xl) 0 var(--spacing-md);
    color: rgba(255, 255, 255, 0.95);
}

.tag-description-content p {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-base);
}

.tag-description-content p:last-child {
    margin-bottom: 0;
}

/* Internal Links in Tag Description */
.tag-description-content a.internal-link {
    color: #7c4dff;
    text-decoration: none;
    border-bottom: 1px solid rgba(124, 77, 255, 0.4);
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-description-content a.internal-link:hover {
    color: #9c7dff;
    border-bottom-color: #7c4dff;
    text-shadow: 0 0 8px rgba(124, 77, 255, 0.4);
}

/* External Links in Tag Description */
.tag-description-content a[target="_blank"] {
    color: #00e5ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 229, 255, 0.3);
    transition: all 0.2s ease;
}

.tag-description-content a[target="_blank"]:hover {
    border-bottom-color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* ===================================
   MOST READ IN TAG SECTION
   =================================== */

.most-read-tag-section {
    padding: var(--spacing-3xl) 0;
    background: rgba(124, 77, 255, 0.05);
}

.most-read-tag-section .section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--color-primary-cyan);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.most-read-tag-section .section-title i {
    color: #ff6b35;
    animation: pulse 2s ease-in-out infinite;
}

.most-read-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.most-read-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.most-read-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary-cyan);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.2);
}

.most-read-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.most-read-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gradient-primary);
}

.most-read-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.most-read-card:hover .most-read-image img {
    transform: scale(1.1);
}

.most-read-content {
    padding: var(--spacing-lg);
}

.most-read-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: white;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.most-read-card:hover .most-read-title {
    color: var(--color-primary-cyan);
}

.most-read-excerpt {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.most-read-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.6);
}

.most-read-category,
.most-read-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.most-read-category i,
.most-read-time i {
    font-size: 0.8rem;
}

/* Responsive Most Read */
@media (max-width: 768px) {
    .most-read-grid {
        grid-template-columns: 1fr;
    }
    
    .most-read-image {
        height: 180px;
    }
    
    .most-read-tag-section .section-title {
        font-size: var(--font-size-xl);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

