/* FAQ Page Styles */
:root {
    --sgc-brand: #2c5f7c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.sgc-hero {
    background-size: cover;
    background-position: center;
    padding: 120px 0;
    color: white;
    text-align: left;
}

.sgc-hero h1 {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 1px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: white !important;
}

/* Breadcrumb Navigation */
.sgc-breadcrumb-nav {
    background-color: #b8d4e3;
    padding: 6px 0;
    border-bottom: 1px solid #a0c4d4;
}

.sgc-breadcrumb-nav .container {
    background-color: #b8d4e3 !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sgc-breadcrumb-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.sgc-breadcrumb-nav li {
    color: black;
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    padding: 8px 25px 8px 0px;
    border-right: 1px solid #9a9ea6;
}

.sgc-breadcrumb-nav li:last-child {
    border-right: none;
}

.sgc-breadcrumb-nav li:hover {
    color: #1a4a63;
}

.sgc-breadcrumb-nav li.current-page {
    font-weight: 600;
    color: #003349;
}

.sgc-breadcrumb-nav li a {
    color: inherit;
    text-decoration: none;
}

/* Hide mobile navigation on desktop */
.mobile-nav-toggle {
    display: none !important;
}

/* Main Container */
.faq-main {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.faq-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px 20px 0px 20px;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.sidebar-categories {
    padding: 20px;
}

.sidebar-category {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
}

.sidebar-category:hover {
    background-color: #f8f9fa;
    color: var(--sgc-brand);
    transform: translateX(5px);
}

.sidebar-category.active {
    background-color: var(--sgc-brand);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(44, 95, 124, 0.3);
}

.sidebar-category.active:hover {
    background-color: #1a4a63;
    color: white;
    transform: translateX(0);
}

/* Main Content Area */
.faq-content {
    flex: 1;
    padding: 40px;
}

/* FAQ Category Content */
.faq-category-content {
    display: none;
}

.faq-category-content.active {
    display: block;
}

.category-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 500;
    border-bottom: 2px solid #2c5f7c;
    padding-bottom: 10px;
}

/* FAQ Items - Desktop (no accordion) */
.faq-items {
    max-width: 800px;
}

.faq-item {
    margin-bottom: 30px;
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.faq-answer {
    color: #555;
    line-height: 1.6;
    padding-left: 0;
}

.faq-answer-content p {
    margin-bottom: 15px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content *:last-child {
    margin-bottom: 0 !important;
}

.faq-answer-content {
    overflow: hidden;
}

.faq-answer-content p:empty {
    display: none;
}

.faq-answer-content a {
    color: #2c5f7c;
    text-decoration: none;
}

.faq-answer-content a:hover {
    text-decoration: underline;
}

/* Contact Section */
.faq-contact {
    max-width: 800px;
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 50px;
}

.faq-contact h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.faq-contact p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.contact-button {
    background-color: var(--sgc-brand);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: #1a4a63;
    color: white;
}

/* Error styling */
.faq-error {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Mobile FAQ Accordion */
@media (max-width: 1024px) {
    .faq-main {
        flex-direction: column;
    }

    .faq-sidebar {
        display: none;
    }

    .faq-content {
        padding: 20px;
    }

    /* Show all categories as expandable sections */
    .faq-category-content {
        display: block !important;
        margin-bottom: 30px;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .category-title {
        background: #f8f9fa;
        color: #333;
        padding: 18px 20px;
        margin: 0;
        font-size: 1.2rem;
        font-weight: 500;
        border-bottom: 1px solid #e9ecef;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
    }

    .category-title::after {
        content: "×";
        font-size: 1.6rem;
        transition: all 0.3s ease;
        color: #6c757d;
        font-weight: 300;
        line-height: 1;
    }

    .category-title.collapsed::after {
        content: "+";
        font-size: 1.4rem;
        transform: none;
    }

    .category-title:hover {
        background: #e9ecef;
    }

    .faq-items {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        background: white;
    }

    .faq-items.expanded {
        max-height: 2000px;
    }

    .faq-item {
        margin-bottom: 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        overflow: hidden;
    }

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

    .faq-question {
        width: 100%;
        background: white;
        border: none;
        padding: 20px;
        text-align: left;
        cursor: pointer;
        font-size: 1.1rem;
        font-weight: 500;
        color: #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.3s ease;
        margin-bottom: 0;
    }

    .faq-question:hover {
        background-color: #f8f9fa;
    }

    .faq-question::after {
        content: "+";
        font-size: 1.5rem;
        color: #2c5f7c;
        transition: transform 0.3s ease;
        flex-shrink: 0;
        margin-left: 20px;
    }

    .faq-question.active::after {
        transform: rotate(45deg);
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: #fafafa;
        padding-left: 0;
    }

    .faq-answer.active {
        max-height: 500px;
    }

    .faq-answer .faq-answer-content {
        padding: 20px;
    }

    .faq-answer-content *:last-child {
        margin-bottom: 0 !important;
    }

    .faq-answer-content p:empty {
        display: none;
    }
}

@media (max-width: 768px) {
    .sgc-hero {
        padding: 80px 0;
    }

    .sgc-hero h1 {
        font-size: 2rem;
        text-align: center;
    }

    /* Mobile Navigation - Amazon Style Horizontal Sliding */
    .sgc-breadcrumb-nav {
        background-color: #b8d4e3;
        padding: 0;
        border-bottom: 1px solid #a0c4d4;
        overflow-x: hidden;
    }

    .sgc-breadcrumb-nav .container {
        background-color: #b8d4e3 !important;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-toggle {
        display: none !important;
    }

    .sgc-breadcrumb-nav ul {
        display: flex !important;
        list-style: none;
        margin: 0;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
        gap: 0;
        flex-wrap: nowrap !important;
        width: 100%;
        min-width: 100%;
    }

    .sgc-breadcrumb-nav ul::-webkit-scrollbar {
        display: none;
    }

    .sgc-breadcrumb-nav li {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 12px 16px;
        font-size: 0.9rem;
        color: black;
        font-weight: 500;
        border-right: 1px solid #9a9ea6;
        transition: background-color 0.3s ease;
        min-width: max-content;
        display: inline-block;
    }

    .sgc-breadcrumb-nav li.current-page {
        font-weight: 600;
        color: #003349;
    }

    .sgc-breadcrumb-nav li:not(:last-child):hover {
        background-color: rgba(26, 74, 99, 0.1);
    }

    .sgc-breadcrumb-nav li a {
        color: inherit;
        text-decoration: none;
        display: block;
    }

    .sgc-breadcrumb-nav li:hover {
        color: #1a4a63;
    }

    /* Clean up FAQ answer spacing on mobile */
    .faq-answer-content *:last-child {
        margin-bottom: 0 !important;
    }

    .faq-answer-content p:empty {
        display: none;
    }
}

/* Desktop-only elements */
.mobile-categories-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-categories-toggle {
        display: block;
    }

    .sidebar-header {
        display: none;
    }
}