﻿@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;600;700&display=swap');

:root {
    --primary-red: #FF0000;
    --dark-red: #8b0000;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --font-family: 'Red Hat Display', sans-serif;
    --text-primary: #1D1D1D; 
    --link-blue: #2F6796;
    --contact-blue: #005AA3;
}

body {
    font-family: var(--font-family);
    background-color: white;
    margin: 0;
}

.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 1200px) {
    .container {
        max-width: 80%;
    }
}

@media (max-width: 1199.98px) {
    .container {
        max-width: 90%;
    }
}

@media (max-width: 767.98px) {
    .container {
        max-width: 95%;
    }
}

.institution-section .row {
    display: flex;
    flex-wrap: wrap;
}

    .institution-section .row .col-lg-4,
    .institution-section .row .col-md-6 {
        display: flex;
    }

.page-header {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    padding: 40px 0 40px 0;
    padding-left: 60px;
    padding-right: 30px;
    position: relative;
}

.title-institution-list-header {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-header,
.active-header {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary); 
}

.main-header {
    font-weight: 400;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

    .main-header:hover {
        color: var(--text-primary);
        text-decoration: none;
    }

.active-header {
    font-weight: 600;
    text-decoration: underline;
}

.main-header::after {
    content: '/';
    margin: 0 10px;
    color: var(--text-primary);
    font-weight: 400;
}

.institution-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E8E8E8;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.02);
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .institution-card:hover {
        transform: translateY(-3px);
        box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.08);
    }

    .institution-card img {
        width: 90px;
        height: 90px;
        object-fit: contain;
        margin-right: 16px;
        flex-shrink: 0;
    }

.institution-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    width: 100%;
    min-width: 0;
}

.title-institution-card {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
    display: block;
    height: auto;
    white-space: normal;
    word-wrap: break-word;
}

.link-depended-institutions {
    position: relative;
    color: var(--link-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    display: inline-block;
    padding-left: 20px;
    margin-bottom: 6px;
    white-space: normal;
    word-break: break-word;
}

    .link-depended-institutions::before {
        content: "→";
        position: absolute;
        left: 0;
        top: 1px;
        width: 18px;
        color: var(--link-blue);
        font-size: 16px;
        font-weight: bold;
    }

    .link-depended-institutions:hover {
        opacity: 0.8;
        color: var(--link-blue);
    }

.contact-institution {
    display: inline-block;
    color: var(--contact-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0;
}

    .contact-institution::after {
        content: " →";
        font-weight: bold;
    }

    .contact-institution:hover {
        opacity: 0.8;
        color: var(--contact-blue);
    }

.institution-card-content > div:last-child {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

@media (max-width: 991px) {
    .page-header {
        padding-left: 40px;
    }
}

@media (max-width: 576px) {
    .page-header {
        margin-top: 20px;
        padding: 30px 20px;
        text-align: center;
        background-position: center;
        background-size: cover;
    }

    .breadcrumb {
        justify-content: center;
    }

    .title-institution-list-header {
        font-size: 26px;
    }

    .institution-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        align-items: center;
    }

        .institution-card img {
            margin-right: 0;
            margin-bottom: 12px;
            width: 100px;
            height: 100px;
        }

    .institution-card-content {
        align-items: center;
    }

    .link-depended-institutions {
        text-align: center;
        padding-left: 0;
    }

        .link-depended-institutions::before {
            position: static;
            display: inline-block;
            margin-right: 4px;
        }
}

.detailed-pagination-nav {
    --bs-pagination-border-width: 0;
    align-items: center;
    padding-left: 0;
    margin-bottom: 0;
}

    .detailed-pagination-nav .pagination-button-link {
        border-radius: 50% !important;
        width: 36px;
        height: 36px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 3px;
        font-size: 14px;
        color: var(--text-primary);
        background-color: transparent;
        border: none;
    }

    .detailed-pagination-nav .pagination-button-icon {
        width: 20px;
        height: 20px;
    }

    .detailed-pagination-nav .pagination-current-page .pagination-button-link {
        background-color: #EFEFEF !important;
        color: var(--text-primary) !important;
        font-weight: bold;
    }

    .detailed-pagination-nav .page-item.disabled .pagination-button-link {
        background-color: transparent !important;
        opacity: 0.38;
        pointer-events: none;
    }

    .detailed-pagination-nav .page-item:not(.active):not(.disabled) .pagination-button-link:hover {
        background-color: rgba(0, 0, 0, 0.04);
    }
