.container {
    margin: 200px 0 0 0;
    box-sizing: border-box;
    position: relative;
}
.online_resources {
    width: 80%;
    margin: 30px auto;
    border: 1px solid #c4baba;
    padding: 15px;
    border-radius: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.header-section-online {
    padding: 80px 70px 40px 70px;
    background-color: #fff;
    position: relative;
    font-family: "Poppins", Arial, sans-serif;
}
.header-title-online {
    font-size: 25px;
    color: #36384e;
    margin-bottom: 10px;
    font-weight: 600;
}
.header-subtitle-online {
    font-size: 16px;
    color: #555;
    font-weight: 400;
}
.header-section {
    padding: 80px 70px 40px 70px;
    background-color: #fff;
    position: relative;
    font-family: "Poppins", Arial, sans-serif;
}

.header-title {
    font-size: 64px;
    color: #1e8dd2;
    margin-bottom: 10px;
}

.header-subtitle {
    font-size: 1.2rem;
    color: #555;
}

.apply-tab {
    position: absolute;
    top: 0;
    right: 0;
    background: #f7a600;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 32px 8px 8px 8px;
    writing-mode: vertical-rl;
    text-align: center;
    border-radius: 0 0 8px 8px;
    z-index: 3;
    height: 120px;
    cursor: pointer;
}

.button-group {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 21px auto 20px auto;
    max-width: fit-content;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.button-group .active-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background-color: #1e8dd2;
    border-radius: 5px;
    transition: left 0.5s ease-in-out, width 0.5s ease-in-out;
    z-index: 0;
}

.button-group .toogle-button {
    padding: 12px 25px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background-color: transparent;
    color: #979797;
    transition: color 0.5s ease-in-out;
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

.button-group .toogle-button.active_button {
    color: #fff;
}

.button-group .toogle-button:hover {
    color: #333;
}

.button-group .toogle-button.active_button:hover {
    color: #fff;
}

.content-sections {
    display: flex;
    margin-top: 40px;
    position: relative;
}

.open-hours-section {
    flex: 1;
    background-color: #1e8dd2;
    color: #fff;
    padding: 80px 70px;

    z-index: 1;
}

.open-hours-title {
    font-size: 2.8rem;
    color: #f7a600;
    margin-bottom: 30px;
    font-weight: 700;
}

.open-hours-item {
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.contact-section {
    flex: 1;
    background-color: #fff;
    padding: 80px 70px;

    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-title {
    font-size: 2.8rem;
    color: #f7a600;
    margin-bottom: 30px;
    font-weight: 700;
}

.contact-subtitle {
    font-size: 1.5rem;
    color: #1e8dd2;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-info {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.contact-list-item {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
}

@media (max-width: 1024px) {
    .header-section,
    .button-group,
    .open-hours-section,
    .contact-section {
        padding-left: 40px;
        padding-right: 40px;
    }
    .header-title {
        font-size: 3rem;
    }
    .open-hours-title,
    .contact-title {
        font-size: 2.2rem;
    }
    .content-sections {
        flex-direction: column;
    }
    .open-hours-section,
    .contact-section {
        clip-path: none;
    }
}

@media (max-width: 768px) {
    .header-section,
    .button-group,
    .open-hours-section,
    .contact-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .header-title {
        font-size: 2.5rem;
    }
    .open-hours-title,
    .contact-title {
        font-size: 1.8rem;
    }

    .button-group button {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

.library-policies-section {
    height: 890px;
    display: flex;
    align-items: self-end;
    justify-content: center;
    position: relative;
    margin-bottom: 40%;
}

.policies-content-card {
    background-color: #fff;
    padding: 40px 60px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    top: 40%;
    transform: translateY(0%);
    z-index: 4;
    height: max-content;
}

.policies-title {
    font-size: 2.5rem;
    color: #f7a600;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.policy-paragraph {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

@media (max-width: 1024px) {
    .policies-content-card {
        padding: 30px 40px;
        max-width: 700px;
    }
    .policies-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .policies-content-card {
        padding: 20px 30px;
        max-width: 90%;
        top: 100px;
    }
    .policies-title {
        font-size: 1.8rem;
    }
    .policy-paragraph {
        font-size: 0.85rem;
    }
    .library-policies-section {
        height: max-content;

    }

    .policies-content-card {
        position: relative;
        top: 40%;
        transform: translateY(0%);
        z-index: 4;

    }
}
/* online resources */
.search-filter-section {
    display: flex;
    justify-content: end;
    align-items: flex-end;
    padding: 30px 70px;
    background-color: #fff;
    gap: 20px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    width: 300px;
    padding: 12px 45px 12px 15px; /* Adjusted padding: top, right, bottom, left */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.search-bar .search-icon {
    position: absolute;
    right: 15px; /* Changed from 'left' to 'right' */
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.filters-button {
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #555;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.filters-button:hover {
    background-color: #f0f0f0;
}
/* Filter Dropdown Styles */
.filters-dropdown {
    position: relative;
    display: inline-block;
}

.filters-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
}

.filter-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background-color: #f5f5f5;
}

.filter-option i {
    margin-right: 8px;
    width: 16px;
}

.resources-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    padding: 0 70px; /* Adjust as needed, table will fill this */
    box-sizing: border-box;
}

.resources-table table {
    width: 100%;
    border-collapse: collapse;
}

.resources-table th,
.resources-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #333;
    text-align: center;
}

.resources-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.resources-table td:first-child {
    font-weight: 600;
    color: #1e8dd2;
}

.download-btn {
    background-color: #1e8dd2;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #0b3454;
}

.category-icons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.category-icons .icon {
    width: 24px;
    height: 24px;
    background-color: #ccc; /* Placeholder for actual icons */
    border-radius: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.8em;
}

.category-icons .icon i {
    color: #555; /* Icon color */
}

.more-options {
    cursor: pointer;
    font-size: 1.2rem;
    color: #888;
}

/* New styles for the download button animation */
.label-download {
    /* Changed class name to be specific */
    background-color: #1e8dd2; /* Matches original button background */
    border: none; /* No border initially */
    display: inline-flex; /* Use inline-flex to fit into table cell and align items */
    align-items: center;
    border-radius: 5px; /* Matches original button border-radius */
    width: auto; /* Let content define width */
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 8px 15px; /* Matches original button padding */
    position: relative;
    overflow: hidden; /* Hide overflow for the circle's 'before' animation */
    gap: 8px; /* Space between icon and text */
}

/* Pseudo-element for the rotating dots animation */
.label-download::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff; /* White dots */
    width: 8px;
    height: 8px;
    transition: all 0.4s ease;
    border-radius: 100%;
    margin: auto;
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    z-index: 2; /* Ensure it's above the button content */
}

.label-download .input {
    display: none; /* Hide the checkbox input */
}

/* Initial title (e.g., "Download") */
.label-download .title-initial {
    /* Specific class for initial title */
    font-size: 0.9rem; /* Matches original button font size */
    color: #fff;
    transition: all 0.4s ease;
    white-space: nowrap; /* Prevent text wrapping */
    position: relative; /* Needed for z-index, if icon is separate */
    z-index: 1; /* Ensure text is above the animation background */
}

/* Hidden title (e.g., "Installed") */
.label-download .title-installed {
    /* Specific class for installed title */
    font-size: 0.9rem;
    color: #fff;
    transition: all 0.4s ease;
    white-space: nowrap;
    position: absolute; /* Position it where the initial title was */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

/* Circle that contains the icon and animates */
.label-download .circle-animated {
    /* Specific class for animated circle */
    height: 24px; /* Adjusted size to fit button better */
    width: 24px; /* Adjusted size */
    border-radius: 50%;
    background-color: transparent; /* Icon should be visible through this, so transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); /* Initial shadow for pulse effect */
    overflow: hidden; /* Hide the square initially */
    flex-shrink: 0; /* Prevent shrinking in flex container */
    z-index: 1;
}

/* Initial icon (e.g., download icon) */
.label-download .circle-animated .icon {
    color: #fff;
    font-size: 16px; /* Font Awesome icon size */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

/* Square (placeholder for checkmark or other icon after download) */
.label-download .circle-animated .square {
    aspect-ratio: 1;
    width: 15px;
    border-radius: 2px;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

/* Pseudo-element for the installing progress bar */
.label-download .circle-animated::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgba(
        97,
        32,
        32,
        0.2
    ); /* Lighter shade for progress bar */
    width: 100%;
    height: 0;
    transition: all 0.4s ease;
    z-index: -1; /* Behind the icon */
}

/* Styles when the checkbox is checked (animation active) */
.label-download:has(.input:checked) {
    width: 100px; /* Expands to show "Downloaded" message */
    animation: installed 0.4s ease 3.5s forwards;
    background-color: rgb(35, 174, 35); /* Green for "installed" */
    border-color: rgb(35, 174, 35); /* Green border */
}

.label-download .input:checked + .circle-animated {
    animation: pulse 1s forwards, circleDelete 0.2s ease 3.5s forwards;
    rotate: 180deg;
    background-color: transparent; /* Keep transparent during pulse */
}

.label-download .input:checked + .circle-animated::before {
    animation: installing 3s ease-in-out forwards;
}

.label-download .input:checked + .circle-animated .icon {
    opacity: 0;
    visibility: hidden;
}

.label-download .input:checked ~ .circle-animated .square {
    opacity: 1;
    visibility: visible;
}

.label-download .input:checked ~ .title-initial {
    opacity: 0;
    visibility: hidden;
    width: 0; /* Collapse initial title space */
}

.label-download .input:checked ~ .title-installed {
    animation: showInstalledMessage 0.4s ease 3.5s forwards;
}

/* Keyframes (kept as provided, with minor adjustments for installed background) */
@keyframes pulse {
    0% {
        scale: 0.95;
        box-shadow: 0 0 0 0 rgba(127, 36, 36, 0.7);
    }
    70% {
        scale: 1;
        box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
    }
    100% {
        scale: 0.95;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes installing {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(-90deg) translate(5px) rotate(0);
        opacity: 1;
        visibility: visible;
    }
    99% {
        transform: rotate(270deg) translate(5px) rotate(270deg);
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes installed {
    100% {
        width: 100px;
        border-color: rgb(35, 174, 35);
        background-color: rgb(35, 174, 35); /* Ensure background is green */
    }
}

@keyframes circleDelete {
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes showInstalledMessage {
    100% {
        opacity: 1;
        visibility: visible;
        left: 50%; /* Center the "Downloaded" message */
        transform: translateX(-50%);
    }
}

@media (max-width: 1024px) {
    .search-filter-section,
    .resources-table {
        padding-left: 40px;
        padding-right: 40px;
    }
}
@media (max-width: 768px) {
    .header-section,
    .search-filter-section,
    .resources-table {
        padding-left: 20px;
        padding-right: 20px;
    }
    .header-title {
        font-size: 1.8rem;
    }
    .search-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar {
        margin-bottom: 15px;
    }
}
/* .headerr-title {
    font-size: 64px;
    color: #1e8dd2;
    margin-bottom: 10px;
    margin-top: 115px;
    margin-left: 84px;
}

.headerr-subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-left: 84px;
} */

/* Pagination styles */
.pagination-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 70px; /* Match left/right padding of other sections */
    margin-top: 20px;
    background-color: #fff;
    border-top: 1px solid #eee; /* A subtle top border if desired, similar to table rows */
    border-bottom-left-radius: 8px; /* Match container border radius */
    border-bottom-right-radius: 8px; /* Match container border radius */
}

.pagination-info {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #555;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

/* Media queries for responsiveness */
@media (max-width: 1024px) {
    .search-filter-section,
    .resources-table,
    .pagination-section {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    .search-filter-section,
    .resources-table,
    .pagination-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .search-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    .search-bar {
        margin-bottom: 15px;
    }
    .pagination-section {
        flex-direction: column; /* Stack info and buttons vertically */
        align-items: flex-start; /* Align to left */
        gap: 15px; /* Space between info and buttons when stacked */
    }
    .pagination-buttons {
        width: 100%; /* Make buttons fill width when stacked */
        justify-content: stretch; /* Stretch buttons */
    }
    .pagination-btn {
        flex-grow: 1; /* Allow buttons to grow and fill space */
    }
}
