/**
 * Multiple Dark News - Redesign Styles
 * Premium utility portal UI: tool cards, grid, animations, glassmorphism
 *
 * @package Multiple_Dark_News
 */

/* ============================================
   ALL ONLINE TOOLS SECTION
   ============================================ */
.all-tools-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
    position: relative;
}

.all-tools-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

/* Tools Search Bar */
.tools-search-bar {
    max-width: 700px;
    margin: var(--space-xl) auto var(--space-lg);
}

.tools-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xs);
    transition: all var(--transition-base);
    backdrop-filter: blur(20px);
}

.tools-search-input-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-red);
    background: var(--bg-secondary);
}

.tools-search-input-wrapper .search-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-left: var(--space-md);
    color: var(--text-muted);
}

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

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

.tools-search-clear {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    margin-right: var(--space-sm);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast);
}

.tools-search-clear:hover {
    color: var(--text-primary);
}

.tools-search-clear.visible {
    display: flex;
}

/* Category Filter Pills */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-md);
}

.category-filter {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-filter:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.category-filter.active {
    background: var(--gradient-red);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow-red);
}

.category-filter .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.category-filter.active .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

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

.tools-grid-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.tools-grid-empty h3 {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.tools-grid-empty p {
    font-size: var(--text-base);
}

/* Premium Tool Card */
.tool-card-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.tool-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tool-card-modern:hover::before {
    opacity: 1;
}

.tool-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), 0 8px 40px rgba(230, 57, 70, 0.15);
    border-color: rgba(230, 57, 70, 0.3);
    background: var(--bg-secondary);
}

.tool-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--space-md);
    flex-shrink: 0;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tool-card-modern:hover .tool-card-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
}

.tool-card-icon svg {
    width: 32px;
    height: 32px;
}

.tool-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-card-name {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    line-height: 1.3;
}

.tool-card-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.tool-card-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-red);
    color: white;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.tool-card-modern:hover .tool-card-btn {
    opacity: 1;
    transform: translateY(0);
    box-shadow: var(--shadow-glow-red);
}

.tool-card-btn:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow-red);
    transform: translateY(-2px) !important;
}

/* Tools Pagination */
.tools-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.load-more-tools {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--text-base);
}

.load-more-tools.loading {
    opacity: 0.7;
    pointer-events: none;
}

.tools-status {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* ============================================
   ARTICLES SECTION (Latest & Popular)
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(230, 57, 70, 0.2);
}

.article-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.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.08);
}

.article-card-category {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--gradient-red);
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.article-card-title a:hover {
    color: var(--color-primary);
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.article-card-date {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.article-card-date svg {
    width: 14px;
    height: 14px;
}

.article-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-top: var(--space-md);
    transition: gap var(--transition-fast);
}

.article-card:hover .article-card-readmore {
    gap: var(--space-sm);
}

/* ============================================
   TRENDING TOOLS SECTION
   ============================================ */
.trending-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.trending-tool-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.trending-tool-card:hover {
    background: var(--bg-card);
    border-color: var(--color-primary);
    transform: translateX(4px);
}

.trending-tool-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    color: white;
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.trending-tool-info {
    flex: 1;
    min-width: 0;
}

.trending-tool-name {
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-tool-views {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.trending-tool-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.trending-tool-card:hover .trending-tool-arrow {
    transform: translateX(4px);
    color: var(--color-primary);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl) 0;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(230, 57, 70, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(108, 92, 231, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-lg);
    background: var(--gradient-red);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow-red);
}

.newsletter-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.newsletter-text {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.newsletter-form-wrapper {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: var(--space-xs);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-form-wrapper input[type="email"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-md) var(--space-lg);
    color: white;
    font-size: var(--text-base);
    font-family: var(--font-primary);
    outline: none;
}

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

.newsletter-form-wrapper .btn {
    flex-shrink: 0;
}

.newsletter-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-consent input[type="checkbox"] {
    accent-color: var(--color-primary);
}

/* ============================================
   TOOL PAGE ENHANCEMENTS
   ============================================ */
.tool-page-premium {
    padding: var(--space-2xl) 0;
}

.tool-page-premium .container {
    max-width: 900px;
}

.tool-premium-header {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
    backdrop-filter: blur(20px);
}

.tool-premium-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
}

.tool-premium-icon svg {
    width: 40px;
    height: 40px;
}

.tool-premium-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.tool-premium-desc {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tool Page Sections */
.tool-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(20px);
}

.tool-section-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tool-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient-red);
    border-radius: var(--radius-full);
}

/* How to Use Steps */
.how-to-steps {
    counter-reset: step-counter;
}

.how-to-step {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
    counter-increment: step-counter;
}

.how-to-step:last-child {
    border-bottom: none;
}

.how-to-step::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    color: white;
    font-weight: 700;
    font-size: var(--text-sm);
    border-radius: var(--radius-full);
}

.how-to-step-text {
    flex: 1;
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 6px;
}

/* Features List */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.feature-item:hover {
    border-color: var(--color-primary);
    background: var(--bg-tertiary);
}

.feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-red);
    border-radius: var(--radius-md);
    color: white;
}

.feature-icon svg {
    width: 18px;
    height: 18px;
}

.feature-text {
    flex: 1;
}

.feature-text strong {
    display: block;
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
}

.feature-text span {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.4;
}

/* Benefits List */
.benefits-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.benefit-item::before {
    content: '✓';
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-green);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
}

/* FAQ Accordion */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--color-primary);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    border: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-question .faq-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question .faq-arrow {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.faq-answer {
    padding: 0 var(--space-lg);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: var(--space-md) var(--space-lg);
    max-height: 300px;
}

/* Tool Rating */
.tool-rating-section {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.tool-rating-stars {
    display: inline-flex;
    gap: 4px;
}

.tool-rating-stars .star {
    font-size: var(--text-2xl);
    cursor: pointer;
    color: var(--border-color);
    transition: color var(--transition-fast);
}

.tool-rating-stars .star.filled,
.tool-rating-stars .star.hover {
    color: #f39c12;
}

.tool-rating-info {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Share Buttons */
.tool-share-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.share-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: var(--space-sm);
}

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

.share-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.share-btn.share-facebook:hover { background: #1877f2; color: white; border-color: #1877f2; }
.share-btn.share-twitter:hover { background: #000; color: white; border-color: #000; }
.share-btn.share-linkedin:hover { background: #0a66c2; color: white; border-color: #0a66c2; }
.share-btn.share-whatsapp:hover { background: #25d366; color: white; border-color: #25d366; }
.share-btn.share-telegram:hover { background: #0088cc; color: white; border-color: #0088cc; }

.share-btn.share-link:hover { background: var(--gradient-purple); color: white; border-color: transparent; }
.share-btn.share-bookmark:hover { background: var(--gradient-orange); color: white; border-color: transparent; }

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* Recently Viewed */
.recently-viewed {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.recently-viewed::-webkit-scrollbar {
    height: 4px;
}

.recently-viewed::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.recently-viewed-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    transition: all var(--transition-fast);
}

.recently-viewed-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--color-primary);
}

/* Related Tools Grid */
.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.related-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    border-color: var(--color-primary);
}

.related-tool-card .related-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--space-sm);
}

.related-tool-card .related-icon svg {
    width: 24px;
    height: 24px;
}

.related-tool-card .related-name {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(230, 57, 70, 0.2); }
    50% { box-shadow: 0 0 40px rgba(230, 57, 70, 0.4); }
}

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

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

.animate-scale-in {
    animation: scaleIn 0.4s ease forwards;
}

/* Staggered animations for grid items */
.tools-grid .tool-card-modern {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.tools-grid .tool-card-modern:nth-child(1) { animation-delay: 0.02s; }
.tools-grid .tool-card-modern:nth-child(2) { animation-delay: 0.04s; }
.tools-grid .tool-card-modern:nth-child(3) { animation-delay: 0.06s; }
.tools-grid .tool-card-modern:nth-child(4) { animation-delay: 0.08s; }
.tools-grid .tool-card-modern:nth-child(5) { animation-delay: 0.10s; }
.tools-grid .tool-card-modern:nth-child(6) { animation-delay: 0.12s; }
.tools-grid .tool-card-modern:nth-child(7) { animation-delay: 0.14s; }
.tools-grid .tool-card-modern:nth-child(8) { animation-delay: 0.16s; }
.tools-grid .tool-card-modern:nth-child(9) { animation-delay: 0.18s; }
.tools-grid .tool-card-modern:nth-child(10) { animation-delay: 0.20s; }
.tools-grid .tool-card-modern:nth-child(11) { animation-delay: 0.22s; }
.tools-grid .tool-card-modern:nth-child(12) { animation-delay: 0.24s; }

/* Scroll-triggered animations */
[data-animate="fade-in-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-in-up"].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE: LAPTOP
   ============================================ */
@media (max-width: 1400px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .articles-grid,
    .trending-tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .related-tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE: DESKTOP
   ============================================ */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .trending-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .related-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE: TABLET
   ============================================ */
@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trending-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .benefits-list {
        grid-template-columns: 1fr;
    }
    .tool-premium-title {
        font-size: var(--text-2xl);
    }
    .newsletter-title {
        font-size: var(--text-2xl);
    }
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .trending-tools-grid {
        grid-template-columns: 1fr;
    }
    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0;
        margin-left: calc(-1 * var(--container-padding));
        margin-right: calc(-1 * var(--container-padding));
        padding-left: var(--container-padding);
        padding-right: var(--container-padding);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .category-filters::-webkit-scrollbar {
        display: none;
    }
    .category-filter {
        flex-shrink: 0;
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }
    .tool-card-modern {
        padding: var(--space-md);
    }
    .tool-card-icon {
        width: 48px;
        height: 48px;
    }
    .tool-card-icon svg {
        width: 24px;
        height: 24px;
    }
    .tool-card-name {
        font-size: var(--text-sm);
    }
    .tool-card-desc {
        display: none;
    }
    .tool-card-btn {
        opacity: 1;
        transform: translateY(0);
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }
    .tool-premium-header {
        padding: var(--space-lg);
    }
    .tool-premium-icon {
        width: 60px;
        height: 60px;
    }
    .tool-premium-icon svg {
        width: 30px;
        height: 30px;
    }
    .tool-premium-title {
        font-size: var(--text-xl);
    }
    .tool-premium-desc {
        font-size: var(--text-base);
    }
    .tool-section {
        padding: var(--space-lg);
    }
    .newsletter-form-wrapper {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
    }
    .newsletter-form-wrapper input[type="email"] {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--radius-lg);
    }
    .newsletter-form-wrapper .btn {
        width: 100%;
    }
    .share-label {
        width: 100%;
        margin-bottom: 0;
    }
}

/* ============================================
   RESPONSIVE: SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    .tool-card-modern {
        padding: var(--space-md) var(--space-sm);
    }
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    .how-to-step {
        gap: var(--space-md);
    }
}

/* Loading Spinner */
.tools-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: var(--space-3xl) 0;
    gap: var(--space-lg);
    color: var(--text-muted);
}
.tools-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tools Grid Empty */
.tools-grid-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) 0;
    gap: var(--space-md);
    text-align: center;
    color: var(--text-muted);
}
.tools-grid-empty svg {
    opacity: 0.4;
    width: 48px;
    height: 48px;
}
.tools-grid-empty h3 {
    font-size: var(--text-xl);
    color: var(--text-primary);
}
.tools-grid-empty p {
    font-size: var(--text-sm);
}

/* Tools Grid Loading State */
.tools-grid.loading {
    position: relative;
    min-height: 200px;
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 800px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}
.faq-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}
.faq-question {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.faq-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
    color: var(--text-muted);
}
.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal), padding var(--transition-normal);
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 var(--space-xl) var(--space-lg);
}
.faq-answer div {
    color: var(--text-secondary);
    line-height: 1.8;
}
