/* IEEE Color Palette */
:root {
    --ieee-blue: 0, 98, 155;
    --cyan: 0, 181, 226;
    --teal: 0, 156, 166;
    --dark-teal: 0, 115, 119;
    --dark-green: 0, 99, 65;
    --green: 0, 132, 61;
    --olive-green: 101, 141, 27;
    --bright-green: 120, 190, 32;
    --yellow: 255, 209, 0;
    --dark-yellow: 255, 199, 44;
    --orange: 255, 163, 0;
    --dark-orange: 232, 119, 34;
    --red: 186, 12, 47;
    --dark-red: 134, 32, 65;
    --purple: 152, 29, 151;
    --dark-purple: 119, 37, 131;
    --dark-blue: 0, 40, 85;
    --gray: 117, 120, 123;

    /* EMBS */
    --embs-primary: 119, 37, 131;
    --embs-secondary: 0, 98, 155;

    /* RAS */
    --ras-primary: 152, 0, 46;
    --ras-secondary: 97, 17, 106;

    /* CAS */
    --cas-primary: 0 135 81;
    --cas-secondary: 35, 31, 32;

    /* WIE */
    --wie-primary: 119 37 131;
    --wie-secondary: 117 120 123;

    /* CS */
    --cs-primary: 255 163 0;
    --cs-secondary: 0 0 0;
}

/* =========================
   CHAPTERS HERO
========================= */

.chapters-hero {
    background: linear-gradient(rgba(0, 0, 50, 0.6), rgba(0, 0, 50, 0.6)),
        url("icons&logos/banner.jpg") center/cover no-repeat;
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.chapters-hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.chapters-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* =========================
   CHAPTER CARDS
========================= */

.chapter-list {
    display: flex;
    width: 100%;
    gap: 30px;
    align-items: flex-start;
}

.chapter-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 500px;
}

.chapter-card {
    background: white;
    border-radius: 12px;
    padding: 40px 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: 0.3s ease;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 150px;
}

.chapter-card:hover {
    transform: translateY(-5px);
}

.chapter-card:has(+ .chapter-activity-wrap.active) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.static-chapters .chapter-card {
    cursor: default;
    transition: 0.3s ease;
}

.static-chapters .chapter-card:hover {
    transform: translateY(-5px);
}

.chapter-card {
    text-align: center;
}

.static-chapters .chapter-card {
    text-align: justify;
    /* hyphens: auto; */
}

.chapter-abbrev {
    display: block;
    margin-bottom: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
}

.chapter-abbrev.embs {
    color: rgb(var(--embs-secondary));
}

.chapter-abbrev.ras {
    color: rgb(var(--ras-primary));
}

.chapter-abbrev.cas {
    color: rgb(var(--cas-primary));
}

.chapter-abbrev.wie {
    color: rgb(var(--wie-primary));
}

.chapter-abbrev.cs {
    color: rgb(var(--cs-primary));
}

.static-chapters .chapter-card h3,
.static-chapters .chapter-card p {
    text-align: justify;
}

.chapter-card h3 {
    margin-bottom: 10px;
}

.chapter-card.embs h3 {
    color: rgb(var(--embs-secondary));
}

.chapter-card.ras h3 {
    color: rgb(var(--ras-primary));
}

.chapter-card.cas h3 {
    color: rgb(var(--cas-primary));
}

.chapter-card.wie h3 {
    color: rgb(var(--wie-primary));
}

.chapter-card.cs h3 {
    color: rgb(var(--cs-primary));
}

.chapter-card p {
    color: #555;
}

.chapter-header img{
    display: inline;
}

.chapter-header h3 {
    display: inline;
    margin-bottom: 0;
}

.chapter-logo {
    margin-right: 10px;
}

.chapter-logo.logo_cas {
    height: 60px;
    width: auto;
    vertical-align: -17px;
}


.chapter-logo.logo_ras {
    height: 50px;
    width: auto;
    vertical-align: -13px;
}

.chapter-logo.logo_embs {
    height: 32px;
    width: auto;
    vertical-align: -6px;
}

.chapter-logo.logo_wie {
    height: 60px;
    width: auto;
    vertical-align: -18px;
}

.chapter-logo.logo_cs {
    height: 40px;
    width: auto;
    vertical-align: -10px;
}

/* =========================
   DROPDOWN ACTIVITIES - CARD STYLE
========================= */

.chapter-activity-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
    overflow: hidden;
}

.chapter-activity-wrap.active {
    grid-template-rows: 1fr;
}

.chapter-activity {
    min-height: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 30px 50px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: grid;
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.chapter-activity-wrap.active .chapter-activity {
    opacity: 1;
    transform: translateY(0);
}

.activity-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.activity-block>summary {
    list-style: none;
}

.activity-block>summary::-webkit-details-marker {
    display: none;
}

.activity-block:not([open]) .activity-subactivities {
    display: none;
}

.activity-block[open] .activity-subactivities {
    display: block;
}

/* Activity Card */

.activity-header {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
    transition: 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.activity-block[open] .activity-header {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.activity-header:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Image */

.activity-header img {
    width: 150px;
        height: auto;
    background-color: #f0f0f0;
}

/* Title */

.activity-header span {
    display: block;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
}

.chapter-activity.embs {
    color: rgb(var(--embs-primary));
}

.chapter-activity.ras {
    color: rgb(var(--ras-secondary));
}

.chapter-activity.cas {
    color: rgb(var(--cas-secondary));
}

.chapter-activity.wie {
    color: rgb(var(--wie-primary));
}

.chapter-activity.cs {
    color: rgb(var(--cs-secondary));
}

.activity-subactivities {
    margin-left: 20px;
    padding: 8px 0 8px 18px;
    border-left: 2px solid #f0f0f0;
    border-radius: 0;
    background: transparent;
    color: #555;
    box-shadow: none;
    transition: transform 0.3s ease;
    animation: fadeUp 0.35s ease both;
}

.activity-block[open] .activity-subactivities {
    animation: fadeUp 0.35s ease both;
}

.activity-subactivities:hover {
    transform: translateY(-3px);
}

.activity-subactivities span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #002855;
}

.activity-subactivities ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.activity-subactivities li {
    list-style: disc;
    line-height: 1.5;
    padding: 0;
    border-radius: 0;
    background: transparent;
    transition: transform 0.25s ease;
}

.activity-subactivities .activity-item {
    display: list-item;
    width: auto;
    cursor: pointer;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    text-align: left;
    transition: transform 0.25s ease, color 0.25s ease;
}

.activity-subactivities .activity-item:hover {
    transform: translateX(6px);
    color: #002855;
    box-shadow: none;
}

.activity-subactivities li:hover {
    transform: translateX(6px);
}

/* =========================
   MODAL POPUP
========================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: fadeIn 0.3s ease;
    text-align: justify;
}

.modal-content img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 15px;
}

#modal-title {
    margin: 0 0 10px 0;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

.chapters-section {
    padding: 80px 40px;
    background-color: #ffffff;
}

.chapters-section h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    color: #00264d;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}