/* Estilos adicionales para el portal de noticias */

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Mejoras para el scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Efectos hover mejorados */
.news-card {
    transition: all 0.3s ease;
}

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

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-form {
        width: 100%;
        max-width: none;
    }
}

/* Focus improvements */
.form-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Category colors */
.category-badge {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Newsletter form improvements */
.newsletter-form input[type="email"] {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    border-color: #ffffff;
}

/* Search improvements */
.search-input {
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tag improvements */
.tag-cloud a {
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    transform: scale(1.05);
}

/* Pagination improvements */
.pagination a {
    transition: all 0.2s ease;
}

.pagination a:hover:not(.active) {
    background-color: #eff6ff;
    color: #1d4ed8;
}

.pagination .active {
    background-color: #1d4ed8;
    color: white;
}

/* Breadcrumb improvements */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #1f2937;
}

/* Sidebar improvements */
.sidebar-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.sidebar-section:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

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

/* Error states */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Success states */
.success-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode .sidebar-section {
        background: #1f2937;
        color: #f9fafb;
    }

    .dark-mode .news-card {
        background: #1f2937;
        color: #f9fafb;
    }
}