/* TUFF RP EMS – Premium Dark Theme v2 */
:root {
  --ems-navy: #050b14;
  --ems-dark: #0a1422;
  --ems-card: #0f1c2e;
  --ems-card-hover: #152538;
  --ems-red: #e11d48;
  --ems-red-glow: #fb7185;
  --ems-cyan: #22d3ee;
  --ems-cyan-dim: #06b6d4;
  --ems-blue: #3b82f6;
  --ems-white: #f1f5f9;
  --ems-muted: #94a3b8;
  --ems-border: rgba(34, 211, 238, 0.12);
  --ems-glow-red: 0 0 25px rgba(225, 29, 72, 0.45);
  --ems-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--ems-navy);
  color: var(--ems-white);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(225, 29, 72, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(59, 130, 246, 0.07) 0%, transparent 45%),
    linear-gradient(180deg, #050b14 0%, #0a1422 40%, #050b14 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--ems-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ems-red-glow); }
img { max-width: 100%; height: auto; display: block; }

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--ems-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ems-white);
  letter-spacing: 0.5px;
}

.logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(225, 29, 72, 0.4));
  transition: transform var(--transition);
}

.logo:hover .logo-img { transform: scale(1.06); }
.logo span.red { color: var(--ems-red); text-shadow: 0 0 12px rgba(225, 29, 72, 0.5); }

.nav { display: flex; align-items: center; gap: 0.2rem; }

.nav-link {
  padding: 0.55rem 1.05rem;
  color: var(--ems-muted);
  font-weight: 550;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ems-white);
  background: rgba(34, 211, 238, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 2px;
  background: linear-gradient(90deg, var(--ems-red), var(--ems-cyan));
  border-radius: 2px;
  box-shadow: var(--ems-glow-red);
}

.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 0.3rem; }
.dropdown-toggle::after { content: '▾'; font-size: 0.65rem; opacity: 0.7; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: var(--ems-card);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.65rem 1.1rem;
  color: var(--ems-muted);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.15), rgba(34, 211, 238, 0.08));
  color: var(--ems-white);
}

.menu-toggle {
  display: none;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--ems-border);
  color: var(--ems-white);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.3rem;
}

.hero {
  position: relative;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(225, 29, 72, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(34, 211, 238, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 880px; margin: 0 auto; }

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 25px rgba(225, 29, 72, 0.5));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2), rgba(225, 29, 72, 0.08));
  border: 1px solid rgba(225, 29, 72, 0.45);
  color: var(--ems-red-glow);
  padding: 0.45rem 1.15rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  box-shadow: var(--ems-glow-red);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 850;
  line-height: 1.12;
  margin-bottom: 1.1rem;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #fff 30%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--ems-red) 0%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(225, 29, 72, 0.4));
}

.hero p {
  font-size: 1.18rem;
  color: var(--ems-muted);
  max-width: 600px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  font-weight: 650;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: white;
  box-shadow: var(--ems-glow-red), 0 6px 20px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(225, 29, 72, 0.65), 0 10px 28px rgba(225, 29, 72, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--ems-cyan);
  border: 1.5px solid var(--ems-cyan);
  box-shadow: var(--ems-glow-cyan);
}

.btn-secondary:hover {
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-3px);
  color: #fff;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--ems-white);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.btn-outline:hover {
  border-color: var(--ems-cyan);
  color: var(--ems-cyan);
  box-shadow: var(--ems-glow-cyan);
}

.section {
  padding: 4.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.section-inner { max-width: 1180px; margin: 0 auto; }

.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 750;
  margin-bottom: 0.55rem;
  text-align: center;
  letter-spacing: -0.3px;
}

.section-title .accent {
  background: linear-gradient(135deg, var(--ems-red), #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--ems-muted);
  max-width: 580px;
  margin: 0 auto 2.75rem;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.4rem;
}

.card {
  background: linear-gradient(160deg, rgba(15, 28, 46, 0.95) 0%, rgba(10, 20, 34, 0.98) 100%);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius);
  padding: 1.85rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ems-red), var(--ems-cyan), var(--ems-blue));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), var(--ems-glow-cyan);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, rgba(225, 29, 72, 0.18), rgba(225, 29, 72, 0.06));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin-bottom: 1.15rem;
  border: 1px solid rgba(225, 29, 72, 0.28);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.15);
}

.card h3 { font-size: 1.18rem; margin-bottom: 0.5rem; font-weight: 650; }
.card p { color: var(--ems-muted); font-size: 0.94rem; }

.info-box {
  background: linear-gradient(145deg, rgba(15, 28, 46, 0.9), rgba(10, 20, 34, 0.95));
  border: 1px solid var(--ems-border);
  border-radius: var(--radius);
  padding: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: center;
  margin-top: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.info-box-icon {
  width: 84px;
  height: 84px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  border: 2px solid rgba(34, 211, 238, 0.35);
  box-shadow: var(--ems-glow-cyan);
  flex-shrink: 0;
}

.info-box-content h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.info-box-content p { color: var(--ems-muted); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--ems-border);
  background: var(--ems-card);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--ems-cyan);
  font-weight: 650;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.6px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(34, 211, 238, 0.05); }

.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 650;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-rank {
  background: rgba(225, 29, 72, 0.15);
  color: var(--ems-red-glow);
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.badge-cert {
  background: rgba(34, 211, 238, 0.12);
  color: var(--ems-cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  font-size: 0.7rem;
  margin: 0.15rem;
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.code-item {
  background: linear-gradient(145deg, var(--ems-card), #0c1828);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  transition: all var(--transition);
}

.code-item:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.1);
  transform: translateX(4px);
}

.code-num {
  font-weight: 750;
  color: var(--ems-red);
  min-width: 3.3rem;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
}

.code-desc { color: var(--ems-muted); font-size: 0.9rem; }

.cta-section {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.1) 0%, rgba(34, 211, 238, 0.07) 100%);
  border-top: 1px solid var(--ems-border);
  border-bottom: 1px solid var(--ems-border);
  text-align: center;
  padding: 4.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.cta-box {
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--ems-card) 0%, #0a1525 100%);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius);
  padding: 2.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(225, 29, 72, 0.08);
}

.cta-box h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.cta-box p { color: var(--ems-muted); margin-bottom: 1.5rem; }

.cta-highlight {
  background: rgba(225, 29, 72, 0.1);
  border-left: 3px solid var(--ems-red);
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
  text-align: left;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cmd-group { margin-bottom: 2.5rem; }
.cmd-group h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--ems-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cmd-list { display: grid; gap: 0.65rem; }

.cmd-row {
  background: linear-gradient(145deg, var(--ems-card), #0c1828);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.25rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: center;
  transition: border-color var(--transition);
}

.cmd-row:hover { border-color: rgba(34, 211, 238, 0.3); }

.cmd-name {
  font-family: 'Courier New', monospace;
  color: var(--ems-red-glow);
  font-weight: 650;
  font-size: 0.95rem;
}

.cmd-desc { color: var(--ems-muted); font-size: 0.9rem; }

.uniform-grid, .vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.35rem;
}

.uniform-card, .vehicle-card {
  background: linear-gradient(160deg, var(--ems-card) 0%, #0a1525 100%);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.uniform-card:hover, .vehicle-card:hover {
  border-color: rgba(225, 29, 72, 0.4);
  box-shadow: var(--ems-glow-red);
  transform: translateY(-5px);
}

.uniform-img {
  height: 150px;
  background: linear-gradient(145deg, #152538, #0a1422);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  border-bottom: 1px solid var(--ems-border);
}

.uniform-body { padding: 1.35rem; }
.vehicle-card { text-align: center; padding: 1.75rem 1.4rem; }
.vehicle-icon { font-size: 2.8rem; margin-bottom: 0.85rem; }
.uniform-body h4, .vehicle-card h3 { margin-bottom: 0.35rem; }
.uniform-body p, .vehicle-card p { color: var(--ems-muted); font-size: 0.88rem; }

.rank-req {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.rank-ladder {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 520px;
  margin: 0 auto;
}

.rank-step {
  background: linear-gradient(145deg, var(--ems-card), #0c1828);
  border: 1px solid var(--ems-border);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition);
}

.rank-step:hover {
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(6px);
}

.rank-step::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--ems-red);
  border-radius: 50%;
  box-shadow: var(--ems-glow-red);
  flex-shrink: 0;
}

.rank-step.high::before {
  background: var(--ems-cyan);
  box-shadow: var(--ems-glow-cyan);
}

.rank-name { font-weight: 650; }
.rank-desc { color: var(--ems-muted); font-size: 0.85rem; margin-left: auto; }

.page-header {
  padding: 4rem 1.5rem 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.1) 0%, transparent 100%);
  border-bottom: 1px solid var(--ems-border);
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.page-header p { color: var(--ems-muted); max-width: 520px; margin: 0 auto; }

.page-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 0 15px rgba(225, 29, 72, 0.4));
}

.footer {
  background: #03070e;
  border-top: 1px solid var(--ems-border);
  padding: 3.25rem 1.5rem 1.75rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--ems-cyan);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 650;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.45rem; }
.footer a { color: var(--ems-muted); font-size: 0.9rem; }
.footer a:hover { color: var(--ems-white); }

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--ems-muted);
  font-size: 0.84rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(5, 11, 20, 0.97);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--ems-border);
    gap: 0.2rem;
    backdrop-filter: blur(12px);
  }
  .nav.open { display: flex; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
    display: none;
  }
  .dropdown.open .dropdown-menu { display: block; }
  .cmd-row { grid-template-columns: 1fr; gap: 0.3rem; }
}

@media (max-width: 600px) {
  .hero { padding: 3.5rem 1rem 3rem; }
  .section { padding: 3rem 1rem; }
  .info-box { flex-direction: column; text-align: center; }
  .hero-logo { width: 90px; height: 90px; }
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.muted { color: var(--ems-muted); }
.highlight { color: var(--ems-red-glow); }
