/* Catalog Page Styles */

/* Navbar for Catalog Page */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar .logo {
    flex-shrink: 0;
}

.navbar .logo img,
.navbar .logo-img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu > a,
.nav-menu .dropdown > a {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    display: block;
    padding: 10px 0;
}

.nav-menu > a:hover,
.nav-menu > a.active,
.nav-menu .dropdown > a:hover {
    color: #ff6b35;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #ff6b35;
    padding-left: 25px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.lang-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
}

.lang-btn {
    padding: 5px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #1a3a6b;
    color: white;
    border-radius: 3px;
}

.lang-divider {
    color: #ccc;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 20px 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: #f8f9fa;
    color: #ff6b35;
}

.mobile-menu a.submenu {
    padding-left: 40px;
    font-size: 14px;
    font-weight: 400;
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu > a,
    .nav-menu .dropdown > a {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .nav-menu,
    .lang-switcher {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, #1a3a6b 0%, #2d5a9e 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Catalog Section */
.catalog-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.catalog-section h2 {
    font-size: 2rem;
    color: #1a3a6b;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Upload Section */
.upload-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 50px;
}

.upload-form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a3a6b;
    box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* File Input */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 20px;
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: #1a3a6b;
    background: #f0f4f8;
}

.file-input-label i {
    font-size: 2rem;
    color: #1a3a6b;
}

.file-input-label span {
    font-size: 1rem;
    color: #555;
}

.file-info {
    margin-top: 10px;
    padding: 10px 15px;
    background: #e8f4f8;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1a3a6b;
    display: none;
}

.file-info.active {
    display: block;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #1a3a6b;
    color: white;
}

.btn-primary:hover {
    background: #2d5a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 107, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover {
    background: #c82333;
}

/* Catalog List Section */
.catalog-list-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #1a3a6b;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.loading-spinner span {
    display: block;
    font-size: 1.1rem;
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-message p {
    font-size: 1.2rem;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Catalog Card */
.catalog-card {
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #1a3a6b;
}

.catalog-thumbnail {
    width: 100%;
    height: 250px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.catalog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-thumbnail i {
    font-size: 5rem;
    color: #d1d5db;
}

.file-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(26, 58, 107, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.catalog-info {
    padding: 20px;
}

.catalog-info h3 {
    font-size: 1.2rem;
    color: #1a3a6b;
    margin-bottom: 10px;
    font-weight: 700;
}

.catalog-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
}

.catalog-meta i {
    margin-right: 5px;
}

.catalog-actions {
    display: flex;
    gap: 10px;
}

.catalog-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-view {
    background: #1a3a6b;
    color: white;
}

.btn-view:hover {
    background: #2d5a9e;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
}

/* Catalog Modal */
.catalog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    overflow: auto;
    padding: 20px;
}

.catalog-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1400px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #1a3a6b;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e1e4e8;
    color: #333;
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-viewer,
.image-viewer {
    width: 100%;
    height: 100%;
    min-height: 70vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer iframe {
    width: 100%;
    height: 75vh;
    border: none;
}

.image-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.image-viewer img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e1e4e8;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero p {
        font-size: 1rem;
    }

    .upload-section,
    .catalog-list-section {
        padding: 25px 20px;
    }

    .catalog-section h2 {
        font-size: 1.5rem;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog-modal-content {
        max-width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 15px;
    }

    .pdf-viewer iframe {
        height: 400px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 60px 0 40px;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .catalog-thumbnail {
        height: 200px;
    }

    .catalog-actions {
        flex-direction: column;
    }
}
