/* ==========================================
   SECTION 7: FAQ - MODERN & PROFESSIONAL
   Hochprofessionelles Design mit Gradient Accent
========================================== */

:root {
    /* Brand Colors mit Gradient */
    --primary-gradient-start: #E5C44D;
    --primary-gradient-end: #F3D663;
    --primary-gradient: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    --primary-color: #E6C23C;
    --primary-hover: #d4af37;
    --primary-dark: #b8860b;
    --primary-light: rgba(230, 194, 60, 0.1);
    --primary-glow: rgba(230, 194, 60, 0.3);
    
    /* Neutral Colors */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --bg-body: #ffffff;
    --bg-section: #f8fafc;
    --bg-white: #ffffff;
    --bg-light: #f1f5f9;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    
    /* Typography */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(230, 194, 60, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & BASE STYLES
========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
}

button {
    font-family: inherit;
}

/* ==========================================
   FAQ SECTION
========================================== */
.faq-section {
    padding: var(--space-3xl) 0;
    background: var(--bg-section);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ==========================================
   SECTION HEADER
========================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.highlight {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   MAIN LAYOUT: 2-COLUMN
========================================== */
.faq-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    align-items: start;
}

/* ==========================================
   LEFT SIDEBAR: NAVIGATION
========================================== */
.faq-sidebar {
    position: sticky;
    top: var(--space-lg);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    animation: fadeInLeft 0.8s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   CATEGORY NAVIGATION
==========================================*/
.category-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-title {
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-secondary);
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.category-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.category-btn.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.category-label {
    flex: 1;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 var(--space-xs);
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
}

.category-btn.active .category-count {
    background: rgba(0, 0, 0, 0.15);
}

/* ==========================================
   RIGHT CONTENT: FAQ ITEMS
========================================== */
.faq-content {
    animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.faq-item.hidden {
    display: none;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.active {
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-color);
}

/* FAQ Question Button */
.faq-question {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.faq-item.active .faq-question {
    background: var(--primary-light);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-item.active .faq-question:hover {
    background: var(--primary-light);
}

/* Question Icon */
.question-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.faq-item.active .question-icon {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.question-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
}

/* Question Text */
.question-text {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Toggle Icon */
.toggle-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.faq-item.active .toggle-icon {
    background: var(--primary-color);
    transform: rotate(180deg);
}

.toggle-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
}

.faq-item.active .toggle-icon svg {
    stroke: var(--text-primary);
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.answer-content {
    padding: 0 var(--space-lg) var(--space-md) calc(var(--space-lg) + 32px + var(--space-sm));
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.answer-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

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

.answer-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================
   CONTACT FOOTER
========================================== */
.contact-footer {
    margin-top: var(--space-3xl);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    border: 2px solid var(--primary-color);
    animation: fadeInUp 1s ease;
}

.contact-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.contact-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Compact Contact Form */
.compact-contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.form-row:has(textarea) {
    grid-template-columns: 2fr 1fr;
}

.compact-contact-form input,
.compact-contact-form textarea {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    transition: all var(--transition-base);
}

.compact-contact-form input:focus,
.compact-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.compact-contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-glow);
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 194, 60, 0.4);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Success Message */
.success-message {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--success-bg);
    border-radius: var(--radius-md);
    color: var(--success);
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

.success-message.visible {
    display: flex;
}

.success-message svg {
    width: 24px;
    height: 24px;
    stroke: var(--success);
}

/* ==========================================
   ANIMATIONS
========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ACCESSIBILITY
========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.faq-question:focus-visible,
.category-btn:focus-visible,
#faqSearch:focus-visible,
.cta-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* ==========================================
   RESPONSIVE OPTIMIZATIONS
========================================== */
@media (max-width: 1200px) {
    .faq-layout {
        grid-template-columns: 240px 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 968px) {
    .faq-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .faq-sidebar {
        position: static;
        margin-bottom: var(--space-lg);
    }
    
    .category-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .nav-title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding: var(--space-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row:has(textarea) {
        grid-template-columns: 1fr;
    }
    
    .contact-footer {
        padding: var(--space-lg);
    }
    
    .contact-header h3 {
        font-size: 1.25rem;
    }
}

/* ===== FAQ – kompakter auf Mobil ===== */
@media (max-width: 768px){
  .faq-section{ padding:24px 0 !important; }
  .faq-section .container{ padding:0 16px !important; }

  /* Header */
  .faq-section .section-header{ margin-bottom:18px !important; }
  .faq-section .section-title{ font-size:1.35rem !important; margin-bottom:6px !important; }
  .faq-section .section-subtitle{ font-size:.95rem; line-height:1.45; max-width:100%; }

  /* Layout & Sidebar */
  .faq-layout{ gap:14px !important; margin-bottom:18px !important; }
  .faq-sidebar{ padding:12px !important; border-radius:14px !important; }
  .faq-section .category-nav{ gap:6px; }
  .faq-section .nav-title{ font-size:.75rem; margin-bottom:6px; }
  .faq-section .category-btn{ padding:8px 10px; font-size:.9rem; border-width:1px; }
  .faq-section .category-count{ min-width:18px; height:18px; font-size:.7rem; }

  /* Accordion */
  .faq-accordion{ gap:12px !important; }
  .faq-item{ border-radius:14px !important; }
  .faq-question{ padding:12px 14px !important; gap:10px; }
  .question-icon{ width:28px; height:28px; border-radius:10px; }
  .question-icon svg{ width:16px; height:16px; }
  .question-text{ font-size:.95rem; line-height:1.35; }
  .toggle-icon{ width:24px; height:24px; }
  .toggle-icon svg{ width:16px; height:16px; }

  .faq-item.active .faq-answer{ max-height:420px; }
  .answer-content{
    padding:0 14px 12px calc(14px + 28px + 10px) !important; /* links Platz für Icon */
  }
  .answer-content p{ font-size:.95rem; line-height:1.5; margin-bottom:8px; }

  /* Kontakt-Teaser unten */
  .contact-footer{ margin-top:22px !important; padding:16px !important; border-radius:16px; }
  .contact-header{ margin-bottom:10px; }
  .contact-header h3{ font-size:1.15rem; }
  .contact-header p{ font-size:.95rem; }

  /* Kompaktes Formular */
  .compact-contact-form{ gap:12px; }
  .compact-contact-form .form-row{ gap:10px; }
  .compact-contact-form input,
  .compact-contact-form textarea{
    padding:10px 12px; font-size:.95rem;
    border-radius:12px; border-width:1px;
  }
  .compact-contact-form textarea{ min-height:72px; }
  .submit-btn{ padding:10px 14px; font-size:.98rem; border-radius:12px; }
  .checkbox-label{ font-size:.85rem; gap:8px; }
  .checkbox-label input[type="checkbox"]{ width:18px; height:18px; }
}

/* Extra kompakt auf sehr kleinen Screens */
@media (max-width: 480px){
  .faq-section{ padding:20px 0 !important; }
  .faq-question{ padding:10px 12px !important; }
  .answer-content{ padding:0 12px 10px calc(12px + 28px + 8px) !important; }
  .faq-section .category-nav{ grid-template-columns:1fr !important; }
  .faq-section .category-btn{ padding:7px 9px; font-size:.88rem; }
  .contact-footer{ padding:14px !important; }
}
