﻿/* Light Mode Styles */
.research-card {
    background: var(--bs-body-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bs-border-color);
}

    .research-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover .card-image {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
    z-index: 2;
}

.category-badge .badge {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.category-badge:hover .badge {
    background: #fff;
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    font-size: 0.95rem;
    color: var(--bs-secondary-color);
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.attachments-section {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bs-secondary-bg);
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
}

.attachment-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

    .attachment-label i {
        font-size: 1rem;
    }

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attachment-link {
    text-decoration: none;
    transition: transform 0.2s ease;
}

    .attachment-link:hover {
        transform: translateY(-2px);
    }

.badge-attachment {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

    .badge-attachment:hover {
        background: #5568d3;
    }

.no-attachment {
    text-align: center;
}

.badge-no-attachment {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-footer-section {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--bs-border-color);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: #2B485C;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .btn-submit:hover:not(.disabled) {
        background: #1d384a;
        box-shadow: 0 4px 12px rgba(43, 72, 92, 0.4);
        color: white;
    }

    .btn-submit.disabled {
        background: var(--bs-secondary-bg);
        color: var(--bs-secondary-color);
        cursor: not-allowed;
        opacity: 0.6;
    }

    .btn-submit i {
        font-size: 1rem;
        transition: transform 0.3s ease;
    }

    .btn-submit:hover:not(.disabled) i {
        transform: translateX(-4px);
    }

.footer-note {
    display: block;
    margin-top: 10px;
    color: var(--bs-danger-text-emphasis);
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 575.98px) {
    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .card-content {
        padding: 16px;
    }

    .btn-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .attachments-section {
        padding: 10px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .card-title {
        font-size: 1.15rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .card-title {
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    .research-card:hover .card-image {
        transform: scale(1.08);
    }
}

/* RTL Support */
[dir="rtl"] .btn-submit i {
    transform: rotate(180deg);
}

[dir="rtl"] .btn-submit:hover:not(.disabled) i {
    transform: rotate(180deg) translateX(-4px);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .research-card,
    .card-image,
    .btn-submit,
    .attachment-link {
        transition: none;
    }

        .research-card:hover .card-image {
            transform: scale(1.03);
        }
}

/* Bootstrap Dark Mode Support */
[data-bs-theme="dark"] .research-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    [data-bs-theme="dark"] .research-card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    }

[data-bs-theme="dark"] .card-image-wrapper {
    background: linear-gradient(135deg, #4c5f7a 0%, #5a4a6f 100%);
}

[data-bs-theme="dark"] .category-badge .badge {
    background: rgba(45, 55, 72, 0.95);
    color: #90cdf4;
}

[data-bs-theme="dark"] .category-badge:hover .badge {
    background: #2d3748;
}

[data-bs-theme="dark"] .badge-attachment {
    background: #4c5f7a;
    color: #e2e8f0;
}

    [data-bs-theme="dark"] .badge-attachment:hover {
        background: #3d4f63;
    }

[data-bs-theme="dark"] .btn-submit {
    background: #3182ce;
}

    [data-bs-theme="dark"] .btn-submit:hover:not(.disabled) {
        background: #2c5282;
        box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
    }
