/* ============================================
   EXCELLENCE TECHNOLOGIQUE - Premium Section
   Apple-inspired Design with Glass Morphism
   ============================================ */

.tech-excellence {
    padding: 6rem 0;
    background: #f8f8f9;
    /* Light mode default */
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

[data-theme="dark"] .tech-excellence {
    background: linear-gradient(180deg, #000000 0%, #0a0a0c 100%);
}

/* Premium Background Effect */
.tech-excellence::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Section Header */
.tech-excellence .section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.tech-excellence .section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #1d1d1f;
    /* Light mode text */
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .tech-excellence .section-header h2 {
    color: #ffffff;
}

.tech-excellence .subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #86868b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

[data-theme="dark"] .tech-excellence .subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* Q&A Container */
.tech-qa-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Q&A Item - LIGHT MODE */
.tech-qa-item {
    /* Light semi-transparent background for light mode */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.tech-qa-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.tech-qa-item.active {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.1),
        0 0 24px rgba(197, 160, 89, 0.25);
}

/* DARK MODE - Tech QA Item */
[data-theme="dark"] .tech-qa-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tech-qa-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(197, 160, 89, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tech-qa-item.active {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(197, 160, 89, 0.3);
}

/* Question Button */
.tech-question {
    width: 100%;
    padding: 1.75rem 2rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: right;
    direction: rtl;
}

.tech-question:hover .q-text {
    color: #c5a059;
}

.q-icon {
    font-size: 1.5rem;
    color: #c5a059;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* DARK MODE - Q-icon same color */
[data-theme="dark"] .q-icon {
    color: #c5a059;
}

.tech-qa-item.active .q-icon {
    transform: scale(1.1);
}

.q-text {
    flex: 1;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    /* Light mode - dark text */
    color: #1d1d1f;
    text-shadow: none;
    line-height: 1.5;
    transition: color 0.3s ease;
}

/* DARK MODE - Q-text */
[data-theme="dark"] .q-text {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.q-chevron {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    transform: rotate(0deg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tech-qa-item.active .q-chevron {
    transform: rotate(90deg);
    color: #c5a059;
}

/* Answer Container */
.tech-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.answer-content {
    padding: 0 2rem 2rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

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

.answer-content p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.9;
    color: #424245;
    /* Light mode text */
    margin: 0 0 1.5rem;
    text-align: right;
    direction: rtl;
}

[data-theme="dark"] .answer-content p {
    color: rgba(255, 255, 255, 0.9);
}

/* Machine Badge */
.machine-badge {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1) 0%, rgba(197, 160, 89, 0.05) 100%);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #c5a059;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-tech {
    font-size: 0.75rem;
    color: #86868b;
    font-weight: 500;
}

[data-theme="dark"] .badge-tech {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tech-excellence {
        padding: 4rem 0;
    }

    .tech-excellence .section-header {
        margin-bottom: 2.5rem;
    }

    .tech-qa-container {
        gap: 1rem;
    }

    .tech-question {
        padding: 1.25rem 1.5rem;
        gap: 0.75rem;
    }

    .q-icon {
        font-size: 1.25rem;
    }

    .q-chevron {
        font-size: 1.25rem;
    }

    .answer-content {
        padding: 0 1.5rem 1.5rem;
    }

    .machine-badge {
        padding: 0.625rem 1rem;
    }

    .badge-label {
        font-size: 0.8rem;
    }

    .badge-tech {
        font-size: 0.7rem;
    }
}

/* Smooth Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
    .tech-qa-item {
        scroll-margin-top: 2rem;
    }
}