/* ============================================
   OFF-GRID SOLAR CALCULATOR STYLES
   ============================================ */

/* Fix inherited styles from main site */
body {
  color: #333;
}

/* Ensure topbar and nav text is visible */
.topbar {
  background: #ff6b1a;
  color: white;
}

.topbar .tb-status,
.topbar .tb-link {
  color: white !important;
}

.nav {
  background: white;
  color: #1a1a2e;
}

.nav .logo,
.nav .logo-text,
.nav .nav-links a {
  color: #1a1a2e !important;
}

.nav .cta-pill {
  background: #ff6b1a;
  color: white !important;
}

/* Hero Section */
.offgrid-hero {
  position: relative;
  padding: 140px 2rem 80px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white !important;
  text-align: center;
  overflow: hidden;
}

.offgrid-hero * {
  color: white !important;
}

.offgrid-hero .hero-h1 em {
  color: #ff6b1a !important;
}

.offgrid-hero .hero-h1 .accent {
  color: #ff6b1a !important;
}

.offgrid-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 26, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 26, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

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

.offgrid-hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.offgrid-hero .hero-h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.offgrid-hero .hero-h1 em {
  color: #ff6b1a;
  font-style: normal;
}

.offgrid-hero .hero-h1 .accent {
  background: linear-gradient(135deg, #ff6b1a, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offgrid-hero .hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Calculator Container */
.offgrid-calc {
  padding: 80px 2rem;
  background: #f8f9fa;
}

.calc-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Section */
.calc-section {
  background: white;
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calc-section-header {
  margin-bottom: 30px;
}

.step-badge {
  display: inline-block;
  padding: 6px 12px;
  background: #ff6b1a;
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.calc-section-header h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.calc-section-header p {
  color: #666;
  font-size: 1rem;
}

/* Appliance List */
.appliance-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.appliance-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 40px;
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.appliance-item:hover {
  border-color: #ff6b1a;
  background: white;
}

.appliance-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.appliance-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.appliance-field input,
.appliance-field select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.appliance-field input:focus,
.appliance-field select:focus {
  outline: none;
  border-color: #ff6b1a;
}

.appliance-result {
  text-align: right;
  font-weight: 600;
  color: #ff6b1a;
  font-size: 1rem;
}

.btn-remove-appliance {
  width: 36px;
  height: 36px;
  border: none;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.btn-remove-appliance:hover {
  background: #cc0000;
  transform: scale(1.1);
}

.btn-add-appliance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px dashed #ddd;
  background: transparent;
  color: #ff6b1a;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.btn-add-appliance:hover {
  border-color: #ff6b1a;
  background: rgba(255, 107, 26, 0.05);
}

/* Load Summary */
.load-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e9ecef;
}

.summary-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #ff6b1a 0%, #ffa500 100%);
  border-radius: 12px;
  color: white;
}

.summary-item span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  opacity: 0.95;
}

.summary-item strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* Config Grid */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-weight: 600;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label small {
  font-size: 0.85rem;
  font-weight: 400;
  color: #666;
  font-style: italic;
}

.config-field select {
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.config-field select:focus {
  outline: none;
  border-color: #ff6b1a;
}

/* Results Section */
.results-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
}

.results-section .calc-section-header h2,
.results-section .calc-section-header p {
  color: white;
}

.results-section .calc-section-header p {
  opacity: 0.8;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.result-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
}

.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 26, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.result-card.highlight {
  background: linear-gradient(135deg, rgba(255, 107, 26, 0.2), rgba(255, 165, 0, 0.15));
  border-color: #ff6b1a;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.result-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.9;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: #ff6b1a;
  margin-bottom: 8px;
}

.result-detail {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 15px;
}

.result-explanation {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.7;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cost Estimate */
.cost-estimate {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 35px;
  margin-bottom: 30px;
}

.cost-estimate h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
}

.cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cost-item span {
  font-size: 1rem;
  opacity: 0.9;
}

.cost-item strong {
  font-size: 1.1rem;
  font-family: 'JetBrains Mono', monospace;
}

.cost-item.total {
  margin-top: 15px;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 107, 26, 0.5);
  border-bottom: none;
}

.cost-item.total span {
  font-size: 1.2rem;
  font-weight: 700;
}

.cost-item.total strong {
  font-size: 2rem;
  color: #ff6b1a;
}

.cost-note {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cost-note strong {
  color: #ffc107;
}

/* Tech Specs */
.tech-specs {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 35px;
  margin-bottom: 30px;
}

.tech-specs h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
}

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

.spec-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.spec-item span {
  display: block;
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.spec-item strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ff6b1a;
  font-family: 'JetBrains Mono', monospace;
}

/* Results CTA */
.results-cta {
  text-align: center;
  margin-top: 40px;
}

.results-cta .btn {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.cta-note {
  margin-top: 15px;
  opacity: 0.7;
  font-size: 0.95rem;
}

/* Info Section */
.offgrid-info {
  padding: 80px 2rem;
  background: white;
}

.info-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.info-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 40px;
  border: 2px solid #e9ecef;
}

.info-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card ul li {
  padding: 12px 0;
  padding-left: 30px;
  position: relative;
  line-height: 1.7;
}

.info-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #ff6b1a;
  font-weight: 700;
}

.info-card ul li strong {
  color: #1a1a2e;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.comparison-table thead th {
  background: #1a1a2e;
  color: white;
  font-weight: 600;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 107, 26, 0.05);
}

.comparison-table td:first-child {
  font-weight: 600;
}

/* Includes Grid */
.includes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.include-item {
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 2px solid #e9ecef;
}

.include-item strong {
  display: block;
  color: #ff6b1a;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.include-item p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 80px 2rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white !important;
  text-align: center;
}

.contact * {
  color: white !important;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: white !important;
}

.contact p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 40px;
  color: white !important;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px 20px;
  border: 2px solid #ff6b1a;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255, 107, 26, 0.1);
  color: #1a1a2e;
  transition: all 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(26, 26, 46, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ffa500;
  background: rgba(255, 107, 26, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 107, 26, 0.2);
}

.contact-alt {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-alt p {
  margin-bottom: 15px;
  opacity: 0.8;
}

.contact-link {
  display: inline-block;
  margin: 0 15px;
  color: #ff6b1a;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.contact-link:hover {
  color: #ffa500;
}

/* Footer - ensure proper colors */
.footer {
  background: #1a1a2e;
  color: white;
}

.footer .logo,
.footer .logo-text,
.footer p,
.footer a {
  color: white !important;
}

.footer .logo-text em {
  color: #ff6b1a !important;
}

.footer-links a:hover {
  color: #ff6b1a !important;
}

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

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .offgrid-hero {
    padding: 100px 1.5rem 60px;
  }

  .offgrid-hero .hero-h1 {
    font-size: 2.5rem;
  }

  .calc-section {
    padding: 30px 20px;
  }

  .appliance-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .appliance-result {
    text-align: left;
  }

  .load-summary {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 25px;
  }
}

/* Button Styles (if not in main styles.css) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.btn.primary {
  background: linear-gradient(135deg, #ff6b1a, #ffa500);
  color: white !important;
}

.btn.primary * {
  color: white !important;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 26, 0.3);
}

.btn.large {
  padding: 18px 40px;
  font-size: 1.1rem;
}
