/* downloadable files styles.css */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(30, 64, 175, 0.18) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #000;
}

.container {
    align-items: center;
    margin: 100px auto 20px;
    width: 100%;
    max-width: 800px;
    height: 70vh;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent container from scrolling */
}

h1 {
    text-align: center;
    font-size: 2rem;
    color: #000;
    margin-bottom: 5px;
}

h3 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 10px;
    text-decoration: underline;
}

.search-bar {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
}

.search-bar input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

.pdf-section {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    position: relative; /* For proper scroll containment */
}

.pdf-section::-webkit-scrollbar {
    width: 8px;
}

.pdf-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pdf-section::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.pdf-section::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.pdf-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdf-section ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-section ul li:hover {
    background-color: #f8f9fa;
}

.pdf-section ul li:last-child {
    border-bottom: none;
}

.pdf-section ul li a {
    text-decoration: none;
    color: #000;
    font-size: 15px;
    display: block;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.pdf-section ul li a:hover {
    color: #007bff;
}

.pdf-section ul li span {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure footer stays at bottom */
#footer-container {
    margin-top: auto;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        margin: 80px 10px 20px;
        height: calc(100vh - 100px); /* Adjust height to account for header and margins */
        min-height: 60vh;
        padding: 15px;
        overflow: hidden; /* Maintain scroll containment */
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .search-bar {
        padding: 0 5px;
        margin-bottom: 10px;
    }

    .search-bar input {
        padding: 10px;
        font-size: 14px;
    }

    .pdf-section {
        padding: 15px;
        margin: 0;
        border-radius: 8px;
        height: calc(100% - 120px); /* Adjust height to account for header and search bar */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pdf-section ul li {
        gap: 4px;
    }

    .pdf-section ul li span {
        font-size: 14px;
    }

    .pdf-section ul li a {
        font-size: 14px;
        padding: 8px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .container {
        margin: 60px 5px 15px;
        padding: 10px;
        height: calc(100vh - 80px); /* Further adjust height for smaller screens */
    }

    h1 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .search-bar {
        padding: 0;
    }

    .search-bar input {
        padding: 8px;
        font-size: 13px;
    }

    .pdf-section {
        padding: 10px;
        height: calc(100% - 100px); /* Adjust height for smaller screens */
    }

    .pdf-section ul li {
        gap: 2px;
    }

    .pdf-section ul li span {
        font-size: 13px;
    }

    .pdf-section ul li a {
        font-size: 13px;
        padding: 6px;
    }

    /* Adjust scrollbar for mobile */
    .pdf-section::-webkit-scrollbar {
        width: 4px;
    }
}

/* Landscape Mode */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .container {
        margin: 60px auto 15px;
        height: calc(100vh - 80px); /* Adjust height for landscape mode */
    }

    h1 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .search-bar {
        margin-bottom: 5px;
    }

    .pdf-section {
        height: calc(100% - 90px); /* Adjust height for landscape mode */
    }
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    margin-left: 8px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    background: #e3f2fd;
    color: #1976d2;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.06);
}
.pdf-btn i {
    font-size: 1em;
}
.pdf-btn.view-btn {
    background: #1e3a8a;
    color: #fff;
}
.pdf-btn.view-btn:hover {
    background: #1e40af;
    color: #fff;
}
.pdf-btn.download-btn {
    background: #1e3a8a;
    color: #fff;
}
.pdf-btn.download-btn:hover {
   background: #1e40af;
    color: #fff;
}
@media (max-width: 768px) {
    .pdf-btn {
        font-size: 13px;
        padding: 4px 8px;
        margin-left: 4px;
    }
}
@media (max-width: 480px) {
    .pdf-btn {
        font-size: 12px;
        padding: 3px 6px;
        margin-left: 2px;
    }
}
