/* TRADIES NATION - MOBILE 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 6px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  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 {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  position: relative;
}

.mobile-toggle {
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  position: absolute;
  left: 16px;
  z-index: 10;
}

.hamburger {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
  position: relative;
  transition: 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--text);
  position: absolute;
  transition: 0.3s;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.logo {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo span { font-size: 24px; }

nav { display: none; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 59px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 20px;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active { display: block; }

.mobile-menu a {
  display: block;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  color: var(--primary);
  background: rgba(217,119,87,0.05);
  padding-left: 24px;
}

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

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero p {
  font-size: 17px;
  opacity: 0.95;
}

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

/* BREADCRUMB */
.breadcrumb {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }

/* CONTAINER */
.container,
.container-narrow {
  padding: 0 20px;
}

/* CONTENT SECTIONS */
.content-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin: 20px;
  box-shadow: var(--shadow-sm);
}

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

.content-section h3 {
  font-size: 19px;
  margin: 24px 0 12px;
}

.content-section p {
  margin-bottom: 14px;
  line-height: 1.7;
}

.content-section ul, .content-section ol {
  margin: 14px 0 20px 20px;
  line-height: 1.7;
}

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

/* GRIDS */
.grid-2,
.grid-3,
.grid-4,
.grid-auto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
}

/* CARDS */
.card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.card h3 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 10px;
}

.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 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 12px;
  text-transform: uppercase;
}

/* FORMS */
.form-section {
  padding: 20px;
  margin: 20px 0;
}

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

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

.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;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

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

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

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

/* BUTTONS */
.btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn:active {
  background: var(--primary-dark);
}

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

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

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

/* FEATURE BOXES */
.feature-box {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  margin-bottom: 16px;
}

.feature-box h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 18px;
}

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

/* CALLOUT BOXES */
.callout {
  padding: 24px;
  border-radius: var(--radius-md);
  margin: 24px 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: 40px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  margin: 32px 20px;
}

.cta-section h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 24px;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

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

/* TABLES */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  background: var(--white);
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

/* BLOG CARDS */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

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

.blog-card-content {
  padding: 20px;
  flex: 1;
}

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

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

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

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

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

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

.footer-inner {
  padding: 40px 20px 32px;
}

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

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

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

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

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

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

/* BACK TO TOP */
#backToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 20px;
  box-shadow: var(--shadow-md);
}

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

.calc-section h3 {
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  font-size: 18px;
}

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

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

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

/* PRINT - HIDE EVERYTHING */
@media print {
  header, footer, #backToTop, .mobile-toggle, .mobile-menu { display: none !important; }
  body { background: white; }
  .content-section { box-shadow: none; border: 1px solid #ddd; }
}

/* UTILITIES */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-light { color: var(--text-light); }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 36px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 36px; }
.no-print { }
