/* =========================================
   GLOSSARY PAGE STYLES - ACCORDION LAYOUT
   ========================================= */

.glossary-section {
    padding: 80px 0;
    font-family: 'Roboto', sans-serif;
}

/* --- Search Bar Styles --- */
/* --- Search Bar Styles (Long Strip Design) --- */
.search-bar-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
    border: 1px solid #eaeaea;
    display: block;
    /* Reset flex from previous style if needed, though annual report uses block wrapper */
    width: 100%;
    max-width: 1200px;
    /* Match glossary list width */
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.search-input-group {
    flex: 1;
    /* Takes up remaining space */
    position: relative;
    width: auto;
    /* Reset fixed width */
    max-width: none;
}

.search-input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    color: #495057;
    transition: border-color 0.2s;
    background-color: #fff;
    box-shadow: none;
    /* Remove previous shadow */
}

.search-input-group input:focus {
    border-color: #580000;
    box-shadow: 0 0 0 3px rgba(88, 0, 0, 0.1);
}

.search-input-group input::placeholder {
    color: #aaa;
}

.btn-search {
    background-color: #580000;
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    min-width: 150px;
    font-family: 'Roboto', sans-serif;
}

.btn-search:hover {
    background-color: #7a0000;
}

/* Hide the old icon styling if present in HTML comments or unused */
.search-icon-inside {
    display: none;
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
    }

    /* Reduce Search Button Width via Wrapper Padding */
    .search-bar-wrapper {
        padding: 20px 60px;
    }
}


/* --- Glossary List (Accordion) --- */
.glossary-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.glossary-item {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.glossary-item:hover {
    border-color: #d1b24a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.glossary-item.active {
    border-color: #580000;
    box-shadow: 0 5px 20px rgba(88, 0, 0, 0.08);
}


/* --- Header (Trigger) --- */
.term-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.glossary-item.active .term-header {
    background-color: #580000;
    /* Active Header Background */
}

.term-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

.glossary-item.active .term-title {
    color: #ffffff;
}

.toggle-icon {
    font-size: 14px;
    color: #d1b24a;
    transition: transform 0.3s ease;
}

.glossary-item.active .toggle-icon {
    transform: rotate(45deg);
    /* Turn + into x */
    color: #fff;
}


/* --- Definition (Content) --- */
.term-definition {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    background-color: #fcfcfc;
    padding: 0 25px;
    /* hidden initially */
    opacity: 0;
}

.glossary-item.active .term-definition {
    max-height: 500px;
    /* Arbitrary large height */
    padding: 20px 25px 25px 25px;
    opacity: 1;
    border-top: 1px solid #f0f0f0;
}

.term-definition p {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    font-weight: 400;
}

.term-definition p:last-child {
    margin-bottom: 0;
}

.term-definition ul {
    margin: 15px 0;
    padding-left: 20px;
    list-style: none;
}

.term-definition ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    color: #555;
}

.term-definition ul li::before {
    content: "•";
    color: #d1b24a;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 18px;
    line-height: 1;
    top: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .glossary-list {
        padding: 0 40px;
        /* Reduce card width by adding container padding */
    }

    .term-header {
        padding: 15px 20px;
    }

    .term-title {
        font-size: 16px;
    }

    .glossary-item.active .term-definition {
        padding: 15px 20px 20px 20px;
    }
}

/* --- Pagination Styles --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 8px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #555;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    /* Slightly rounded squares */
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Roboto', sans-serif;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #ebebeb;
    border-color: #ccc;
    color: #333;
}

.pagination-btn.active {
    background-color: #580000;
    /* SLECIC Maroon */
    color: #fff;
    border-color: #580000;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9f9f9;
}