/* FAQ Page Styles */
/* Following Age Calculator professional standards */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Search Section */
.faq-search-section {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color, #e0e6ed);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--input-bg, #ffffff);
    color: var(--text-color, #374151);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: scale(1.02);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-muted, #6b7280);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background: var(--accent-bg, #f8fafc);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-question {
    font-weight: 600;
    color: var(--primary-color, #2563eb);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-result-preview {
    color: var(--text-muted, #6b7280);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Category Navigation */
.faq-categories {
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem;
    background: var(--accent-bg, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e0e6ed);
}

.category-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: var(--card-bg, #ffffff);
    color: var(--text-color, #374151);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-tab:hover {
    background: var(--primary-light, #dbeafe);
    color: var(--primary-color, #2563eb);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--primary-color, #2563eb);
    color: white;
    border-color: var(--primary-dark, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* FAQ Sections */
.faq-sections {
    margin-bottom: 3rem;
}

.faq-category h2 {
    color: var(--primary-color, #2563eb);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.faq-category h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #2563eb), var(--secondary-color, #4f46e5));
    margin: 0.5rem auto;
    border-radius: 2px;
}

/* FAQ Items */
.faq-item {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light, #93c5fd);
}

.faq-item.active {
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: var(--accent-bg, #f8fafc);
}

.faq-question h3 {
    color: var(--text-color, #374151);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    padding-right: 1rem;
}

.faq-toggle {
    color: var(--primary-color, #2563eb);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light, #dbeafe);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    background: var(--primary-color, #2563eb);
    color: white;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    color: var(--text-color, #374151);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* FAQ Footer */
.faq-footer {
    background: var(--accent-bg, #f8fafc);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.still-need-help h3 {
    color: var(--primary-color, #2563eb);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.still-need-help p {
    color: var(--text-color, #374151);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #2563eb), var(--primary-dark, #1d4ed8));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark, #1d4ed8), var(--primary-color, #2563eb));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* Feature cards styling */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #2563eb);
}

.feature-card h3 {
    color: var(--primary-color, #2563eb);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-color, #374151);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Tool tips styling */
.tool-tips {
    background: var(--accent-bg, #f8fafc);
    border: 1px solid var(--border-color, #e0e6ed);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.tool-tips h3 {
    color: var(--primary-color, #2563eb);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.tool-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-tips li {
    color: var(--text-color, #374151);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.tool-tips li::before {
    content: "❓";
    position: absolute;
    left: 0;
    top: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    background: rgba(255, 255, 0, 0.3);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

/* Responsive design */
@media (max-width: 768px) {
    .faq-container {
        padding: 1rem 0;
    }
    
    .faq-search-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 0.875rem 2.5rem 0.875rem 1rem;
    }
    
    .category-tabs {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .category-tab {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .faq-search-section {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 0.75rem;
    }
    
    .faq-answer {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .tool-tips {
        padding: 1rem;
    }
    
    .faq-footer {
        padding: 1.5rem;
    }
}
