/* Avalanche Contractor - Main Stylesheet */
/* Updated for 2026 */

:root {
  --primary-color: #1a5490;
  --secondary-color: #2c7fb8;
  --accent-color: #e63946;
  --text-dark: #2d3748;
  --text-light: #4a5568;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --success-color: #38a169;
  --warning-color: #d69e2e;
  --max-width: 1200px;
  --spacing-unit: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-unit);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

/* Header & Navigation */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 0;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.updated-badge {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Main Content */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin-top: 2rem;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  min-width: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs span {
  margin: 0 0.5rem;
  color: var(--text-light);
}

/* Cards & Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Article Content */
.article-header {
  margin-bottom: 2rem;
}

.article-header img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.table-of-contents {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.table-of-contents h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.table-of-contents ul {
  list-style: none;
  padding-left: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: var(--primary-color);
}

/* Info Boxes */
.info-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.info-box.warning {
  border-left-color: var(--warning-color);
  background: #fffaf0;
}

.info-box.success {
  border-left-color: var(--success-color);
  background: #f0fff4;
}

.info-box.danger {
  border-left-color: var(--accent-color);
  background: #fff5f5;
}

.info-box h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Author Box */
.author-box {
  background: var(--bg-light);
  border-top: 2px solid var(--border-color);
  padding: 1.5rem;
  margin: 3rem 0 2rem;
  border-radius: 4px;
}

.author-box p {
  margin-bottom: 0.5rem;
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.related-articles h3 {
  margin-top: 0;
}

/* Sidebar */
.sidebar-widget {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.sidebar-widget ul {
  list-style: none;
  padding-left: 0;
}

.sidebar-widget li {
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  background-color: var(--text-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.875rem;
}

/* Glossary */
.glossary-term {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.glossary-term:last-child {
  border-bottom: none;
}

.glossary-term h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.glossary-filter {
  margin-bottom: 2rem;
}

.glossary-filter input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

/* Forms */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--secondary-color);
  text-decoration: none;
  color: white;
}

/* Calendar */
.calendar-month {
  margin-bottom: 3rem;
}

.calendar-month h3 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.calendar-checklist {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.calendar-checklist ul {
  list-style: none;
  padding-left: 0;
}

.calendar-checklist li {
  padding-left: 1.5rem;
  position: relative;
}

.calendar-checklist li:before {
  content: "□";
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .main-nav,
  .sidebar,
  .btn {
    display: none;
  }
  
  .main-content {
    max-width: 100%;
    padding: 0;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  .main-nav li {
    margin-bottom: 0.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
