/**
 * Toolkit Template Styles
 */

.page-template-template-toolkit {
    .toolkit-hero-wrapper {
        gap: var(--spacing-lg);

        @media (max-width: 992px) {
            gap: 0;
        }
        .toolkit-hero-left {
            width: calc(50% - (var(--spacing-lg) / 2));

            @media (max-width: 992px) {
                width: 100%;
            }
            p {
                max-width: 480px;
                text-wrap: pretty;

                @media (max-width: 992px) {
                    max-width: none;
                }
            }
        }
        .toolkit-hero-right {
            width: calc(50% - (var(--spacing-lg) / 2));

            @media (max-width: 992px) {
                width: 100%;
                padding-top: var(--spacing-md);
            }
            .toolkit-hero-right-inner {
                padding: 2.2rem;
                background: linear-gradient(to bottom, #000000 0%, #181818 100%);
                border: 1px solid rgba(var(--color-yellow-rgb), .5);
                box-shadow: 0px 0px 20px rgba(var(--color-yellow-rgb), .5);
                border-radius: var(--border-radius-secondary);

                @media (max-width: 768px) {
                    padding: 1.5rem;
                }
            }
            p, ul {
                text-wrap: pretty;
                
                &:last-child {
                    margin-bottom: 0;
                }
            }
            ul {
                li {
                    &:last-of-type {
                        padding-bottom: 0;
                    }
                }
            }
        }
    }
    .toolkit-content {
        padding-top: 0;
    }
    .accordion-section {
        padding-top: 100px;

        @media (max-width: 768px) {
            padding-top: 50px;
        }
    }
    .accordion-item {
        margin-bottom: 25px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: var(--card-shadow);
        background: linear-gradient(to bottom, #000000 0%, #181818 100%);
        border: 1px solid rgba(255, 255, 255, .5);
        border-radius: var(--border-radius-secondary);
        transition: .3s ease-in-out;

        &:hover, &:focus-visible {
            border: 1px solid rgba(var(--color-yellow-rgb), .5);
            box-shadow: 0px 0px 20px rgba(var(--color-yellow-rgb), .5);
        }
        &:last-of-type {
            margin-bottom: 0px;
        }
    }
    .accordion-header {
        width: 100%;
    }
    .accordion-button {
        width: 100%;
        text-align: left;
        cursor: pointer;
        display: flex;
        align-items: center;
        font-family: var(--font-body);
        font-size: 2rem;
        position: relative;
        background: transparent;
        border: none;
        padding: 2.2rem;
        transition: all 0.3s ease;

        @media (max-width: 768px) {
            padding: 1.5rem;
        }
        &:hover {
            .toggle-icon {
                transform: scale(1.2);
                background-color: var(--color-orange);
            }
        }
        &:focus {
            outline: none;
        }
        &.collapsed {
            .icon-minus {
                display: none;
            }
            .icon-plus {
                display: block;
            }
        }
        &:not(.collapsed) {
            .icon-minus {
                display: block;
            }
            .icon-plus {
                display: none;
            }
        }
    }
    .toggle-icon {
        position: relative;
        display: inline-block;
        width: 30px;
        height: 30px;
        background-color: var(--color-primary);
        border-radius: 50%;
        border: 2px solid white;
        transition: .3s ease-in-out;

        span {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 1rem;
            color: white;
        }
    }
    .accordion-title {
        margin-left: var(--spacing-sm);
        color: white;
        font-family: var(--font-heading-primary);
        font-weight: bold;
        font-size: 1.5rem;
        line-height: 1.2;
        margin-top: 4px;

        @media (max-width: 768px) {
            font-size: 1.3rem;
        }
    }
    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        
        .downloads {
            padding: 2.2rem;
            padding-top: 0;
            opacity: 0;
            transition: opacity 0.2s ease;

            @media (max-width: 768px) {
                padding: 1.5rem;
                padding-top: 0;
            }
        }
        &.open {
            max-height: 5000px; /* Large enough to accommodate content */

            .downloads {
                opacity: 1;
            }
        }
    }
    .downloads {
        .download-intro-text {
            padding-bottom: 2.2rem;

            @media (max-width: 768px) {
                padding-bottom: 1.5rem;
            }
            p {
                strong {
                    font-weight: bold;
                }
                &:last-of-type {
                    margin-bottom: 0px;
                }
            }
        }      
        .download-item {
            display: flex;
            flex-wrap: wrap;
            border-top: 1px solid rgba(255, 255, 255, .5);
            padding-top: 2.2rem;
            margin-bottom: 2.2rem;

            @media (max-width: 768px) {
                flex-direction: column-reverse;
                padding-top: 1.5rem;
                margin-bottom: 1.5rem;
            }
            &:last-of-type {
                margin-bottom: 0;
            }
            .download-img {
                width: 250px;

                @media (max-width: 768px) {
                    width: 100%;
                    max-width: 250px;
                    margin: 0px auto;
                }
                img {
                    width: 100%;
                    display: block;
                }
            }
            .download-content {
                width: calc(100% - 250px);
                padding-left: 2.2rem;

                @media (max-width: 768px) {
                    width: 100%;
                    padding-left: 0;
                    padding-bottom: 1.5rem;
                }
                h3 {
                    font-size: 1.5rem;
                    line-height: 1.2;

                    @media (max-width: 768px) {
                        font-size: 1.3rem;
                    }
                }
                p, ul {
                    strong {
                        font-weight: bold;
                    }
                }
                p {
                    text-wrap: pretty;
                }
                ul {
                    padding-left: 40px;

                    @media (max-width: 768px) {
                        padding-left: 30px;
                    }
                }
                .download-share {
                    p {
                        margin-bottom: 1rem;
                    }
                    a {
                        margin-bottom: 1rem;

                        &:last-of-type {
                            margin-bottom: 0;
                        }
                    }
                }
            }
        }
    }
}