/* ==================== IMPORTS & VARIABLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --text-dark: #2c3e50;
  --text-body: #4a4a4a;
  --bg-body: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --header-height: 70px;
}

/* ==================== RESET & GLOBAL ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-body);
  padding-top: var(--header-height); /* Reserve space for fixed header */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

h1, h2, h3, h4 {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

img {
  max-width: 100%;
  display: block;
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==================== FIXED HEADER ==================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.site-header h1 a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

/* Mobile Toggle Button (Hidden on Desktop) */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.5rem;
}

/* Desktop Navigation */
.site-nav {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav > li > a {
  color: var(--text-dark);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.site-nav > li > a:hover {
  color: var(--primary-color);
}

/* Dropdown Menus */
.has-dropdown {
  position: relative;
  cursor: pointer;
}

/* Triangle indicator */
.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.8em;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -10px;
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
  min-width: 180px;
  list-style: none;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding-top: 1rem; /* Gap filler */
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.dropdown li a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-body);
  font-size: 0.95rem;
}

.dropdown li a:hover {
  background: #f1f3f5;
  color: var(--primary-color);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== MAIN WRAPPER ==================== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 80vh;
}

/* ==================== HERO SECTION (INDEX) ==================== */
.hero-section {
  display: flex;
  flex-direction: column-reverse; /* Image on top mobile */
  align-items: center;
  gap: 2rem;
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.intro {
  flex: 1;
  font-size: 1.1rem;
}

.intro p {
  margin-bottom: 1rem;
}

.hero-img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

@media(min-width: 768px) {
  .hero-section {
    flex-direction: row;
    padding: 3rem;
  }
}

/* ==================== FILTERS (EQUIPMENT/DICTIONARY) ==================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--bg-white);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.filters input[type="search"] {
  flex: 1 1 250px;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.filter-dropdown {
  position: relative;
}

.filter-toggle {
  background: var(--bg-white);
  border: 1px solid #ccc;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

.filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0; /* Align right */
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 250px;
  z-index: 100;
  list-style: none;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.filter-menu.open {
  display: block;
}

.filter-menu li label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.filter-menu li label:hover {
  background: #f1f3f5;
}

input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

.select-all-btn {
  background: #eee;
  border: none;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
}

/* ==================== EQUIPMENT CARDS ==================== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fff;
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.card .body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

/* ==================== ACCORDIONS (EDUCATION) ==================== */
details.dropdown-section {
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

summary {
  padding: 1.25rem;
  cursor: pointer;
  background-color: var(--bg-white);
  font-weight: 600;
  list-style: none; /* Hide default triangle */
  position: relative;
  font-size: 1.1rem;
  color: var(--text-dark);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-weight: 400;
  font-size: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

details[open] summary::after {
  content: '−'; /* Minus sign */
}

details[open] summary {
  background-color: #f8f9fa;
  border-bottom: 1px solid var(--border-color);
}

details p {
  padding: 1.5rem;
  color: var(--text-body);
}

iframe {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

/* ==================== RESOURCES LISTS ==================== */
.resource-list {
  display: grid;
  gap: 1.5rem;
}

.resource-item {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.resource-item h3 {
  color: var(--primary-color);
}

.resource-item .deadline {
  display: inline-block;
  background: #e9ecef;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  color: #495057;
}

/* ==================== DICTIONARY ==================== */
.dictionary-list {
  display: grid;
  gap: 1rem;
}

.entry {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}

/* ==================== MOBILE NAVIGATION ==================== */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    gap: 0;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav > li {
    width: 100%;
    border-top: 1px solid #f1f1f1;
  }

  .site-nav > li > a {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
  }

  /* Mobile Dropdowns */
  .has-dropdown > a::after {
    content: ' ▾';
    float: right;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    padding: 0;
    display: none; /* JS or hover logic handles this */
  }
  
  /* On mobile, allow hover/focus to show, or keep it simple */
  .has-dropdown:hover .dropdown, 
  .has-dropdown:active .dropdown {
    display: block;
  }
  
  .dropdown li a {
    padding-left: 2.5rem; /* Indent sub-items */
  }
}
/* ==================== IMPORTS & VARIABLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary-color: #0056b3;     /* Trustworthy Blue */
  --primary-light: #e7f1ff;     /* Light Blue Background */
  --accent-color: #28a745;      /* Success/Action Green */
  --text-dark: #1a1a1a;         /* High Contrast Text */
  --text-body: #4a4a4a;         /* Readable Body Text */
  --bg-body: #f4f7f6;           /* Soft Medical Gray-Blue */
  --bg-white: #ffffff;
  --border-color: #dee2e6;
  --header-height: 72px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
  --radius: 8px;
}

/* ==================== RESET & GLOBAL ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-body);
  padding-top: var(--header-height);
}

a { color: var(--primary-color); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* Accessibility: Skip Link */
.skip-link {
  position: absolute; top: -100px; left: 0; background: #000; color: #fff;
  padding: 1rem; z-index: 9999; transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* Focus States */
:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }

/* ==================== HEADER & NAV ==================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex; align-items: center;
}

.nav-container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}

.logo {
  font-size: 1.5rem; font-weight: 800; color: var(--text-dark);
  text-transform: uppercase; letter-spacing: -0.5px; text-decoration: none;
}
.logo:hover { text-decoration: none; }

.mobile-toggle {
  display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer;
}

.site-nav { display: flex; gap: 2rem; list-style: none; align-items: center; }
.site-nav a {
  color: var(--text-dark); font-weight: 600; padding: 0.5rem 0;
}

/* Dropdowns */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: ' ▾'; font-size: 0.8em; }

.dropdown {
  display: none; position: absolute; top: 100%; left: -1rem;
  background: var(--bg-white); min-width: 220px;
  box-shadow: var(--shadow-md); border-radius: var(--radius);
  padding: 0.5rem 0; list-style: none; border: 1px solid var(--border-color);
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }

.dropdown li a {
  display: block; padding: 0.75rem 1.5rem; color: var(--text-body);
}
.dropdown li a:hover { background: var(--primary-light); color: var(--primary-color); text-decoration: none; }

/* The "Support Team" Button */
.nav-button {
  background: var(--text-dark); color: #fff !important;
  padding: 0.6rem 1.2rem !important; border-radius: var(--radius);
  transition: transform 0.2s;
}
.nav-button:hover {
  transform: translateY(-2px); background: var(--primary-color); text-decoration: none;
}

/* ==================== LAYOUTS ==================== */
main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; min-height: 80vh; }

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; color: var(--text-dark); line-height: 1.2; }
h2 { font-size: 1.75rem; margin: 2rem 0 1rem; color: var(--text-dark); }
p { margin-bottom: 1rem; font-size: 1.05rem; }

/* Hero Section */
.hero {
  background: var(--bg-white); padding: 3rem; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column-reverse; gap: 2rem;
  align-items: center; margin-bottom: 3rem;
}
.hero-content { flex: 1; }
.hero-img { width: 100%; max-width: 400px; border-radius: var(--radius); }

@media(min-width: 768px) {
  .hero { flex-direction: row; }
}

/* ==================== CARDS & GRIDS ==================== */
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem;
}

.card {
  background: var(--bg-white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; transition: transform 0.2s;
  border: 1px solid var(--border-color);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-img {
  height: 200px; width: 100%; object-fit: contain;
  background: #fff; padding: 1rem; border-bottom: 1px solid #f0f0f0;
}

.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-meta {
  font-size: 0.9rem; color: #666; margin-bottom: 1rem;
  background: #f8f9fa; display: inline-block; padding: 0.25rem 0.5rem; border-radius: 4px;
}
.card-desc { font-size: 0.95rem; color: var(--text-body); margin-bottom: 1.5rem; flex: 1; }

.btn {
  display: inline-block; background: var(--primary-color); color: white !important;
  padding: 0.6rem 1.2rem; border-radius: 6px; text-align: center; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; width: 100%;
}
.btn:hover { background: #004494; text-decoration: none; }

/* ==================== ACCORDIONS & LISTS ==================== */
details {
  background: var(--bg-white); border: 1px solid var(--border-color);
  margin-bottom: 1rem; border-radius: var(--radius);
}
summary {
  padding: 1rem; font-weight: 600; cursor: pointer; list-style: none; position: relative;
}
summary::after { content: '+'; position: absolute; right: 1rem; font-weight: bold; }
details[open] summary::after { content: '-'; }
details[open] summary { border-bottom: 1px solid var(--border-color); background: #fcfcfc; }
.details-content { padding: 1.5rem; }

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .site-nav {
    display: none; flex-direction: column; position: absolute;
    top: var(--header-height); left: 0; width: 100%;
    background: var(--bg-white); border-bottom: 1px solid var(--border-color);
    padding: 1rem 0; gap: 0; box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav li { width: 100%; border-top: 1px solid #f1f1f1; }
  .site-nav a { padding: 1rem 1.5rem; display: block; }
  .dropdown { position: static; box-shadow: none; border: none; display: none; background: #f8f9fa; }
  .has-dropdown.active .dropdown { display: block; }
  .nav-button { margin: 1rem 1.5rem; text-align: center; }
}