/**
 * Help Center - Dropbox-inspired FAQ Page Styles
 */

/* ============================================
   HERO SECTION
   ============================================ */

.help-hero {
    background: linear-gradient(135deg, #336DFF 0%, #1a4fd6 100%);
    padding: 80px 0 100px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.help-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.help-hero .container {
    position: relative;
    z-index: 100;
}

.help-hero-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.help-hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    color: #fff;
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1000;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 2;
}

.search-wrapper input {
    width: 100%;
    padding: 20px 24px 20px 56px;
    font-size: 16px;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: box-shadow 0.2s ease;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.search-wrapper input:focus {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.25);
}

.search-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 99999;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item .result-question {
    font-weight: 600;
    color: #242635;
    margin-bottom: 4px;
}

.search-result-item .result-category {
    font-size: 13px;
    color: #93949B;
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: #93949B;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */

.help-categories {
    padding: 80px 0;
    background: #f8f9fa;
    margin-top: -40px;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.help-categories .row {
    gap: 24px;
    row-gap: 24px;
}

.help-categories .col-12,
.help-categories .col-md-6,
.help-categories .col-lg-4 {
    padding: 0;
    margin-bottom: 0;
}

.help-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .help-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 576px) {
    .help-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.help-card {
    display: block;
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: all 0.25s ease;
    height: 100%;
    border: 1px solid transparent;
}

.help-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(51, 109, 255, 0.15);
    border-color: #336DFF;
    text-decoration: none;
}

.help-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: #336DFF;
}

.help-card-icon svg {
    width: 48px;
    height: 48px;
}

.help-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #242635;
    margin-bottom: 8px;
}

.help-card-desc {
    font-size: 14px;
    color: #93949B;
    line-height: 1.5;
    margin-bottom: 16px;
}

.help-card-count {
    font-size: 13px;
    color: #336DFF;
    font-weight: 500;
}

/* ============================================
   FAQ SECTIONS
   ============================================ */

.help-faqs {
    padding: 40px 0 80px;
}

.faq-section {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.faq-section:last-child {
    border-bottom: none;
}

.faq-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.faq-section-icon {
    width: 40px;
    height: 40px;
    color: #336DFF;
}

.faq-section-icon svg {
    width: 40px;
    height: 40px;
}

.faq-section-title {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: #242635;
    margin: 0;
}

.faq-list {
    max-width: 800px;
}

/* FAQ Accordion Items */
.faq-item {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.faq-item[open] {
    border-color: #336DFF;
    box-shadow: 0 4px 12px rgba(51, 109, 255, 0.1);
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #242635;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: #336DFF;
}

.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #93949B;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: #336DFF;
}

.faq-answer {
    padding: 0 24px 24px;
    color: #555;
    line-height: 1.7;
    font-size: 15px;
}

.faq-answer a {
    color: #336DFF;
    text-decoration: underline;
}

/* ============================================
   CONTACT CTA SECTION
   ============================================ */

.help-contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.help-contact-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.help-contact-title {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    color: #242635;
    margin-bottom: 12px;
}

.help-contact-text {
    font-size: 18px;
    color: #93949B;
    margin-bottom: 32px;
}

.help-contact-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.help-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #336DFF;
    color: #fff;
    border: 2px solid #336DFF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.help-btn-primary:hover {
    background: #1a4fd6;
    border-color: #1a4fd6;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.help-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: #336DFF;
    border: 2px solid #336DFF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.help-btn-outline:hover {
    background: #336DFF;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-card {
    animation: fadeInUp 0.5s ease forwards;
}

.help-card:nth-child(1) { animation-delay: 0.1s; }
.help-card:nth-child(2) { animation-delay: 0.15s; }
.help-card:nth-child(3) { animation-delay: 0.2s; }
.help-card:nth-child(4) { animation-delay: 0.25s; }
.help-card:nth-child(5) { animation-delay: 0.3s; }
.help-card:nth-child(6) { animation-delay: 0.35s; }
.help-card:nth-child(7) { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 992px) {
    .help-hero {
        padding: 60px 0 80px;
    }

    .help-categories {
        padding: 50px 0;
    }

    .faq-section {
        padding: 30px 0;
    }
}

@media (max-width: 768px) {
    .help-hero {
        padding: 50px 0 70px;
    }

    .help-hero-title {
        font-size: 28px;
    }

    .help-hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .search-wrapper input {
        padding: 16px 20px 16px 50px;
        font-size: 15px;
    }

    .help-categories {
        padding: 40px 0;
        margin-top: -30px;
    }

    .help-card {
        padding: 24px;
    }

    .help-card-icon,
    .help-card-icon svg {
        width: 40px;
        height: 40px;
    }

    .help-card-title {
        font-size: 18px;
    }

    .faq-section-header {
        margin-bottom: 24px;
    }

    .faq-section-icon,
    .faq-section-icon svg {
        width: 32px;
        height: 32px;
    }

    .faq-question {
        padding: 16px 20px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 0 20px 20px;
        font-size: 14px;
    }

    .help-contact {
        padding: 60px 0;
    }

    .help-contact-title {
        font-size: 24px;
    }

    .help-contact-text {
        font-size: 16px;
    }

    .help-contact-buttons {
        flex-direction: column;
        align-items: center;
    }

    .help-btn-primary,
    .help-btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .help-hero {
        padding: 40px 0 60px;
    }

    .search-wrapper input {
        padding: 14px 16px 14px 46px;
    }

    .search-wrapper .search-icon {
        left: 16px;
        width: 20px;
        height: 20px;
    }

    .help-card {
        padding: 20px;
    }

    .faq-item {
        border-radius: 8px;
    }
}

/* ============================================
   HIGHLIGHT SEARCH MATCHES
   ============================================ */

.highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 2px;
}

/* ============================================
   SCROLL OFFSET FOR ANCHOR LINKS
   ============================================ */

.faq-section {
    scroll-margin-top: 100px;
}
