/* Helpful Resources Block Styles */

/* Main Block Styles */
.helpfulresources-wrapper {
    position: relative;
}

.helpfulresources-content {
    width: 100%;
}

/* Tab Buttons Styles */
.helpfulresources-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.tab-button {
    padding: 12px 24px;
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    min-width: 250px;
}

.tab-button:hover {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.tab-button.active {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Tab Content Styles */
.tab-content-wrapper {
    position: relative;
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

.tab-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.tab-copy {
    margin-bottom: 40px;
}

/* Files Grid Styles */
.files-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 80px 0;
}

/* When there are exactly 2 files, show 2 per row on desktop */
.files-grid:has(.file-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

.file-card {
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.file-title {
    border-left: 4px solid var(--secondary);
    padding: 10px 0 10px 10px;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.file-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.file-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.file-button.download {
    background-color: var(--primary);
    color: white;
}

.file-button.download:hover {
    background-color: var(--secondary);
}

.file-button.view {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.file-button.view:hover {
    background-color: var(--primary);
    color: white;
}

/* FAQs Section Styles */
.faqs-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.faqs-title-col {
    flex: 0 0 30%;
}

.faqs-content-col {
    flex: 0 0 calc(70% - 30px);
}

.faqs-title {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 0;
}

.faqs-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border-radius: 30px;
    overflow: hidden;
}

.faq-question {
    background-color: white;
    border: 2px solid var(--secondary);
    border-radius: 30px;
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(var(--secondary-rgb), 0.1);
}

.faq-arrow {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    background-color: white;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 1000px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .files-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Override the 2-item rule on tablet/mobile */
    .files-grid:has(.file-card:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }

    .faqs-title-col {
        flex: 0 0 100%;
    }

    .faqs-content-col {
        flex: 0 0 100%;
    }
}

@media (max-width: 767px) {
    .helpfulresources-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .tab-button {
        width: 100%;
        text-align: center;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }

    /* Override the 2-item rule on mobile */
    .files-grid:has(.file-card:nth-child(2):last-child) {
        grid-template-columns: 1fr;
    }

    .file-buttons {
        flex-direction: column;
    }

    .tab-title {
        font-size: 2rem;
    }
}

/* Spacing Classes */
.mt-small {
    margin-top: 30px;
}

.mt-medium {
    margin-top: 60px;
}

.mt-large {
    margin-top: 90px;
}

.mb-small {
    margin-bottom: 30px;
}

.mb-medium {
    margin-bottom: 60px;
}

.mb-large {
    margin-bottom: 90px;
}