/* khedut store - Mobile-Friendly Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #006400 0%, #228B22 100%);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

header h1 a {
  color: white;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

nav {
  margin-top: 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.2);
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

h1,
h2,
h3 {
  color: #006400;
  margin-top: 0;
}

h2 {
  border-bottom: 2px solid #006400;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
}

ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

ul li {
  background: #f4f4f4;
  padding: 0.75rem;
  border-radius: 4px;
  transition: background 0.3s;
}

ul li:hover {
  background: #e8e8e8;
}

ul li a {
  color: #006400;
  text-decoration: none;
  font-weight: 500;
}

ul li a:hover {
  text-decoration: underline;
}

/* Tables: make header/body widths consistent and center tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin: 1.5rem 0;
  table-layout: fixed;
}

.table-container {
  overflow-x: auto;
  text-align: center;
  margin-bottom: 2rem;
}

.table-wrapper {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

thead {
  background: #006400;
  color: white;
}

th,
td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  overflow-wrap: anywhere;
}

th {
  font-weight: 600;
  position: sticky;
  top: 0;
}

tbody tr:nth-child(even) {
  background: #f9f9f9;
}

tbody tr:hover {
  background: #f0f0f0;
}

td a {
  color: #006400;
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: #006400;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 2px solid #006400;
  border-radius: 4px;
  transition: all 0.3s;
}

.back-link:hover {
  background: #006400;
  color: white;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
  margin-top: 3rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.4rem;
  }

  main {
    padding: 1rem;
    margin: 1rem;
  }

  ul {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.2rem;
  }

  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: 0.4rem;
  }
}

/* Print Styles */
@media print {

  header,
  footer,
  nav,
  .back-link {
    display: none;
  }

  body {
    background: white;
  }

  main {
    box-shadow: none;
  }
}