/* --- FAQ Specific Styles --- */

/* Layout */
#faq-hero {
    padding: 160px 20px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Ozdobne tło pod tytułem (tylko dla GPU) */
#faq-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    filter: blur(120px);
    opacity: 0.3;
    z-index: -1;
    border-radius: 50%;
}

.faq-wrapper {
    max-width: 900px;
    margin: 0 auto 120px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Category Headers */
.faq-category-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-category-title span.icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

/* Accordion Group */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* FAQ Item Card - Premium Glass */
.faq-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Hover Effect */
.faq-item:hover {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateY(-2px);
}

/* Active (Open) State - Highlight Whole Card */
.faq-item:has(details[open]) {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, rgba(0, 210, 255, 0.08) 0%, rgba(0, 0, 0, 0.2) 100%);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1);
}

/* Remove inner focus outline/background on details/summary */
.faq-item details {
    width: 100%;
    outline: none;
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

.faq-item summary {
    padding: 1.5rem 2rem;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    list-style-type: none; /* Ensure removal for all browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s ease;
    user-select: none;
    outline: none;
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker { /* Ensure removal for all browsers */
    display: none;
    content: ""; /* Force empty content */
}

/* FORCE HIDE any rogue pseudo-elements from previous iterations */
.faq-item summary::after {
    display: none !important;
    content: none !important;
}

.faq-item summary:focus {
    outline: none;
}

/* Animated Icon (+/-) - Now a single, transforming element */
.faq-icon {
    width: 40px; /* Zwiększony rozmiar */
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.faq-icon::before, /* Pionowa kreska */
.faq-icon::after {  /* Pozioma kreska */
    content: '';
    position: absolute;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq-icon::before {
    width: 2px;
    height: 16px;
    transform: scaleY(1); /* Domyślnie widoczna */
}

.faq-icon::after {
    width: 16px;
    height: 2px;
    transform: scaleX(1); /* Domyślnie widoczna */
}

/* Stan otwarty - ikona minusa */
.faq-item details[open] .faq-icon {
    background: var(--primary-color); /* Niebieskie tło */
    transform: rotate(180deg); /* Obróć całe kółko - nie ma efektu na samym minusie */
}

.faq-item details[open] .faq-icon::before {
    transform: scaleY(0); /* Zmień wysokość pionowej kreski na 0 */
    background-color: #000; /* Zapewnij kontrast na jasnym tle */
}

.faq-item details[open] .faq-icon::after {
    background-color: #000; /* Zapewnij kontrast na jasnym tle */
}


/* Content (Answer) */
.faq-content {
    padding: 0 2rem 2rem 2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
    opacity: 0;
    transform: translateY(-5px);
    animation: fadeIn 0.3s ease forwards;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: -0.5rem;
    padding-top: 1.5rem;
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Contact Box */
.faq-contact {
    text-align: center;
    margin-bottom: 100px;
    padding: 4rem 2rem;
    background: var(--glass-bg);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.05;
    z-index: -1;
}

.faq-contact h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.faq-contact p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}


/* --- NO-GPU Fallback (Performance & Compatibility) --- */
body.no-gpu #faq-hero::after {
    display: none;
}

body.no-gpu .faq-item {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #141414;
    border: 1px solid #333;
    box-shadow: none;
}

body.no-gpu .faq-item:hover {
    border-color: #555;
    transform: none;
}

body.no-gpu .faq-item:has(details[open]) {
    background: #1a1a1a;
    border-color: var(--primary-color);
    box-shadow: none;
}

body.no-gpu .faq-contact {
    backdrop-filter: none !important;
    background: #141414;
    border: 1px solid #333;
}

/* Responsive */
@media (max-width: 768px) {
    #faq-hero { padding-top: 140px; }
    
    .faq-item summary {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
    
    .faq-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .faq-category-title {
        font-size: 1.2rem;
    }
}
