:root {
  --blue-deep:   #0b2e36;   /* darkest teal — dark sections            */
  --blue-mid:    #23a3c1;   /* brand teal — primary colour             */
  --blue-bright: #1bb8df;   /* lighter teal — links, highlights        */
  --blue-light:  #b8e8f3;   /* soft teal tint — borders, dividers      */
  --blue-pale:   #e8f7fb;   /* near-white teal — section backgrounds   */
  --gold:        #f0b429;   /* gold accent                             */
  --text-dark:   #0b1f24;
  --text-muted:  #4a6b75;
  --font-script: "Poppins", sans-serif;
  --font-serif:  "Noto Serif HK", serif;
}

body{
  font-family: var(--font-script);
  color: var(--text-dark);
  background: #ffffff;
}

/* ============================================================
   CALENDARS CONTENT AREA  (.cal- prefix)
   ============================================================ */
.cal-section{
  padding: 20px 0 100px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--blue-pale) 100%);
}

/* ---------- Section heading ---------- */
.cal-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 14px;
}
.cal-eyebrow::before,
.cal-eyebrow::after{
  content:"";
  width: 34px;
  height: 2px;
  background: var(--gold);
}
.cal-title{
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 12px;
}
.cal-sub{
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto 46px;
}

/* ---------- Tabs ---------- */
.cal-tabs{
  display: inline-flex!important;
  background: #ffffff;
  border: 1px solid var(--blue-light);
  border-radius: 60px;
  padding: 6px!important;
  box-shadow: 0 10px 30px rgba(11, 46, 54, .08);
  margin-bottom: 20px!important;
  flex-wrap: wrap!important;
  justify-content: center;
}
.cal-tabs .nav-link{
  font-family: var(--font-script);
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-deep);
  border: 0;
  border-radius: 50px;
  padding: 13px 34px;
  transition: all .3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cal-tabs .nav-link .cal-tab-ico{
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.cal-tabs .nav-link:hover{ color: var(--blue-mid); }
.cal-tabs .nav-link.active{
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-bright));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(35, 163, 193, .35);
}

/* ---------- Term block ---------- */
.cal-term{
  background: #ffffff;
  border: 1px solid var(--blue-light);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 44px;
  box-shadow: 0 16px 40px rgba(11, 46, 54, .07);
}
.cal-term-head{
  background: var(--blue-deep);
  padding: 26px 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.cal-term-head::after{
  content:"";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,184,223,.25), transparent 70%);
}
.cal-term-badge{
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.cal-term-badge svg{ width: 26px; height: 26px; }
.cal-term-head h3{
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}
.cal-term-head span{
  display: block;
  font-family: var(--font-script);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* ---------- Event rows ---------- */
.cal-events{ padding: 10px 0; }
.cal-event{
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 17px 34px;
  border-bottom: 1px dashed var(--blue-light);
  transition: background .25s ease;
  position: relative;
}
.cal-event:last-child{ border-bottom: 0; }
.cal-event:hover{ background: var(--blue-pale); }
.cal-event::before{
  content:"";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--blue-bright);
  border-radius: 0 3px 3px 0;
  transition: height .25s ease;
}
.cal-event:hover::before{ height: 60%; }

.cal-event-date{
  flex: 0 0 250px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-mid);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 1px;
}
.cal-event-date svg{
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--blue-bright);
}
.cal-event-name{
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.55;
}

/* Holiday pill */
.cal-holiday{
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8a6510;
  background: rgba(240, 180, 41, .18);
  border: 1px solid rgba(240, 180, 41, .45);
  border-radius: 30px;
  padding: 3px 12px;
  margin-left: 10px;
  vertical-align: 2px;
  white-space: nowrap;
}

/* Exam / performance highlight */
.cal-event--exam .cal-event-name{ font-weight: 600; color: var(--blue-deep); }

/* ---------- Legend ---------- */
.cal-legend{
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 38px;
  font-size: 13px;
  color: var(--text-muted);
}
.cal-legend span{ display: inline-flex; align-items: center; gap: 8px; }
.cal-legend i{
  width: 12px; height: 12px;
  border-radius: 4px;
  display: inline-block;
}
.cal-legend .cal-lg-term{ background: var(--blue-mid); }
.cal-legend .cal-lg-holiday{ background: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px){
  .cal-section{ padding: 60px 0 70px; }
  .cal-tabs .nav-link{ padding: 11px 22px; font-size: 14px; }
  .cal-term-head{ padding: 20px 22px; }
  .cal-term-head h3{ font-size: 20px; }
  .cal-event{
    flex-direction: column;
    gap: 6px;
    padding: 15px 22px;
  }
  .cal-event-date{ flex: 0 0 auto; }
  .cal-holiday{ margin-left: 0; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}