/* FAQ Expandable List System for Orkestra C1 CMS */
/* Compatible with XHTML and ASP.NET masterpages */

.faq-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Edit Mode Styles - When CMS is in edit mode */
.faq-container.edit-mode {
    border: 2px dashed #007acc;
    background: #f8f9fa;
    padding: 15px;
}

.faq-container.edit-mode .faq-instructions {
    display: block;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #1976d2;
}

.faq-container.edit-mode .faq-instructions strong {
    display: block;
    margin-bottom: 5px;
}

/* Hide instructions in normal view */
.faq-instructions {
    display: none;
}

/* FAQ Item Styles */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

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

.faq-item:hover {
    background-color: #f5f5f5;
}

/* FAQ Question (Header) */
.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    position: relative;
    background: #ffffff;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: #f8f9fa;
    color: #007acc;
}

.faq-question:focus {
    outline: 2px solid #007acc;
    outline-offset: -2px;
}

/* FAQ Toggle Icon */
.faq-toggle {
    font-size: 18px;
    font-weight: bold;
    color: #007acc;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* FAQ Answer (Content) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #ffffff;
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Adjust based on your content needs */
    padding: 0 25px 25px 25px;
}

.faq-answer-content {
    padding-top: 15px;
    color: #666666;
    line-height: 1.6;
    font-size: 15px;
}

.faq-answer-content p {
    margin: 0 0 15px 0;
}

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

/* List styles for edit mode */
.faq-container.edit-mode ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-container.edit-mode li {
    background: #ffffff;
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
}

.faq-container.edit-mode li:before {
    content: "Q: ";
    font-weight: bold;
    color: #007acc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-container {
        margin: 10px;
        border-radius: 0;
    }
    
    .faq-question {
        padding: 15px 20px;
        font-size: 15px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 20px 20px;
    }
    
    .faq-answer-content {
        font-size: 14px;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .faq-toggle,
    .faq-answer {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .faq-item {
        border-bottom: 2px solid #000000;
    }
    
    .faq-question {
        border: 1px solid #000000;
    }
    
    .faq-question:hover {
        background-color: #000000;
        color: #ffffff;
    }
}

/* Print styles */
@media print {
    .faq-container {
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .faq-item.active .faq-answer {
        max-height: none;
        padding: 10px 25px 25px 25px;
    }
    
    .faq-toggle {
        display: none;
    }
    
    .faq-question {
        cursor: default;
    }
}