/* DBA TOGGLE */


.phase-section {
    background: white;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.phase-header {
    /* background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); */
    background-color: #e5f1ff;
    color: black;
    padding: 16px 60px 16px 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.phase-header.phase-2 {
    /* background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%); */
}

.phase-header.phase-3 {
    /* background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); */
}

.phase-header:hover {
    opacity: 0.95;
}

.phase-title {
    font-size: 20px;
    font-weight: 600;
}

.phase-focus {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.9;
    max-width: 600px;
}

.phase-toggle {
    font-size: 24px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.phase-toggle:hover {
}

.phase-content {
    display: block;
    padding: 0;
    animation: slideDown 0.3s ease;
}

.phase-content.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modules-table th:first-child,
.modules-table td:first-child {
    width: 85%;
}

.modules-table th.ects,
.modules-table td.ects {
    width: 15%;
}

.modules-table {
    width: 100%;
    border-collapse: collapse;
}

.modules-table thead {
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    border: 1px solid #e0e0e0;
}

.modules-table th {
    padding: 8px 18px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modules-table td {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: top;
}

.modules-table td strong {
    font-size: 15px;
}

.modules-table tbody tr:hover {
    background-color: #f9f9f9;
}

/*
.module-code {
    font-weight: 600;
    color: #2c3e50;
    min-width: 66px;
}
*/

.module-title {
    font-weight: 400;
    color: #1a252f;
}

.ects {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    min-width: 20px;
}

.ects-label {
    display: none;
}

.md-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.phase-header-content {
    flex: 1;
}

.program-total {
    margin: 24px;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    border: 0;
}

/* ===== TABLET (768px and below) ===== */
@media (max-width: 768px) {
    .phase-header {
        padding: 12px 50px 12px 16px;
    }

    .phase-title {
        font-size: 18px;
    }

    .phase-focus {
        font-size: 13px;
        margin-top: 4px;
    }

    .phase-toggle {
        width: 32px;
        height: 32px;
        font-size: 20px;
        right: 12px;
    }

    .modules-table th,
    .modules-table td {
        padding: 12px;
        font-size: 13px;
    }

    .modules-table th {
        font-size: 12px;
    }

    /*
    .module-code {
        min-width: 50px;
        font-size: 13px;
    }
    */

    .ects {
        min-width: 40px;
        font-size: 13px;
    }

    .program-total {
        margin: 16px;
        font-size: 14px;
    }
}

/* ===== MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    .phase-section {
        margin-bottom: 16px;
    }

    .phase-header {
        padding: 12px 50px 12px 12px;
    }

    .phase-header-content {
        width: 100%;
    }

    .phase-title {
        font-size: 16px;
    }

    .phase-focus {
        font-size: 12px;
        max-width: 100%;
        line-height: 1.4;
        margin-top: 4px;
    }

    .phase-toggle {
        width: 30px;
        height: 30px;
        font-size: 18px;
        right: 12px;
    }

    .modules-table {
        font-size: 12px;
    }

    .modules-table th {
        font-size: 10px;
        letter-spacing: 0;
        padding: 8px 4px;
    }

    .modules-table thead {
        display: none;
    }

    .modules-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 2px solid #e0e0e0;
        padding: 8px;
        gap: 8px;
        align-items: center;
    }

    .modules-table td {
        padding: 4px;
        font-size: 12px;
        border-bottom: none;
    }

    /*
    .module-code {
        min-width: 45px;
        font-size: 11px;
        font-weight: 400;
        flex: 0 0 auto;
        order: 2;
    }
    */

    .module-title {
        word-break: break-word;
        flex: 1 1 100%;
        font-size: 12px;
        order: 1;
        padding-top: 0;
    }

    .module-title strong {
        font-size: 12px;
    }

    .ects {
        min-width: 30px;
        font-size: 12px;
        text-align: right;
        flex: 0 0 auto;
        margin-left: auto;
        font-weight: 400;
        order: 3;
    }

    .ects-label {
        display: inline;
        margin-right: 4px;
    }

    .program-total {
        margin: 12px 8px;
        font-size: 13px;
    }
}

/* ===== SMALL MOBILE (360px and below) ===== */
@media (max-width: 360px) {
    .phase-title {
        font-size: 14px;
    }

    .phase-focus {
        font-size: 11px;
    }

    .modules-table th,
    .modules-table td {
        padding: 6px;
        font-size: 10px;
    }

    /*
    .module-code {
        min-width: 40px;
    }
    */

    .ects {
        min-width: 25px;
    }
}
/* END OF DBA TOGGLE */