/* ==========================================================
   PEST — Profenaa Evaluation Skill Test
   Crimson themed, fully responsive, self-contained section
   v3: 5 departments, name+phone capture, energy-flow motion,
   locked-answer feedback (green = correct, red = wrong)
   ========================================================== */

:root{
  --crimson:        #b3122d;
  --crimson-dark:    #7a0c1e;
  --crimson-deep:    #4a0613;
  --crimson-light:   #e63950;
  --crimson-glow:    #ff5c72;
  --crimson-tint:    #fdebee;
  --ink:             #221013;
  --ink-soft:        #6b4a50;
  --paper:           #fff7f7;
  --card:            #ffffff;
  --line:            #f0d8db;
  --good:            #1f9d55;
  --good-tint:       #eafaf0;
  --bad:             #c4291f;
  --bad-tint:        #fdeceb;
  --warn:            #c98a00;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-soft: 0 14px 34px -16px rgba(122,12,30,0.35);
  --shadow-card: 0 4px 18px -6px rgba(74,6,19,0.18);
  font-size: 16px;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }

body{
  margin:0;
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(900px 500px at 100% -10%, var(--crimson-tint), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, var(--crimson-tint), transparent 60%),
    var(--paper);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

.pest-wrap{
  position:relative;
  max-width:920px;
  margin:0 auto;
  padding:48px 20px 80px;
  margin-top: 50px;
}

/* ---------- Ambient energy orbs (decorative, cheap: transform/opacity only) ---------- */
.energy-orb{
  position:absolute;
  border-radius:50%;
  filter:blur(46px);
  opacity:.28;
  pointer-events:none;
  z-index:-1;
  will-change:transform;
}
.energy-orb.orb-a{ width:260px; height:260px; top:-70px; left:-70px; background:var(--crimson-light); animation:orbFloat 9s ease-in-out infinite; }
.energy-orb.orb-b{ width:220px; height:220px; bottom:20px; right:-60px; background:var(--crimson); animation:orbFloat 11s ease-in-out infinite reverse; }
.energy-orb.orb-c{ width:170px; height:170px; top:40%; left:46%; background:var(--crimson-glow); opacity:.16; animation:orbFloat 13s ease-in-out infinite; }

@keyframes orbFloat{
  0%,100%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(18px,-16px,0) scale(1.08); }
}

/* ---------- Screens ---------- */
.screen{ display:none; animation:fadeUp .45s ease; }
.screen.active{ display:block; }

@keyframes fadeUp{
  from{ opacity:0; transform:translateY(14px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ---------- Heading block ---------- */
.pest-head{ text-align:center; margin-bottom:38px; }

.pest-tag{
  display:inline-block;
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--crimson);
  background:var(--crimson-tint);
  border:1px solid #f3c4cb;
  padding:6px 14px;
  border-radius:999px;
  margin-bottom:14px;
}

.pest-title{
  margin:0;
  font-size:clamp(2.4rem, 7vw, 3.6rem);
  font-weight:800;
  letter-spacing:.06em;
  background:linear-gradient(135deg, var(--crimson-dark), var(--crimson) 55%, var(--crimson-light));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  line-height:1.05;
}

.pest-sub{
  margin:8px 0 0;
  font-weight:700;
  color:var(--ink);
  font-size:1.05rem;
}

.pest-desc{
  margin:10px auto 0;
  max-width:520px;
  color:var(--ink-soft);
  font-size:.95rem;
  line-height:1.55;
}

/* ---------- Name entry screen ---------- */
.name-card{
  max-width:480px;
  margin:60px auto 0;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:34px 28px;
  text-align:center;
  box-shadow:var(--shadow-soft);
}

.chosen-dept-name{
  margin:10px 0 6px;
  font-size:1.5rem;
  font-weight:800;
  color:var(--ink);
}

.name-card-desc{
  margin:0 0 22px;
  color:var(--ink-soft);
  font-size:.92rem;
}

.name-field-row{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.name-field-row .name-input + .name-input{ margin-top:0; }

@media (min-width:480px){
  .name-field-row .btn-primary{ margin-left:0; }
}

.name-input{
  width:100%;
  font-family:inherit;
  font-size:1rem; /* keep >=16px to avoid iOS auto-zoom / jump on focus */
  padding:13px 16px;
  border-radius:var(--radius-sm);
  border:1.5px solid var(--line);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
  background:#fff;
  color:var(--ink);
  touch-action:manipulation;
}

.name-input:focus{
  border-color:var(--crimson);
  box-shadow:0 0 0 3px rgba(179,18,45,0.12);
}

.name-input.invalid{
  border-color:var(--bad);
}

.name-error{
  display:none;
  color:var(--bad);
  font-size:.8rem;
  font-weight:600;
  margin:10px 0 0;
  text-align:left;
}

.name-error.show{ display:block; }

.btn-link{
  display:inline-block;
  margin-top:20px;
  background:none;
  border:none;
  color:var(--crimson-dark);
  font-weight:700;
  font-size:.85rem;
  cursor:pointer;
  font-family:inherit;
}

.btn-link:hover{ text-decoration:underline; }

/* ---------- Department cards ---------- */
.dept-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:18px;
}

.dept-card{
  position:relative;
  text-align:left;
  cursor:pointer;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:20px 18px 18px;
  box-shadow:var(--shadow-card);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  overflow:hidden;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.dept-card::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg, var(--crimson), var(--crimson-light), var(--crimson));
  background-size:200% 100%;
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s ease;
}

.dept-card:hover{
  transform:translateY(-4px);
  border-color:var(--crimson-light);
  box-shadow:var(--shadow-soft);
}
.dept-card:hover::before{
  transform:scaleX(1);
  animation:energyShift 1.6s linear infinite;
}
.dept-card:active{ transform:translateY(-1px) scale(.99); }

@keyframes energyShift{
  0%{ background-position:0% 0; }
  100%{ background-position:200% 0; }
}

.dept-code{
  display:inline-block;
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.08em;
  color:#fff;
  background:var(--crimson);
  padding:3px 9px;
  border-radius:6px;
  margin-bottom:10px;
}

.dept-name{
  margin:0 0 4px;
  font-size:1.08rem;
  font-weight:700;
  color:var(--ink);
}

.dept-meta{
  margin:0;
  font-size:.82rem;
  color:var(--ink-soft);
}

/* ---------- Test bar ---------- */
.test-bar{
  margin-bottom:22px;
}

.test-bar-left{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.dept-pill{
  font-weight:800;
  letter-spacing:.04em;
  color:var(--crimson-dark);
  background:var(--crimson-tint);
  border:1px solid #f3c4cb;
  padding:5px 12px;
  border-radius:999px;
  font-size:.82rem;
}

.taker-pill{
  font-size:.78rem;
  font-weight:700;
  color:var(--ink-soft);
  background:#fff;
  border:1px solid var(--line);
  padding:5px 12px;
  border-radius:999px;
}

.q-counter{
  font-size:.85rem;
  font-weight:600;
  color:var(--ink-soft);
}

.progress-track{
  width:100%;
  height:8px;
  background:#f3dde0;
  border-radius:999px;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  width:3.33%;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.32) 0 6px, transparent 6px 12px),
    linear-gradient(90deg, var(--crimson-dark), var(--crimson-light));
  background-size:32px 100%, 100% 100%;
  border-radius:999px;
  transition:width .3s ease;
  animation:energyFlow 1.1s linear infinite;
}

@keyframes energyFlow{
  0%{ background-position:0 0, 0 0; }
  100%{ background-position:32px 0, 0 0; }
}

/* ---------- Quiz card ---------- */
.quiz-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:28px 26px;
  box-shadow:var(--shadow-card);
}

@media (max-width:560px){
  .quiz-card{ padding:20px 16px; }
}

.question-text{
  margin:0 0 20px;
  font-size:1.18rem;
  line-height:1.5;
  color:var(--ink);
  font-weight:700;
}

.options-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.option{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:13px 16px;
  border:1.5px solid var(--line);
  border-radius:var(--radius-sm);
  cursor:pointer;
  background:#fffdfd;
  transition:border-color .18s ease, background .18s ease, transform .12s ease;
  font-size:.96rem;
  color:var(--ink);
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.option:hover{
  border-color:var(--crimson-light);
  background:var(--crimson-tint);
}

.option:active{ transform:scale(.99); }

.option.selected{
  border-color:var(--crimson);
  background:var(--crimson-tint);
  box-shadow:inset 0 0 0 1px var(--crimson), 0 0 0 4px rgba(179,18,45,.08);
  animation:selectPulse .28s ease;
}

@keyframes selectPulse{
  0%{ transform:scale(.98); }
  100%{ transform:scale(1); }
}

.option-letter{
  flex:0 0 auto;
  width:26px;
  height:26px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  font-weight:800;
  background:var(--crimson-tint);
  color:var(--crimson-dark);
  border:1px solid #f3c4cb;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}

.option.selected .option-letter{
  background:var(--crimson);
  color:#fff;
  border-color:var(--crimson);
}

/* ---------- Locked / answered feedback states ----------
   Applied once a question has been answered (see JS: .locked
   is added to every option, plus .correct-answer on the right
   option and .wrong-answer on the user's wrong pick). These
   rules are placed after .selected and use matching specificity
   with .selected combos so the correct/wrong colors always win
   over the plain crimson "selected" look. */

.option.locked{
  cursor:default;
  pointer-events:none;
}

.option.locked:hover{
  border-color:var(--line);
  background:#fffdfd;
}

/* Correct option — always shown in green once answered,
   whether or not it's the one the user picked. */
.option.correct-answer{
  border-color:var(--good);
  background:var(--good-tint);
}
.option.correct-answer .option-letter{
  background:var(--good);
  color:#fff;
  border-color:var(--good);
}

/* Wrong option the user picked — shown in red. */
.option.wrong-answer{
  border-color:var(--bad);
  background:var(--bad-tint);
}
.option.wrong-answer .option-letter{
  background:var(--bad);
  color:#fff;
  border-color:var(--bad);
}

/* When the user's own selection is the correct one, keep it green
   (overrides the generic crimson .selected look). */
.option.selected.correct-answer{
  border-color:var(--good);
  background:var(--good-tint);
  box-shadow:inset 0 0 0 1px var(--good), 0 0 0 4px rgba(31,157,85,.10);
}
.option.selected.correct-answer .option-letter{
  background:var(--good);
  color:#fff;
  border-color:var(--good);
}

/* When the user's own selection is wrong, keep it red
   (overrides the generic crimson .selected look). */
.option.selected.wrong-answer{
  border-color:var(--bad);
  background:var(--bad-tint);
  box-shadow:inset 0 0 0 1px var(--bad), 0 0 0 4px rgba(196,41,31,.10);
}
.option.selected.wrong-answer .option-letter{
  background:var(--bad);
  color:#fff;
  border-color:var(--bad);
}

/* ---------- Nav buttons ---------- */
.nav-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:22px;
  flex-wrap:wrap;
}

.btn{
  position:relative;
  overflow:hidden;
  font-family:inherit;
  font-size:.92rem;
  font-weight:700;
  border-radius:999px;
  padding:12px 24px;
  border:none;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.btn::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle, rgba(255,255,255,.4) 10%, transparent 60%);
  opacity:0;
  transform:scale(0);
}

.btn:active::after{
  opacity:1;
  transform:scale(2.2);
  transition:transform .5s ease, opacity .6s ease;
}

.btn:active{ transform:scale(.97); }

.btn-primary{
  background:linear-gradient(135deg, var(--crimson-dark), var(--crimson));
  color:#fff;
  box-shadow:0 10px 22px -8px rgba(122,12,30,0.55);
  margin-left:auto;
}
.btn-primary:hover{ box-shadow:0 14px 26px -8px rgba(122,12,30,0.65); }

.btn-ghost{
  background:#fff;
  color:var(--crimson-dark);
  border:1.5px solid var(--crimson-light);
}
.btn-ghost:hover{ background:var(--crimson-tint); }

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

/* ---------- Result screen ---------- */
.result-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:36px 28px;
  text-align:center;
  box-shadow:var(--shadow-soft);
  max-width:520px;
  margin:0 auto;
}

.result-dept{
  margin:10px 0 4px;
  font-size:1.4rem;
  color:var(--ink);
}

.result-taker{
  margin:0 0 22px;
  font-size:.88rem;
  color:var(--ink-soft);
  font-weight:600;
}

.score-ring-wrap{
  position:relative;
  width:140px;
  height:140px;
  margin:0 auto 14px;
}

.score-ring{ width:140px; height:140px; transform:rotate(-90deg); }

.ring-bg{
  fill:none;
  stroke:#f3dde0;
  stroke-width:12;
}

.ring-fill{
  fill:none;
  stroke:var(--crimson);
  stroke-width:12;
  stroke-linecap:round;
  stroke-dasharray:377;
  stroke-dashoffset:377;
  transition:stroke-dashoffset 1s ease;
  filter:drop-shadow(0 0 6px rgba(179,18,45,.45));
}

.score-ring-text{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column; 
  align-items:center;
  justify-content:center;
}

#scoreNumber{
  font-size:2.1rem;
  font-weight:800;
  color:var(--crimson-dark);
  line-height:1;
}

.score-out-of{
  font-size:.85rem;
  color:var(--ink-soft);
  font-weight:600;
}

.score-percent{
  font-weight:800;
  font-size:1.1rem;
  color:var(--crimson);
  margin:4px 0 2px;
}

.score-msg{
  color:var(--ink-soft);
  font-size:.92rem;
  margin:0 0 22px;
}

.result-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:26px;
}

.stat-box{
  border-radius:var(--radius-sm);
  padding:12px 6px;
  font-weight:800;
  font-size:1.2rem;
  border:1px solid var(--line);
}

.stat-box small{
  display:block;
  font-weight:600;
  font-size:.72rem;
  color:var(--ink-soft);
  margin-top:2px;
}

.stat-box.correct{ background:#eafaf0; color:var(--good); }
.stat-box.wrong{ background:#fdeceb; color:var(--bad); }
.stat-box.skipped{ background:#fff8e8; color:var(--warn); }

.result-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.result-actions .btn{ width:100%; margin-left:0; }

@media (min-width:480px){
  .result-actions{ flex-direction:row; }
}

/* ---------- Sync/submit status ---------- */
.sync-note{
  margin-top:14px;
  font-size:.76rem;
  color:var(--ink-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.sync-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--good);
  flex:0 0 auto;
}

/* ---------- Accessibility / performance guards ---------- */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

.dept-card:focus-visible,
.option:focus-visible,
.btn:focus-visible,
.name-input:focus-visible{
  outline:3px solid var(--crimson-light);
  outline-offset:2px;
}



/* footer */

.footer {
  background-color: #1c1c22;
  color: white;
  padding: 40px 20px;
  font-family: 'Poppins', sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.footer-col {
  flex: 1 1 200px;
  min-width: 200px;
}

/* Fix logo spacing */
.footer-logo-img {
  width: 100px;
  margin: -25px 0; /* adds top and bottom spacing */
  margin-bottom: 3px;
}

/* Make the paragraph justified */
.footer-col p {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  text-align: justify;  /* <-- this makes it align full */
}


.footer-logo-text {
  font-size: 20px;
  color: crimson;
  margin-bottom: 15px; /* increased from 10px */
}


.footer-col h3 {
  color: crimson;
  margin-bottom: 10px;
  font-size: 16px;
}

.footer-col ul {
  list-style: none;
  padding-left: 0;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.footer-col ul li a:hover {
  color: crimson;
}

.footer-col p,
.footer-col a {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  text-align: left;
}
.location-link {
  color: #ccc;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.6;
  display: inline-block;
}

.location-link:hover {
  color: crimson;
  text-decoration: underline;
}


.social-icons a {
  display: inline-flex;                  /* Centers icon in circle */
  align-items: center;
  justify-content: center;
  width: 36px;                           /* Fixed width */
  height: 36px;                          /* Same height = circle */
  border-radius: 50%;                   /* Makes it a circle */
  border: 1px solid crimson;
  background-color: transparent;
  color: white;
  font-size: 16px;
  margin-right: 8px;
  transition: 0.3s ease;
}

.social-icons a:hover {
  background-color: crimson;
  color: white;
}


.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 30px;
  padding-top: 15px;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}
/* Normal-looking link */
.plain-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.plain-link:hover {
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
.footer-container {
  gap: 0px !important;
}

.footer-col {
  margin-bottom: 10px !important;
}


  .footer-col h3 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .footer-col ul li {
    margin-bottom: 4px;
  }

  .footer-logo-img {
    width: 80px;
  }

  .footer-logo-text {
    font-size: 18px;
  }

  .social-icons {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .footer-bottom {
    text-align: left;
    margin-top: 20px;
  }
}


/* WhatsApp Floating Button with Font Icon */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #1ebd5a;
  transform: scale(1.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Mobile Responsive */
@media screen and (max-width: 600px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    font-size: 24px;
    bottom: 15px;
    left: 15px;
  }
}


/* Scroll to Top Button Bottom Right */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  font-size: 24px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
#scrollTopBtn:hover {
  background-color: #0056b3;
}




/* Enroll Button */
.enroll-btn {
  background-color: crimson;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

.enroll-btn:hover {
  background-color: darkred;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Form Container */
.form-container {
  background: #fff;
  padding: 5px 20px;         /* 🔻 Reduced padding */
  border-radius: 12px;
  width: 90%;
  max-width: 400px;           /* 🔻 Reduced width too */
  position: relative;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}



.form-container h2 {
  margin-bottom: 20px;
  color: crimson;
  text-align: center;
}

/* Close Button */
.close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  color: crimson;
  cursor: pointer;
}

/* Form Fields */
.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: crimson;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 12px;
  background-color: crimson;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
  margin-bottom: 7px;
}

.submit-btn:hover {
  background-color: darkred;
}

/* Responsive */
@media (max-width: 600px) {
  .form-container {
    padding: 20px;
  }

  .enroll-btn {
    width: 100%;
  }
}

.dept-desc {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #6b5d4f;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
  margin-top: 0;
}

.dept-card.expanded .dept-desc {
  max-height: 220px;
  opacity: 1;
  margin-top: 0.6rem;
}

/* ---- Read More button (crimson) ---- */
.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.9rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid #a4193d;
  background: linear-gradient(135deg, #fdf0f2, #f6d9df);
  color: #8c1230;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease,
              transform 0.2s ease, box-shadow 0.25s ease;
}

/* chevron icon, rotates on expand */
.read-more-btn::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-left: 2px;
}

.dept-card.expanded .read-more-btn::after {
  transform: rotate(-135deg);
}

/* subtle sheen sweep on hover */
.read-more-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.read-more-btn:hover::before {
  left: 130%;
}

.read-more-btn:hover {
  color: #6b0d24;
  border-color: #8c1230;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(164, 25, 61, 0.28);
}

.read-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(164, 25, 61, 0.22);
}

.read-more-btn:focus-visible {
  outline: 2px solid #a4193d;
  outline-offset: 2px;
}
 
/* expanded state — solid crimson fill */
.dept-card.expanded .read-more-btn {
  background: linear-gradient(135deg, #a4193d, #7a0f2b);
  border-color: #7a0f2b;
  color: #fdf0f2;
}

.dept-card.expanded .read-more-btn:hover {
  box-shadow: 0 4px 10px rgba(122, 15, 43, 0.4);
}



/* Navbar */
.navbar {
  background-color: crimson;
  border-bottom: 2px solid black;
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-family: 'Segoe UI', sans-serif;
  animation: slideDown 0.6s ease-in-out;
  top: 0;
  left: 0;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.navbar-logo {
  width: 45px;
  height: 45px;
  margin-right: 0px;
  margin-bottom:0.4px;
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text {
  font-size: 1rem;
  font-weight: bold;
  color: white;
  margin-bottom: 3px;
}

.brand-subtext {
  font-size: 0.75rem;
  color: white;
}

/* Navbar Links */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.navbar-links a {
  text-decoration: none;
  color: white;
  padding: 8px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-links a:hover {
  color: black;
  transform: translateY(-2px);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 0.95rem;
  color: white;
  transition: color 0.3s ease;
}

.dropdown-btn:hover {
  color: black;
}

.dropdown-content {
  position: absolute;
  background-color: #fffbea;
  top: 25px;
  left: 0;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid black;
  border-radius: 4px;
  overflow: visible; /* allow sub-dropdown to show */
  min-width: 250px;
  z-index: 1001;
  display: none;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    transform: scaleY(0.8);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.dropdown-content a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #ffe066;
  color: #ff0000;
}

/* Sub-dropdown (down, same width as main dropdown) */
.sub-dropdown {
  position: relative;
}

.sub-dropdown-content {
  display: none;
  position: absolute;
  left: 0;        /* align with parent */
  top: 100%;      /* below parent */
  background-color: #fffbea;
  min-width: 250px; /* same as main dropdown */
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  border: 1px solid black;
  border-radius: 4px;
  z-index: 1002;
}

.sub-dropdown-content a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.sub-dropdown-content a:hover {
  background-color: #ffe066;
  color: #ff0000;
}

.sub-dropdown:hover .sub-dropdown-content {
  display: block;
}
/* Make sub-dropdown parent look like other dropdown items */
.sub-dropdown > span {
  display: block;            /* like a link */
  padding: 10px;             /* same as links */
  color: #333;               /* match dropdown text */
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  font-size: 16px;           /* same as links */
  line-height: 1.2;          /* match dropdown links */
}

.sub-dropdown > span:hover {
  background-color: #ffe066;
  color: #ff0000;
}


/* Enroll Now button */
.login-btn {
  background-color: #8B0A23;
  color: #000;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
}

.login-btn:hover {
  background-color: #ffc107;
  color: #ff0000;
  transform: scale(1.05);
}

/* Hamburger Menu */
.menu-icon {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-icon {
    display: block;
  }

  .navbar-links {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 1rem;
    display: none;
    gap: 1rem;
    z-index: 999;
    border-top: 1px solid black;
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links a,
  .dropdown-btn,
  .login-btn {
    width: 100%;
    text-align: center;
    padding: 0.4rem 0.8rem;
    color: crimson;
  }

  .login-btn {
    font-size: 0.9rem;
    padding: 6px 16px;
    margin: 0 auto;
    display: block;
  }

  .dropdown-content {
    position: relative;
    top: 0;
    left: 0;
    border: none;
    box-shadow: none;
    background-color: transparent;
    width: 100%;
    padding-left: 0;
    display: none;
  }

  .dropdown-content.active {
    display: block;
  }

  .dropdown-content a {
    padding: 0.5rem 0;
    color: #333;
  }

  .brand-subtext {
    font-size: 0.6rem;
    color: white;
  }

  /* Sub-dropdown on mobile */
  .sub-dropdown-content {
    position: relative;
    left: 0;
    top: 0;
    background-color: transparent;
    box-shadow: none;
    border: none;
    width: 100%;
    padding-left: 1rem;
  }

  .sub-dropdown-content a {
    padding: 0.5rem 0;
    color: #333;
  }
}

@media (min-width: 769px) and (max-width: 991px) {
  .login-btn {
    font-size: 0.9rem;
    padding: 6px 16px;
    margin: 0 auto;
    display: inline-block;
    width: auto;
    max-width: 200px;
  }
}

@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

  /* ===== Crimson theme tokens (scoped to this section) ===== */
  .dept-redirect {
    --crimson: #a30021;
    --crimson-dark: #6e0016;
    --crimson-light: #d4183d;
    --crimson-tint: #fdeef1;
    --ink: #2b1114;
    --muted: #7a5a5f;
 
    padding: 12px 20px 32px;
    font-family: Poppins, system-ui, -apple-system, Segoe UI, sans-serif;
  }
 
  .dept-redirect__inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
  }
 
  .dept-redirect__title {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(20px, 3.2vw, 28px);
    font-weight: 600;
  }
 
  .dept-redirect__subtitle {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(13px, 1.8vw, 15px);
    line-height: 1.5;
  }
 
  .dept-redirect__buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
 
  .dept-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    text-decoration: none;
    background: #ffffff;
    border: 1.5px solid #f0d2d8;
    box-shadow: 0 2px 10px rgba(163, 0, 33, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }
 
  .dept-btn:hover,
  .dept-btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(163, 0, 33, 0.18);
    border-color: var(--crimson-light);
    background: linear-gradient(135deg, #ffffff 0%, var(--crimson-tint) 100%);
  }
 
  .dept-btn__icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-dark) 100%);
  }
 
  .dept-btn__icon svg {
    width: 24px;
    height: 24px;
  }
 
  .dept-btn__text {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
    min-width: 0;
  }
 
  .dept-btn__label {
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
  }
 
  .dept-btn__sub {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
  }
 
  .dept-btn__arrow {
    flex: none;
    font-size: 18px;
    color: var(--crimson);
    transition: transform 0.2s ease;
  }
 
  .dept-btn:hover .dept-btn__arrow {
    transform: translateX(4px);
  }
 
  /* ===== Responsive ===== */
  @media (max-width: 640px) {
    .dept-redirect__buttons {
      grid-template-columns: 1fr;
    }
    .dept-redirect {
      padding: 8px 16px 24px;
    }
  }
 
  @media (max-width: 380px) {
    .dept-btn {
      padding: 14px;
      gap: 10px;
    }
    .dept-btn__icon {
      width: 40px;
      height: 40px;
    }
  }
