/* PanelRig.com — Master Stylesheet */
/* Dark theme solar calculator site */
/* Last updated: May 2026 */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #f59e0b;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   HEADER & NAV
   ============================================ */
header {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f0f0f0;
  letter-spacing: -0.5px;
}

.logo a {
  color: #f0f0f0;
  text-decoration: none;
}

.logo a:hover {
  text-decoration: none;
}

.logo .accent {
  color: #f59e0b;
}

nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

nav a {
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: #f59e0b;
  text-decoration: none;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  nav.active {
    display: flex;
  }
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: #888;
}

.breadcrumbs a {
  color: #999;
}

.breadcrumbs a:hover {
  color: #f59e0b;
}

.breadcrumbs span {
  margin: 0 0.35rem;
  color: #555;
}

/* ============================================
   HERO / PAGE HEADER
   ============================================ */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h1 .accent {
  color: #f59e0b;
}

.hero p {
  font-size: 1.15rem;
  color: #bbb;
  max-width: 650px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ============================================
   CARDS & GRID
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 3rem;
}

.card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}

.card h3 a {
  color: #f0f0f0;
}

.card h3 a:hover {
  color: #f59e0b;
  text-decoration: none;
}

.card p {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.5;
}

.card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card .card-tag {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.75rem;
}

/* ============================================
   CALCULATOR TOOL LAYOUT
   ============================================ */
.tool-page {
  padding: 1.5rem 0 3rem;
}

.tool-intro {
  max-width: 800px;
  margin-bottom: 2rem;
}

.tool-intro h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.tool-intro p {
  color: #bbb;
  font-size: 1rem;
  line-height: 1.6;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

.calc-inputs,
.calc-results {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
}

.calc-inputs h2,
.calc-results h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #333;
}

.calc-results {
  position: sticky;
  top: 5rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 0.35rem;
}

.form-group .hint {
  font-size: 0.78rem;
  color: #777;
  margin-top: 0.2rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
select {
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #f0f0f0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input:focus,
select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* Range slider */
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #444;
  border-radius: 3px;
  outline: none;
  margin-top: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  border: 2px solid #121212;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  border: 2px solid #121212;
}

/* Toggle / radio group */
.toggle-group {
  display: flex;
  gap: 0;
  border: 1px solid #444;
  border-radius: 8px;
  overflow: hidden;
}

.toggle-group label {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  background: #2a2a2a;
  border-right: 1px solid #444;
  transition: all 0.2s;
  margin-bottom: 0;
}

.toggle-group label:last-child {
  border-right: none;
}

.toggle-group input[type="radio"] {
  display: none;
}

.toggle-group input[type="radio"]:checked + label,
.toggle-group label.active {
  background: #f59e0b;
  color: #121212;
}

/* ============================================
   RESULT DISPLAY
   ============================================ */
.result-item {
  padding: 1rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1.2;
}

.result-value.large {
  font-size: 2.25rem;
}

.result-note {
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.2rem;
}

.result-highlight {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* ============================================
   PRODUCT RECOMMENDATIONS (Amazon Affiliate)
   ============================================ */
.products-section {
  margin-top: 3rem;
}

.products-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s;
}

.product-card:hover {
  border-color: #f59e0b;
}

.product-card .product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0f0f0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-card .product-desc {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 0.75rem;
}

.product-card .product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 0.75rem;
}

.btn-amazon {
  display: inline-block;
  background: #f59e0b;
  color: #121212;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-amazon:hover {
  background: #d97706;
  color: #121212;
  text-decoration: none;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
  margin-top: 3rem;
}

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.faq-item {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question:hover {
  background: #252525;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: #f59e0b;
  font-weight: 700;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ============================================
   HOW IT WORKS / INFO SECTIONS
   ============================================ */
.info-section {
  margin-top: 3rem;
  padding: 2rem 0;
}

.info-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.info-section p {
  color: #bbb;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.info-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}

.info-section ul, .info-section ol {
  color: #bbb;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.info-section li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

/* Formula display */
.formula {
  background: #1a1a1a;
  border: 1px solid #333;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #ddd;
  overflow-x: auto;
  margin: 1rem 0;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: #777;
  line-height: 1.5;
}

.disclaimer strong {
  color: #999;
}

/* ============================================
   ADSENSE SLOTS
   ============================================ */
.ad-slot {
  background: #1a1a1a;
  border: 1px dashed #333;
  border-radius: 8px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  overflow: hidden;
}

.ad-slot-horizontal {
  min-height: 90px;
}

.ad-slot-sidebar {
  min-height: 250px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #1a1a1a;
  border-top: 1px solid #333;
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand .logo {
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: #777;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-links-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.footer-links-col a {
  display: block;
  color: #777;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: #f59e0b;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #2a2a2a;
  font-size: 0.8rem;
  color: #555;
}

.footer-bottom a {
  color: #666;
}

/* ============================================
   CATEGORY PAGE
   ============================================ */
.category-header {
  padding: 2rem 0 1rem;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.category-header p {
  color: #bbb;
  font-size: 1rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-amber {
  color: #f59e0b;
}

.text-muted {
  color: #888;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  header, footer, .ad-slot, .products-section, nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card, .calc-inputs, .calc-results, .faq-item {
    border-color: #ccc;
    background: #fff;
  }

  .result-value, .text-amber, .accent {
    color: #b45309;
  }
}
