
/* Component Styles - Enhanced with Better Spacing */

/* Article Cards - استایل‌های جدید برای صفحه مقالات */
.article-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(224, 47, 58, 0.3);
}

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

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

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

.article-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-card-meta svg {
    opacity: 0.7;
}

.article-date,
.article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.article-card-tags .tag {
    background: rgba(224, 47, 58, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Utility Classes */
.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-item svg {
    color: var(--text-muted);
}

.read-more {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: var(--font-persian);
}

.read-more:hover {
    background: #000000;
    color: white;
    transform: translateX(-3px);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (min-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tool Cards */
.tool-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: auto;
}


.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(224, 47, 58, 0.2);
}

.tool-card .tool-icon {
    width: 65px;
    height: 65px;
    background: var(--primary-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 2.25rem;
    box-shadow: 0 4px 12px rgba(224, 47, 58, 0.25);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(224, 47, 58, 0.35);
}

.tools-logo {
    width: 65px;
    height: 65px;
    background: transparent;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    overflow: hidden;
}

.tools-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tools-logo svg {
    width: 70%;
    height: 70%;
}

.tool-card:hover .tools-logo {
    transform: scale(1.05);
}

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

.tool-title {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.tool-version {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(224, 47, 58, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    z-index: 1;
}

.tool-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.tool-platform {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.tool-platform svg {
    width: 14px;
    height: 14px;
}

.tool-features {
    text-align: right;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(224, 47, 58, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(224, 47, 58, 0.2);
    width: 100%;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tool-features h4 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(224, 47, 58, 0.3);
}

.tool-features p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0;
}

.feature-item {
    margin-bottom: 1.5rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.feature-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-features li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    position: relative;
    padding-right: 1.5rem;
    line-height: 1.6;
}

.tool-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.tool-download-btn {
    flex: 1;
    display: inline-block;
    padding: 0.7rem 1.4rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(224, 47, 58, 0.3);
    text-align: center;
}

.tool-download-btn:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

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

/* Tool Modal */
.tool-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tool-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(224, 47, 58, 0.2);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #c70812;
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(224, 47, 58, 0.1);
    color: var(--text-primary);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(224, 47, 58, 0.2);
}

.modal-header .modal-icon {
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    padding: 0;
    overflow: visible;
}

.modal-header .modal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal-header p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-features {
    text-align: right;
}

.modal-features h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-features p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

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

.tool-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
    margin-top: auto;
}

.tool-details-btn {
    flex: 1;
    padding: 0.7rem 1.4rem;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-persian);
}

.tool-details-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

.tool-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tool-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.tool-btn {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--primary-color);
    color: white;
    font-family: var(--font-persian);
}

.tool-btn:hover {
    background: #000000;
    transform: translateY(-2px);
}

.tool-btn-primary {
    background: var(--secondary-color);
    color: white;
}

.tool-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.tool-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

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

/* Loading Skeletons */
.card-loading {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.loading-skeleton {
    background: var(--border-color);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-title {
    height: 1.5rem;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.75rem;
}

.skeleton-text:last-child {
    width: 60%;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

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

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10001;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

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

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.toast.info {
    background: #3498db;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    line-height: 1.4;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-persian);
}

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

.btn-primary:hover {
    background: #000000;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #000000;
    color: white;
    transform: translateY(-2px);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.about-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    padding-right: 2rem;
    position: relative;
}

.values-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.values-list strong {
    color: var(--text-primary);
}

.contact-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--dark-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.contact-info p {
    margin-bottom: 0.75rem;
}

.contact-info strong {
    color: var(--text-primary);
}

/* Podcasts Page */
.podcasts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.podcast-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
}

.podcast-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.podcast-cover {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), #c70812);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.podcast-info {
    flex: 1;
}

.podcast-info h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.podcast-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.podcast-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.podcast-play-btn {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podcast-play-btn:hover {
    background: #000000;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .article-card,
    .tool-card,
    .card-loading {
        margin-bottom: 1.5rem;
    }

    .article-card-image {
        height: 200px;
    }

    .article-card-content {
        padding: 1.25rem;
    }

    .article-card-title {
        font-size: 1.2rem;
    }

    .article-card-excerpt {
        font-size: 0.9rem;
    }

    .article-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .tool-actions {
        flex-direction: column;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }
}
