.bg-main{
    background-color: #add1d1;
}
.text-blue{
    color: #4b5e96;
}

.controlsBtn {
    font-size: 1rem;
    color: #4b5e96 !important;
    font-weight: bold;
}

.controlsBtn:hover {
    background: #add1d1;
}

.controlsContainer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 350px;
    z-index: 1001;
    display: none;
    font-size: 0.8rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.resultsPanel {
    background: #add1d1;
    border-radius: 1rem;
}

/* Responsive layout for main content */
@media (max-width: 767px) {
    #mainContent .row {
        flex-direction: column !important;
    }
    #mainContent .col-7,
    #mainContent .col-5 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    #mainContent .col-7 {
        height: 50vh !important;
    }
    #mainContent .col-5 {
        height: 50vh !important;
    }
    #orgList {
        height: calc(50vh - 70px) !important;
    }
}

/* Scroll-to-list floating button (visible on md and smaller) */
#scrollToListBtn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #2a9d8f;
    color: #fff;
    border: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
#scrollToListBtn:hover {
    background: #21867a;
    transform: scale(1.08);
}

/* Organization cards styling */
#orgList {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem 1rem 1rem;
    height: calc(100vh - 70px) !important;
}

/* 2 columns on large screens and desktop only */
@media (min-width: 992px) {
    #orgList {
        grid-template-columns: repeat(2, 1fr);
    }
}

.orgItem {
    display: flex;
    flex-direction: column;
    height: 450px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.8rem;
}

.orgItem:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.orgItem .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    max-height: 120px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.orgItem .logo-container img {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.orgItem .content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.org-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.org-description-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.btnShowMore {
    background: none;
    border: none;
    color: #4b5e96;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0;
    cursor: pointer;
    text-align: left;
    align-self: flex-start;
    flex-shrink: 0;
}

.btnShowMore:hover {
    text-decoration: underline;
}

.orgItem .content-container h5 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.orgItem .content-container a {
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.orgItem .content-container a:hover {
    text-decoration: underline;
}

.orgTags {
    margin-top: auto;
    flex-shrink: 0;
}

.orgTagBadge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5e96;
    background-color: #f3f6ff;
}

/* Org detail modal */
#orgModal .modal-header {
    background: #add1d1;
    border-bottom: none;
}

#orgModal .modal-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    min-height: 100px;
}

#orgModal .modal-logo-container img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

#orgModal .modal-org-description {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #333;
    white-space: pre-line;
}

#orgModal .modal-tags {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

#orgModal .modal-tags .tag-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Admin pages */
.admin-page {
    background: linear-gradient(180deg, #eaf4f4 0%, #f7fbff 45%, #ffffff 100%);
    min-height: 100vh;
}

.admin-shell {
    max-width: 1400px;
}

.admin-title {
    color: #4b5e96;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.admin-panel {
    border: 1px solid #c7dce7 !important;
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(75, 94, 150, 0.08);
}

.admin-panel .admin-legend {
    color: #4b5e96;
    font-weight: 700;
    padding: 0 0.35rem;
}

.admin-panel-body {
    border: 1px solid #dbe8ef !important;
    border-radius: 0.75rem;
    background: #f8fbfd !important;
}

.admin-card {
    border: 1px solid #cedee8;
    border-radius: 0.9rem;
    box-shadow: 0 6px 18px rgba(75, 94, 150, 0.08);
}

.admin-card-header {
    background: linear-gradient(90deg, #add1d1 0%, #d8e7f2 100%);
    color: #32477d;
    border-bottom: 1px solid #c6d9e5;
    border-top-left-radius: 0.9rem !important;
    border-top-right-radius: 0.9rem !important;
}

.admin-scroll {
    scrollbar-width: thin;
    scrollbar-color: #9fb7c8 #edf4f8;
}

.admin-scroll::-webkit-scrollbar {
    width: 8px;
}

.admin-scroll::-webkit-scrollbar-track {
    background: #edf4f8;
}

.admin-scroll::-webkit-scrollbar-thumb {
    background: #9fb7c8;
    border-radius: 10px;
}

.admin-page .list-group-item {
    border-left: 0;
    border-right: 0;
    border-color: #e7eef3;
}

.admin-page .list-group-item.active {
    background: #4b5e96;
    border-color: #4b5e96;
}

.admin-page .btn-primary {
    background-color: #4b5e96;
    border-color: #4b5e96;
}

.admin-page .btn-primary:hover {
    background-color: #3f4f82;
    border-color: #3f4f82;
}

.admin-page .btn-success {
    background-color: #2d8a72;
    border-color: #2d8a72;
}

.admin-page .btn-success:hover {
    background-color: #24715d;
    border-color: #24715d;
}

.admin-page .form-control,
.admin-page .form-select,
.admin-page textarea {
    border-radius: 0.6rem;
    border-color: #cddbe4;
}

.admin-page .form-control:focus,
.admin-page .form-select:focus,
.admin-page textarea:focus {
    border-color: #4b5e96;
    box-shadow: 0 0 0 0.2rem rgba(75, 94, 150, 0.15);
}

.admin-tag-box {
    background: #f9fcff;
    border: 1px solid #d7e5ef !important;
}

.admin-subtitle {
    color: #5a6c86;
    font-weight: 600;
}
