/* ==========================================
   KWANG GROUP — FAQ / KNOWLEDGE CENTER
   Fully Responsive CSS (No Body/Reset)
   Version 1.0
========================================== */

/* ----- BASE (without body/reset) ----- */
.faq-center {
    max-width: 1280px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.10);
    transition: padding 0.2s ease;
}

/* ----- UTILITY ----- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ----- HERO ----- */
.faq-hero {
    text-align: center;
    padding: 1rem 0.5rem 2.5rem 0.5rem;
    border-bottom: 1px solid #e9edf2;
}

.faq-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eef2ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    margin-bottom: 1.25rem;
}

.faq-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0b1a2e;
    max-width: 900px;
    margin: 0 auto 1rem auto;
}

.faq-hero p {
    font-size: 1.125rem;
    color: #475569;
    max-width: 680px;
    margin: 0 auto 2rem auto;
}

/* ----- SEARCH ----- */
.faq-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 640px;
    margin: 0 auto;
}

.faq-search input[type="search"] {
    flex: 2 1 260px;
    padding: 0.9rem 1.4rem;
    border: 1.5px solid #d1d9e6;
    border-radius: 60px;
    font-size: 1rem;
    background: #ffffff;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
    color: #0b1a2e;
}

.faq-search input[type="search"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.faq-search input[type="search"]::placeholder {
    color: #94a3b8;
}

.faq-search button {
    flex: 0 1 auto;
    background: #0b1a2e;
    color: white;
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.faq-search button:hover {
    background: #1e2f45;
}

.faq-search button:active {
    transform: scale(0.96);
}

/* ----- QUICK LINKS (TOPICS) ----- */
.faq-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.2rem;
    padding: 1.8rem 0.5rem 2rem 0.5rem;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 2.5rem;
}

.faq-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.7rem;
    border-radius: 40px;
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

.faq-quick-links a span {
    font-size: 1.1rem;
}

.faq-quick-links a:hover {
    background: #eef2ff;
    color: #1e3a8a;
}

/* ----- CATEGORY HEADER ----- */
.faq-category {
    margin-top: 3rem;
    scroll-margin-top: 2rem;
}

.category-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eef2f6;
}

.category-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #d1d9e6;
    line-height: 1;
    flex-shrink: 0;
}

.category-header div {
    flex: 1;
}

.category-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eef2ff;
    padding: 0.2rem 0.9rem;
    border-radius: 40px;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.category-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b1a2e;
    margin-bottom: 0.2rem;
}

.category-header p {
    color: #64748b;
    font-size: 1rem;
    max-width: 550px;
}

/* ----- FAQ LIST / ACCORDION ----- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: #f9fafc;
    border-radius: 1.2rem;
    border: 1px solid #eef2f6;
    overflow: hidden;
    transition: border 0.15s;
}

.faq-item:hover {
    border-color: #d1d9e6;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.2rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    color: #0b1a2e;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    line-height: 1.4;
}

.faq-question:hover {
    background: #f1f4f9;
}

.faq-question span:first-child {
    flex: 1;
}

.faq-icon {
    font-size: 1.6rem;
    font-weight: 300;
    color: #64748b;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: #2563eb;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 1.6rem;
    background: #ffffff;
}

.faq-item.open .faq-answer {
    max-height: 600px; /* enough for content */
    padding: 0.2rem 1.6rem 1.6rem 1.6rem;
}

.faq-answer p,
.faq-answer ul,
.faq-answer strong {
    margin-bottom: 0.6rem;
}

.faq-answer ul {
    padding-left: 1.5rem;
    list-style: disc;
    color: #1e293b;
}

.faq-answer ul li {
    margin-bottom: 0.2rem;
}

.faq-answer strong {
    color: #0b1a2e;
}

/* ----- CONTACT INFO (special block) ----- */
.contact-info {
    background: #f1f5f9;
    border-radius: 1.8rem;
    padding: 2rem 2rem 2.2rem 2rem;
    margin-top: 0.5rem;
    text-align: center;
}

.contact-info p {
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 1.8rem auto;
    color: #1e293b;
}

.contact-button {
    display: inline-block;
    background: #0b1a2e;
    color: white;
    font-weight: 600;
    padding: 0.9rem 2.8rem;
    border-radius: 60px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
}

.contact-button:hover {
    background: #1e2f45;
}

.contact-button:active {
    transform: scale(0.96);
}

/* ----- FINAL CTA ----- */
.faq-final-cta {
    margin-top: 4rem;
    background: #0b1a2e;
    color: white;
    border-radius: 2.5rem;
    padding: 3rem 2rem;
    text-align: center;
}

.faq-final-cta span {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1.4rem;
    border-radius: 40px;
    margin-bottom: 1.2rem;
}

.faq-final-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.faq-final-cta p {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 480px;
    margin: 0 auto 2.2rem auto;
}

.faq-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.faq-cta-buttons a {
    display: inline-block;
    background: white;
    color: #0b1a2e;
    font-weight: 600;
    padding: 0.8rem 2.4rem;
    border-radius: 60px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.faq-cta-buttons a:last-child {
    background: transparent;
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.faq-cta-buttons a:hover {
    background: #e2e8f0;
}

.faq-cta-buttons a:last-child:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.faq-cta-buttons a:active {
    transform: scale(0.96);
}

/* ==========================================
   RESPONSIVE TWEAKS
========================================== */

/* Tablets & small laptops */
@media (max-width: 1024px) {
    .faq-center {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }

    .faq-hero h1 {
        font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    }

    .category-header {
        flex-wrap: wrap;
    }

    .category-number {
        font-size: 1.8rem;
    }
}

/* Mobile landscape & small tablets */
@media (max-width: 768px) {
    .faq-center {
        padding: 1.5rem 1rem;
        border-radius: 1.8rem;
    }

    .faq-hero {
        padding: 0.5rem 0 1.8rem 0;
    }

    .faq-hero h1 {
        font-size: 1.8rem;
    }

    .faq-hero p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .faq-search input[type="search"] {
        flex: 1 1 100%;
        padding: 0.8rem 1.2rem;
    }

    .faq-search button {
        flex: 1 1 100%;
        padding: 0.8rem 1.2rem;
        justify-content: center;
    }

    .faq-quick-links {
        gap: 0.4rem 0.8rem;
        padding: 1rem 0.2rem 1.5rem 0.2rem;
    }

    .faq-quick-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .category-header {
        flex-direction: column;
        gap: 0.2rem;
    }

    .category-number {
        font-size: 1.6rem;
    }

    .category-header h2 {
        font-size: 1.5rem;
    }

    .faq-question {
        padding: 1rem 1.2rem;
        font-size: 0.98rem;
    }

    .faq-answer {
        padding: 0 1.2rem;
    }

    .faq-item.open .faq-answer {
        padding: 0.2rem 1.2rem 1.2rem 1.2rem;
    }

    .contact-info {
        padding: 1.5rem 1rem;
    }

    .faq-final-cta {
        padding: 2rem 1.2rem;
        border-radius: 2rem;
    }

    .faq-cta-buttons a {
        flex: 1 1 100%;
        text-align: center;
        padding: 0.7rem 1.5rem;
    }

    .faq-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .faq-center {
        padding: 1rem 0.75rem;
        border-radius: 1.5rem;
    }

    .faq-hero h1 {
        font-size: 1.5rem;
    }

    .faq-label {
        font-size: 0.65rem;
        padding: 0.3rem 0.8rem;
    }

    .category-number {
        font-size: 1.4rem;
    }

    .faq-question {
        font-size: 0.92rem;
        padding: 0.9rem 1rem;
    }

    .faq-icon {
        font-size: 1.4rem;
    }

    .faq-answer {
        font-size: 0.95rem;
    }

    .faq-quick-links a {
        font-size: 0.78rem;
        padding: 0.2rem 0.5rem;
    }
}

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