/* =================================================================
   FAQ PAGE STYLES
   ================================================================= */

:root {
    --faq-primary: #d4a574;
    --faq-secondary: #c09560;
    --faq-dark: #2c1810;
    --faq-light: #f7f3ed;
    --faq-white: #ffffff;
    --faq-gray: #666666;
    --faq-border: rgba(212, 165, 116, 0.15);
    --faq-hover: rgba(212, 165, 116, 0.1);
}

/* Page Layout */
.faq-page {
    background: linear-gradient(to bottom, var(--faq-light) 0%, var(--faq-white) 100%);
    min-height: 100vh;
}

/* Hero Section */
.faq-hero {
    background: linear-gradient(135deg, var(--faq-dark) 0%, #3a2318 100%);
    color: var(--faq-white);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: var(--faq-white);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 400;
}

.search-faq {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-faq input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid rgba(212, 165, 116, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.search-faq input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-faq i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faq-primary);
    font-size: 1.2rem;
}

/* Content Area */
.faq-content {
    padding: 4rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

/* Sidebar */
.faq-sidebar {
    position: sticky;
    top: 2rem;
}

.faq-categories {
    background: var(--faq-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--faq-border);
}

.faq-categories h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--faq-dark);
    font-weight: 600;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--faq-primary);
}

.category-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-links li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--faq-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

.category-link:hover,
.category-link.active {
    background: var(--faq-light);
    color: var(--faq-primary);
    transform: translateX(5px);
}

.category-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--faq-primary);
    border-radius: 0 3px 3px 0;
}

/* Main Content */
.faq-main {
    max-width: 800px;
}

.faq-category {
    background: var(--faq-white);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--faq-border);
    position: relative;
}

.faq-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--faq-primary) 0%, var(--faq-secondary) 100%);
    border-radius: 16px 16px 0 0;
}

.faq-category h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: var(--faq-dark);
    margin-bottom: 2rem;
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--faq-border);
}

.faq-category h2 i {
    color: var(--faq-primary);
    font-size: 1.2rem;
}

/* FAQ Items */
.faq-item {
    border: 1px solid var(--faq-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: var(--faq-primary);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    background: var(--faq-light);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--faq-hover);
}

.faq-question h4 {
    font-size: 1.1rem;
    color: var(--faq-dark);
    margin: 0;
    font-weight: 600;
    flex: 1;
    padding-right: 1rem;
}

.faq-question i {
    color: var(--faq-primary);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--faq-white);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p,
.faq-answer ul,
.faq-answer ol {
    color: var(--faq-gray);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.faq-answer p:last-child,
.faq-answer ul:last-child,
.faq-answer ol:last-child {
    margin-bottom: 0;
}

.faq-answer a {
    color: var(--faq-primary);
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    color: var(--faq-secondary);
    text-decoration: underline;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 1.5rem;
}

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

/* Need Help Section */
.need-help-section {
    background: linear-gradient(135deg, var(--faq-light) 0%, var(--faq-white) 100%);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    border: 2px solid var(--faq-primary);
    margin-top: 3rem;
}

.need-help-section h2 {
    font-size: 2rem;
    color: var(--faq-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.need-help-section p {
    font-size: 1.1rem;
    color: var(--faq-gray);
    margin-bottom: 2rem;
}

.help-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Increased from 250px */
    gap: 2rem;
    max-width: 650px; /* Increased from 600px */
    margin: 0 auto;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Increased from 1rem */
    padding: 2rem 1.5rem; /* Increased from 1.5rem */
    background: var(--faq-white);
    border-radius: 12px;
    text-decoration: none;
    color: var(--faq-dark);
    transition: all 0.3s ease;
    border: 2px solid var(--faq-border);
    min-width: 0; /* Allow flex items to shrink */
}

.help-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--faq-primary);
}

.help-option i {
    font-size: 2rem;
    color: var(--faq-primary);
    flex-shrink: 0;
}

.help-option div {
    text-align: left;
    flex: 1; /* Added to ensure proper spacing */
    min-width: 0; /* Allow text to wrap properly */
    overflow-wrap: break-word; /* Break long words if needed */
}

.help-option strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem; /* Increased from 0.25rem */
    color: var(--faq-dark);
}

.help-option span {
    font-size: 0.95rem;
    color: var(--faq-gray);
    line-height: 1.4;
    word-break: break-all; /* Break the email address if it's too long */
    display: block; /* Ensure it takes full width */
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faq-sidebar {
        position: static;
        order: -1;
    }
    
    .category-links {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .category-link {
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .faq-hero {
        padding: 4rem 0 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .faq-category {
        padding: 2rem 1.5rem;
    }
    
    .help-options {
        grid-template-columns: 1fr;
        max-width: 100%;    }
    
    .help-option {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2.5rem 2rem;
    }
    
    
    .help-option div {
        text-align: center;
        width: 100%; /* Ensure full width on mobile */

    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .faq-category h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h4 {
        font-size: 1rem;
    }

    .help-option {
        padding: 2rem 1.5rem;
    }

    .help-option span {
        font-size: 0.9rem; /* Slightly smaller on very small screens */
    }
}

/* FAQ JavaScript Enhancement */
.faq-item {
    scroll-margin-top: 2rem;
}

/* Search highlighting */
mark {
    background: var(--faq-primary);
    color: white;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}