/* Font import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

body {
    font-family: 'Futura PT', 'Open Sans', sans-serif;
    background: white;
    color: #000;
    margin: 0;
    padding: 0;
}

.faq-intro {
    max-width: 800px;
    margin: 20px auto 10px auto;
    padding: 0 20px;
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
}

.faq-intro a {
    color: #7166AD;
    text-decoration: underline;
}

/* Search input styling */
#searchInput {
    width: 80%;
    padding: 10px;
    border: 2px solid #050505;
    border-radius: 5px;
}

/* Mobile specific styles */
@media (max-width: 600px) {
    /* Make the search bar full width */
    #searchInput {
        width: 90%;
        margin-top: 10px;
    }

    .faq-question {
        font-size: 18px;  /* Slightly smaller font size for mobile */
        padding: 15px;
    }

    .faq-answer {
        padding: 10px 15px;  /* Adjust padding for smaller screens */
    }
}

main {
    padding: 20px;
}

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

.search-wrapper {
    max-width: 800px;
    margin: 20px auto 0 auto; /* add top spacing */
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Makes it responsive */
    gap: 10px;
}

/* Floating card style for each question */
.faq-item {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Alternate background colors */
.faq-item:nth-child(even) .faq-question {
    background-color: #4CB9CE;
}
.faq-item:nth-child(odd) .faq-question {
    background-color: #7166AD;
}

/* Question styles */
.faq-question {
    padding: 20px;
    font-size: 20px;
    color: white;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
    position: relative;
    transition: background-color 0.3s ease;
    font-family: 'Futura PT', 'Open Sans', sans-serif;
}

/* Arrow style */
.faq-question::after {
    content: '▼';
    position: absolute;
    right: 20px;
    transition: transform 0.3s ease;
}

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

/* Answer styles */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
    background-color: #e6e6e6;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 18px;
    border-top: 1px solid #ccc;
    line-height: 1.6;
}

/* When open */
.faq-item.active .faq-answer {
    padding: 20px;
    max-height: none;  /* No limit for max height */
}

/* Back to top button */
#backToTopBtn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    padding: 12px 18px;  /* Adjusted padding for a more rounded button */
    background-color: rgba(128, 128, 128, 0.6); /* Semi-transparent grey */
    color: white;
    border: none;
    border-radius: 50%;  /* Circular button */
    font-size: 20px;      /* Larger font size for visibility */
    cursor: pointer;
    display: none;        /* Initially hidden */
    z-index: 9999;        /* Ensures it's on top of other elements */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);  /* Soft shadow to make it stand out */
    transition: opacity 0.3s ease;  /* Smooth opacity transition */
}

html {
    scroll-behavior: smooth;  /* Enables smooth scrolling */
}

@media (max-width: 600px) {
    .faq-question {
        font-size: 18px;  /* Slightly smaller font size for mobile */
        padding: 15px;
    }

    .faq-answer {
        padding: 10px 15px;  /* Adjust padding for smaller screens */
    }
}
