/* TRADIES NATION - DESKTOP CSS - SOVEREIGN BUILD */

:root {
  --primary: #d97757;
  --primary-dark: #c25a3a;
  --primary-light: #e89676;
  --sage: #8a9a7b;
  --sage-dark: #6d7d62;
  --cream: #faf8f3;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6b6b6b;
  --border: #e0ddd5;
  --border-light: #ebe8e0;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* HEADER */
header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.logo:hover { transform: translateY(-2px); }
.logo span { font-size: 32px; }

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--primary);
  background: rgba(217, 119, 87, 0.08);
}

.mobile-toggle, .mobile-menu { display: none; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--sage) 100%);
  color: white;
  padding: 64px 40px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1.2;
  font-weight: 700;
}

.hero p {
  font-size: 20px;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
  font-weight: 600;
}

/* BREADCRUMB */
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  font-size: 14px;
  color: var(--text-light);
}

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

.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; }

/* CONTAINER */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}

/* CONTENT SECTIONS */
.content-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.content-section h2 {
  color: var(--primary);
  font-size: 32px;
  margin-bottom: 24px;
  font-weight: 700;
}

.content-section h3 {
  color: var(--text);
  font-size: 22px;
  margin: 32px 0 16px;
  font-weight: 700;
}

.content-section p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.content-section ul, .content-section ol {
  margin: 16px 0 24px 24px;
  line-height: 1.8;
}

.content-section li { margin-bottom: 8px; }

/* GRIDS */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

/* CARDS */
.card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
}

.card p {
  color: var(--text-medium);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.card-badge {
  display: inline-block;
  background: rgba(217,119,87,0.1);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 16px;
  text-transform: uppercase;
}

/* FORMS */
.form-section {
  max-width: 700px;
  margin: 48px auto;
  padding: 0 40px;
}

.form-box {
  background: var(--white);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  transition: all 0.2s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217,119,87,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--sage);
}

.btn-secondary:hover {
  background: var(--sage-dark);
}

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

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

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

.btn-white:hover {
  background: var(--cream);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 20px 40px;
  font-size: 18px;
}

/* FEATURE BOXES */
.feature-box {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.feature-box h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-box p {
  color: var(--text-light);
  margin: 0;
  line-height: 1.7;
}

/* CALLOUT BOXES */
.callout {
  padding: 32px;
  border-radius: var(--radius-md);
  margin: 32px 0;
}

.callout-primary {
  background: rgba(217,119,87,0.08);
  border-left: 4px solid var(--primary);
}

.callout-success {
  background: rgba(34,197,94,0.08);
  border-left: 4px solid var(--success);
}

.callout-warning {
  background: rgba(245,158,11,0.08);
  border-left: 4px solid var(--warning);
}

.callout-error {
  background: rgba(239,68,68,0.08);
  border-left: 4px solid var(--error);
}

/* CTA SECTIONS */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--sage));
  color: white;
  padding: 64px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 48px 0;
}

.cta-section h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 8px;
}

.stat-item p {
  color: var(--text-light);
  font-size: 15px;
}

/* TABLES */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--cream);
  font-weight: 700;
  color: var(--text);
}

tr:hover { background: rgba(217,119,87,0.03); }

/* BLOG CARDS */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.blog-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--sage));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.blog-card-content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-category {
  display: inline-block;
  background: rgba(217,119,87,0.1);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.blog-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card p {
  color: var(--text-medium);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}

.blog-card-meta {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.blog-card-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

/* FOOTER */
footer {
  background: var(--text);
  color: white;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 64px 40px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.footer-col a:hover {
  color: white;
  padding-left: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 32px;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}

/* BACK TO TOP */
#backToTop {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

#backToTop:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* CALCULATOR STYLES */
.calc-section {
  background: white;
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.calc-section h3 {
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.total-row {
  background: var(--cream);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
}

.final-quote {
  background: linear-gradient(135deg, var(--primary), var(--sage));
  color: white;
  padding: 32px;
  border-radius: var(--radius-md);
  text-align: center;
}

.final-quote-amount {
  font-size: 48px;
  font-weight: 700;
  margin: 16px 0;
}

/* PRINT STYLES */
@media print {
  header, footer, #backToTop, .no-print { display: none !important; }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .content-section, .form-box, .calc-section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  .hero {
    background: white !important;
    color: black !important;
    border-bottom: 2px solid var(--primary);
    padding: 20px;
  }
  
  .hero h1 { color: var(--primary); }
  
  a { color: black; text-decoration: underline; }
  
  .btn {
    background: white !important;
    color: black !important;
    border: 1px solid black;
  }
  
  .final-quote {
    background: white !important;
    color: black !important;
    border: 2px solid var(--primary);
  }
  
  .cta-section { display: none; }
}

/* UTILITIES */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-light { color: var(--text-light); }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 48px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 32px; }
.mb-lg { margin-bottom: 48px; }
