/**
 * Modern Projects - Public Styles
 */

/* Reset e Base */
.modern-projects-wrapper,
.modern-projects-archive-wrapper,
.modern-projects-single-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Archive Header */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.archive-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.archive-description {
    font-size: 1.1em;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 50px;
}

.projects-grid.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.projects-grid.layout-list {
    grid-template-columns: 1fr;
}

.projects-grid.layout-masonry {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-flow: dense;
}

/* Project Item */
.project-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.project-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-item:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.5em;
    margin: 0 0 15px;
    font-weight: 600;
}

.project-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-title a:hover {
    color: #0073aa;
}

.project-categories {
    margin-bottom: 15px;
}

.project-category {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 5px 5px 0;
    background: #f0f0f0;
    color: #666;
    border-radius: 20px;
    font-size: 0.85em;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.project-category:hover {
    background: #0073aa;
    color: #fff;
}

.project-excerpt {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.project-link:hover {
    background: #005a87;
}

.project-link .arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.project-link:hover .arrow {
    transform: translateX(5px);
}

/* Single Project */
.project-single {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.project-featured-image {
    grid-column: 1 / -1;
    margin-bottom: 30px;
}

.project-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.project-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 30px;
}

.project-header .project-title {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.project-content {
    grid-column: 1 / 2;
}

.project-content p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-sidebar {
    grid-column: 2 / 3;
}

.project-details,
.project-tags {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.project-details h3,
.project-tags h3 {
    font-size: 1.2em;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-item {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.detail-item strong {
    color: #333;
    margin-bottom: 5px;
}

.detail-item span {
    color: #666;
}

.project-url-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: background 0.3s ease;
}

.project-url-link:hover {
    background: #005a87;
}

.project-tag {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px 5px 0 0;
    background: #e0e0e0;
    color: #555;
    border-radius: 15px;
    font-size: 0.9em;
    text-decoration: none;
    transition: background 0.3s ease;
}

.project-tag:hover {
    background: #0073aa;
    color: #fff;
}

/* Gallery */
.project-gallery {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.project-gallery h3 {
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #0073aa;
    color: #fff;
}

/* Filter */
.projects-filter {
    text-align: center;
    margin-bottom: 40px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-button {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
}

.filter-button:hover,
.filter-button.active {
    background: #0073aa;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid.layout-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .project-single {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        grid-column: 1 / 2;
    }
    
    .archive-title {
        font-size: 2em;
    }
    
    .project-header .project-title {
        font-size: 2em;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* No Projects Found */
.no-projects {
    text-align: center;
    padding: 60px 20px;
}

.no-projects p {
    font-size: 1.2em;
    color: #666;
}

/* Project Categories Grid */
.project-categories-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 50px;
}

.project-categories-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.project-categories-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.project-categories-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.category-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-content {
    padding: 20px;
    text-align: center;
}

.category-name {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.category-count {
    color: #999;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .project-categories-grid.columns-4,
    .project-categories-grid.columns-3,
    .project-categories-grid.columns-2 {
        grid-template-columns: 1fr;
    }
}
