/* Projects Showcase Frontend Styles */

.projects-showcase {
    margin: 20px 0;
}

/* Single Project Styles */
.single-project {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.single-project-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.single-project-header .project-title {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    color: #333;
    font-weight: bold;
}

.project-category {
    margin: 10px 0;
}

.category-label {
    font-weight: bold;
    color: #666;
    margin-right: 8px;
}

.category-name {
    background: #0073aa;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.project-location {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.location-icon {
    font-size: 16px;
}

.location-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.single-project-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.single-project-content .project-image {
    flex: 0 0 300px;
}

.single-project-content .project-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.single-project-content .project-details {
    flex: 1;
}

.single-project-content .project-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.single-project-content .project-link {
    margin: 15px 0;
}

.single-project-content .project-website {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.single-project-content .project-website:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.project-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.single-project-navigation {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-button {
    display: inline-block;
    background: #f1f1f1;
    color: #555;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background: #e1e1e1;
    color: #333;
    text-decoration: none;
}

.projects-controls {
    margin-bottom: 20px;
    text-align: center;
}

.layout-toggle {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.layout-toggle:hover {
    background: #005a87;
}

.layout-toggle.active {
    background: #005a87;
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Grid Layout */
.grid-layout .projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.grid-layout .project-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 33%;
    margin: 0;
    max-width: 350px;
}

.grid-layout .project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.grid-layout .project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.grid-layout .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-layout .project-card:hover .project-image img {
    transform: scale(1.05);
}

.grid-layout .project-content {
    padding: 20px;
}

.grid-layout .project-title {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    font-weight: bold;
    color: #333;
}

.grid-layout .project-category {
    margin: 0 0 10px 0;
}

.grid-layout .category-badge {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.grid-layout .project-location {
    margin: 0 0 15px 0;
    justify-content: flex-start;
}

.grid-layout .location-icon {
    font-size: 14px;
}

.grid-layout .location-text {
    font-size: 13px;
    color: #888;
}

.grid-layout .project-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.grid-layout .project-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-layout .project-link {
    margin: 0;
}

.grid-layout .project-website,
.grid-layout .project-details {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.grid-layout .project-details {
    background: #666;
}

.grid-layout .project-website:hover,
.grid-layout .project-details:hover {
    color: white;
    text-decoration: none;
}

.grid-layout .project-website:hover {
    background: #005a87;
}

.grid-layout .project-details:hover {
    background: #555;
}

/* List Layout */
.list-layout .projects-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-layout .project-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.list-layout .project-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.list-layout .project-image {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
}

.list-layout .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-layout .project-content {
    flex: 1;
}

.list-layout .project-title {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    font-weight: bold;
    color: #333;
}

.list-layout .project-category {
    margin: 0 0 10px 0;
}

.list-layout .category-badge {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.list-layout .project-location {
    margin: 0 0 15px 0;
    justify-content: flex-start;
}

.list-layout .location-icon {
    font-size: 14px;
}

.list-layout .location-text {
    font-size: 13px;
    color: #888;
}

.list-layout .project-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.list-layout .project-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.list-layout .project-link {
    margin: 0;
}

.list-layout .project-website,
.list-layout .project-details {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.list-layout .project-details {
    background: #666;
}

.list-layout .project-website:hover,
.list-layout .project-details:hover {
    color: white;
    text-decoration: none;
}

.list-layout .project-website:hover {
    background: #005a87;
}

.list-layout .project-details:hover {
    background: #555;
}

/* No Projects Message */
.no-projects {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Pagination Styles */
.projects-pagination {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-link:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}

.pagination-link.current-page {
    background: #007cba;
    border-color: #007cba;
    color: #ffffff;
    font-weight: 600;
    cursor: default;
}

.pagination-link.current-page:hover {
    background: #007cba;
    border-color: #007cba;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

.pagination-link.first-page,
.pagination-link.last-page,
.pagination-link.prev-page,
.pagination-link.next-page {
    font-size: 18px;
    font-weight: bold;
    min-width: 44px;
}

.pagination-link.first-page:hover,
.pagination-link.last-page:hover,
.pagination-link.prev-page:hover,
.pagination-link.next-page:hover {
    background: #007cba;
    border-color: #007cba;
    color: #ffffff;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .projects-pagination {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .pagination-controls {
        gap: 6px;
    }
    
    .pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-link.first-page,
    .pagination-link.last-page,
    .pagination-link.prev-page,
    .pagination-link.next-page {
        font-size: 16px;
        min-width: 40px;
    }
    
    .pagination-ellipsis {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pagination-controls {
        gap: 4px;
    }
    
    .pagination-link {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .pagination-link.first-page,
    .pagination-link.last-page,
    .pagination-link.prev-page,
    .pagination-link.next-page {
        font-size: 14px;
        min-width: 36px;
    }
    
    .pagination-ellipsis {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Pagination loading state */
.pagination-link.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-link.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.pagination-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.pagination-link[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .projects-pagination {
        border-top-color: #444;
    }
    
    .pagination-info {
        color: #ccc;
    }
    
    .pagination-link {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .pagination-link:hover {
        background: #3a3a3a;
        border-color: #007cba;
        color: #007cba;
    }
    
    .pagination-link.current-page {
        background: #007cba;
        border-color: #007cba;
        color: #ffffff;
    }
    
    .pagination-ellipsis {
        color: #999;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid-layout .projects-container {
        grid-template-columns: 1fr;
    }
    
    .list-layout .project-card {
        flex-direction: column;
        text-align: center;
    }
    
    .list-layout .project-image {
        width: 100%;
        height: 200px;
    }
    
    .projects-controls {
        margin-bottom: 15px;
    }
    
    .layout-toggle {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Single project responsive */
    .single-project-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .single-project-content .project-image {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .single-project-header .project-title {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .projects-container {
        gap: 15px;
    }
    
    .grid-layout .project-content,
    .list-layout .project-card {
        padding: 15px;
    }
    
    .layout-toggle {
        padding: 6px 12px;
        font-size: 12px;
        margin: 0 2px;
    }
}
