:root{
  --maroon: #800000;
  --accent: #ffd700;
  --bg: #ffffff;
  --text: #222;
  --card-bg: #f9f9f9;
  --max-width: 1100px;
  --radius: 10px;
  --gap: 1.25rem;
}

/* Basic reset and box sizing */
* { box-sizing: border-box; }
html,body { height: 100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Segoe UI Historic";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 16px;
}

/* Container helper */
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Skip link for keyboard users */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus{
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  padding: .5rem .75rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  z-index: 1000;
}

/* Header */
header{
  background: var(--maroon);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 200;
}

.brand { display:flex; align-items:center; gap:.75rem; }
.brand h1{ margin:0; font-size:1.125rem; letter-spacing:.2px; font-weight:700; }

/* Navigation */
nav { display:flex; align-items:center; gap:12px; }
nav ul { list-style: none; display:flex; gap:12px; margin:0; padding:0; align-items:center; }
nav a { color: white; text-decoration: none; font-weight:600; }
nav a:hover, nav a:focus { text-decoration: underline; }

/* Login button in header */
.login-btn{
  background: var(--accent);
  color: #000;
  border: none;
  padding: .4rem .85rem;
  border-radius: 8px;
  font-weight:700;
  cursor: pointer;
  transition: transform .12s ease;
}
.login-btn:active{ transform: translateY(1px); }

/* Hero */
.hero{
  background: linear-gradient(180deg, var(--maroon), #5a0000 60%);
  color: white;
  text-align: center;
  padding: 72px 16px;
}
.hero h2{ font-size: clamp(1.5rem, 3.2vw, 2.5rem); margin:.25rem 0; }
.hero p{ font-size: clamp(.95rem, 1.2vw, 1.15rem); margin:.5rem 0 1.2rem; }

/* CTA group */
.cta-group{ display:flex; gap:.6rem; flex-wrap:wrap; justify-content:center; }
.btn{
  border:none;
  padding:.7rem 1.05rem;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
  font-size:1rem;
}
.btn-primary{ background: var(--accent); color:#000; }
.btn-ghost{ background: transparent; border:2px solid rgba(255,255,255,.15); color:inherit; }

/* Exam section */
.exam-section{ padding:48px 0; }
.exam-section h3{ color: var(--maroon); text-align:center; margin:0 0 1rem; }

/* Grid cards */
.exam-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: calc(var(--max-width) - 32px);
  margin: 0 auto;
}
.exam-card{
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.04);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  min-height: 110px;
}
.exam-card:focus, .exam-card:hover{ transform: translateY(-6px); box-shadow:0 18px 40px rgba(0,0,0,.08); }
.exam-card h4{ margin:.25rem 0; color: var(--maroon); }
.exam-card p{ margin:0; font-size:.95rem; color:#333; }

/* Footer */
footer{
  background: var(--maroon);
  color: white;
  padding: 18px 0;
  text-align:center;
  margin-top: 36px;
  font-size: .95rem;
}

/* Mobile adjustments */
@media (max-width:720px){
  header{ padding:8px 12px; }
  nav ul{ display: none; } /* hide desktop links on small screens */
  .menu-toggle{ display:inline-flex; }
  .mobile-nav{
    display:none;
    position:absolute;
    right:12px;
    top:62px;
    background:white;
    color:var(--text);
    border-radius:8px;
    box-shadow:0 12px 30px rgba(0,0,0,.12);
    padding:.6rem;
  }
  .mobile-nav a{ display:block; padding:.5rem .75rem; border-radius:6px; color:var(--text); text-decoration:none; }
  .hero{ padding:48px 12px; }
}

/* Focus outlines for keyboard users */
a:focus, button:focus, .exam-card:focus, input:focus, textarea:focus{
  outline: 3px solid rgba(255,215,0,.35);
  outline-offset: 3px;
}

/* Modal styles (if you use a modal) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  padding: 20px;
}
.modal.open { display:flex; }
.modal-panel{
  background: white;
  max-width: 520px;
  width: 100%;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

/* Form styles */
.form-row{ display: flex; flex-direction: column; gap: .5rem; margin-bottom: .8rem; }
label{ font-weight: 600; font-size: .92rem; }
input[type="text"], input[type="email"], input[type="password"], textarea{
  padding: .6rem .7rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
  background: #fff;
}

/* Small utility helpers */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }

/* Accessibility improvements for clickable cards */
.exam-card[role="button"]{ cursor:pointer; }

/* Minor page-specific tweaks */
.hero .cta-group .btn { min-width: 140px; }

/* Smooth image and layout performance */
img { max-width: 100%; height: auto; display: block; }

/* Printable adjustments */
@media print{
  header, footer, .hero { display: none; }
  .exam-card { box-shadow: none; border: 1px solid #ccc; }
}
