/* Breaking News Digital - Main CSS File */

/* Navigation Styles */
.nav-link-simple {
    display: inline-block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background-color: transparent;
    border-radius: 9999px;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    outline: none !important;
    border: none;
}

.nav-link-simple:hover {
    color: #111827;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-link-simple.active {
    color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    outline: none !important;
    border: none;
}

.nav-link-simple:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 9999px;
}

.nav-link-simple:focus {
    outline: none;
}

/* Dark mode */
.dark .nav-link-simple {
    color: #d1d5db;
}

.dark .nav-link-simple:hover {
    color: #f9fafb;
    background-color: #374151;
}

.dark .nav-link-simple.active {
    color: #60a5fa;
    background-color: #374151;
    outline: none !important;
    border: none;
}

.dark .nav-link-simple:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-radius: 9999px;
}

.dark .nav-link-simple:focus {
    outline: none;
}

/* Dropdown Menu Styles */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(229, 231, 235, 0.3);
}

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

.dropdown-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.dropdown-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Dark mode dropdown */
.dark .dropdown-item {
    color: #d1d5db;
    border-bottom-color: rgba(75, 85, 99, 0.3);
}

.dark .dropdown-item:hover {
    background-color: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.dark .dropdown-item.active {
    background-color: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

/* Dropdown animation states */
#moreMenuDropdown.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

#moreMenuIcon.rotated {
    transform: rotate(180deg);
}

.nav-link-simple.dropdown-active {
    color: #2563eb;
    background-color: #dbeafe;
}

.dark .nav-link-simple.dropdown-active {
    color: #60a5fa;
    background-color: #1e3a8a;
}

/* Glass Pagination Styles */
.glass-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1rem 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: fit-content;
    margin: 0 auto;
}

.pagination-info-glass {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.pagination-info-glass span {
    font-weight: 600;
    color: #374151;
}

.pagination-controls-glass {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.pagination-btn.disabled {
    background: rgba(255, 255, 255, 0.2);
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: #6b7280;
    font-weight: 600;
}

/* Dark mode pagination */
.dark .glass-pagination {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .pagination-info-glass {
    color: #d1d5db;
}

.dark .pagination-info-glass span {
    color: #f3f4f6;
}

.dark .pagination-btn {
    background: rgba(75, 85, 99, 0.5);
    color: #d1d5db;
}

.dark .pagination-btn:hover:not(.disabled) {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.dark .pagination-btn.active {
    background: linear-gradient(135deg, #1e40af, #2563eb);
}

.dark .pagination-btn.disabled {
    background: rgba(75, 85, 99, 0.2);
    color: #6b7280;
}

.dark .pagination-dots {
    color: #9ca3af;
}

/* Responsive pagination */
@media (max-width: 640px) {
    .glass-pagination {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .pagination-btn {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8125rem;
    }
}

/* Action Buttons */
.action-btn {
    padding: 0.5rem;
    color: #6b7280;
    background-color: transparent;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    color: #374151;
    background-color: #f3f4f6;
    transform: scale(1.05);
}

.dark .action-btn {
    color: #9ca3af;
}

.dark .action-btn:hover {
    color: #f3f4f6;
    background-color: #374151;
}

/* Additional Dark Mode Styles */
.dark .reading-time {
    color: #d1d5db !important;
}

.dark .author-info {
    color: #d1d5db !important;
}

.dark .view-count {
    color: #d1d5db !important;
}

/* Force article card text colors in dark mode */
.dark .article-card .text-gray-600,
.dark .article-card p {
    color: #e5e7eb !important;
}

.dark .article-card .text-gray-500,
.dark .article-card .text-sm {
    color: #d1d5db !important;
}

.dark .article-card .text-gray-400 {
    color: #d1d5db !important;
}

.dark .article-card h3 {
    color: #ffffff !important;
}

.dark .article-card h3 a {
    color: #ffffff !important;
}

.dark .article-card h3:hover a {
    color: #60a5fa !important;
}

/* Featured articles specific overrides */
.dark #featuredArticles .article-card .text-gray-600,
.dark #featuredArticles .article-card p {
    color: #e5e7eb !important;
}

.dark #featuredArticles .article-card .text-gray-500 {
    color: #d1d5db !important;
}

/* Main articles specific overrides */
.dark #articlesContainer .article-card .text-gray-600,
.dark #articlesContainer .article-card p {
    color: #e5e7eb !important;
}

.dark #articlesContainer .article-card .text-gray-500 {
    color: #d1d5db !important;
}

/* Card Styles */
.article-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
    border: 1px solid transparent;
}

.article-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.dark .article-card {
    background: #374151;
    border-color: #4b5563;
}

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

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

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

.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    color: white;
}

.article-category.ai { background-color: #8b5cf6; }
.article-category.audio-video { background-color: #ec4899; }
.article-category.news { background-color: #3b82f6; }
.article-category.productivity { background-color: #10b981; }
.article-category.security { background-color: #ef4444; }
.article-category.updates { background-color: #f59e0b; }
.article-category.gaming { background-color: #6366f1; }
.article-category.hardware { background-color: #6b7280; }
.article-category.office { background-color: #149985; }
.article-category.updates-releases { background-color: #686af2; }

/* Glass containers */
.glass-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark .glass-container {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

.newsletter-glass-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Category filter styles */
.category-filter-item {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
    margin-bottom: 0.5rem;
}

.category-filter-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.category-filter-item.active {
    background: #2563eb;
    color: white;
}

.category-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.category-item-icon {
    width: 1rem;
    text-align: center;
}

.category-count {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.1);
}

.dark .category-filter-item {
    color: #d1d5db;
    background: #374151;
}

.dark .category-filter-item:hover {
    background: #4b5563;
}

.dark .category-filter-item.active {
    background: #1e40af;
    color: #dbeafe;
}

.dark .category-count {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}

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

/* Glass Tag Styles */
.tag {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0.25rem;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dark .tag {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .tag:hover {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

/* Global dark mode overrides */
.dark .text-gray-900 {
    color: #ffffff !important;
}

.dark .text-gray-700 {
    color: #e5e7eb !important;
}

.dark .text-gray-600 {
    color: #e5e7eb !important;
}

.dark .text-gray-500 {
    color: #d1d5db !important;
}

.dark .border-gray-200 {
    border-color: #4b5563 !important;
}

.dark .divide-gray-200 > * + * {
    border-color: #4b5563 !important;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.8s ease-out;
}

/* Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}