/**
 * Scientific Works Page Styles
 * Styles for the scientific works and testimonials page with tabs
 */

/* Main Section */
.scientific-works-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.scientific-works-wrapper {
    position: relative;
}

/* Tabs Layout */
.scientific-works-tabs {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    min-height: 600px;
}

/* Left Column - Navigation */
.tabs-navigation {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.tabs-navigation-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #4a5568;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    width: 100%;
    border: none;
}

.tab-button:hover {
    background: #deede8;
    transform: translateX(4px);
}

.tab-button.active {
    background: linear-gradient(135deg, #9dcbbb 0%, #019983 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tab-button.active .tab-arrow {
    opacity: 1;
    transform: translateX(0);
}

.tab-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tab-title {
    flex: 1;
    line-height: 1.3;
}

.tab-arrow {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    font-size: 12px;
}

.tab-button.active .tab-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right Column - Content */
.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-panel-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

/* Items Grid */
.tab-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Item Cards */
.tab-item-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tab-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e0;
}

.item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tab-item-card:hover .item-image img {
    transform: scale(1.05);
}

.item-content {
    padding: 24px;
}

.document-icon,
.testimonial-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 22px;
}

.document-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.testimonial-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.item-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.4;
}

.item-author {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-date {
    font-size: 13px;
    color: #718096;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-description {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
}

.item-description p {
    margin: 0;
}

.item-description p + p {
    margin-top: 8px;
}

/* Download Button */
.item-actions {
    margin-top: auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
    text-decoration: none;
}

.file-type {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.file-size {
    font-size: 12px;
    opacity: 0.9;
}

/* Testimonial Card Specific */
.testimonial-card .item-content {
    position: relative;
}

.testimonial-card .testimonial-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.testimonial-card .item-description {
    font-style: italic;
    padding-left: 16px;
    border-left: 3px solid #27ae60;
}

/* Empty States */
.tab-empty,
.scientific-works-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.tab-empty p,
.scientific-works-empty p {
    font-size: 16px;
    color: #718096;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .scientific-works-tabs {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tabs-navigation {
        position: static;
        padding: 16px;
    }

    .tabs-navigation-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-button {
        flex: 1;
        min-width: 200px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .tab-button .tab-arrow {
        display: none;
    }

    .tab-panel-title {
        font-size: 24px;
    }

    .tab-items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .scientific-works-section {
        padding: 50px 0;
    }

    .tabs-navigation {
        padding: 12px;
    }

    .tab-button {
        min-width: 100%;
        padding: 12px 14px;
        font-size: 13px;
    }

    .tab-icon {
        width: 28px;
        height: 28px;
    }

    .tab-panel-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .tab-panel-title {
        font-size: 20px;
    }

    .tab-items-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .item-content {
        padding: 20px;
    }

    .item-title {
        font-size: 16px;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tabs-navigation-inner {
        flex-direction: column;
    }

    .tab-button {
        min-width: auto;
    }

    .item-image {
        height: 150px;
    }
}

/* Animation for tab switching */
.tab-panel {
    will-change: opacity, transform;
}

/* Accessibility */
.tab-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.tab-button:focus:not(:focus-visible) {
    outline: none;
}

/* Print styles */
@media print {
    .tabs-navigation {
        display: none;
    }

    .scientific-works-tabs {
        grid-template-columns: 1fr;
    }

    .tab-panel {
        display: block !important;
        page-break-after: always;
    }

    .download-btn {
        display: none;
    }
}
