/* ========================================
   TESTIMONIALS & FAQ - Premium Design
   ======================================== */

/* Testimonials Section */
.testimonials-section {
    padding: 80px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    margin: 40px 20px;
    border-radius: 20px;
}

/* Carousel Container */
.testimonial-carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 40px;
}

.testimonial-carousel-track-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0 40px;
    /* Space for shadow/transform */
}

.testimonial-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    list-style: none;
    padding: 0;
    margin: 0;
}

.testimonial-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    padding: 0 10px;
    opacity: 0.5;
    transform: scale(0.9);
    transition: all 0.5s ease;
    filter: blur(2px);
}

.testimonial-slide.current-slide {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Premium Card Design */
.testimonial-card.premium-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(102, 126, 234, 0.2);
}

.testimonial-card.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.quote-icon {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.testimonial-rating {
    margin-bottom: 1.5rem;
    display: inline-flex;
    gap: 5px;
}

.testimonial-rating i {
    color: #ffd700;
    font-size: 1.1rem;
    text-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
}

.author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.author-info {
    text-align: left;
}

.author-info strong {
    display: block;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 700;
}

.author-info span {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #4a5568;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: #fff;
    color: #667eea;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.current-indicator {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.trust-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-5px);
}

.trust-badge i {
    font-size: 2rem;
    color: #667eea;
}

.trust-badge span {
    color: #333;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    margin: 40px 20px;
    border-radius: 20px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.faq-item.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: #f1c40f;
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.faq-question {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff !important;
    /* Default un-expanded white */
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.faq-item.active .faq-question {
    color: #ffd24d !important;
    /* Golden when expanded as requested */
}

.faq-toggle-icon {
    width: 24px;
    height: 24px;
    border: 2px solid #ffd24d;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
    content: '';
    position: absolute;
    background-color: #ffd24d;
    transition: all 0.3s ease;
}

/* Horizontal line (always visible) */
.faq-toggle-icon::before {
    width: 12px;
    height: 2px;
}

/* Vertical line (hidden when active/minus) */
.faq-toggle-icon::after {
    width: 2px;
    height: 12px;
}

.faq-item.active .faq-toggle-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    /* Answer White/Light Gray */
    line-height: 1.7;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    opacity: 1;
    color: #ffffff !important;
    /* Pure white forced for answer */
}

.faq-answer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.faq-answer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.faq-answer strong {
    color: #333;
    font-weight: 600;
}

/* ========================================
   GRID LAYOUT & RESPONSIVENESS (FIX)
   ======================================== */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Responsive Fixes - Ensure everything fits inside the boxes */
@media (max-width: 768px) {

    .testimonials-section,
    .faq-section {
        padding: 50px 15px;
        margin: 30px 10px;
        border-radius: 15px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .testimonial-card {
        padding: 2rem 1.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2.5rem;
    }

    .trust-badge {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .trust-badge i {
        font-size: 1.5rem;
    }

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

    .faq-answer {
        padding: 0 1.5rem 1.5rem 3.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {

    .testimonials-section,
    .faq-section {
        margin: 20px 5px;
        padding: 40px 10px;
    }

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

    .testimonial-card {
        padding: 1.5rem 1rem;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

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

/* ========================================
   SECTION OVERFLOW FIX (MOBILE)
   ======================================== */

@media (max-width: 768px) {

    /* Prevent Tools, Learn, features & Life Purpose sections from going out of bounds */
    .tools-section,
    .learn-section,
    .features-section,
    .life-purpose-section {
        margin: 20px 10px !important;
        padding: 30px 15px !important;
        width: auto !important;
        border-radius: 15px !important;
        overflow: hidden !important;
        /* Strictly contain children */
    }

    .tools-grid,
    .learn-grid,
    .features-grid,
    .purpose-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .tool-card,
    .learn-card,
    .feature-card,
    .purpose-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 1.5rem !important;
        margin: 0 0 1rem 0 !important;
        text-align: center !important;
    }
}

/* ========================================
   COMPATIBILITY RESULTS FIX
   ======================================== */
.compatibility-results {
    width: 100% !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
    .compatibility-results {
        padding: 1.2rem !important;
        margin: 10px auto !important;
        border-radius: 15px !important;
    }

    /* Ensure the inner grid doesn't force a minimum width */
    .compatibility-results div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* ========================================
   PREMIUM SEO TABLES
   ======================================== */
.premium-seo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.1);
    margin: 0;
}

.premium-seo-table thead tr {
    background: linear-gradient(135deg, #6c5ce7 0%, #8e7dff 100%);
    color: #ffffff;
    text-align: left;
}

.premium-seo-table th,
.premium-seo-table td {
    padding: 18px 25px;
}

.premium-seo-table th {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.premium-seo-table tbody tr {
    transition: background-color 0.3s ease;
}

.premium-seo-table tbody tr td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #2d3436;
    font-size: 1.05rem;
}

.premium-seo-table tbody tr:last-child td {
    border-bottom: none;
}

.premium-seo-table tbody tr:hover {
    background-color: rgba(108, 92, 231, 0.04);
}

.premium-seo-table tbody tr td strong {
    color: #6c5ce7;
    font-weight: 700;
}

/* ========================================
   EXAMPLE CHART CARD RESPONSIVENESS
   ======================================== */
.example-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991px) {
    .example-container {
        flex-direction: column;
        padding: 30px 20px;
        gap: 25px;
    }

    .example-text,
    .example-image {
        width: 100%;
        min-width: 100% !important;
    }

    .example-image img {
        max-width: 100%;
        height: auto;
    }
}

/* ========================================
   TABLE RESPONSIVENESS (MOBILE)
   ======================================== */
@media (max-width: 768px) {

    .premium-seo-table th,
    .premium-seo-table td {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .premium-seo-table th:first-child,
    .premium-seo-table td:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 1;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    }

    .premium-seo-table thead th:first-child {
        background: #6c5ce7;
    }
}

/* ========================================
   FAQ ICON FIX (PREMIUM WRAPPER)
   ======================================== */
.faq-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1) 0%, rgba(108, 92, 231, 0.2) 100%);
    border-radius: 50%;
    color: #6c5ce7;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 12px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.1);
    margin-top: 2px;
    font-family: 'Poppins', sans-serif;
}