/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-purple: #8B5CF6;
  --primary-pink: #EC4899;
  --dark-purple: #6D28D9;
  --light-pink: #F9A8D4;
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --gradient-secondary: linear-gradient(135deg, #EC4899 0%, #F9A8D4 100%);
  --text-dark: #1F2937;
  --text-light: #6B7280;
  --bg-light: #FAFAFA;
  --white: #FFFFFF;
  --shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.1), 0 2px 4px -1px rgba(139, 92, 246, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(139, 92, 246, 0.1), 0 4px 6px -2px rgba(139, 92, 246, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
header {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-wrapper:hover {
  transform: scale(1.05);
}

.logo-wrapper img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
  width: 80%;
}

nav ul li a:hover,
nav ul li a:focus {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* Banner Styles */
.banner {
  width: 100%;
  margin: 2rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.2), 0 10px 10px -5px rgba(139, 92, 246, 0.1);
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.banner-first {
  margin-top: 0;
  margin-bottom: 3rem;
}

.banner-middle {
  margin: 3rem 0;
}

/* Section Styles */
section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

section h1 {
  font-size: 2.5rem;
  color: var(--dark-purple);
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

section h2 {
  font-size: 2rem;
  color: var(--primary-purple);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

section p {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.8;
}

section p:last-child {
  margin-bottom: 0;
}

/* List Styles */
ul, ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

nav ul, ol {
    margin-left: 0;
    margin-bottom: 0;
}

ul li, ol li {
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.8;
}

nav ul li, ol li {
    margin-bottom: 0;

  }

ul li p, ol li p {
  margin-bottom: 0.5rem;
}

ul li strong, ol li strong {
  color: var(--primary-purple);
  font-weight: 600;
}

/* Table Container with Horizontal Scroll */
.table-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-purple) var(--bg-light);
}

.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Table Styles */
table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  margin: 0;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

thead {
  background: var(--gradient-primary);
}

thead th {
  color: var(--white);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 1.1rem;
}

tbody tr {
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  transition: background 0.3s ease;
}

tbody tr:hover {
  background: rgba(139, 92, 246, 0.05);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: 1rem;
  color: var(--text-dark);
}

/* Definition List Styles */
dl {
  margin: 2rem 0;
}

dt {
  font-weight: 600;
  color: var(--primary-purple);
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

dd {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.8;
  padding-left: 1rem;
  border-left: 3px solid var(--light-pink);
}

/* Footer Styles */
footer {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 3rem 1.5rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 6px -1px rgba(139, 92, 246, 0.1);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section p {
  margin: 0;
  color: var(--white);
  opacity: 0.9;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
}

.footer-links li a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.9;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links li a:hover {
  opacity: 1;
  transform: translateX(5px);
  color: var(--light-pink);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    display: block;
    align-self: flex-end;
    margin-top: -3.5rem;
  }

  nav {
    width: 100%;
    display: none;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    display: block;
    width: 100%;
    text-align: center;
  }

  section {
    padding: 1.5rem;
  }

  section h1 {
    font-size: 2rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  section p {
    font-size: 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .banner {
    margin: 1.5rem 0;
    border-radius: 12px;
  }

  .banner-first {
    margin-bottom: 2rem;
  }

  .banner-middle {
    margin: 2rem 0;
  }

  table {
    font-size: 0.9rem;
  }

  thead th,
  tbody td {
    padding: 0.75rem;
  }

  footer {
    padding: 2rem 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .logo-wrapper img {
    height: 40px;
  }

  section h1 {
    font-size: 1.75rem;
  }

  section h2 {
    font-size: 1.25rem;
  }

  ul, ol {
    margin-left: 1.5rem;
  }

  table {
    font-size: 0.85rem;
  }

  thead th,
  tbody td {
    padding: 0.5rem;
  }

  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.3rem;
  }

  .bottom-banner {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    text-align: center;
  }

  .bottom-banner-content {
    font-size: 0.9rem;
  }

  .bottom-banner-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }
}

@media (max-width: 768px) {
  body.has-bottom-banner .scroll-to-top {
    transition: bottom 0.3s ease;
  }
}

@media (max-width: 480px) {
  body.has-bottom-banner .scroll-to-top {
    transition: bottom 0.3s ease;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 998;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-to-top.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--gradient-secondary);
  transform: translateY(-5px);
  box-shadow: 0 15px 20px -5px rgba(139, 92, 246, 0.3);
}

.scroll-to-top:active {
  transform: translateY(-2px);
}

/* Bottom Banner (created via JS) */
.bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gradient-primary);
  color: var(--white);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.3);
  z-index: 997;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  animation: slideUp 0.4s ease-out;
  max-width: 100%;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bottom-banner-content {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.bottom-banner-button {
  background: var(--white);
  color: var(--primary-purple);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.bottom-banner-button:hover {
  background: var(--light-pink);
  color: var(--dark-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.bottom-banner-button:active {
  transform: translateY(0);
}

/* Adjust scroll to top button when banner is visible - will be set dynamically via JS */
body.has-bottom-banner .scroll-to-top {
  transition: bottom 0.3s ease;
}

/* Footer padding adjustment for banner - will be set dynamically via JS */
body.has-bottom-banner footer {
  transition: padding-bottom 0.3s ease;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--primary-pink);
  outline-offset: 2px;
}

