/*
 * ESG Topics Accordion - Enhanced Custom CSS with New Colors
 */

/* ==============================
   1. BASE WIDGET CONTAINER
   ============================== */

   .p-2 {
    padding: 10px;
   }

.esg-accordion {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0 auto;
    max-width: 1000px;
}

/* ==============================
   2. LEVEL 1: CATEGORY (The 3D Layer)
   ============================== */

.esg-accordion__category {
    margin-bottom: 16px;
    border-radius: 12px !important;
    overflow: hidden;
    /* 3D/Shadow Effect - Subtle Gray for professionalism */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.esg-accordion__category:hover {
    /* Subtle Lift on Hover */
    box-shadow: 0 15px 30px rgba(253, 133, 73, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05); /* Shadow matching the hover color */
    transform: translateY(-2px);
}

.esg-accordion__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    /* Primary Color Scheme */
    background: #558192; /* Normal BG Color */
    padding: 16px 24px !important;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFFFFF; /* White text for contrast */
    border: none;
    border-radius: 12px !important;
    transition: background 0.2s ease;
}

.esg-accordion__heading:hover {
    border-radius: 12px !important;
    background: #fd8549; /* Hover BG Color */
}

/* ==============================
   3. ICON STYLES (All Levels)
   ============================== */

.esg-accordion__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 16px;
    font-weight: 600;
    font-size: 1.2rem;
    color: #FFFFFF;
    transition: transform 0.3s ease;
}

/* Icon for Open State */
.esg-accordion__heading[aria-expanded="true"] .esg-accordion__icon,
.esg-accordion__subheading[aria-expanded="true"] .esg-accordion__icon,
.esg-accordion__tertiary[aria-expanded="true"] .esg-accordion__icon {
    transform: rotate(45deg);
}


/* ==============================
   4. CONTENT PANELS
   ============================== */

/* Level 1 Panel */
.esg-accordion__panel {
    padding: 0;
    background: #F8FAFC; /* Light Gray Background */
    border-top: 1px solid #E5E7EB;
}

/* Level 2 Panel */
.esg-accordion__subpanel {
    padding: 0;
    background: #FFFFFF; /* White background for the next layer */
}

/* Level 3 Panel */
.esg-accordion__terpanel {
    margin-top: 10px;
    padding: 10px 24px 20px 24px;
    border-radius: 12px;
    background: #F1F5F9;
    border-top: 1px solid #E5E7EB;
}

/* ==============================
   5. LEVEL 2: SUBCATEGORY (DESCRIPTION)
   ============================== */

.esg-accordion__subheading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #dddddd !important; /* Normal BG Color - Lighter Gray */
    padding: 12px 24px 12px 32px !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #374151;
    border: none;
    margin-top: 8px;
    border-radius: 12px !important;
    transition: background 0.2s ease;
}

.esg-accordion__subheading:hover {
    border-radius: 12px !important;
    background: #fd8549 !important; /* Hover BG Color */
    color: #FFFFFF; /* White text on hover for contrast */
}

/* Adjust Level 2 Icon Color */
.esg-accordion__subheading .esg-accordion__icon {
    color: #6B7280; /* Gray for normal state */
}
.esg-accordion__subheading:hover .esg-accordion__icon {
    color: #FFFFFF; /* White on hover */
}

/* ==============================
   6. LEVEL 3: TOPIC
   ============================== */

.esg-accordion__tertiary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #EEEEEE !important; /* Normal BG Color - Even Lighter Gray */
    padding: 10px 24px 10px 52px !important;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    color: #4B5563;
    border: none;
    margin-top: 8px;
    border-radius: 12px !important;
    transition: background 0.2s ease;
}

.esg-accordion__tertiary:hover {
    border-radius: 12px !important;
    background: #fd8549 !important; /* Hover BG Color */
    color: #FFFFFF; /* White text on hover */
}

/* Adjust Level 3 Icon Color */
.esg-accordion__tertiary .esg-accordion__icon {
    color: #9CA3AF;
}
.esg-accordion__tertiary:hover .esg-accordion__icon {
    color: #FFFFFF;
}

/* ==============================
   7. BOOK LIST (EXCELLENT DESIGN)
   ============================== */

.esg-book-list {
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.esg-book-item {
    /* Card-like item */
    background: #FFFFFF;
    padding: 10px 15px;
    font-size: 0.95rem;
    color: #374151;
    /* Use the accent color for the strip */
    border-left: 4px solid #fd8549; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.esg-book-item:hover {
    background: #F8FAFC;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.esg-book-item::before {
    content: none;
}

/* ==============================
   8. ANIMATION (For JavaScript)
   ============================== */

.esg-accordion__panel,
.esg-accordion__subpanel,
.esg-accordion__terpanel {
    display: none;
}