/*
Theme Name: USA Trucking Tools
Theme URI: https://example.com/usa-trucking-tools
Author: Antigravity
Description: Fast, SEO-optimized trucking calculator theme.
Version: 1.1
Text Domain: usa-trucking-tools
*/

:root {
  /* Brand Palette */
  --color-primary: #2563eb;
  /* Vivid Blue */
  --color-primary-dark: #1d4ed8;
  /* Deep Vivid Blue */
  --color-secondary: #0f172a;
  /* Slate 900 */
  --color-accent: #f59e0b;
  /* Amber 500 */

  /* Usage Palette */
  --bg-body: #f8fafc;
  /* Slate 50 */
  --bg-card: #ffffff;
  --text-main: #334155;
  /* Slate 700 */
  --text-heading: #0f172a;
  /* Slate 900 */
  --text-muted: #64748b;
  /* Slate 500 */

  /* Status Colors */
  --status-success: #16a34a;
  /* Green 600 */
  --status-error: #dc2626;
  /* Red 600 */

  /* Borders & Shadows */
  --border-subtle: #e2e8f0;
  /* Slate 200 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

h2 {
  font-size: 1.875rem;
  border-bottom: none;
}

h3 {
  font-size: 1.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

p {
  margin-bottom: 1.5rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header & Navigation */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-cta-header {
  background-color: var(--color-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-cta-header:hover {
  background-color: #d97706;
  color: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  /* Increase hit area */
  z-index: 101;
  display: none;
  /* Hidden on desktop */
  min-width: 44px;
  /* Mobile touch target min width */
  min-height: 44px;
  /* Mobile touch target min height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--color-secondary);
  margin: 3px 0;
  transition: 0.4s;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 70px;
  /* Push down slightly */
  left: 0;
  width: 100%;
  height: 0;
  background: white;
  z-index: 100;
  overflow: hidden;
  transition: height 0.3s ease;
  border-bottom: 2px solid var(--color-primary);
}

.mobile-menu-overlay.active {
  height: auto;
  padding-bottom: 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.mobile-cta {
  display: block;
  text-align: center;
  margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 850px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only,
  .menu-toggle {
    display: block;
  }

  .header-inner {
    padding: 0 15px;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #1e293b 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 4px solid var(--color-accent);
}

.hero-section h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .intro-text {
  font-size: 1.25rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #d97706;
  color: white;
  transform: translateY(-2px);
}

.link-secondary {
  color: #cbd5e1;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.link-secondary:hover {
  color: white;
  border-bottom-color: var(--color-primary);
}

/* Quick Access Grid */
.quick-access-section {
  margin-bottom: 5rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2rem;
  color: var(--color-secondary);
}

.quick-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card-link {
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1rem;
  display: block;
  font-size: 0.9rem;
}

/* Silo Sections */
.silo-section {
  margin-bottom: 5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 3rem;
}

.silo-header {
  margin-bottom: 2rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.silo-header h2 {
  font-size: 1.75rem;
  color: var(--color-secondary);
}

.silo-header p {
  color: var(--text-muted);
}

.inline-cta-box {
  background: #f1f5f9;
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 2rem;
}

.inline-cta-box a {
  font-weight: 700;
}

/* Financial Silo */
.financial-silo {
  background: #f8fafc;
  /* Keep same bg for now, maybe darken slightly if needed */
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--status-success);
  font-weight: 600;
}

/* Trust Section */
.trust-section {
  text-align: center;
  margin-bottom: 4rem;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.trust-grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.trust-item {
  font-weight: 600;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item::before {
  content: "🛡️";
  font-size: 1.25rem;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .benefit-list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .trust-grid {
    flex-direction: column;
    gap: 1rem;
  }
}

.tool-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.tool-card h3 {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
  flex-grow: 1;
}

/* Calculator Page Styles */
.calculator-page {
  max-width: 800px;
  margin: 2rem auto;
}

.calculator-box {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

button.btn-calculate {
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  width: 100%;
  transition: opacity 0.2s;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

button.btn-calculate:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Results Box */
.result-box {
  margin-top: 2rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 2rem;
  border-left: none;
}

.result-box h3 {
  color: var(--color-secondary);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #bfdbfe;
  padding-bottom: 0.75rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.result-value {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.profit-pos {
  color: var(--status-success);
}

.profit-neg {
  color: var(--status-error);
}

/* Content Section */
.tool-content {
  margin-top: 3rem;
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.tool-content h2 {
  color: var(--color-primary-dark);
  font-size: 1.5rem;
  margin-top: 2rem;
}

.tool-content p {
  color: var(--text-main);
  font-size: 1.05rem;
}

.tool-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-content li {
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

/* Footer */
.site-footer {
  background: var(--color-secondary);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
  text-align: left;
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-primary);
  /* Small underline */
  display: inline-block;
  padding-bottom: 0.5rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
  padding-left: 5px;
  /* Subtle hover slide */
}

.site-info {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.disclaimer {
  color: #64748b;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Responsive Footer */
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-col h4 {
    border-bottom: none;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-section h1 {
    font-size: 2.25rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .main-navigation ul {
    gap: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .calculator-box {
    padding: 1.5rem;
  }
}