/* ========================= */
/* RESET & VARIABLES         */
/* ========================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif !important;
}

:root {
  --navy:         #0a1f5c;
  --navy-mid:     #122580;
  --navy-light:   #1e3a8a;
  --red:          #dc2626;
  --red-dark:     #b91c1c;
  --red-glow:     rgba(220,38,38,0.28);
  --blue-glow:    rgba(18,37,128,0.18);
  --white:        #ffffff;
  --glass:        rgba(220,38,38,0.05);
  --glass-border: rgba(10,31,92,0.13);
  --off-white:    #f6f8ff;
}

/* ========================= */
/* SCROLLBAR                 */
/* ========================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f4ff; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red), var(--navy-light));
  border-radius: 10px;
}

/* ========================= */
/* TEXT SELECTION            */
/* ========================= */
::selection {
  background: rgba(220,38,38,0.15);
  color: var(--red-dark);
}

/* ========================= */
/* BODY                      */
/* ========================= */
body {
  background: var(--white);
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #1a1a2e;
  animation: pageFade 0.9s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes pageFade {
  from { opacity: 0; filter: blur(5px); transform: scale(0.99); }
  to   { opacity: 1; filter: blur(0);   transform: scale(1); }
}

/* ── Drifting background blobs ── */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(220,38,38,0.13), transparent 70%);
  animation: blobDriftA 14s ease-in-out infinite alternate;
}

body::after {
  width: 550px; height: 550px;
  bottom: -180px; left: -180px;
  background: radial-gradient(circle, rgba(18,37,128,0.14), transparent 70%);
  animation: blobDriftB 18s ease-in-out infinite alternate;
}

@keyframes blobDriftA {
  0%   { transform: translate(0,0)      scale(1); }
  33%  { transform: translate(-30px,40px) scale(1.07); }
  66%  { transform: translate(40px,20px)  scale(0.95); }
  100% { transform: translate(20px,-30px) scale(1.05); }
}
@keyframes blobDriftB {
  0%   { transform: translate(0,0)       scale(1); }
  33%  { transform: translate(35px,-25px) scale(1.06); }
  66%  { transform: translate(-20px,40px) scale(0.96); }
  100% { transform: translate(15px,30px)  scale(1.04); }
}

/* ========================= */
/* LAYOUT                    */
/* ========================= */
.main-container {
  flex: 1;
  display: flex;
  position: relative;
  z-index: 1;
}

/* ========================= */
/* SIDEBAR                   */
/* ========================= */
.sidebar {
  width: 290px;
  background: linear-gradient(165deg, #0d1f6e 0%, #0a1540 60%, #08102e 100%);
  padding: 36px 26px 44px;
  color: var(--white);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  align-self: flex-start;
  border-right: 1px solid rgba(220,38,38,0.18);
  box-shadow: 6px 0 50px rgba(10,31,92,0.25),
              inset -1px 0 0 rgba(255,255,255,0.04);
  z-index: 100;
  animation: sidebarSlide 0.7s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes sidebarSlide {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ── Animated shimmer left bar ── */
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--red), var(--navy-mid), var(--red), transparent);
  background-size: 100% 300%;
  animation: sidebarBar 4s linear infinite;
}
@keyframes sidebarBar {
  from { background-position: 0% 0%; }
  to   { background-position: 0% 300%; }
}

/* ── Top shimmer line ── */
.sidebar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

/* ── Sidebar Title ── */
.sidebar h2 {
  font-size: 21px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 38px;
  padding-bottom: 18px;
  position: relative;
  color: var(--white);
  background: linear-gradient(90deg, #ffffff, #fca5a5, #93c5fd, #ffffff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 6s linear infinite;
}
@keyframes titleShimmer {
  from { background-position: 0% center; }
  to   { background-position: 300% center; }
}

.sidebar h2::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 50px; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--navy-mid), transparent);
  border-radius: 10px;
  animation: h2LineGrow 3s ease-in-out infinite alternate;
}
@keyframes h2LineGrow {
  from { width: 45px; }
  to   { width: 100%; }
}

/* ========================= */
/* MAIN OPTION BUTTONS       */
/* ========================= */
.main-option {
  padding: 14px 18px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  position: relative;
  overflow: hidden;
  transition: all 0.38s cubic-bezier(0.22,1,0.36,1);
}

/* Shine sweep */
.main-option::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.14), transparent);
  transition: left 0.5s ease;
}
.main-option:hover::before { left: 150%; }

/* Red glow ring */
.main-option::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--navy-mid));
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  transition: opacity 0.4s;
}
.main-option:hover::after { opacity: 0.5; }

.main-option:hover {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: rgba(220,38,38,0.5);
  color: var(--white);
  transform: translateX(8px);
  box-shadow: 0 8px 28px var(--red-glow),
              inset 0 1px 0 rgba(255,255,255,0.15);
}

.main-option.active-btn {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: rgba(220,38,38,0.5);
  color: var(--white);
  box-shadow: 0 8px 28px var(--red-glow);
}

/* ========================= */
/* SUBMENU                   */
/* ========================= */
.submenu {
  display: none;
  margin-bottom: 14px;
  padding-left: 8px;
  position: static !important;
  top: unset !important;
  left: unset !important;
  right: unset !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: unset !important;
  min-width: unset !important;
  float: none !important;
}

.submenu.active {
  display: block;
  animation: slideDown 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submenu div {
  padding: 11px 14px;
  margin-bottom: 7px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.72);
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  position: relative;
  overflow: hidden;
}

/* Arrow appears on hover */
.submenu div::after {
  content: "→";
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%) translateX(10px);
  opacity: 0;
  transition: all 0.28s ease;
  font-size: 13px;
  color: rgba(220,38,38,0.8);
}

/* Shine sweep */
.submenu div::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.4s;
}
.submenu div:hover::before { left: 150%; }

.submenu div:hover {
  background: rgba(220,38,38,0.2);
  border-color: rgba(220,38,38,0.38);
  color: var(--white);
  transform: translateX(6px);
  box-shadow: 0 4px 16px var(--red-glow);
  padding-right: 30px;
}

.submenu div:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ========================= */
/* CONTENT AREA              */
/* ========================= */
.content {
  flex: 1;
  margin-left: 0;
  padding: 50px 75px 60px;
  text-align: center;
  position: relative;
  min-height: 100vh;
  animation: contentFade 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s both;
}

@keyframes contentFade {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Dot grid on content */
.content::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(10,31,92,0.055) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  animation: gridDrift 25s linear infinite alternate;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 28px 28px; }
}

/* ========================= */
/* CONTENT TITLE             */
/* ========================= */
#contentTitle {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  display: inline-block;
  opacity: 0;
  animation: titleEntrance 1s cubic-bezier(0.22,1,0.36,1) 0.3s forwards,
             titleShimmerContent 7s linear 1.4s infinite;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-mid) 35%, var(--red) 70%, var(--navy) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@keyframes titleEntrance {
  from { opacity: 0; transform: translateY(-30px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);     filter: blur(0); }
}
@keyframes titleShimmerContent {
  from { background-position: 0% center; }
  to   { background-position: 300% center; }
}

/* Animated underline */
#contentTitle::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--navy-light), var(--red));
  background-size: 200% auto;
  margin: 16px auto 40px;
  border-radius: 20px;
  box-shadow: 0 0 16px var(--red-glow);
  animation: lineGrow   0.8s cubic-bezier(0.22,1,0.36,1) 0.9s forwards,
             lineFlow   4s linear 1.8s infinite;
}
@keyframes lineGrow { to { width: 160px; } }
@keyframes lineFlow {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* Soft glow orb behind title */
#contentTitle::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 130px;
  background: radial-gradient(ellipse, rgba(10,31,92,0.07), transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  animation: titleGlow 4s ease-in-out infinite alternate;
}
@keyframes titleGlow {
  from { opacity: 0.5; transform: translate(-50%,-50%) scale(0.9); }
  to   { opacity: 1;   transform: translate(-50%,-50%) scale(1.1); }
}

/* ========================= */
/* COURSE LIST               */
/* ========================= */
#courseList {
  max-width: 1050px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

#courseList ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 26px;
}

/* ========================= */
/* COURSE CARD               */
/* ========================= */
#courseList li {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(10,31,92,0.1);
  padding: 28px 24px;
  border-radius: 20px;
  box-shadow:
    0 4px 24px rgba(10,31,92,0.09),
    0 1px 4px rgba(10,31,92,0.05),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: all 0.45s cubic-bezier(0.22,1,0.36,1);
  opacity: 0;
  transform: translateY(40px);
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

/* Top gradient accent bar */
#courseList li::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--navy-light), var(--red));
  background-size: 200% auto;
  opacity: 0;
  transition: opacity 0.4s;
  animation: topBarFlow 4s linear infinite paused;
}

/* Shine sweep */
#courseList li::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  transition: left 0.55s ease;
}

#courseList li.show {
  animation: cardRise 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes cardRise {
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger delays */
#courseList li:nth-child(1)  { animation-delay: 0.05s; }
#courseList li:nth-child(2)  { animation-delay: 0.12s; }
#courseList li:nth-child(3)  { animation-delay: 0.19s; }
#courseList li:nth-child(4)  { animation-delay: 0.26s; }
#courseList li:nth-child(5)  { animation-delay: 0.33s; }
#courseList li:nth-child(6)  { animation-delay: 0.40s; }
#courseList li:nth-child(7)  { animation-delay: 0.47s; }
#courseList li:nth-child(8)  { animation-delay: 0.54s; }
#courseList li:nth-child(9)  { animation-delay: 0.61s; }

@keyframes topBarFlow {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

#courseList li:hover::before {
  opacity: 1;
  animation-play-state: running;
}
#courseList li:hover::after { left: 130%; }

#courseList li:hover {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-10px) scale(1.03);
  box-shadow:
    0 24px 55px rgba(220,38,38,0.3),
    0 0 0 1px rgba(220,38,38,0.22),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Course link */
#courseList li a.course-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* ========================= */
/* SECTION DIVIDER (bonus)   */
/* ========================= */
.divider {
  width: 100%;
  height: 2px;
  margin: 55px auto;
  border-radius: 20px;
  background: linear-gradient(90deg, transparent, var(--navy-mid), var(--red), transparent);
  background-size: 200% auto;
  animation: hrFlow 5s linear infinite, hrPulse 3s ease-in-out infinite;
  position: relative;
}
@keyframes hrFlow  { from { background-position: 0% center; } to { background-position: 200% center; } }
@keyframes hrPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.7; } }

.divider::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red), 0 0 25px var(--red-glow);
  animation: dotPulse 2s ease infinite;
}
@keyframes dotPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1);   }
  50%      { transform: translate(-50%,-50%) scale(1.6); }
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */
@media (max-width: 992px) {
  .content { padding: 50px 30px; margin-left: 0; }
  #contentTitle { font-size: 32px; }
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: unset;
    padding: 36px 22px;
    border-right: none;
    border-bottom: 1px solid rgba(220,38,38,0.2);
  }
  .content {
    margin-left: 0;
    padding: 40px 18px;
  }
  .main-container { flex-direction: column; }
  #contentTitle { font-size: 26px; letter-spacing: 2px; }
  #courseList ul { grid-template-columns: 1fr; }
}