/* ==========================================================================
   GLOBAL STYLING
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Reddit Sans', sans-serif; 
}

body {
    background-color: #f8f9fd;
    color: #2d2d30;
    overflow-x: hidden;
}

/* ==========================================================================
   EXACT PROVIDED SIDEBAR COMPONENT INTEGRATION
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    min-height: 100vh;
    width: 92px;
    background-color: #5848CB;
    padding: .4rem .8rem;
    transition: all 0.5s ease;
    z-index: 999;
}

.sidebar.active {
    width: 250px;
}

.sidebar.active ~ .main-content {
    left: 250px;
    width: calc(100% - 250px);
}

.main-content {
    position: relative;
    background-color: #f8f9fd; /* Maintained the fresh light backdrop color */
    min-height: 100vh;
    top: 0;
    left: 92px;
    transition: all 0.5s ease;
    width: calc(100% - 92px);
    padding: 1.5rem 3rem; /* Enhanced padding behavior to keep layout spaced */
}

.sidebar #btn {
    position: absolute;
    color: #fff;
    top: 0.8rem;
    left: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.4s ease;
    margin-bottom: 30px;
}

.sidebar.active #btn {
    left: 50%;
    transform: translateX(-50%);
}

.sidebar .top .logo {
    width: 100%;
    opacity: 1;
    margin-top: 70px;
    margin-bottom: 35px;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.logo-link img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.sidebar.active .logo-link img {
    width: 70px;
    height: 70px;
}

.logo-link span {
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sidebar:not(.active) .logo-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.sidebar.active .logo-link span {
    opacity: 1;
    width: auto;
}

.top .logo i {
    font-size: 2rem;
    margin-right: 5px;
}

.bold {
    font-weight: 600;
}

.sidebar p {
    opacity: 0;
}

.sidebar.active p {
    opacity: 1;
}

.nav-list {
    margin-top: 35px;
}

.sidebar ul li {
    position: relative;
    list-style-type: none;
    margin: 12px 0;
    line-height: 50px;
    display: flex;
    justify-content: center;
}

.sidebar ul li a {
    color: #fff;
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    border-radius: 0.8rem;
    padding-left: 10px;
}

.sidebar ul li a:hover {
    background-color: #fff;
    color: #5848CB;
}

.sidebar ul li a i {
    min-width: 50px;
    text-align: center;
    height: 50px;
    border-radius: 12px;
    line-height: 50px;
    font-size: 1.4rem;
}

.sidebar .nav-item {
    opacity: 0;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.sidebar.active .nav-item {
    opacity: 1;
}

.sidebar ul li .tooltip {
    position: absolute;
    left: 125px;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0.5rem 0.8rem rgba(0, 0, 0, 0.2);
    border-radius: .6rem;
    padding: .4rem 1.2rem;
    line-height: 1.8rem;
    z-index: 20;
    opacity: 0;
    background: white;
    color: #000;
}

.sidebar.active ul li .tooltip {
    display: none;
}

.sidebar:not(.active) .logo-link {
    transform: translateX(6px);
}

.sidebar.active .top .logo {
    display: flex;
    justify-content: flex-start;
    padding-left: 22px;
}

/* ==========================================================================
   TOP LIGHT PANEL NAVIGATION & WINDOW COMPONENT CONTROLS
   ========================================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 3rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #7b7993;
    font-size: 1.2rem;
}

.search-box input {
    background: #ffffff;
    border: 1px solid #e2e4f0;
    outline: none;
    padding: 12px 15px 12px 45px;
    border-radius: 24px;
    color: #333;
    width: 320px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #5848CB;
    box-shadow: 0 4px 16px rgba(88,72,203,0.1);
}

.topbar-icons {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #696784;
    font-size: 1.4rem;
}

.topbar-icons i { cursor: pointer; transition: color 0.2s; }
.topbar-icons i:hover { color: #5848CB; }

.avatar-link {
    display: flex;
    align-items: center;
}

.topbar-icons .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.topbar-icons .avatar:hover { transform: scale(1.08); }

/* ==========================================================================
   ACADEMIC TIMELINE STRUCTURE (JANUARY - DECEMBER EXTENDED AXIS)
   ========================================================================== */
.timeline-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-title {
    color: #1c1a36;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-align: center;
}

.year-dropdown-container {
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.clean-year-select {
    background-color: #ffffff;
    color: #5848CB;
    border: 1px solid #e1e3f2;
    padding: 10px 40px 10px 24px; /* Dinagdagan ang padding sa kanan para sa bagong arrow */
    font-size: 1rem;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 12px rgba(88, 72, 203, 0.05);
    transition: all 0.2s ease;
    text-align: center;

    /* Pwersahang tinanggal ang default native browser arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Naglagay ng custom inline minimalist SVG arrow para laging perfect center */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235848CB' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.clean-year-select:hover {
    background-color: #f1efff;
    border-color: #5848CB;
}

/* Siniguro na ang text sa loob ng drop-down options ay laging nakagitna at malinis */
.clean-year-select option {
    background-color: #ffffff;
    color: #2d2d30;
    font-weight: 600;
    text-align: center;
}

/* Spine Track Axis Line */
.timeline-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e4f0;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-img-box, 
.timeline-text-box {
    width: 50%;
    padding: 0 35px;
}

.left-img .timeline-img-box { display: flex; justify-content: flex-end; }
.left-img .timeline-text-box { text-align: left; }
.right-img .timeline-text-box { text-align: right; }
.right-img .timeline-img-box { justify-content: flex-start; }

.timeline-img-box img {
    width: 100%;
    max-width: 250px;
    height: 155px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(26, 23, 54, 0.05);
    border: 3px solid #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-img-box img:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 28px rgba(88, 72, 203, 0.15);
}

.clickable-card {
    cursor: pointer;
    border-radius: 12px;
    padding: 10px;
    transition: background 0.2s ease;
}
.clickable-card:hover {
    background: rgba(88, 72, 203, 0.03);
}

/* Timeline Central Node Points */
.timeline-dot {
    position: absolute;
    left: 50%;
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border: 3px solid #5848CB;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 0 0 4px rgba(88,72,203,0.1);
}

/* Typography Configs */
.month-label {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #5848CB;
    margin-bottom: 2px;
}

.timeline-text-box h3 {
    color: #1c1a36;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-text-box p {
    color: #696784;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ==========================================================================
   DYNAMIC MODAL COMPONENT WINDOWS
   ========================================================================== */
.timeline-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 14, 28, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.timeline-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 700px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.timeline-modal.open .modal-card {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 22px;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal-btn:hover { color: #333; }

.modal-body-split {
    display: flex;
    gap: 30px;
    align-items: center;
}

.modal-preview-area {
    width: 50%;
    flex-shrink: 0;
}
.modal-preview-area img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

.modal-info-area {
    width: 50%;
}
.modal-info-area h2 {
    font-size: 1.6rem;
    color: #1c1a36;
    margin-bottom: 10px;
    font-weight: 800;
}
.modal-info-area p {
    color: #696784;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE LAYOUTS
   ========================================================================== */
@media(max-width: 768px) {
    .modal-body-split { flex-direction: column; gap: 15px; }
    .modal-preview-area, .modal-info-area { width: 100%; }
    .modal-preview-area img { height: 180px; }
    .timeline-img-box, .timeline-text-box { padding: 0 15px; }

}