/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Constrain textual content width */
main > article,
main > section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
}

.brand img {
  height: 70px;
  width: auto;
}

/* Navigation */
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.site-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle-bar {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Banners */
.banner {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  margin: 2rem 0;
  transition: transform 0.3s ease;
}

.banner:hover {
  transform: translateY(-5px);
}

.banner-top {
  margin: 1rem 0 2rem 0;
}

.banner-middle {
  margin: 3rem 0;
}

/* Content sections */
article,
section {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  text-align: center;
}

h2 {
  font-size: 1.8rem;
  color: #34495e;
  margin: 2rem 0 1rem 0;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin: 1.5rem 0 0.8rem 0;
}

p {
  margin-bottom: 1rem;
  text-align: justify;
}

ul,
ol {
  margin: 1rem 0 1rem 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Table wrapper for horizontal scroll */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tables */
table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

tr:hover {
  background: #f8f9fa;
}

/* FAQ */
dl {
  margin: 2rem 0;
}

dt {
  font-weight: 600;
  color: #2c3e50;
  margin: 1rem 0 0.5rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 4px solid #667eea;
  border-radius: 0 8px 8px 0;
}

dd {
  margin: 0 0 1rem 1rem;
  padding: 0 1rem;
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.footer-nav a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #667eea;
}

.footer-copy {
  color: #bdc3c7;
  font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-inner {
    min-height: 70px;
    padding: 0.5rem 0;
  }

  .brand img {
    height: 55px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .site-nav[aria-expanded="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .container {
    padding: 0 15px;
  }

  .banner {
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .header-inner {
    min-height: 65px;
    padding: 0.5rem 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .brand {
    font-size: 1.2rem;
  }

  .brand img {
    height: 50px;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.8rem 0.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus,
button:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }
}
