@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F0F2F5;
    color: #333333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================
   NAVBAR
   ============================ */
.navbar {
    background-color: #1E3456;
    padding: 8px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-logo img {
    max-height: 120px;
    vertical-align: middle;
    border-radius: 8px;
    padding: 4px 8px;
    background-color: white;
}

.navbar-title {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background-color: #1E3456;
    color: white;
    margin-top: auto;
}

.footer-top {
    padding: 20px 40px;
}

.footer-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 40px;
    text-align: center;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ============================
   SEARCH SECTION
   ============================ */
.search-section {
    background: linear-gradient(135deg, #1E3456 0%, #2C3E6B 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.search-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.search-bar {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-bar button {
    background-color: #E8A820;
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s;
}

.search-bar button:hover {
    background-color: #D4951C;
}

/* Search Filters */
.search-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.search-filters select {
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-filters select option {
    color: #333333;
    background-color: white;
}

/* ============================
   CONTENT SECTION
   ============================ */
.content-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

/* Card */
.card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: contain;
    background-color: #f5f5f5;
    display: block;
    padding: 8px;
}

.card-info {
    padding: 12px 15px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1E3456;
    text-align: center;
}

/* ============================
   PAGINATION
   ============================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.pagination button {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.2s;
}

.pagination button.active {
    background-color: #1E3456;
    color: white;
    border-color: #1E3456;
}

.pagination button:not(.active):hover {
    background-color: #f0f0f0;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================
   PDF MODAL
   ============================ */
.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pdf-modal.hidden {
    display: none;
}

.pdf-modal-content {
    width: 90%;
    height: 90%;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-modal-header {
    background-color: #1E3456;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-modal-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.pdf-modal iframe {
    width: 100%;
    flex: 1;
    border: none;
}

/* ============================
   LOADING / NO RESULTS
   ============================ */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading.hidden {
    display: none;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results.hidden {
    display: none;
}

/* ============================
   UPLOAD PAGE
   ============================ */
.upload-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 0 20px;
    width: 100%;
}

.upload-container h2 {
    color: #1E3456;
    margin-bottom: 10px;
}

.upload-container p {
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #1E3456;
    background-color: #f8f9fd;
}

.upload-icon {
    font-size: 3rem;
    color: #1E3456;
    margin-bottom: 15px;
}

.upload-progress {
    margin-top: 20px;
}

.upload-progress.hidden {
    display: none;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1E3456, #2C3E6B);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
}

.upload-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
}

.upload-result.hidden {
    display: none;
}

.upload-result.success {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.upload-result.error {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.hidden {
    display: none !important;
}

/* ============================
   RESPONSIVENESS
   ============================ */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-section {
        padding: 30px 15px;
    }
    .navbar {
        padding: 12px 20px;
    }
    .navbar-logo img {
        max-height: 45px;
    }
    .footer-top {
        padding: 20px;
    }
    .footer-bottom {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .navbar {
        padding: 10px 15px;
    }
    .navbar-logo img {
        max-height: 38px;
    }
    .upload-area {
        padding: 40px 20px;
    }
    .search-title {
        font-size: 1.4rem;
    }
    .footer-logo img {
        max-height: 40px;
    }
}
