/* ══════════════════════════════════════════════════════════════════════════════
   CURRO PASSWORD SELF-SERVICE PORTAL - STYLESHEET
   ══════════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────────
   GLOBAL RESET & VARIABLES
   ────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --curro-dark: #1a1a2e;
  --curro-dark-rgb: 26, 26, 46;
  --curro-blue: #003B73;
  --curro-blue-rgb: 0, 59, 115;
  --curro-blue-light: #004E8C;
  --curro-blue-light-rgb: 0, 78, 140;
  --curro-accent: #0077C8;
  --curro-accent-rgb: 0, 119, 200;
  --curro-orange: #e8792f;
  --curro-orange-rgb: 232, 121, 47;
  --curro-orange-dark: #d16a22;
  --curro-orange-dark-rgb: 209, 106, 34;
  --surface: #f4f6f9;
  --surface-light: #f8f9fa;
  --surface-lighter: #f0f0f0;
  --text: #1a1a1a;
  --text-light: #666;
  --text-lighter: #ccc;
  --border: #e8e8e8;
  --border-light: #e0e0e0;
  --white: #fff;
  --tag-primary-bg: #E3F2FD;
  --tag-primary-text: #1565C0;
  --tag-high-bg: #FFF3E0;
  --tag-high-text: #E65100;
  --tag-staff-bg: #F3E5F5;
  --tag-staff-text: #6A1B9A;
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════
   HEADER – Curro style
   ══════════════════════════════════════ */
.top-bar {
  background: var(--curro-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 72px;
}

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.top-bar-logo img {
  height: 40px;
}

.top-bar-logo .mypass-badge {
  background: var(--curro-accent);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.top-bar-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: .85rem;
  padding: .5rem .9rem;
  border-radius: 6px;
  transition: background .2s, color .2s;
}

.top-bar-nav a:hover {
  background: rgba(255,255,255,.1);
}

.top-bar-nav .nav-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.2);
  margin: 0 .25rem;
}

.top-bar-nav .btn-cta {
  background: var(--curro-orange);
  color: var(--white);
  font-weight: 600;
  padding: .5rem 1.1rem;
  border-radius: 6px;
  margin-left: .5rem;
  transition: background .2s;
}

.top-bar-nav .btn-cta:hover {
  background: var(--curro-orange-dark);
}

/* ══════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════ */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem;
  justify-content: center;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--curro-blue);
  margin-bottom: .4rem;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ── Grade Cards ── */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  width: 100%;
}

.grade-grid.hidden {
  display: none;
}

.grade-card {
  background: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 2px solid transparent;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
  overflow: hidden;
}

.grade-card:hover {
  transform: translateY(-4px);
  border-color: var(--curro-accent);
  box-shadow: 0 8px 24px rgba(0,119,200,.15);
}

.grade-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.grade-card-body {
  padding: 1.25rem 1rem;
  text-align: center;
}

.grade-card-body .grade-label {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--curro-blue);
  margin-bottom: .3rem;
}

.grade-card-body .grade-desc {
  font-size: .82rem;
  color: var(--text-light);
}

/* ── Need Help side banner ── */
.help-banner {
  position: fixed;
  right: 0;
  top: 40%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  align-items: stretch;
}

.help-banner-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .9rem .6rem;
  background: var(--curro-orange);
  color: var(--white);
  cursor: pointer;
  border-radius: 10px 0 0 10px;
  box-shadow: -3px 0 16px rgba(0,0,0,.18);
  user-select: none;
  min-width: 36px;
}

.help-banner-tab:hover {
  background: var(--curro-orange-dark);
  box-shadow: -4px 0 20px rgba(0,0,0,.25);
}

.help-banner-tab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.help-banner-tab .tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.help-banner-panel {
  width: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: 10px 0 0 10px;
  box-shadow: -4px 0 24px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
}

.help-banner.open .help-banner-panel {
  width: 240px;
}

.help-banner-panel-inner {
  width: 240px;
  padding: 1.25rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.help-banner-panel-inner .hbp-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--curro-blue);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--curro-orange);
  padding-bottom: .4rem;
  margin-bottom: .1rem;
}

.help-banner-panel-inner .hbp-label {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.5;
}

.help-banner-panel-inner .hbp-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--curro-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: .65rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  font-family: inherit;
}

.help-banner-panel-inner .hbp-btn:hover {
  background: var(--curro-accent);
}

.help-banner-panel-inner .hbp-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.help-banner-panel-inner .hbp-contact {
  background: var(--surface);
  border-radius: 6px;
  padding: .65rem .8rem;
  font-size: .78rem;
  color: var(--text-light);
  line-height: 1.7;
}

.help-banner-panel-inner .hbp-contact a {
  color: var(--curro-accent);
  text-decoration: none;
  font-weight: 600;
}

.help-banner-panel-inner .hbp-contact a:hover {
  text-decoration: underline;
}

@keyframes helpBounce {
  0%   { transform: scale(1) translateX(0); }
  15%  { transform: scale(1.18) translateX(-6px); }
  30%  { transform: scale(1) translateX(0); }
  45%  { transform: scale(1.12) translateX(-4px); }
  60%  { transform: scale(1) translateX(0); }
  75%  { transform: scale(1.07) translateX(-2px); }
  100% { transform: scale(1) translateX(0); }
}

.help-banner-tab.pulse {
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--curro-blue);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: .25rem;
  opacity: .8;
  transition: opacity .2s;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--curro-blue);
  margin: 1.25rem 0 .5rem;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p, .modal-body li {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.modal-body ul, .modal-body ol {
  padding-left: 1.25rem;
  margin: .5rem 0;
}

.modal-body li {
  margin-bottom: .35rem;
}

.modal-body .help-contact {
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.modal-body .help-contact p {
  margin: .25rem 0;
}

.modal-body .help-contact a {
  color: var(--curro-accent);
  text-decoration: none;
  font-weight: 600;
}

.modal-body .help-contact a:hover {
  text-decoration: underline;
}

.modal-body .help-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .75rem;
}

.modal-body .help-links a {
  color: var(--curro-accent);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.modal-body .help-links a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════
   COLLAPSIBLE PANELS
   ══════════════════════════════════════ */
.collapsible-panel {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: .75rem;
  overflow: hidden;
}

.panel-header {
  background: var(--surface-light);
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .2s;
  border: none;
  width: 100%;
  font-size: .95rem;
  font-weight: 600;
  color: var(--curro-blue);
  font-family: inherit;
}

.panel-header:hover {
  background: var(--surface-lighter);
}

.panel-header.active {
  background: var(--curro-blue);
  color: var(--white);
}

.panel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform .3s;
}

.panel-header.active .panel-toggle {
  transform: rotate(180deg);
}

.panel-content {
  display: none;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--white);
  animation: slideDown .3s ease-out;
}

.panel-content.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.panel-content h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--curro-blue);
  margin-bottom: .75rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.portal-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-right: .4rem;
}

.portal-tag.primary {
  background: var(--tag-primary-bg);
  color: var(--tag-primary-text);
}

.portal-tag.high {
  background: var(--tag-high-bg);
  color: var(--tag-high-text);
}

.portal-tag.staff {
  background: var(--tag-staff-bg);
  color: var(--tag-staff-text);
}

.panel-content p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: .5rem 0;
}

.panel-content iframe {
  width: 100%;
  height: 400px;
  border: none !important;
  border-radius: 6px;
  margin-top: 1rem;
}

.panel-content > div[style*="position: relative"] {
  margin: 1rem 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ══════════════════════════════════════
   FOOTER – Curro style
   ══════════════════════════════════════ */
.footer {
  background: var(--curro-dark);
  color: var(--text-lighter);
  font-size: .85rem;
}

.footer-portals {
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 2rem;
}

.footer-portals button {
  background: none;
  border: none;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: color .2s;
  cursor: pointer;
  padding: 0;
}

.footer-portals button:hover {
  color: var(--curro-orange);
}

.footer-portals button.active {
  color: var(--curro-orange);
  border-bottom: 2px solid var(--curro-orange);
  padding-bottom: .5rem;
  margin-bottom: -.5rem;
}

.footer-portals .sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,.2);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-brand p {
  margin-top: .75rem;
  line-height: 1.5;
  color: #aaa;
  font-size: .82rem;
}

.footer-brand img {
  height: 36px;
  filter: brightness(10);
}

.footer h5 {
  color: #fff;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .75rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: .45rem;
}

.footer ul a {
  color: #aaa;
  text-decoration: none;
  transition: color .2s;
  font-size: .82rem;
}

.footer ul a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: .6rem;
  margin-top: .75rem;
}

.footer-social a {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.footer-social a:hover {
  background: var(--curro-orange);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 1rem 2rem;
  color: #777;
  font-size: .78rem;
}

.footer-bottom a {
  color: #999;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ══════════════════════════════════════
   FLOATING NAV - NEW
   ══════════════════════════════════════ */
.floating-nav {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 10px 0px;
  background: transparent;
  border: none;
  width: 100%;
  background-color: var(--curro-blue);
}

.floating-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  color: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: none;
  white-space: nowrap;
}

.floating-nav-btn:last-child {
  border-right: none;
}

.floating-nav-btn:hover {
  background: transparent;
  color: var(--white);
}

.floating-nav-btn.active {
  background: transparent;
  color: var(--white);
}

.floating-nav-btn.active:hover {
  background: transparent;
  color: var(--white);
}

.nav-emoji {
  font-size: 1.5rem;
  display: inline-block;
  position: relative;
  top: -2px;
}

.floating-nav-btn.active svg {
  stroke: var(--white);
}

.floating-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .top-bar {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: .75rem;
  }
  .grade-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .top-bar-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem;
  }
  .top-bar-nav .nav-sep {
    display: none;
  }
  .grade-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
  .footer-portals {
    flex-direction: column;
    gap: .75rem;
  }
  .footer-portals .sep {
    display: none;
  }
  .footer-portals button.active {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
  .floating-nav {
    flex-wrap: wrap;
    padding: 0.8rem 10px;
    gap: 0.3rem;
  }
  .floating-nav-btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
  }
  .help-banner {
    top: auto;
    bottom: 80px;
    transform: none;
  }
  .help-banner.open .help-banner-panel {
    width: 200px;
  }
  .help-banner-panel-inner {
    width: 200px;
  }
}
