/* Foundations of Biology - Custom Styles */

:root {
  /* Color Palette */
  --primary-blue: #2c3e50;
  --secondary-blue: #3498db;
  --accent-green: #27ae60;
  --accent-red: #e74c3c;
  --light-gray: #ecf0f1;
  --dark-gray: #2c3e50;
  --text-color: #333333;
  --link-color: #2980b9;
  
  /* Typography */
  --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-code: 'Fira Code', 'Consolas', monospace;
}

/* Base Styles */
body {
  font-family: var(--font-main);
  line-height: 1.7;
  color: var(--text-color);
  max-width: 3200px;
  margin: 0 auto;
  padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--primary-blue);
  margin-top: 2em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 3px solid var(--secondary-blue);
  padding-bottom: 10px;
  margin-top: 1em;
}

h2 {
  font-size: 2rem;
  color: var(--dark-gray);
  border-left: 4px solid var(--accent-green);
  padding-left: 15px;
}

h3 {
  font-size: 1.5rem;
  color: var(--primary-blue);
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

/* Special Elements */
.learning-objectives {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 10px;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.learning-objectives h3 {
  color: white;
  margin-top: 0;
  border: none;
  padding: 0;
}

.learning-objectives ul {
  margin: 15px 0 0 0;
  padding-left: 20px;
}

.learning-objectives li {
  margin: 10px 0;
}

/* Characteristic Boxes */
.characteristic-box {
  background-color: #f8f9fa;
  border-left: 4px solid var(--secondary-blue);
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

.characteristic-box strong {
  color: var(--primary-blue);
  font-size: 1.1em;
}

/* Hierarchy Diagram */
.hierarchy-diagram {
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  padding: 20px;
  margin: 30px 0;
  background: linear-gradient(to bottom, white, #f8f9fa);
}

.hierarchy-diagram .level {
  margin: 15px 0;
  padding: 15px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hierarchy-diagram .level-title {
  font-weight: bold;
  color: var(--primary-blue);
  margin-bottom: 5px;
}

.hierarchy-diagram .level-description {
  color: #666;
  font-size: 0.9em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th {
  background-color: var(--primary-blue);
  color: white;
  text-align: left;
  padding: 15px;
  font-weight: 600;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

tr:hover {
  background-color: #e8f4fc;
  transition: background-color 0.2s;
}

/* Code Blocks */
pre {
  background-color: #f5f7fa;
  border-left: 4px solid var(--secondary-blue);
  padding: 15px;
  overflow-x: auto;
  border-radius: 0 5px 5px 0;
  margin: 20px 0;
}

code {
  font-family: var(--font-code);
  background-color: #f1f3f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Callouts */
div.callout {
  border-radius: 8px;
  margin: 25px 0;
  padding: 20px;
  border-left: 5px solid;
}

div.callout-note {
  border-color: var(--secondary-blue);
  background-color: #e8f4fc;
}

div.callout-important {
  border-color: var(--accent-red);
  background-color: #fdeaea;
}

div.callout-tip {
  border-color: var(--accent-green);
  background-color: #eafaf1;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, white 0%, white 100%);  /*I changed from this #2c3e50 and #4a6491*/
  color: black; /*white*/
  padding: 40px;
  border-radius: 15px;
  margin-bottom: 40px;
  text-align: left; 
}

.hero-text h2 {
  color: black; /*white*/
  border: none;
  padding: 0;
  margin-top: 0;
  font-size: 2.38rem;
}

.hero-text p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 20px auto;
  opacity: 0.9;
}

/* Quick Links */
.quick-links {
  margin: 50px 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.link-card {
  display: block;
  background: white;
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-color: var(--secondary-blue);
  text-decoration: none;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.link-card h4 {
  color: var(--primary-blue);
  margin: 10px 0;
}

.link-card p {
  color: #666;
  margin: 0;
}

/* Review Questions */
.review-questions {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  margin: 40px 0;
  border-left: 4px solid var(--accent-green);
}

.review-questions h3 {
  margin-top: 0;
  color: var(--accent-green);
}

/* Key Terms */
.key-terms {
  background-color: #f0f7ff;
  padding: 25px;
  border-radius: 8px;
  margin: 30px 0;
}

.key-terms dt {
  font-weight: bold;
  color: var(--primary-blue);
  margin-top: 10px;
}

.key-terms dd {
  margin-left: 20px;
  color: #555;
}

/* Figures and Images */
figure {
  margin: 30px 0;
  text-align: center;
}

figcaption {
  font-style: italic;
  color: #666;
  margin-top: 10px;
  font-size: 0.9em;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Interactive Exercises */
.interactive-exercise {
  background-color: #fff8e1;
  border: 2px dashed #ffb74d;
  border-radius: 10px;
  padding: 25px;
  margin: 30px 0;
}

.interactive-exercise h4 {
  color: #e65100;
  margin-top: 0;
}

/* Navigation */
.sidebar {
  background-color: #f8f9fa;
}

.navbar {
  background-color: var(--primary-blue);
}

/* Footer */
.footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 2px solid var(--light-gray);
  color: #666;
  font-size: 0.9em;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .link-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 25px 15px;
  }
  
  .learning-objectives {
    padding: 20px 15px;
  }
}

/* Print Styles */
@media print {
  .hero-section, .link-grid, .interactive-exercise {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .page-break {
    page-break-before: always;
  }
}