/*
Theme Name: Thermalay
Theme URI: https://thermalay.co.nz/
Author: Thermalay
Description: Custom theme for Thermalay.co.nz – off-grid solar, regional pSEO, data-driven content. Based on archived design with modern enhancements.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thermalay
*/

/* ===== Variables ===== */
:root {
  --thermalay-primary: #2d5a27;
  --thermalay-primary-dark: #1e3d1a;
  --thermalay-accent: #e8a317;
  --thermalay-bg: #f8f6f1;
  --thermalay-text: #333;
  --thermalay-muted: #666;
  --thermalay-border: #ddd;
  --thermalay-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --thermalay-container: 1200px;
  --thermalay-radius: 6px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--thermalay-text);
  background: var(--thermalay-bg);
}

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

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

a:hover {
  text-decoration: underline;
}

/* ===== Layout ===== */
.site-container {
  max-width: var(--thermalay-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  box-shadow: var(--thermalay-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--thermalay-primary);
}

.site-logo a {
  color: inherit;
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  color: var(--thermalay-text);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--thermalay-radius);
}

.site-nav a:hover {
  background: var(--thermalay-bg);
  text-decoration: none;
}

.site-nav .current-menu-item a {
  color: var(--thermalay-primary);
  font-weight: 600;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--thermalay-primary) 0%, var(--thermalay-primary-dark) 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.hero .cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--thermalay-radius);
  text-align: center;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--thermalay-accent);
  color: var(--thermalay-primary-dark);
}

.btn-primary:hover {
  background: #f0b020;
  color: var(--thermalay-primary-dark);
}

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.3);
  text-decoration: none;
  color: #fff;
}

/* ===== Content Sections ===== */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
  color: var(--thermalay-primary);
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--thermalay-radius);
  box-shadow: var(--thermalay-shadow);
}

.feature-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--thermalay-muted);
}

/* ===== Spec Tables ===== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--thermalay-radius);
  overflow: hidden;
  box-shadow: var(--thermalay-shadow);
}

.spec-table th,
.spec-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--thermalay-border);
}

.spec-table th {
  background: var(--thermalay-bg);
  font-weight: 600;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

/* ===== Calculator ===== */
.calc-box {
  background: #fff;
  padding: 2rem;
  border-radius: var(--thermalay-radius);
  box-shadow: var(--thermalay-shadow);
  max-width: 500px;
}

.calc-box label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.calc-box input,
.calc-box select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--thermalay-border);
  border-radius: 4px;
  font-size: 1rem;
}

.calc-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--thermalay-primary);
}

.calc-result strong {
  font-size: 1.25rem;
  color: var(--thermalay-primary);
}

/* ===== Lead Form ===== */
.lead-form {
  background: #fff;
  padding: 2rem;
  border-radius: var(--thermalay-radius);
  box-shadow: var(--thermalay-shadow);
  max-width: 500px;
}

.lead-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--thermalay-border);
  border-radius: 4px;
  font-size: 1rem;
}

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

/* ===== Footer ===== */
.site-footer {
  background: var(--thermalay-primary-dark);
  color: rgba(255,255,255,0.9);
  padding: 2rem 0;
  margin-top: 3rem;
}

.site-footer a {
  color: rgba(255,255,255,0.9);
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav ul {
    flex-direction: column;
  }
}
