* {
    box-sizing: border-box;
    font-family: "Roboto", "Arial" , sans-serif;
}

body {
    padding: 0px;
    margin: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    background-color: #faf8f3;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.dark-mode header {
    background-color: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .profile-sidebar {
    background-color: #242424;
}

.dark-mode .profile-card {
    background-color: #2c2c2c;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .profile-title {
    opacity: 0.7;
}

.dark-mode .progress-bar {
    background-color: #3a3a3a;
}

.dark-mode .gpa-item {
    background: linear-gradient(135deg, rgba(94, 195, 167, 0.15), rgba(91, 143, 199, 0.15)) !important;
    border-color: rgba(94, 195, 167, 0.2) !important;
}

.dark-mode .gpa-label {
    color: #aaa;
}

.dark-mode .gpa-value {
    color: #5fc3a7;
}

.dark-mode .program-container {
    background-color: #242424;
}

.dark-mode .program-container .block {
    background: linear-gradient(to right, #2a2a2a, #333333);
    border-color: #444444;
}

.dark-mode .program-container .block .block_courses .blockClass {
    background-color: #2e2e2e;
    border-color: #555555;
    color: #e0e0e0;
}

.dark-mode .program-container .block .block_courses .blockClass span:nth-child(1) {
    color: #b0b0b0;
}

.dark-mode .program-container .block .block_courses .blockClass:hover {
    background-color: #3a3a3a;
}

.dark-mode .program-container .block .block_courses .blockClass.class_requisite {
    background-color: rgba(91, 192, 235, 0.2);
}

.dark-mode .program-container .block .block_courses .blockClass.class_opening {
    background-color: rgba(186, 85, 211, 0.2);
}

.dark-mode .status-pending {
    color: #888;
}

.dark-mode .status-pending:hover {
    color: #e0e0e0;
}

header {
    width: calc(100% - 2rem);
    max-width: 1400px;
    margin: 1rem auto 0;
    background-color: rgba(0, 32, 128, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 32, 128, 0.15);
    height: 90px;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    padding: 0 1rem;
}

.header-left {
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    text-align: left;
}

.header-center h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 2px;
}

.header-center p {
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-weight: 300;
}

.logo {
    height: 60px;
    width: auto;
}

.status-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.80rem;
}

.status-indicators .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
}

.status-indicator-color {
    display: inline-block;
    vertical-align: middle;
}

.status-indicator-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #999;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(0.9);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }
}

main {
    display: flex;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
    width: 280px;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
}

.profile-sidebar {
    flex-shrink: 0;
    width: 100%;
    background-color: #fffcf8;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0, 32, 128, 0.08);
}

.profile-card {
    background-color: #fffbf6;
    color: #1a1a1a;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 32, 128, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.profile-title {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.75;
    text-align: center;
}

.profile-progress {
    width: 100%;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E8B6F, #5fc3a7);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.gpa-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.gpa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.6rem;
    background: linear-gradient(135deg, rgba(46, 139, 111, 0.08), rgba(91, 143, 199, 0.08));
    border-radius: 10px;
    border: 1px solid rgba(46, 139, 111, 0.15);
    cursor: default;
}

.gpa-label {
    font-size: 0.65rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpa-value {
    font-size: 1rem;
    font-weight: 700;
    color: #002080;
}

.profile-badges {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.profile-badges .badge {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-align: center;
}

.profile-badges .badge strong {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.badges-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: default;
}

.badge:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.badge-approved {
    background-color: #2E8B6F;
    color: white;
    box-shadow: 0 2px 6px rgba(46, 139, 111, 0.3);
}

.badge-approved:hover {
    box-shadow: 0 4px 12px rgba(46, 139, 111, 0.5);
}

.badge-approved strong {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.badge-remaining {
    background-color: #5B8FC7;
    color: white;
    box-shadow: 0 2px 6px rgba(91, 143, 199, 0.3);
}

.badge-remaining:hover {
    box-shadow: 0 4px 12px rgba(91, 143, 199, 0.5);
}

.badge-remaining strong {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.badge-total {
    background-color: #37474F;
    color: white;
    box-shadow: 0 2px 6px rgba(55, 71, 79, 0.3);
}

.badge-total:hover {
    box-shadow: 0 4px 12px rgba(55, 71, 79, 0.5);
}

.badge-total strong {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.badge-program {
    background-color: #8B6BB1;
    color: white;
    box-shadow: 0 2px 6px rgba(139, 107, 177, 0.3);
}

.badge-program:hover {
    box-shadow: 0 4px 12px rgba(139, 107, 177, 0.5);
}

.badge-program strong {
    font-size: 0.9rem;
    margin-right: 0.3rem;
}

.program-container {
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding:1rem;
    background-color: #fffcf8;
    border-radius: 13px;
    box-shadow: 0 4px 16px rgba(0, 32, 128, 0.08);
}

.program-container h3 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.program-container .status-indicators {
    margin-top: 0.5rem;
}

.program-container .block {
    border: 1px solid #d4d4d4;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    border-radius: 5px;
    background: linear-gradient(to right, #eceff1, #fffefc);
}

.program-container .block .block_label {
    padding: 1rem;
    width: 3.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

.program-container .block .block_label.collapsible {
    width: auto;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.program-container .block .block_label.collapsible:hover {
    background-color: rgba(0, 32, 128, 0.1);
    border-radius: 5px;
}

.program-container .block .block_label.collapsible .toggle-icon {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.program-container .block .block_label.collapsible.active .toggle-icon {
    transform: rotate(180deg);
}

.program-container .block .block_courses {
    display: flex;
    flex:2;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem;
}
.program-container .block .block_courses .blockClass {
    display: flex;
    align-items: start;
    justify-content: center;
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
    padding: 0.85rem 0.75rem 0.75rem;
    flex-direction: column;
    font-size: 0.75rem;
    border: 1px solid #555;
    border-radius: 7px;
    width: 10rem;
    cursor: default;
    background-color: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease, max-height 0.3s ease;
    max-height: 200px;
}

.program-container .block .block_courses .blockClass:hover {
    max-height: 500px;
}

.program-container .block .block_courses .blockClass span:nth-child(1) {
    color: #444;
}

.program-container .block .block_courses .blockClass span:nth-child(2) {
    font-weight: bold;
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

.course-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    transition: max-height 0.3s ease;
    max-height: 2.4em;
}

.program-container .block .block_courses .blockClass:hover .course-name {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    max-height: 500px;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0rem;
}

.program-container .block .block_courses .blockClass::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.45rem;
    background-color: var(--status-color, transparent);
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}

.program-container .block .block_courses .blockClass:hover {
    background-color: rgba(254, 255, 212, 0.9);
    transform: translateY(-3px);
}

.program-container .block .block_courses .blockClass.class_requisite{
    background-color: rgba(183, 248, 255, 0.9);
}

.program-container .block .block_courses .blockClass.class_opening{
    background-color: rgba(255, 190, 253, 0.9);
}

.program-container .block .block_courses .blockClass span:nth-child(3) {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    display: none;
}

.course-info-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.15rem;
    width: 100%;
}

.course-grade {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background-color: rgba(0, 32, 128, 0.1);
    font-size: 0.7rem;
    font-weight: 600;
    color: #002080;
}

.course-year {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}

.dark-mode .course-grade {
    background-color: rgba(91, 192, 235, 0.15);
    color: #5bc0eb;
}

.dark-mode .course-year {
    color: #999;
}

.status-approved { 
    --status-color: #28a745;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.status-approved:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

.status-indicator-aprobado .status-indicator-color {
    background-color: #28a745;
    border-color: #1e7e34;
    box-shadow: 0 0 3px rgba(40, 167, 69, 0.4), 0 0 6px rgba(40, 167, 69, 0.2);
}

.status-failed { 
    --status-color: #dc3545;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.status-failed:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
}

.status-indicator-reprobado .status-indicator-color {
    background-color: #dc3545;
    border-color: #bb2d3b;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.4), 0 0 6px rgba(220, 53, 69, 0.2);
}

.status-pending { 
    --status-color: #9ea3a7;
    box-shadow: 0 2px 6px rgba(158, 163, 167, 0.3);
    color: #999;
}

.status-pending:hover {
    box-shadow: 0 4px 12px rgba(158, 163, 167, 0.5);
    color: #000;
}

.status-indicator-pendiente .status-indicator-color {
    background-color: #9ea3a7;
    border-color: #6c7073;
    box-shadow: 0 0 3px rgba(158, 163, 167, 0.3), 0 0 6px rgba(158, 163, 167, 0.15);
}

.status-taking { 
    --status-color: #ffc107;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.status-taking:hover {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.status-indicator-cursando .status-indicator-color {
    background-color: #ffc107;
    border-color: #ff9800;
    box-shadow: 0 0 3px rgba(255, 193, 7, 0.4), 0 0 6px rgba(255, 193, 7, 0.2);
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 2rem);
    max-width: 1400px;
    margin: 2rem auto;
    background-color: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(15px);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(15, 15, 15, 0.2);
}

footer a {
    color: white;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
}

.dark-mode-switch {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    display: block;
    width: 51px;
    height: 31px;
    cursor: pointer;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 8px;
}

.dark-mode .dark-mode-switch {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dark-mode-switch input {
    opacity: 0 !important;
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(120, 120, 128, 0.16);
    transition: 0.4s;
    border-radius: 31px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.dark-mode-switch input:checked + .slider {
    background-color: rgba(120, 120, 128, 0.32);
}

.dark-mode-switch input:focus + .slider {
    box-shadow: 0 0 1px rgba(120, 120, 128, 0.5);
}

.dark-mode-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.dark-mode .slider {
    background-color: rgba(120, 120, 128, 0.32);
}

.slider .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.3s;
    z-index: 1;
}

.slider .sun {
    left: 6px;
    opacity: 1;
}

.slider .moon {
    right: 6px;
    opacity: 0.3;
}

.dark-mode-switch input:checked + .slider .sun {
    opacity: 0.3;
}

.dark-mode-switch input:checked + .slider .moon {
    opacity: 1;
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
        padding: 0.5rem;
    }

    .sidebar-wrapper {
        width: 100%;
        position: static;
    }

    .profile-sidebar {
        width: 100%;
        position: static;
    }

    .profile-card {
        position: static;
        padding: 2rem 1.5rem;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .profile-name {
        font-size: 1.3rem;
    }

    .profile-title {
        font-size: 0.9rem;
    }

    .profile-badges {
        width: 100%;
    }

    .profile-badges .badge {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
    }

    header {
        height: auto;
        padding: 0.75rem;
    }

    .header-container {
        gap: 1rem;
    }

    .header-center h1 {
        font-size: 1.5rem;
    }

    .header-center p {
        font-size: 0.8rem;
    }

    .logo {
        height: 45px;
    }

    .program-container {
        padding: 0.5rem;
    }

    .program-container .block {
        flex-direction: column;
        gap: 0.5rem;
    }

    .program-container .block .block_label {
        width: 100%;
        padding: 0.5rem;
        font-size: 1.2rem;
    }

    .program-container .block .block_courses {
        width: 100%;
        justify-content: center;
    }

    .program-container .block .block_courses .blockClass {
        width: calc(50% - 0.375rem);
        min-width: 8rem;
    }
}

@media (max-width: 480px) {
    header {
        height: auto;
    }

    .header-container {
        gap: 0.75rem;
    }

    .header-center h1 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .header-center p {
        font-size: 0.75rem;
    }

    .logo {
        height: 40px;
        width: auto;
    }

    .status-indicators {
        display: grid;
        grid-template-columns: 0.3fr 0fr;
        gap: 0.3rem;
        font-size: 0.70rem;
        justify-items: start;
    }

    .badges-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: space-evenly;
    }

    .badge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex: 0 1 45%;
        text-align: center;
    }

    .badge strong {
        font-size: 0.95rem;
    }

    .program-container h3 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .program-container .status-indicators {
        margin-top: 0rem;
    }

    .program-container .block .block_courses .blockClass {
        width: calc(50% - 0.4rem);
        min-width: unset;
        align-items: start;
        text-align: start;
    }

    .program-container .block .block_courses {
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .program-container .block:nth-child(15) .block_courses {
        justify-content: center;
    }

    .program-container .block:nth-child(15) .block_courses .blockClass {
        width: 70%;
    }
}
