/* Custom styles for the Strategic Business Analytics with R book */

/* Main text styling */
body {
  line-height: 1.6;
  color: #333;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #2c3e50;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2em;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.2em;
}

/* Links */
a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Code blocks */
pre {
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 16px;
  overflow: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 85%;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 90%;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  padding: 0.2em 0.4em;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

th, td {
  padding: 8px 12px;
  border: 1px solid #dfe2e5;
}

th {
  background-color: #f6f8fa;
  font-weight: 600;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #dfe2e5;
  padding-left: 1em;
  color: #6a737d;
  margin-left: 0;
  margin-right: 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Learning objectives section */
.learning-objectives {
  background-color: #e3f2fd;
  border-left: 5px solid #2196f3;
  padding: 1em;
  margin-bottom: 1.5em;
}

.learning-objectives h2 {
  color: #0d47a1;
  margin-top: 0;
}

/* Prerequisites section */
.prerequisites {
  background-color: #f1f8e9;
  border-left: 5px solid #8bc34a;
  padding: 1em;
  margin-bottom: 1.5em;
}

.prerequisites h2 {
  color: #33691e;
  margin-top: 0;
}

/* Business case section */
.business-case {
  background-color: #fff8e1;
  border-left: 5px solid #ffc107;
  padding: 1em;
  margin-bottom: 1.5em;
}

.business-case h2, .business-case h3 {
  color: #ff6f00;
  margin-top: 0;
}

/* Exercises section */
.exercises {
  background-color: #fce4ec;
  border-left: 5px solid #e91e63;
  padding: 1em;
  margin-bottom: 1.5em;
}

.exercises h2, .exercises h3 {
  color: #880e4f;
  margin-top: 0;
}

/* Summary section */
.summary {
  background-color: #e8eaf6;
  border-left: 5px solid #3f51b5;
  padding: 1em;
  margin-bottom: 1.5em;
}

.summary h2 {
  color: #1a237e;
  margin-top: 0;
}

/* References section */
.references {
  background-color: #f3e5f5;
  border-left: 5px solid #9c27b0;
  padding: 1em;
  margin-bottom: 1.5em;
}

.references h2 {
  color: #4a148c;
  margin-top: 0;
}

/* Emoji styling */
.emoji {
  font-size: 1.2em;
}

/* Print-specific styles */
@media print {
  body {
    font-size: 10pt;
  }
  
  pre, code {
    font-size: 9pt;
    background-color: #f8f8f8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .learning-objectives, .prerequisites, .business-case, .exercises, .summary, .references {
    background-color: #f8f8f8 !important;
    border-left: 3pt solid #666 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
