/* Featured Projects Widget Styles */
.featured-projects-widget {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Poppins', sans-serif;
}

.featured-projects-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
    height: 670px;
}

/* Sidebar Styles */
.projects-sidebar {
    position: sticky;
    top: 100px;
    height: 670px;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 0 1 auto;
}

/* Sidebar image below navigation */
.sidebar-image {
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 0px;
    overflow: hidden;
    width: 335px;
    height: 300px;
    display: flex;
    flex-shrink: 0;
}

.sidebar-image.sidebar-project-item {
    position: relative;
}

.sidebar-image-section {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.sidebar-image-section.active {
    display: block;
}

.sidebar-image-section a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 0px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: block;
    min-height: 100%;
    min-width: 100%;
}

.sidebar-image a:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.widget-title {
    color: #2b7194;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    margin-bottom: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-description {
    color: #676b6f;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    margin-bottom: 16px;
}

.widget-description strong {
    color: #676b6f;
    font-weight: 600;
}

.project-categories {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.project-categories li {
    margin-bottom: 4px;
}

.category-link {
    color: #484b4f;
    text-decoration: none;
    font-size: 21px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    line-height: 42px;
}

.category-link:hover {
    color: #666;
}

.category-link.active {
    color: #333;
    font-weight: 700;
}

.view-all-btn {
    background: #c0d42f;
    color: #333;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-bottom: 55px;
    border: none;
    cursor: pointer;
    
}

.view-all-btn:hover {
    background: #a8c229;
    transform: translateY(-2px);
}

/* Projects Content */
.projects-content {
    position: relative;
}

.project-section {
    display: none;
}

.project-section.active {
    display: block;
}

/* NEW LAYOUT: 2 small squares stacked + 1 large rectangle on right */
.projects-masonry {
    display: grid;
    grid-template-columns: 335px 682px;
    grid-template-rows: 300px 300px;
    gap: 6px;
    height: 606px;
    width: 1023px;
}

/* Project Items - Custom positioning */
.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

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

/* Custom Grid positioning */
.project-item:nth-child(1) {
    /* Large image on the right */
    grid-column: 2;
    grid-row: 1 / 3;
}

.project-item:nth-child(2) {
    /* Top left small square */
    grid-column: 1;
    grid-row: 1;
}

.project-item:nth-child(3) {
    /* Bottom left small square */
    grid-column: 1;
    grid-row: 2;
}

/* Hide additional items if more than 3 in main grid */
.project-item:nth-child(n+4) {
    display: none;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: all 0.3s ease;
    display: block;
    min-height: 100%;
    min-width: 100%;
}

.project-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

/* Project Overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

/* Sidebar image overlay */
.sidebar-image a:hover .project-overlay {
    opacity: 1;
}

.project-overlay h4 {
    font-size: 19px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.3;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Sidebar content is now handled by flexbox above */

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-projects-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .projects-sidebar {
        position: static;
        height: auto;
        flex-direction: column;
    }
    
    .sidebar-image {
        position: static;
        width: 100%;
        height: 300px;
        margin-top: 20px;
    }
    
    .projects-masonry {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 15px;
        height: 615px;
        width: 100%;
    }
    
    .project-item:nth-child(1) {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    
    .project-item:nth-child(2) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .project-item:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 768px) {
    .featured-projects-container {
        gap: 30px;
        padding: 20px 15px;
        grid-template-columns: 1fr;
    }
    
    .widget-title {
        font-size: 24px;
    }
    
    .widget-description {
        font-size: 14px;
    }
    
    .category-link {
        font-size: 16px;
    }
    
    .projects-sidebar {
        height: auto;
        position: static;
    }
    
    .sidebar-image {
        position: static;
        width: 100%;
        height: 250px;
        margin-top: 20px;
    }
    
    .sidebar-image img {
        height: 100%;
        aspect-ratio: 1;
    }
    
    .projects-masonry {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 250px);
        gap: 15px;
        height: auto;
        width: 100%;
    }
    
    .project-item:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .project-item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .project-item:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }
    
    .project-overlay h4 {
        font-size: 16px;
    }
}

/* Loading state for empty sections */
.project-section:not(.active) {
    display: none;
}

.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-style: italic;
}