/* Common CSS - Maker Lab Kids */
/* Shared styles across all pages */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typography */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #2D3142;
}

/* Navigation */
nav {
  background: #2D3142;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #FFD23F;
}

/* Hamburger Menu Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: 0.3s;
}

/* Quick Nav (pill buttons) */
.quick-nav {
  padding: 0.75rem 2rem;
  position: sticky;
  top: 70px;
  z-index: 100;
}

.quick-nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-nav a {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.quick-nav a:hover {
  transform: translateY(-2px);
}

/* Common Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary {
  background: #E65100;
  color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid #00A8A8;
  margin-left: 1rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Footer */
footer {
  background: #2D3142;
  color: white;
  padding: 2rem;
  text-align: center;
}

footer p {
  opacity: 0.8;
}

footer a {
  color: #FFD23F;
}

/* Mobile Navigation - Divider for quick-nav items in menu */
.nav-links .nav-divider {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Show hamburger button */
  .nav-toggle {
    display: flex;
  }

  /* Nav stays fixed on mobile */
  nav {
    padding: 0.75rem 1rem;
  }

  /* Dropdown menu */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2D3142;
    flex-direction: column;
    padding: 0;
    gap: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
  }

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

  /* Divider styling for quick-nav items in mobile menu */
  .nav-links .nav-divider {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
  }

  /* Quick nav items in mobile menu */
  .nav-links .mobile-quick-link a {
    color: #FFD23F;
    font-size: 0.9rem;
  }

  .nav-links .mobile-quick-link a:hover {
    color: white;
  }

  /* Hide sticky quick-nav bar on mobile */
  .quick-nav {
    display: none;
  }

  /* Button adjustments */
  .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* Standards Tables - Desktop */
.standards-table {
  table-layout: fixed;
}

/* Sub-section descriptions */
.sub-section-desc {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Standards Tables - Mobile Responsive */
@media (max-width: 768px) {
  /* Reduce content padding */
  .content {
    padding: 1rem;
  }

  /* Reduce framework-content padding */
  .framework-content {
    padding: 1rem;
  }

  /* Framework header more compact */
  .framework-header {
    padding: 1rem;
  }

  .framework-header h2 {
    font-size: 1.1rem;
    flex-wrap: wrap;
  }

  /* Instructions box more compact */
  .instructions {
    padding: 1rem;
  }

  /* Standards table responsive - wrap in scrollable container */
  .standards-table {
    font-size: 0.8rem;
    table-layout: fixed;
    min-width: 100%;
  }

  /* Wrapper for horizontal scroll on mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }

  .standards-table th,
  .standards-table td {
    padding: 0.4rem;
  }

  /* Remove fixed widths on mobile - let table flow naturally */
  .standards-table th[style],
  .standards-table td[style] {
    width: auto !important;
  }

  /* Allow code to wrap on very small screens */
  .standards-table .code {
    font-size: 0.7rem;
    white-space: normal;
    word-break: break-word;
    padding: 0.15rem 0.3rem;
  }

  /* Reduce column widths */
  .standards-table th:first-child,
  .standards-table td:first-child {
    width: auto;
    min-width: 50px;
  }

  /* Second column (standard text) - allow wrapping */
  .standards-table td:nth-child(2) {
    min-width: 120px;
    max-width: 200px;
  }

  .program-links {
    gap: 0.2rem;
  }

  .program-link {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
  }

  /* Sub-section headers */
  .sub-section h3 {
    font-size: 1rem;
  }

  /* Sub-section descriptions */
  .sub-section-desc {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  nav {
    padding: 0.5rem 0.75rem;
  }

  .nav-logo {
    height: 40px;
  }

  .standards-table {
    font-size: 0.8rem;
  }

  .standards-table th,
  .standards-table td {
    padding: 0.4rem;
  }
}
