/* Custom color scheme */
:root {
  --primary-color: #2E86AB;
  --secondary-color: #A23B72;
  --accent-color: #F18F01;
  --success-color: #06A77D;
  --light-bg: #F9F9F9;
}

/* Hero section styling */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  font-weight: 700;
}

.hero-banner h3 {
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  font-weight: 600;
  color: white;
  border-bottom: none;
  margin-top: 0;
}

.hero-banner p {
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
  font-size: 1.1rem;
}

/* Card styling for content sections */
.content-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Callout boxes */
.callout-note {
  background-color: #E3F2FD;
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.callout-important {
  background-color: #FFF3E0;
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.callout-tip {
  background-color: #E8F5E9;
  border-left: 4px solid var(--success-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.callout-warning {
  background-color: #FFF8E1;
  border-left: 4px solid var(--secondary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* Section headers */
h3 {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

/* Code blocks */
pre {
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

/* Plot containers */
.plot-container {
  background: var(--light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Plot spacing and padding to prevent title cutoff */
.cell-output-display {
  margin: 2rem 0;
  padding: 1rem;
}

.quarto-figure {
  margin: 2rem 0;
  padding: 0.5rem;
}

img[src*="figure-html"] {
  margin: 1.5rem auto;
  display: block;
  max-width: 100%;
  padding: 1rem 0;
}

.plotly {
  margin: 2rem 0 !important;
  padding: 1rem 0 !important;
}

h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* Styled tables */
table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

thead th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 1rem;
}

tbody tr:nth-child(even) {
  background-color: var(--light-bg);
}

tbody tr:hover {
  background-color: #E3F2FD;
  transition: background-color 0.2s ease;
}

/* Key findings boxes */
.key-finding {
  background: linear-gradient(to right, #FFF3E0 0%, #FFECB3 100%);
  border-left: 6px solid var(--accent-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Navigation improvements */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Images */
img {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
  background: var(--light-bg);
  padding: 1rem 1.5rem;
  border-radius: 4px;
}

/* Button styling for links */
a.btn {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

a.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

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

/* Fix white SVG logos (NAR and FHFA) */
img[src*="nar-logo.svg"],
img[src*="fhfa-logo.svg"] {
  filter: invert(1);
  background: transparent;
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .hero-banner h1 {
    font-size: 1.8rem;
  }

  .content-card {
    padding: 1rem;
  }
}
