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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
  color: #1a1a1a;
}

h2 {
  font-size: 2rem;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
  color: #2d2d2d;
}

h3 {
  font-size: 1.5rem;
  margin: 1.25rem 0 0.5rem;
  color: #444;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0052a3;
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and Navigation */
header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1a1a1a;
}

.logo a {
  color: inherit;
  display: block;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 250px;
  display: block;
}

/* Main Navigation */
nav {
  flex: 1;
  margin: 0 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  display: block;
  padding: 0.5rem 0;
  color: #333;
  font-weight: 500;
}

nav a:hover {
  color: #0066cc;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Breadcrumbs */
.breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.breadcrumb li:not(:last-child)::after {
  content: " / ";
  margin: 0 0.5rem;
}

.breadcrumb a {
  color: #0066cc;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  order: 2;
}

.hero-content {
  order: 1;
}

.hero h1 {
  color: white;
  margin-top: 0;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .hero-image {
    order: 1;
  }

  .hero-content {
    order: 2;
  }
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.main-content {
  flex: 1;
}

/* Sidebar for Ads */
.sidebar {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.ad-space {
  background-color: #e0e0e0;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
}

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

.card-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #0066cc;
  color: white;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.card-link:hover {
  background-color: #0052a3;
  text-decoration: none;
}

/* Safety Panel */
.safety-panel {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.safety-panel h2 {
  margin-top: 0;
  color: #856404;
}

.safety-panel p, .safety-panel ul {
  color: #333;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.footer-section ul {
  list-style: none;
  margin-left: 0;
}

.footer-section a {
  color: #0066cc;
  display: block;
  padding: 0.25rem 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.875rem;
  color: #666;
}

/* Forms */
form {
  max-width: 500px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

button {
  background-color: #0066cc;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #0052a3;
}

/* Accessibility */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: #0066cc;
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

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

  h2 {
    font-size: 1.5rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 1rem;
  }

  nav {
    margin: 0;
    flex-basis: 100%;
    order: 3;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  header, footer, .sidebar, .ad-space {
    display: none;
  }

  a {
    text-decoration: underline;
  }
}

/* Search Styles */
.search-box {
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-results-list {
  display: grid;
  gap: 1rem;
}

.search-result-item {
  padding: 1rem;
  background-color: #f9f9f9;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  transition: background-color 0.3s, transform 0.2s;
}

.search-result-item:hover {
  background-color: #f0f0f0;
  transform: translateX(4px);
}

.result-title {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.result-title:hover {
  text-decoration: underline;
  color: #0056b3;
}

#search-results {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .search-box {
    max-width: 100%;
  }
  
  .search-box input {
    font-size: 16px;
  }
}
