/* Downloadable Resources Component - Scoped Styles */
.downloadable-resources-wrapper {
    width: 100%;
    background-color: var(--color-white);
    padding: 150px 0 0;
    position: relative;
    
    .downloadable-resources-headline {
        font-size: var(--font-size-downloadable-headline);
        line-height: var(--font-lh-downloadable-headline);
        font-weight: 600;
        color: var(--color-blue);
        text-align: center;
        margin: 0 auto 120px;
        padding: 0 20px;
        max-width: 1080px;
        z-index: 2;
        position: relative;
        text-transform: uppercase;
    }

    .downloadable-resources-floating-container {
        margin: 0 auto;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 100%;
    }

    .downloadable-resources-content {
        width: 1440px;
        position: relative;
        background-color: var(--color-red);
        padding: 150px 0 100px;
        margin: 0 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        z-index: 1;
        clip-path: var(--clip-path-smooth-bowl);
    }

    .downloadable-resources-category-container {
        width: 840px;
        background-color: var(--color-yellow);
        text-align: center;
        padding: 20px 40px;
        position: absolute;
        top: -40px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
        clip-path: var(--clip-path-headline-bowl);
    }

    .downloadable-resources-category-headline {
        margin: 0;
        color: var(--color-nav-gray);
        font-size: var(--font-size-downloadable-category);
        line-height: var(--font-lh-downloadable-category);
        font-weight: 600;
        text-align: center;
    }

    .downloadable-resources-grid {
        display: grid;
        /* Start with 2 columns by default */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px;
        width: 100%;
        max-width: 840px; /* Width for 2 columns */
        position: relative;
        z-index: 2;
        padding: 30px 0;
        margin: 0 auto;

        /* When we have only one item, center it */
        &:has(> :only-child) {
            grid-template-columns: minmax(0, 1fr);
            max-width: 420px; /* Width for 1 column - half of 2 columns */
            
            .downloadable-resource-item {
                justify-self: center;
                max-width: 100%;
            }
        }

        /* When we have 3 or more items, expand to 3 columns */
        &:has(> :nth-child(3)) {
            grid-template-columns: repeat(3, minmax(0, 1fr));
            max-width: 1280px; /* Width for 3 columns */
        }
    }

    .downloadable-resource-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
    }
    
    .download-audience {
        font-size: var(--font-size-downloadable-audience);
        line-height: var(--font-lh-downloadable-audience);
        font-weight: 700;
        color: var(--color-yellow);
        text-transform: uppercase;
        min-height: var(--font-lh-downloadable-audience);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .download-title {
        font-size: var(--font-size-body);
        line-height: var(--font-lh-body);
        font-weight: 700;
        color: var(--color-white);
        text-transform: uppercase;
        min-height: calc(var(--font-lh-body) * 2);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
    }
    
    .download-image-container {
        width: 100%;
        
        .download-image {
            width: 100%;
            height: 100%;
            margin-left: 40px;
        }
    }
    
    .download-button {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        background-color: var(--color-yellow);
        color: var(--color-nav-gray);
        font-size: var(--font-size-downloadable-button);
        line-height: var(--font-lh-downloadable-button);
        font-weight: 600;
        text-decoration: none;
        padding: 8px 25px;
        border-radius: 20px;
        transition: all 0.3s ease;
        border: 2px solid var(--color-yellow);
        cursor: pointer;
        width: 100%;
        max-width: 200px;
        
        .download-button-text {
            white-space: nowrap;
        }
        
        .download-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            transition: all 0.3s ease;
            
            /* Style for both fill and stroke SVGs */
            fill: currentColor;
            stroke: currentColor;
        }
        
        &:hover {
            background-color: var(--color-nav-gray);
            color: var(--color-yellow);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);

            .download-icon {
                /* SVG will inherit yellow color from parent with high specificity */
                fill: var(--color-yellow) !important;
                stroke: var(--color-yellow) !important;
                
                path {
                    fill: var(--color-yellow) !important;
                    stroke: var(--color-yellow) !important;
                }
                
                circle, rect, line, polyline, polygon {
                    fill: var(--color-yellow) !important;
                    stroke: var(--color-yellow) !important;
                }
            }
        }
        
        &:focus {
            outline: 2px solid var(--color-white);
            outline-offset: 2px;
        }
    }
    
    .downloadable-resources-empty-state {
        text-align: center;
        color: var(--color-white);
        font-size: var(--font-size-body);
        line-height: var(--font-lh-body);
        position: relative;
        z-index: 2;
        
        a {
            color: var(--color-yellow);
            text-decoration: underline;
            
            &:hover {
                color: var(--color-white);
            }
        }
    }
    
    /* Responsive Design */
    @media screen and (max-width: 1599px) {

        .downloadable-resources-category-container {
            width: 580px;
        }
    }

    @media screen and (max-width: 1024px) {
        padding: 50px 0 0;

        .downloadable-resources-category-container {
            width: 90%;
            padding: 20px;
            max-width: 460px;
        }

        .downloadable-resources-grid {
            padding: 30px 20px;
            gap: 20px;
            max-width: 90%;

            /* Maintain single column width on tablet */
            &:has(> :only-child) {
                max-width: min(420px, 90%);
            }

            &:has(> :nth-child(3)) {
                max-width: 90%;
            }
        }
    }

    @media screen and (max-width: 768px) {
        .downloadable-resources-headline {
            margin: 0 auto 80px;
        }
        .downloadable-resources-content {
            padding: 70px 0 40px;
            margin: 0 20px;
            clip-path: var(--clip-path-mobile-bowl);
        }

        .downloadable-resources-category-container {
            width: calc(100% - 120px);
            padding: 20px;
        }

        .downloadable-resources-grid {
            grid-template-columns: minmax(0, 1fr);
            max-width: calc(100% - 40px);
            gap: 30px;
            padding: 30px 10px;

            /* Maintain single column width on mobile */
            &:has(> :only-child) {
                max-width: 100%;
            }

            /* Override 3-column layout on mobile */
            &:has(> :nth-child(3)) {
                grid-template-columns: minmax(0, 1fr);
                max-width: calc(100% - 40px);
            }
        }
    }

    @media screen and (max-width: 400px) {
        .downloadable-resources-category-headline {
            font-size: 1.4rem;
            line-height: 2rem;
        }
    }
} 

.downloadable-resources-page .downloadable-resources-wrapper {
    padding: 340px 0 80px;
}

.downloadable-resources-page .downloadable-resources-wrapper .downloadable-resources-headline {
    display: none;
}

@media screen and (max-width: 1024px) {
    .downloadable-resources-page .downloadable-resources-wrapper {
        padding: 220px 0 80px;
    }
}