/* Prefixed CSS to avoid conflicts */
body.kg-modal-open {
    overflow: hidden;
}

.kg-college-finder-section {
    font-family: "Poppins", sans-serif;
    background-color: #f0f2f5; /* Light grey background */
    padding: 20px 0;
    position: relative;
    margin: 0 auto;
}

.kg-breadcrumb {
    margin-bottom: 1rem;
}

.kg-breadcrumb .breadcrumb {
    margin-bottom: 0.5rem;
}

.kg-breadcrumb .breadcrumb-item a {
    text-decoration: none;
    color: #0d6efd;
}

.kg-breadcrumb .breadcrumb-item.active {
    color: #6c757d;
}

.kg-ad-banner {
    margin-bottom: 1.5rem;
}

.kg-ad-banner img {
    width: 100%;
    border-radius: 8px;
}

.kg-main-heading {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background-color: #d9e9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Results Count Styling */
.kg-results-count {
    background-color: #fff;
    padding: 20px;
    /* height: 77px; */
    align-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Filter Sidebar Styling */
.kg-filters-sidebar {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: sticky;
    top: 36%;
    bottom: 38%;
}

.kg-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.kg-filters-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.kg-reset-btn {
    background: none;
    border: none;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.9rem;
}
.custom-link:hover {
    text-decoration: underline; /* hover पर underline */
    cursor: pointer; /* cursor pointer */
}
/* Accordion Customization */
.kg-filters-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
}

.kg-filters-accordion .accordion-item:last-child {
    border-bottom: none;
}

.kg-filters-accordion .accordion-button {
    font-weight: 600;
    padding: 15px 0;
    color: #212529;
    background-color: #fff;
}

.kg-filters-accordion .accordion-button:not(.collapsed) {
    box-shadow: none;
    color: #0d6efd;
}

.kg-filters-accordion .accordion-button:focus {
    box-shadow: none;
}

.kg-filters-accordion .accordion-button::after {
    display: none; /* Hide default bootstrap icon */
}

.kg-filters-accordion .kg-accordion-icon {
    transition: transform 0.2s ease-in-out;
    margin-left: auto;
}

.kg-filters-accordion .accordion-button:not(.collapsed) .kg-accordion-icon {
    transform: rotate(180deg);
}

.kg-filters-accordion .accordion-body {
    padding: 0 0 15px 0;
}

.kg-filter-search {
    position: relative;
    margin-bottom: 10px;
}

.kg-filter-search input {
    padding-left: 30px;
    font-size: 0.9rem;
}

.kg-filter-search .fa-search {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.kg-filter-options {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.kg-filter-options::-webkit-scrollbar {
    width: 5px;
}
.kg-filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.kg-filter-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.kg-filter-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.kg-filter-options .form-check {
    margin-bottom: 8px;
}
.kg-filter-options .form-check-label {
    font-size: 0.9rem;
}
.kg-filter-options .form-check-label span {
    color: #6c757d;
}

/* Results Area Styling */
.kg-results-topbar {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.kg-active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.kg-filter-tag {
    background-color: #31508d;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: 500;
}

/* Custom Dropdown Styling */
.kg-sort-dropdown {
    position: relative;
    min-width: 200px;
}

.kg-dropdown-toggle {
    width: 100%;
    text-align: left;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem; /* Adjusted padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    box-shadow: none;
    white-space: nowrap;
}

.kg-dropdown-toggle:focus {
    outline: none;
}

.kg-dropdown-toggle svg {
    width: 1rem;
    height: 1rem;
}

.kg-dropdown-menu {
    display: block; /* Keep it as block for animations */
    visibility: hidden; /* Control visibility */
    opacity: 0; /* Start fully transparent */
    transform: translateY(-10px); /* Start slightly moved up */
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 10;
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.kg-dropdown-menu.kg-active {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.kg-dropdown-item {
    padding: 0.75rem 1rem; /* Adjusted padding */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.kg-dropdown-item:hover {
    background-color: #f8f9fa;
}

.kg-dropdown-item.active {
    font-weight: 700;
}

.kg-dropdown-item.active .fa-check {
    display: inline-block;
}

.kg-dropdown-item .fa-check {
    display: none;
    color: #0d6efd;
}

/* College Card Styling */
.kg-college-card {
    background-color: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    position: relative;
}

.kg-featured-tag {
    position: absolute;
    top: -1px;
    left: 20px;
    background-color: #0d6efd;
    color: white;
    padding: 4px 12px 6px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.kg-featured-tag .fa-star {
    font-size: 0.7rem;
    margin-right: 5px;
}

.kg-card-header {
    display: flex;
    gap: 15px;
    align-items: center;
}

.kg-college-logo {
    width: 50px;
    height: 50px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
    object-fit: contain;
}

.kg-college-title h6 {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1rem;
}

.kg-college-meta {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px; /* row-gap column-gap */
}

.kg-college-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kg-info-item {
    text-align: left;
}

.kg-info-item .kg-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2px;
    font-weight: 400;
}

.kg-info-item .kg-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
}

.kg-info-item .kg-value.kg-highlight {
    color: #d9534f;
    font-weight: 600;
}

.kg-info-item a {
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 600;
}

.kg-btn-compare {
    background-color: #2f7bff;
    color: #f7f7f7;
    border-color: #d0d5dd;
}

.kg-btn-compare:hover {
    opacity: 0.8;
}

.kg-btn-brochure {
    background-color: #00139c;
    color: #fff;
    border: none;
}

.kg-btn-brochure:hover {
    opacity: 0.9;
}

.kg-btn-apply {
    background-color: #16324f;
    color: #fff;
    border: none;
}

.kg-btn-apply:hover {
    opacity: 0.9;
}

.kg-card-footer {
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kg-card-footer .kg-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.kg-card-footer .kg-links::-webkit-scrollbar {
    display: none;
}

.kg-card-footer .kg-links a {
    text-decoration: none;
    font-weight: 500;
    color: #0d6efd;
    font-size: 0.9rem;
    white-space: nowrap;
}

.kg-card-footer .kg-links .kg-separator {
    width: 1px;
    height: 16px;
    background-color: #dee2e6;
    flex-shrink: 0;
}

.kg-ranking {
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

/* Floating Contact Icon */

/* Mobile Filter Bar */
.kg-mobile-filter-bar-container {
    position: sticky;
    top: 4.3rem;
    z-index: 1020; /* High z-index to stay on top */
    background-color: #f0f2f5;
}
.kg-mobile-filter-bar {
    background-color: #fff;
    padding: 0.625rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* For Firefox */
}

.kg-mobile-filter-bar::-webkit-scrollbar {
    display: none; /* For Chrome, Safari, and Opera */
}

.kg-mobile-filter-bar .kg-filter-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    background-color: #fff;
}

.kg-mobile-filter-bar .kg-main-filter-btn {
    border-color: #d9534f;
    color: #d9534f;
}

.kg-main-filter-btn svg {
    stroke: #d9534f;
}

.kg-main-filter-btn div {
    background-color: #d9534f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter Modal */
.kg-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
    align-items: flex-end;
}
.kg-filter-modal.kg-show {
    display: flex;
}
.kg-modal-content {
    background-color: #fff;
    width: 100%;
    height: 80vh;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}
.kg-filter-modal.kg-show .kg-modal-content {
    transform: translateY(0);
}

.kg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.kg-modal-header h5 {
    font-weight: 600;
    margin: 0;
}

.kg-selected-filters-area {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 40px;
}

.kg-selected-filter-chip {
    background-color: rgba(217, 83, 79, 0.1);
    color: #d9534f;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.kg-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
}

.kg-modal-main {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.kg-modal-nav {
    flex: 2;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
}

.kg-modal-nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    background-color: #fff;
    font-size: 0.875rem;
}

.kg-modal-nav-item.active {
    background-color: #e9ecef;
    font-weight: 600;
    color: #0d6efd;
}

.kg-modal-nav-item .kg-filter-count {
    font-weight: normal;
    color: #6c757d;
}

.kg-modal-pane-container {
    flex: 3;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8fafc;
}

.kg-modal-pane {
    display: none;
}

.kg-modal-pane.active {
    display: block;
}

.kg-modal-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.kg-modal-footer button {
    flex: 1;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
}

.kg-btn-clear {
    background-color: #fff;
    border: 1px solid #0d6efd;
    color: #0d6efd;
}

.kg-btn-apply-filters {
    background-color: #0d6efd;
    color: #fff;
    border: none;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .kg-mobile-filter-bar-container,
    .kg-mobile-results-count {
        display: none;
    }
    .kg-card-actions-desktop {
        width: 180px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    /* .kg-college-finder-section {
        margin-top: 105px;
    } */

    .kg-card-actions-desktop .kg-btn {
        width: 100%;
        border-radius: 8px;
        font-weight: 600;
        padding: 10px 15px;
        border: 1px solid;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s ease;
    }

    .kg-card-main-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 1rem;
        align-content: space-between;
        flex-direction: row;
        justify-content: space-between;
        padding-top: 12px;
    }
    .kg-card-details {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 20px 0 0 0;
    }
    .kg-card-actions-mobile {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .kg-filters-sidebar-col,
    .kg-results-count.d-none.d-lg-block,
    .kg-card-actions-desktop {
        display: none;
    }
    /* .kg-college-finder-section {
        margin-top: 3rem;
    } */
    .rating-stars {
        font-size: 14px;
    }
    .kg-card-main-wrapper {
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 1rem;
        padding-top: 12px;
    }

    .kg-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding-top: 1rem;
    }
    .kg-card-actions-mobile {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .kg-card-actions-mobile .kg-btn {
        border-radius: 8px;
        font-weight: 600;
        padding: 9px 10px;
        border: 1px solid;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s ease;
    }
    .kg-card-actions-mobile .flex-shrink-1 {
        flex-shrink: 1 !important;
    }
    .kg-card-actions-mobile .flex-grow-1 {
        flex-grow: 1 !important;
    }
}

@media (max-width: 768px) {
    .kg-main-heading {
        font-size: 1.5rem;
        padding: 1rem;
    }
    .kg-results-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .container {
        /* Override bootstrap container padding on mobile */
        padding-left: 0;
        padding-right: 0;
        /* overflow-x: hidden; */
    }
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    .kg-content-padding {
        padding: 0 15px;
    }
}
/* Listing grid Page */
#long-content {
    color: #212529;
    font-size: 15px;
    max-height: 209px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

/* Gradient fade when collapsed */
#long-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    /* height: 60px; */
    width: 100%;
    /* background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); */
    transition: opacity 0.3s ease;
}

/* Expanded State */
#long-content .expanded {
    max-height: 1200px;
}

#long-content .expanded::after {
    opacity: 0;
}

/* Headings */
#long-content h1 {
    font-size: 22px !important;
    font-weight: 700;
    /* color: #1d3970; */
    margin-bottom: 10px;
}

#long-content h2 {
    font-size: 20px;
    font-weight: 600;
    /* color: #31508d; */
    margin-top: 18px;
}

#long-content p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2rem;
    letter-spacing: 0.025rem;
    margin-bottom: 8px;
    text-align: justify;
}

#expand-btn {
    text-decoration: none;
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 6px;
}
#expand-btn:hover {
    text-decoration: none;
    cursor: pointer;
}

.expand-btn:hover {
    background-color: #2b437f;
    transform: scale(1.03);
}

/* Responsive Design */
@media (max-width: 768px) {
    #long-content h1 {
        font-size: 19px;
    }
    #long-content h2 {
        font-size: 16px;
    }
    #long-content {
        font-size: 14px;
    }
}
