/**
 * Q&A Accordion Styles
 * Placer denne fil i dit child theme under /spørgsmål-accordion/qa-accordion-style.css
 */

/* Import Chivo font */
@import url('https://fonts.googleapis.com/css2?family=Chivo:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Container */
.qa-accordion-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: 'Chivo', sans-serif !important;
}

/* Title */
.qa-accordion-title {
    font-family: 'Chivo', sans-serif !important;
    font-size: 2.5rem;
    font-weight: 600;
    color: #2e2e2e;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
	display:none;
}

/* Accordion */
.qa-accordion {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(140, 113, 49, 0.1);
    overflow: hidden;
    border: 1px solid rgba(140, 113, 49, 0.1);
}

/* Q&A Items */
.qa-item {
    border-bottom: 1px solid rgba(140, 113, 49, 0.1);
    transition: all 0.3s ease;
}

.qa-item:last-child {
    border-bottom: none;
}

.qa-item:hover {
    background-color: rgba(140, 113, 49, 0.02);
}

/* Questions (buttons) */
.qa-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Chivo', sans-serif !important;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.qa-question:hover {
    color: #2e2e2e;
    background-color: rgba(140, 113, 49, 0.05);
}

.qa-question:focus {
    outline: 2px solid #2e2e2e;
    outline-offset: -2px;
    background-color:#FDFCFB!important;
    color: #333!important;
}

.qa-question[aria-expanded="true"] {
    color: #2e2e2e;
    background-color: rgba(140, 113, 49, 0.08);
}

.qa-question[aria-expanded="true"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #2e2e2e;
}

/* Question Text */
.qa-question-text {
    flex: 1;
    margin-right: 1rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
}

/* Toggle Icon */
.qa-toggle-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #2e2e2e;
    transition: transform 0.3s ease;
}

.qa-question[aria-expanded="true"] .qa-toggle-icon {
    transform: rotate(180deg);
}

.qa-toggle-icon svg {
    width: 100%;
    height: 100%;
}

/* Answers */
.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(140, 113, 49, 0.02);
}

.qa-answer.active {
    max-height: 500px; /* Adjust based on content */
}

.qa-answer-content {
    padding: 1rem 2rem 1.5rem 2rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.qa-answer.active .qa-answer-content {
    opacity: 1;
    transform: translateY(0);
}

/* Answer Text Styling */
.qa-answer-content p {
    font-family: 'Chivo', sans-serif !important;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: #292929;
    margin: 1rem 0 1rem 0;
}

.qa-answer-content p:last-child {
    margin-bottom: 0;
}

.qa-answer-content ul {
    font-family: 'Chivo', sans-serif !important;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    padding-left: 1.5rem;
}

.qa-answer-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

.qa-answer-content li::marker {
    color: #8C7131;
}

/* ===========================================
   PDF File Attachment Styling
   =========================================== */

.qa-file-attachment {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(140, 113, 49, 0.15);
}

.qa-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: rgba(140, 113, 49, 0.08);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid rgba(140, 113, 49, 0.15);
}

.qa-file-link:hover {
    background-color: rgba(140, 113, 49, 0.15);
    border-color: rgba(140, 113, 49, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(140, 113, 49, 0.15);
}

.qa-file-link:focus {
    outline: 2px solid #8C7131;
    outline-offset: 2px;
}

/* PDF Icon */
.qa-file-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c93c37;
    background-color: rgba(201, 60, 55, 0.1);
    border-radius: 6px;
    padding: 4px;
}

.qa-file-icon svg {
    width: 100%;
    height: 100%;
}

/* File Info */
.qa-file-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.qa-file-name {
    font-family: 'Chivo', sans-serif !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2e2e2e;
    line-height: 1.3;
    word-break: break-word;
}

.qa-file-size {
    font-family: 'Chivo', sans-serif !important;
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
    line-height: 1.2;
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 768px) {
    .qa-accordion-container {
        margin: 1rem;
    }
    
    .qa-accordion-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .qa-question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    
    .qa-answer-content {
        padding: 0 1.5rem 1.25rem 1.5rem;
    }
    
    .qa-answer-content p,
    .qa-answer-content ul {
        font-size: .7rem!important;
    }
    
    /* File attachment responsive */
    .qa-file-link {
        padding: 0.6rem 0.85rem;
        gap: 0.6rem;
    }
    
    .qa-file-icon {
        width: 28px;
        height: 28px;
    }
    
    .qa-file-name {
        font-size: 0.9rem;
    }
    
    .qa-file-size {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .qa-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .qa-answer-content {
        padding: 0 1rem 1rem 1rem;
    }

    
    .qa-accordion-title {
        font-size: 1.8rem;
    }
    
    /* File attachment small screens */
    .qa-file-attachment {
        margin-top: 1rem;
        padding-top: 0.85rem;
    }
    
    .qa-file-link {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        width: 100%;
    }
    
    .qa-file-icon {
        width: 26px;
        height: 26px;
    }
    
    .qa-file-name {
        font-size: 0.85rem;
    }
}

/* ===========================================
   Animations
   =========================================== */

@keyframes accordionOpen {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes accordionClose {
    from {
        max-height: 500px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

/* Loading animation for better UX */
.qa-accordion-container.loading .qa-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.qa-accordion-container.loading .qa-item:nth-child(1) { animation-delay: 0.1s; }
.qa-accordion-container.loading .qa-item:nth-child(2) { animation-delay: 0.2s; }
.qa-accordion-container.loading .qa-item:nth-child(3) { animation-delay: 0.3s; }
.qa-accordion-container.loading .qa-item:nth-child(4) { animation-delay: 0.4s; }
.qa-accordion-container.loading .qa-item:nth-child(5) { animation-delay: 0.5s; }
.qa-accordion-container.loading .qa-item:nth-child(6) { animation-delay: 0.6s; }
.qa-accordion-container.loading .qa-item:nth-child(7) { animation-delay: 0.7s; }
.qa-accordion-container.loading .qa-item:nth-child(8) { animation-delay: 0.8s; }
.qa-accordion-container.loading .qa-item:nth-child(9) { animation-delay: 0.9s; }
.qa-accordion-container.loading .qa-item:nth-child(10) { animation-delay: 1.0s; }
.qa-accordion-container.loading .qa-item:nth-child(11) { animation-delay: 1.1s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}