:root {
    --primary: #1a237e;
    --primary-light: #534bae;
    --primary-dark: #000051;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.premium-faq-section {
    background: var(--bg-gradient);
    padding: 3rem 1rem;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
}

/* Hero Section */
.faq-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.faq-hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.faq-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Modern Search Bar */
.search-container {
    position: relative;
    max-width: 700px;
    margin: 2rem auto;
    z-index: 10;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.5rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-wrapper:focus-within {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.search-icon {
    color: var(--secondary);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 0;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Category Tags */
.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.category-tag {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.category-tag:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
}

.category-tag.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

/* FAQ List & Cards */
.faq-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.faq-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.faq-question-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

.question-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.chevron-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-card.active .chevron-icon {
    transform: rotate(180deg);
}

.faq-answer-container {
    max-height: 0;
    height: 0; /* Fallback */
    overflow: hidden;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
}

.faq-card.active .faq-answer-container {
    max-height: 1000px;
    height: auto;
    visibility: visible;
}

.faq-answer-content {
    padding: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
}

.answer-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.answer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.answer-text {
    flex: 1;
    padding-top: 0.35rem; /* アイコンとの垂直方向の微調整 */
}

.faq-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #e5e7eb;
}

.faq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.faq-footer-tag {
    font-size: 0.75rem;
    background: #eff6ff;
    color: var(--secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Load More / Close Button Container */
.load-more-container {
    margin-top: 4rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-premium {
    background: var(--primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(26, 35, 126, 0.3);
    display: inline-flex;
    align-items: center;
}

.btn-premium:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(26, 35, 126, 0.4);
}

.btn-premium-outline {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
}

.btn-premium-outline:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Utilities */
.hidden {
    display: none !important;
}

.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.text-xl {
    font-size: 1.25rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.mt-4 {
    margin-top: 1rem;
}

.text-secondary {
    color: var(--secondary);
}

.hover\:underline:hover {
    text-decoration: underline;
}

.ml-1 { margin-left: 0.25rem; }
.mr-1 { margin-right: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

/* Responsive adjustments */
@media (max-width: 640px) {
    .faq-hero h2 {
        font-size: 1.8rem;
    }
    
    .question-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .faq-answer-content {
        padding: 1rem;
    }

    .answer-wrapper {
        gap: 0.75rem;
    }

    .answer-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}
