/* Models Page Specific Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    padding: 7rem 0 4rem;
    text-align: center;
    margin-top: 80px; /* Account for fixed header */
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Model Categories */
.model-categories {
    padding: 5rem 0 3rem;
    background-color: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.category-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(49, 130, 206, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
    font-size: 1.75rem;
}

.category-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    color: var(--text);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.model-count {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Model Search & Filters */
.model-search {
    padding: 2rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.search-filters {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: var(--bg);
    color: var(--text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
}

.filter-select {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: var(--bg);
    color: var(--text);
    cursor: pointer;
    min-width: 150px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

#resetFilters {
    margin-left: auto;
    white-space: nowrap;
}

/* Models Grid */
.models-grid-section {
    padding: 5rem 0;
    background-color: var(--bg);
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.model-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    position: relative;
}

.model-card.featured {
    border: 2px solid var(--accent);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.model-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

.model-preview {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.model-preview .model-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.model-card:hover .model-img {
    transform: scale(1.05);
}

.model-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover .model-overlay {
    opacity: 1;
}

.preview-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.model-type, .model-industry {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.model-type {
    background-color: rgba(49, 130, 206, 0.1);
    color: var(--accent);
}

.model-industry {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--text-light);
}

.model-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.model-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.model-description {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

.model-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.model-difficulty,
.model-downloads {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.model-difficulty i {
    font-size: 0.8em;
}

.model-difficulty.beginner {
    color: var(--success);
}

.model-difficulty.intermediate {
    color: var(--warning);
}

.model-difficulty.advanced {
    color: var(--danger);
}

.model-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.model-footer {
    display: flex;
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
}

.model-footer .btn {
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
}

.model-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal-content {
    background-color: var(--bg);
    margin: 2rem auto;
    max-width: 900px;
    width: 90%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem 1rem;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text);
}

.modal-body {
    padding: 0;
}

.model-preview-container {
    display: flex;
    min-height: 500px;
}

.model-preview-sidebar {
    width: 280px;
    padding: 1.5rem;
    border-right: 1px solid var(--border);
    background-color: var(--bg-secondary);
}

.model-preview-sidebar h4 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--text);
    font-size: 1.1rem;
}

.model-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.model-details-list li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.model-details-list strong {
    color: var(--text);
    font-weight: 500;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.preview-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.model-preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg);
    min-height: 300px;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-light);
}

.preview-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    #resetFilters {
        margin-left: 0;
        width: 100%;
    }
    
    .model-preview-container {
        flex-direction: column;
    }
    
    .model-preview-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
        margin-top: 70px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .model-footer {
        flex-direction: column;
    }
    
    .model-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .model-card {
        margin: 0 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .model-preview-content {
        padding: 1.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.model-card.visible {
    opacity: 1;
}

/* Staggered animation delays */
.model-card:nth-child(1) { animation-delay: 0.1s; }
.model-card:nth-child(2) { animation-delay: 0.2s; }
.model-card:nth-child(3) { animation-delay: 0.3s; }
.model-card:nth-child(4) { animation-delay: 0.4s; }
.model-card:nth-child(5) { animation-delay: 0.5s; }
.model-card:nth-child(6) { animation-delay: 0.6s; }
