/* Modern CSS for Genealogy Website */
:root {
  /* Color palette - earthy tones with a modern twist */
  --primary-color: #5d4037; /* Deep brown */
  --secondary-color: #8d6e63; /* Lighter brown */
  --accent-color: #bf360c; /* Rusty accent */
  --background-color: #f5f5f5; /* Light gray background */
  --text-color: #333333; /* Dark gray text */
  --light-text: #ffffff; /* White text */
  --link-color: #795548; /* Brown links */
  --link-hover-color: #bf360c; /* Rusty hover */
  --card-background: #ffffff; /* White card background */
  --border-color: #e0e0e0; /* Light gray border */
  
  /* Typography */
  --heading-font: 'Playfair Display', Georgia, serif;
  --body-font: 'Open Sans', Arial, sans-serif;
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--light-text);
  text-decoration: none;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  color: var(--accent-color);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--light-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  background-color: var(--secondary-color);
  color: var(--light-text);
  padding: 2rem 0;
  text-align: center;
  background-image: linear-gradient(to right, var(--secondary-color), var(--primary-color));
  background-size: cover;
  background-position: center;
}

.hero h1 {
  font-size: 3rem;
  color: var(--light-text);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--light-text);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #a53000;
  text-decoration: none;
  color: var(--light-text);
}

/* Main content */
.main-content {
  padding: 3rem 0;
}

/* Card layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background-color: var(--card-background);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card-text {
  margin-bottom: 1.5rem;
}

/* About section */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin: 3rem 0;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.about-image img {
  height: 100%;
  height: auto;
  display: block;
}

/* Footer */
.site-footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-column h3 {
  color: var(--light-text);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: var(--light-text);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-column a:hover {
  opacity: 1;
  text-decoration: none;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Responsive styles */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .site-title {
    margin-bottom: 1rem;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .about-section {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .main-nav.active {
    display: block;
    width: 100%;
  }
}

/* Special sections */
.genealogy-section {
  background-color: rgba(93, 64, 55, 0.05);
  padding: 3rem 0;
  margin: 3rem 0;
  border-radius: 8px;
}

/* Article styles */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-header {
  margin-bottom: 2rem;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-image {
  margin-bottom: 2rem;
  text-align: center;
}

.featured-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-caption {
  margin-top: 0.75rem;
  font-style: italic;
  color: #666;
  font-size: 0.9rem;
}

.back-link {
  margin: 3rem 0;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  transition: color 0.3s ease;
}

.back-link a i {
  margin-right: 0.5rem;
}

.contact-info {
  background-color: rgba(93, 64, 55, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(141, 110, 99, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Table styles */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: rgba(93, 64, 55, 0.05);
  font-weight: 600;
}

.data-table tr:hover {
  background-color: rgba(93, 64, 55, 0.02);
}

.text-center {
  text-align: center;
}
