/* Base Styles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation Bar */
.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-link:not(.text-gray-400):hover {
    border-bottom: 2px solid #b91c1c;
    padding-bottom: 4px;
}

.nav-link.active {
    color: #b91c1c;
    border-bottom: 2px solid #b91c1c;
    padding-bottom: 4px;
}

.nav-link.text-gray-400 {
    cursor: not-allowed;
}

.nav-link.text-gray-400:hover {
    border-bottom: none;
    padding-bottom: 4px;
}

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

/* Row Selection */
.row-selectable {
    cursor: pointer;
    user-select: none;
}

.row-selectable:hover {
    background-color: #f0f9ff !important;
}

.row-selected {
    background-color: #dbeafe !important;
    border-left: 3px solid #3b82f6;
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sort-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Conference Tabs */
.conf-tab {
    padding: 6px 12px;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    font-size: 12px;
    border-radius: 4px;
    color: #374151;
    transition: all 0.2s;
    margin: 2px;
}

.conf-tab:hover {
    background: #d1d5db;
}

.conf-tab.active {
    background: #b31b1b;
    color: white;
    font-weight: bold;
}

.conf-tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    max-height: 120px;
    overflow-y: auto;
}

/* Blog Navigation Tabs */
.blog-tab {
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px 6px 0 0;
    color: #374151;
    transition: all 0.2s;
    margin-right: 4px;
}

.blog-tab:hover {
    background: #e5e7eb;
}

.blog-tab.active {
    background: white;
    color: #b31b1b;
    font-weight: bold;
    border-bottom: 3px solid #b31b1b;
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #b31b1b, #dc2626);
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-intro {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-card-loading {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
}

.blog-card-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    color: #dc2626;
}

/* Blog Homepage */
.blog-filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.blog-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.blog-search-input:focus {
    outline: none;
    border-color: #b31b1b;
}

.tag-filter {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.tag-filter:hover {
    background: #e5e7eb;
}

.tag-filter.active {
    background: #b31b1b;
    color: white;
    border-color: #b31b1b;
}

/* Carousel Styles */
.carousel-container {
    scroll-behavior: smooth;
    transition: opacity 0.2s ease-in-out;
}

/* Fade animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #b91c1c;
    width: 24px;
    border-radius: 4px;
}

.carousel-dot:hover {
    background: #9ca3af;
}

.carousel-dot.active:hover {
    background: #b91c1c;
}

/* Dashboard Section Styling */
#dashboardCards {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-card-title {
        font-size: 1.125rem;
    }
    
    .blog-card-content {
        padding: 1rem;
    }
    
    .blog-card-image {
        height: 160px;
    }
}