/* ---------- Main Section ---------- */
main {
    background-color: #f9fafc;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    height: 100%;
    width: 82%;
    padding: 2rem 1rem;
}

/* ---------- Heading ---------- */
.heading-title {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: #111827;
    font-weight: 700;
}
.heading-info {
    width: 100%;
    color: #4b5563;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ---------- Nav2 ---------- */
.nav2 {
    height: 2.6rem;
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-container {
    background-color: white;
    width: 35%;
    height: 100%;
    border: 0.08rem solid rgb(209 213 219);
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.2s ease;
}
.search-box {
    height: 85%;
    width: 98.5%;
    background-color: white;
    border-radius: 0.3rem;
    display: flex;
    align-items: center;
}
.search-box i {
    font-size: 1.2rem;
    padding: 1rem;
    color: #a5a8ab;
}
.search-container:focus-within {
    box-shadow: 0 0 0 2px #4184f5;
    border-color: #4184f5;
}
.input-box {
    height: 100%;
    width: 100%;
    border: none;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    outline: none;
}
.nav2-right {
    width: 30%;
    margin-right: 0;
}
.nav-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}
.filter-and-date {
    display: flex;
    gap: 0.5rem;
}
.nav-container i, .view-btns i {
    font-size: 1rem;
}
.date-range-btn, .filter-btn {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.date-range-btn, .filter-btn, .grid-view, .list-view {
    font-size: 0.8rem;
    font-weight: 500;
    color: #020817;
    height: 2.6rem;
    width: auto;
    padding: 0.5rem 1rem;
    border: none;
    background-color: white;
    border: 0.08rem solid rgb(209 213 219);
    border-radius: 0.5rem;
    cursor: pointer;
}
.view-btns {
    display: flex;
    justify-content: center;
    border: 0.08rem solid rgb(209 213 219);
    border-radius: 0.5rem;
}
.grid-view, .list-view {
    border: none;
    font-size: 0.9rem;
}
.active {
    background-color: #f1f4f9;
}
.date-range-btn:hover, .filter-btn:hover, .grid-view:hover, .list-view:hover, .clear:hover {
    background-color: #f1f4f9;
}

/* ---------- Filter ---------- */
.filter-box {
    position: absolute;
    left: 59%;
    margin-top: 3rem;
    height: fit-content;
    width: 20rem;
    padding: 1rem;
    color: #020817;
    font-weight: 500;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 1000;
}
.section1, .section2 {
    margin-top: 0.1rem;
    margin-bottom: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
}
.filter-box p {
    font-size: 1rem;
    padding: 0.5rem 0;
}
.filter-box label {
    font-size: 0.9rem;
}
.filter-box input {
    height: 1rem;
    width: 1rem;
    margin-right: 0.5rem;
    border: 0.08rem solid black;
    cursor: pointer;
}
.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}
.clear, .apply {
    height: 2.3rem;
    width: auto;
    padding: 0 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
}
.clear {
    background-color: white;
    border: 0.08rem solid rgb(209 213 219);
}
.apply {
    color: white;
    background-color: #3b82f6;
    border: none;
}
.apply:hover {
    background-color: #4e8ff7;
}

/* ---------- Date Range ---------- */
.date-range-box {
    position: absolute;
    left: 70.5%;
    margin-top: 3rem;
    height: fit-content;
    width: 15rem;
    background-color: white;
    font-weight: 500;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 1000;
}
.date-input {
    margin-bottom: 1rem;
}
.date-input label {
    font-size: 0.9rem;
}

.input-container input {
    width: 95%;
    border: none;
    border-radius: 0.3rem;
    border: 0.08rem solid rgb(209 213 219);
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.apply-date-btn {
    height: 2.3rem;
    width: 50%;
    margin-left: 22%;
    background-color: #3b82f6;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    align-self: center;
    cursor: pointer;
}

.apply-date-btn:hover {
    background-color: #4e8ff7;
}

.hidden {
    display: none;
}

/* No Data Found Box*/
.no-data-box {
    width: 100%;
    height: 9rem;
    background-color: white;
    border-radius: 0.5rem;
    border: 0.09rem dashed rgb(209 213 219);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.no-data-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #374151;
}
.no-data-info {
    font-size: 1rem;
    color: #6b7280;
}

/* ---------- Boxes ---------- */
.clg-list {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: grid;
    /* grid-template-columns:  repeat(3, 1fr); minmax(33%, 38.8%) */
    grid-template-columns: repeat(2, 49.3%);
    grid-auto-flow: row;
    grid-gap: 1.2rem;
    margin-top: 1.5rem;
}
.clg-list-flex {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.clg-box {
    width: auto;
    height: auto;
    background-color: white;
    border: 1px solid rgb(209 213 219);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border-radius: 0.5rem;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out forwards;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.program-strip {
    text-align: center;
    background: #4f46e5;
    color: #fff;
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.upper-box {
    padding: 1.5rem;
    width: 100%;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.clg-box:hover {
    box-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
}

.clg-layer1 {
    height: auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    align-items: center;
}
.layer1-left {
    width: 70%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    align-items: center;
}
.img-box {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0.5rem;
    background-color: #e1f2fd;
    color: #4184f5;
    font-size: 1rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}
.name-course {
    line-height: 1.5rem;
}
.clg-name {
    color: #020817;
    font-size: 1rem;
    font-weight: 500;
}
.clg-course {
    font-size: 0.9rem;
    color: #4b5563;
}

.layer1-right {
    height: max-content;
    padding: 0.3rem 0.5rem;
    width: auto;
    background-color: #3b82f6;
    text-align: center;
    border-radius: 1rem;
    font-size: 0.8rem;
    color: #faf8fc;
    font-weight: 500;
}
.layer1-right:hover {
    background-color: #3f4457 !important;
}

.deadline, .state {
    height: max-content;
    width: 100%;
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.state {
    margin-bottom: 0.8rem;
}

.announcement {
    width: 100%;
    /* height: auto; */
    padding: 0.5rem;
    color: #374151;
    font-size: 0.8rem;
    background-color: #f9fafb;
    border: 0.08rem solid rgb(209 213 219);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}
.announcement-text {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
    overflow-wrap: break-word;
    white-space: normal;
}
.announcement i {
    font-size: 0.9rem;
    color: #689df8;
    padding-right: 0.5rem;
}

.lower-box {
    width: 100%;
    border-top: 0.01rem solid rgb(235, 237, 240);
    /* margin-top: 1.5rem; */
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    align-self: flex-end;
    margin-top: auto;
}

.view-details {
    height: 2.5rem;
    width: 7rem;
    /* color: #3b82f6; */
    font-size: 0.8rem;
    font-weight: 500;
    background-color: white;
    border: none;
    border-radius: 0.5rem;
}
.view-details:hover {
    background-color: #f1f5f9;
    /* color: #020817; */
    cursor: pointer;
}

.clg-website {
    height: 2.5rem;
    width: 7rem;
    color: #3b82f6;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: white;
    border: 0.09rem solid transparent;
    border-radius: 0.5rem;
    outline: none;
}
.clg-website:hover {
    background-color: #f1f5f9;
    /* color: #020817; */
    cursor: pointer;
}

#back-to-top {
    position: fixed;
    bottom: 0.8rem;
    right: 0.8rem;
    z-index: 100;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    background-color: white;
    border: 0.08rem solid rgb(209 213 219);
    border-radius: 0.5rem;
    cursor: pointer;
    outline: none;
    display: none;
}

/* ---------- Responsive Style Code ---------- */
@media (max-width: 767px) { /* Mobile (Portrait) */
    header {
        max-width: 100%;
        padding: 0 4%;
        /* gap: 10%; */
    }
    .logo {
        font-size: 1.2rem;
    }
    .header-right {
        width: 38%;
        justify-content: flex-end;
        gap: 5%;
    }
    .header-right p {
        display: none;
    }
    .home-box, .announcement-box, .feedback-box {
        gap: 0;
        padding: 0.5rem 0.5rem;
    }
    .home-box i, .announcement-box i, .feedback-box i {
        font-size: 1.2rem;
    }
    main {
        padding: 1rem 1rem;
    }
    .container {
        width: 100%;
        padding: 0;
    }
    .nav2 {
        height: auto;
        flex-direction: column;
        gap: 0.9rem;
    }
    .search-container, .nav2-right {
        width: 100%;
        height: 2.5rem;
    }
    .input-box {
        font-size: 0.9rem;
    }
    .nav-container {
        justify-content: space-between;
    }
    /* .grid-view i::before, .list-view i::before {
        font-size: 1.1rem;
    }
    .grid-view, .list-view {
        padding: 0 1rem;
    } */
    .view-btns {
        display: none;
    }
    .date-range-btn, .filter-btn {
        font-size: 0.8rem;
        padding: 0 0.5rem;
    }
    .date-range-btn i, .filter-btn i, .grid-view i, .list-view i {
        font-size: 0.8rem;
    }
    .filter-box {
        left: 2%;
    }
    .date-range-box {
        left: 8%;
    }
    .clg-list, .clg-list-flex {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }
    .clg-box {
        width: 94%;
    }
}

@media (min-width: 767px) and (max-width: 1024px) { /* Medium [Tablets and small laptops] */
    header {
        max-width: 100%;
        padding: 0 4%;
    }
    .logo {
        font-size: 1.5rem;
    }
    .header-right {
        justify-content: flex-end;
        gap: 0;
    }
    .home-box, .announcement-box, .feedback-box {
        padding: 0.5rem 0.8rem;
    }
    .header-right p {
        font-size: 0.9rem;
    }
    main {
        padding: 2rem 1rem;
    }
    .container {
        min-width: 95%;
        max-width: 100%;
        padding: 0;
    }
    .heading {
        width: 100%;
    }
    .nav2 {
        justify-content: space-between;
        gap: 0.5rem;
    }
    .nav2-right {
        width: 47%;
    }
    .search-container {
        width: 53%;
    }
    .filter-and-date {
        width: 100%;
        justify-content: flex-end;
        gap: 0.5rem;
    }
    .date-range-btn, .filter-btn {
        padding: 0.5rem 0.8rem;
    }
    .clg-list, .clg-list-flex {
        max-width: 100%;
    }
    .clg-list {
        grid-template-columns: repeat(2, 48.5%);
    }
}

@media (min-width: 1025px) and (max-width: 1440px) { /* Laptops and Desktops */
    header {
        max-width: 100%;
        padding: 0 4%;
    }
    .header-right {
        justify-content: flex-end;
        gap: 0;
    }
    .header-right p {
        font-size: 1rem;
    }
    .container {
        min-width: 90%;
        max-width: 100%;
        padding: 1rem 1rem;
    }
    .search-container {
        width: 53%;
    }
    .nav2 {
        justify-content: space-between;
        gap: 0.5rem;
    }
    .nav2-right {
        width: 47%;
    }
    .filter-and-date {
        width: 100%;
        justify-content: flex-end;
        gap: 0.5rem;
    }
    .date-range-btn, .filter-btn {
        padding: 0.5rem 0.8rem;
    }
}