/* Catalog page */
.catalog-page {
    background: #efefef;
    min-height: 50vh;
    padding: 100px 0 80px;
}

.catalog-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.catalog-page__title {
    margin: 0;
    font-size: clamp(36px, 5vw, 85px);
    font-weight: 500;
    color: var(--color-primary);
    line-height: 1.1;
    padding-left: calc(var(--page-title-align-x) - var(--page-side-pad));
}

.catalog-page__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: clamp(48px, 5vw, 72px);
    padding: 0 32px;
    border-radius: var(--radius-card);
    background: var(--color-primary);
    color: #efefef;
    font-size: clamp(18px, 2vw, 30px);
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.catalog-page__submit:hover {
    text-decoration: none;
    opacity: 0.9;
}

.catalog-page__filters {
    margin-bottom: 48px;
}

.catalog-page__filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.catalog-page__dropdown {
    position: relative;
    width: 100%;
}

.catalog-page__dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: clamp(48px, 5vw, 72px);
    padding: 0 20px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-card);
    background: transparent;
    color: var(--color-primary);
    font-family: inherit;
    font-size: clamp(16px, 2vw, 30px);
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-radius 0.2s ease;
}

.catalog-page__dropdown-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-page__dropdown-label--placeholder {
    opacity: 0.85;
}

.catalog-page__dropdown-chevron {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    background: url("/img/trinagle_small.png") center / contain no-repeat;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.catalog-page__dropdown.is-open {
    z-index: 30;
}

.catalog-page__dropdown.is-open .catalog-page__dropdown-toggle {
    background: var(--color-primary);
    border-color: var(--color-primary);
    border-bottom-color: transparent;
    color: var(--color-primary-text);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
    z-index: 2;
}

.catalog-page__dropdown.is-open .catalog-page__dropdown-label--placeholder {
    opacity: 1;
    color: var(--color-primary-text);
}

.catalog-page__dropdown.is-open .catalog-page__dropdown-chevron {
    transform: rotate(180deg);
    filter: brightness(0) invert(1);
}

.catalog-page__dropdown.is-open .catalog-page__dropdown-menu {
    display: block;
}

.catalog-page__dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: min(420px, 55vh);
    margin: 0;
    padding: 16px 0 20px;
    list-style: none;
    background: #fff;
    border: none;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 1;
}

.catalog-page__dropdown--org .catalog-page__dropdown-menu {
    max-height: min(520px, 60vh);
    padding: 15px 0 20px;
}

.catalog-page__dropdown-menu > li {
    margin: 0;
    padding: 0;
}

.catalog-page__dropdown-option {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-family: inherit;
    font-size: clamp(16px, 1.5vw, 29px);
    font-weight: 400;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    text-underline-offset: 3px;
    text-underline-position: from-font;
}

.catalog-page__dropdown--org .catalog-page__dropdown-option {
    font-size: clamp(12px, 1.2vw, 23px);
    padding: 8px 20px;
    white-space: normal;
}

.catalog-page__dropdown-option:hover,
.catalog-page__dropdown-option:focus-visible {
    color: var(--color-primary);
    text-decoration: underline;
    outline: none;
}

.catalog-page__dropdown-option.is-selected {
    color: var(--color-primary);
    text-decoration: underline;
}

.catalog-page__dropdown-option.is-hidden,
.catalog-page__dropdown-menu > li.is-hidden {
    display: none;
}

.catalog-page__apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: clamp(48px, 4.5vw, 70px);
    padding: 0 40px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--color-footer-bg);
    color: #efefef;
    font-family: inherit;
    font-size: clamp(16px, 2vw, 30px);
    font-weight: 400;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.catalog-page__apply:hover {
    opacity: 0.9;
}

.catalog-page__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 23px;
    margin-bottom: 48px;
}

.catalog-page__card {
    display: flex;
    flex-direction: column;
    min-height: 421px;
    padding: 40px;
    background: #fff;
    border-radius: var(--radius-card);
    box-sizing: border-box;
}

.catalog-page__card-type {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.3;
}

.catalog-page__card-title {
    margin: 0 0 20px;
    flex: 1 1 auto;
    font-size: 25px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.35;
    letter-spacing: normal;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-page__card-org {
    margin: 0 0 28px;
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-page__card-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

.catalog-page__chat-form {
    margin: 0;
    padding: 0;
}

.catalog-page__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--radius-card);
    font-family: inherit;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

.catalog-page__btn--primary {
    background: var(--color-primary);
    color: #efefef;
}

.catalog-page__btn--primary:hover {
    text-decoration: none;
    opacity: 0.9;
}

.catalog-page__btn--secondary {
    background: #bebebe;
    color: var(--color-text);
}

.catalog-page__btn--secondary:hover:not(:disabled) {
    opacity: 0.9;
}

.catalog-page__btn--secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.catalog-page__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-page__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    border-radius: 50%;
    background: #bebebe;
    color: #efefef;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
}

.catalog-page__page:hover:not(.catalog-page__page--disabled):not(.catalog-page__page--active) {
    text-decoration: none;
    opacity: 0.85;
}

.catalog-page__page--active {
    background: var(--color-footer-bg);
    color: #efefef;
}

.catalog-page__page--arrow {
    font-size: 36px;
    font-weight: 400;
    line-height: 0.9;
}

.catalog-page__page--disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.catalog-page__empty {
    text-align: center;
    padding: 60px 0 80px;
}

.catalog-page__empty p {
    margin: 0;
    font-size: 22px;
    color: rgba(41, 41, 41, 0.7);
    line-height: 1.5;
}

@media (max-width: 1359px) {
    .catalog-page__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 920px) {
    .catalog-page__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog-page__submit {
        width: 100%;
        max-width: 320px;
    }

    .catalog-page__filters-row {
        grid-template-columns: 1fr;
    }

    .catalog-page__grid {
        grid-template-columns: 1fr;
    }

    .catalog-page__card {
        min-height: 0;
        padding: 28px;
    }
}

@media (max-width: 550px) {
    .catalog-page {
        padding: 24px 0 48px;
    }

    .catalog-page__card-title {
        font-size: 20px;
    }

    .catalog-page__card-type,
    .catalog-page__card-org {
        font-size: 17px;
    }

    .catalog-page__page {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

/* Extracted from legacy/style.css */
.partner-logo-catalog {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    height: 200px;
    margin-top: 30px;
    object-fit: contain;
}

@media (max-width: 550px) {
    .partner-logo-catalog {
        height: 150px;
    }
}

.project-detail {
    background-color: #ffffff;
    padding: 40px 0;
}

.project-detail .wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.project-detail .back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #007bff;
    text-decoration: none;
}

.project-detail h3 {
    margin-bottom: 20px;
}

.project-detail fieldset {
    margin-top: 40px;
}

.project-detail fieldset ul {
    list-style: none;
}

.project-card-view {
    display: flex;
    gap: 30px;
}

.project-photo {
    flex-shrink: 0;
    width: 300px;
}

.project-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.project-info {
    flex-grow: 1;
}

.project-info h4 {
    margin-top: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 1.1em;
}

.project-info p {
    line-height: 1.6;
}

.project-title {
    font-size: 2.2em;
    margin-bottom: 5px;
}

.project-organization {
    font-size: 1.2em;
    color: #6c757d;
    margin-bottom: 20px;
}

.project-specifics p strong {
    color: #333;
}

.chat-button-container {
    text-align: center;
    margin-top: 40px;
}

.chat-button-container #chat {
    background-color: #ae040f;
    color: #ffffff;
    font-family: "Inter", "Roboto", sans-serif;
    font-size: 20px;
    font-weight: 300;
    width: 288px;
    height: 38px;
    border-radius: 11px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.chat-button-container #chat:not(:disabled):hover {
    background-color: #494949;
    color: #E1E1E2;
}

.chat-button-container #chat:disabled {
    background-color: #b0b0b0;
    cursor: not-allowed;
    opacity: 0.7;
}

.chat-form__hidden-input {
    display: none;
}
