/* FAQ PAGE STYLES */

/* Basic resets & typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.5;
    color: #333;
}

/* FAQ Hero Section */
.faq-hero {
    background: var(--gray-50);
    padding: 8rem 1rem 4rem; /* Increased top padding to account for navbar */
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

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

.faq-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.faq-hero p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Search Bar */
.faq-search {
    margin: 2rem auto;
    max-width: 600px;
}

.search-wrapper {
    position: relative;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.search-wrapper:focus-within {
    box-shadow: var(--shadow-md);
}

.search-wrapper input[type="search"] {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-wrapper input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
}

.search-wrapper .search-icon {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

.search-wrapper .clear-search-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: none; /* Shown dynamically via JS */
    color: #888;
}

/* FAQ Section Layout */
.faq-section {
    padding: 4rem 1rem;
    background: var(--white);
}

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

.faq-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sidebar Categories */
.faq-sidebar {
    position: sticky;
    top: 100px; /* Account for navbar */
    height: fit-content;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.category-tab {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.category-tab:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.category-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.category-tab i {
    min-width: 20px;
    text-align: center;
}

/* Main FAQ Content */
.faq-main {
    flex: 1;
}

.faq-content {
    padding: 1rem;
}

/* FAQ Categories - Updated */
.faq-category {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show all categories when "all" is selected */
.faq-category.show-all,
.category-tab[data-category="all"].active ~ .faq-content .faq-category {
    display: block;
    opacity: 1;
}

/* Show specific category when active */
.faq-category.active {
    display: block;
    opacity: 1;
}

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

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.faq-question h3 {
    flex: 1;
    margin-right: 1rem;
    font-size: 1.1rem;
    color: var(--gray-900);
    font-weight: 600;
}

.toggle-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    transition: all 0.3s ease-in-out;
}

.faq-answer .answer-content {
    padding: 1rem 0;
    color: var(--gray-700);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: none; /* Changed from fixed height */
}

/* Search Results Styling */
.faq-content.searching .faq-category {
    display: block !important;
    opacity: 1;
}

.faq-content.searching .faq-item {
    display: none;
}

.faq-content.searching .faq-item.search-match {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Highlight for search results */
.highlight {
    background-color: yellow;
}

/* No results message */
.no-results {
    background: #ffecec;
    border: 1px solid #ffcccc;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    color: #cc0000;
}

/* Updated Contact Section Styles */
.faq-contact {
    margin-top: 4rem;
    padding: 3rem 1rem;
    background: linear-gradient(to bottom, var(--gray-50), var(--white));
    border-top: 1px solid var(--gray-200);
}

.contact-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-header h3 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-card h4 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

/* Quick Contact Options */
.quick-contact .contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: var(--gray-50);
    text-decoration: none;
    color: var(--gray-900);
    transition: all 0.3s ease;
}

.contact-option:hover {
    background: var(--primary);
    color: var(--white);
}

.option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    margin-right: 1rem;
}

.contact-option:hover .option-icon {
    background: rgba(255, 255, 255, 0.2);
}

.option-content {
    display: flex;
    flex-direction: column;
}

.option-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.option-value {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Contact Form Card */
.contact-form-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-form-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.contact-form-card .button {
    padding: 1rem 2rem;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Social Links */
.social-links {
    text-align: center;
    margin-top: 2rem;
}

.social-links p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.social-button:hover {
    transform: translateY(-3px);
}

.social-button.facebook:hover {
    background: #1877f2;
    color: white;
}

.social-button.instagram:hover {
    background: #e4405f;
    color: white;
}

.social-button.linkedin:hover {
    background: #0077b5;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-header h3 {
        font-size: 1.75rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-option {
        padding: 0.875rem;
    }

    .option-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .faq-contact {
        padding: 2rem 1rem;
    }

    .contact-header h3 {
        font-size: 1.5rem;
    }

    .contact-icon {
        font-size: 2rem;
    }

    .social-buttons {
        gap: 0.75rem;
    }

    .social-button {
        width: 36px;
        height: 36px;
    }
}

/* Responsive (Mobile) */
@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: 200px 1fr;
    }
}

/* Mobile Styles - Updated */
@media (max-width: 768px) {
    .faq-hero {
        padding: 5rem 1rem 2rem;
    }
    
    .faq-layout {
        grid-template-columns: 1fr;
    }
    
    .faq-sidebar {
        display: none; /* Hide desktop sidebar */
    }
    
    /* Mobile Category Select - Improved */
    .mobile-category-select {
        display: block;
        position: sticky;
        top: 70px;
        z-index: 100;
        background: var(--white);
        width: 100%;
        padding: 1rem;
        margin: 0;
        border: none;
        border-bottom: 1px solid var(--gray-200);
        font-size: 1rem;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* Main Content Layout - Updated */
    .faq-section {
        padding: 0;
    }
    
    .faq-container {
        padding: 0;
    }
    
    .faq-content {
        padding: 1rem;
    }
    
    /* Category Display - Fixed */
    .faq-category {
        display: none;
        margin-bottom: 2rem;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .faq-category.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Search Results - Updated */
    .faq-content.searching .faq-category {
        display: block;
    }
    
    .faq-content.searching .faq-item:not(.search-match) {
        display: none;
    }
    
    .faq-content.searching .faq-item.search-match {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

@media (max-width: 480px) {
    .faq-hero h1 {
        font-size: 1.75rem;
    }
    
    .faq-hero p {
        font-size: 1rem;
    }
    
    .search-wrapper input[type="search"] {
        padding: 0.875rem 3rem 0.875rem 1rem;
    }
}

/* Mobile Category Dropdown - Updated */
.mobile-category-select {
    display: none;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background-color: var(--white);
    margin: 1rem 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    box-shadow: var(--shadow-sm);
}

.mobile-category-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

