/**
 * Research Organizations - Frontend Styles
 */

/* Section Container */
.research-organizations-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Title */
.research-organizations-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 3px solid #0073aa;
    line-height: 1.4;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Table */
.research-organizations-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
}

.research-organizations-table tbody {
    display: table-row-group;
}

.research-organizations-table tr {
    transition: background-color 0.2s ease;
}

.research-organizations-table td {
    padding: 6px 8px;
    border: none;
    vertical-align: middle;
}

/* Highlight row with logo and organization name */
.zebra-table tr:nth-child(odd) {
    background-color: #e3effb;
}

.zebra-table tr:nth-child(even) {
    background-color: #fff;
}

/* Remove bottom border for logo cells */
.no-bottom-border {
    border-bottom: none !important;
}

/* Logo Cell */
.logo-cell {
    width: 70px;
    min-width: 70px;
    text-align: left;
    vertical-align: middle;
    padding: 6px 5px 2px 5px !important;
}

.logo-cell a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.org-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.org-logo:hover {
    transform: scale(1.05);
}

/* Organization Name Cell */
.org-name-cell {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a2e;
    padding: 6px 8px !important;
    vertical-align: middle;
    text-align: left;
}

.org-name-cell a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    font-weight: 700;
}

.org-name-cell a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Research URLs Cell */
.research-urls-cell {
    word-break: break-word;
    padding: 6px 8px !important;
    vertical-align: middle;
    line-height: 1.5;
}

.research-urls-cell a {
    color: #0073aa;
    text-decoration: none;
    display: inline-block;
    padding: 1px 0;
    margin: 1px 0;
    background: transparent;
    font-size: 14px;
    transition: all 0.2s ease;
    word-break: break-all;
}

.research-urls-cell a:hover {
    background: transparent;
    color: #0073aa;
    text-decoration: underline;
}

/* First and Last Row Border Radius */
.research-organizations-table tr:first-child td:first-child {
    border-top-left-radius: 12px;
}

.research-organizations-table tr:first-child td:last-child {
    border-top-right-radius: 12px;
}

.research-organizations-table tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.research-organizations-table tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.research-organizations-table tr:last-child td {
    border-bottom: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .research-organizations-section {
        padding: 20px 15px;
        margin: 25px 0;
        border-radius: 12px;
    }

    .research-organizations-title {
        font-size: 1.25rem;
    }

    .research-organizations-table {
        font-size: 14px;
    }

    .research-organizations-table td {
        padding: 12px 10px;
    }

    .logo-cell {
        width: 80px;
        min-width: 80px;
    }

    .org-logo {
        max-width: 70px;
    }

    .research-urls-cell a {
        font-size: 12px;
        padding: 3px 6px;
    }
}

@media screen and (max-width: 480px) {
    .research-organizations-section {
        padding: 15px 10px;
    }

    .research-organizations-title {
        font-size: 1.1rem;
    }

    .logo-cell {
        width: 60px;
        min-width: 60px;
        padding: 10px 8px 5px 8px !important;
    }

    .org-logo {
        max-width: 50px;
    }

    .org-name-cell {
        padding: 5px 8px 10px 8px !important;
        font-size: 13px;
    }

    .research-urls-cell {
        padding: 10px 8px !important;
    }

    .research-urls-cell a {
        font-size: 11px;
    }
}

/* Lightbox Styles */
.ro-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.ro-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ro-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.ro-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90%;
    max-height: 90%;
    animation: roFadeIn 0.3s ease;
}

@keyframes roFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ro-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.ro-lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.ro-lightbox-close:hover {
    background: #dc3545;
    color: #fff;
    transform: scale(1.1);
}