/* CASA-Bio Static Site Styles */

:root {
  --primary-color: #1a5f7a;
  --primary-dark: #134b61;
  --secondary-color: #57837b;
  --accent-color: #c38154;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #fff;
  --bg-light: #f8f9fa;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo:hover {
  text-decoration: none;
}

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

nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

nav a:hover,
nav a.active {
  color: white;
  text-decoration: none;
  border-bottom-color: var(--accent-color);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 800px;
}

/* Page header (for inner pages) */
.page-header {
  background: var(--bg-light);
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--primary-color);
}

/* Section styles */
section {
  margin-bottom: 3rem;
}

section h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

section h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

section p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card h3 {
  color: var(--primary-color);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Subtheme items */
.subtheme {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.25rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.subtheme h4 {
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.subtheme-code {
  font-weight: 600;
  color: var(--accent-color);
}

.subtheme p {
  font-size: 0.95rem;
  color: var(--text-color);
  margin: 0;
}

/* Lists */
ul, ol {
  margin: 1rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Organization list */
.org-list {
  column-count: 2;
  column-gap: 2rem;
  list-style: decimal;
  margin: 1.5rem 0 1.5rem 1.5rem;
}

.org-list li {
  break-inside: avoid;
  padding: 0.25rem 0;
}

@media (max-width: 600px) {
  .org-list {
    column-count: 1;
  }
}

/* Resource links */
.resource-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.resource-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.resource-list li:last-child {
  border-bottom: none;
}

.resource-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.resource-list .icon {
  color: var(--accent-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-small {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-small:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 0.95rem;
}

/* Disclaimer */
.disclaimer {
  background: #fff9e6;
  border: 1px solid #f0e6c8;
  border-radius: 6px;
  padding: 1rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Footer */
footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

footer .container {
  text-align: center;
}

footer p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    justify-content: center;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  header, footer, .back-link {
    display: none;
  }

  main {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
