/* 
  Solar Panels Calculator - Premium Design System (2026)
  Theme: Sleek SaaS, Green Energy, Trust, Modern UI
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors - Curated Harmony */
  --primary-color: #10B981; /* Electric Energy Emerald */
  --primary-dark: #059669;
  --primary-light: rgba(16, 185, 129, 0.1);
  --secondary-color: #3B82F6; /* Trust Blue */
  --secondary-dark: #1D4ED8;
  --accent-color: #F59E0B; /* Solar Amber */
  --accent-light: rgba(245, 158, 11, 0.1);

  /* Neutrals - Slate Scale */
  --bg-body: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A; /* Slate 900 */
  --text-muted: #64748B; /* Slate 500 */
  --text-light: #94A3B8; /* Slate 400 */
  --border-color: #E2E8F0; /* Slate 200 */
  --input-focus: rgba(16, 185, 129, 0.25);

  /* Shadows - Layered Elevation */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 40px -10px rgba(15, 23, 42, 0.12);

  /* Design Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --container-width: 1200px;
  --content-width: 860px;
  --header-height: 80px;

  /* Fonts */
  --font-sans: 'Poppins', sans-serif;

  /* Typography Scale */
  --text-display: clamp(2rem, 5vw, 3.2rem);
  --text-h1: clamp(1.8rem, 4vw, 2.4rem);
  --text-h2: 1.8rem;
  --text-h3: 1.4rem;
  --text-h4: 1.15rem;
  --text-base: 1rem;
  --text-small: 0.875rem;
}

/* Dark Mode Tokens (Triggered by class or media query) */
@media (prefers-color-scheme: dark) {
  :root.auto-theme {
    --bg-body: #0F172A; /* Slate 900 */
    --bg-card: #1E293B; /* Slate 800 */
    --text-main: #F8FAFC; /* Slate 50 */
    --text-muted: #94A3B8; /* Slate 400 */
    --text-light: #64748B; /* Slate 500 */
    --border-color: #334155; /* Slate 700 */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  }
}

/* Explicit Dark Theme Class */
body.dark-theme {
  --bg-body: #0F172A;
  --bg-card: #1E293B;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border-color: #334155;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Skip Link for WCAG */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-to-main:focus {
  top: 0;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.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; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-h1); font-weight: 800; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

/* Header Banner Ticker */
.ticker-banner {
  background: linear-gradient(90deg, #064E3B, #0F172A);
  color: #A7F3D0;
  padding: 8px 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Main Header */
.main-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark-theme .main-header {
  background-color: rgba(30, 41, 59, 0.85);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}
.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:hover {
  color: var(--primary-color);
}

/* Installer / Call to Action Nav Link */
.nav-links a.cta-nav {
  background: var(--primary-color);
  color: white !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.nav-links a.cta-nav:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Mobile Menu Trigger */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-main);
}

@media (max-width: 992px) {
  .mobile-menu-btn {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active {
    display: flex;
  }
}

/* Hero Section */
.hero-wrapper {
  background: linear-gradient(rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.82)), url('/assets/images/solar_rooftop_home.png') no-repeat center center / cover;
  color: white;
  padding: 80px 0;
  position: relative;
}

/* Split Hero layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.hero-text-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-image-pane {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img-element {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  border: 4px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.hero-img-element:hover {
  transform: translateY(-5px);
}

.hero-grid .cta-button-group {
  justify-content: flex-start;
}

@media (max-width: 992px) {
  .hero-wrapper {
    padding: 48px 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .hero-grid .cta-button-group {
    justify-content: center;
  }
  .hero-img-element {
    max-width: 80%;
  }
}

/* Footer Social Links */
.footer-social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  transition: all 0.2s ease;
  text-decoration: none;
}
.social-icon-btn:hover {
  background: var(--primary-color, #10b981);
  color: white;
  transform: translateY(-2px);
}
.social-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6EE7B7;
  margin-bottom: 20px;
}

.hero-wrapper h1 {
  color: white;
  margin-bottom: 16px;
  font-size: var(--text-display);
}

.hero-wrapper p {
  color: #CBD5E1;
  max-width: 680px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
}

/* CTA buttons */
.cta-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: translateY(-2px);
}

/* Stats Row */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}

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

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 4px;
}

/* Grid Calculators Page list */
.calc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  width: 56px;
  height: 56px;
  background: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease;
}

.card-item:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  background-color: var(--primary-light);
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 10px;
  width: fit-content;
}

.tag-popular { background: #DCFCE7; color: #15803D; }
.tag-scheme { background: #FEF3C7; color: #92400E; }
.tag-blue { background: #DBEAFE; color: #1E40AF; }
.tag-purple { background: #F3E8FF; color: #6B21A8; }
.tag-orange { background: #FFEDD5; color: #C2410C; }
.tag-new { background: #FCE7F3; color: #9D174D; }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* Calculator Subpages split layout */
.calculator-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}

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

.form-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

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

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-body);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 4px var(--input-focus);
}

/* Radio buttons container */
.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Button utility for form */
.btn-submit {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16,185,129,0.2);
  transition: all 0.2s;
}
.btn-submit:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(16,185,129,0.3);
}

/* Result Dashboard */
.results-pane {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 576px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-card.highlight {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #BFDBFE;
}
body.dark-theme .metric-card.highlight {
  background: linear-gradient(135deg, #1E293B 0%, #1E3A8A 100%);
  border-color: #3B82F6;
}

.metric-card.success {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-color: #A7F3D0;
}
body.dark-theme .metric-card.success {
  background: linear-gradient(135deg, #1E293B 0%, #064E3B 100%);
  border-color: #10B981;
}

.metric-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.metric-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Content cards / Tables */
.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.content-box-header {
  background: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.dark-theme .content-box-header {
  background: rgba(255, 255, 255, 0.02);
}

.content-box-body {
  padding: 24px;
}

/* Detailed Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
}

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

.data-table .highlight-row td {
  background-color: var(--primary-light);
  font-weight: 700;
  color: var(--primary-dark);
}

/* SEO Content Section */
.seo-section {
  padding: 64px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 64px;
}

.seo-article {
  max-width: var(--content-width);
  margin: 0 auto;
}

.seo-article h2 { margin-top: 2rem; margin-bottom: 1rem; }
.seo-article h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; }
.seo-article p { margin-bottom: 1.25rem; font-size: 0.95rem; }
.seo-article ul { margin-left: 20px; list-style: disc; margin-bottom: 1.5rem; }
.seo-article li { margin-bottom: 0.5rem; font-size: 0.95rem; color: var(--text-muted); }

/* FAQ Section Accordions */
.faq-grid {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-header::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.faq-card.open .faq-header::after {
  transform: rotate(45deg);
}

.faq-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s ease;
}

.faq-card.open .faq-body {
  max-height: 500px;
  opacity: 1;
  padding: 0 20px 16px 20px;
}

/* Call to Action Section Banner */
.cta-banner {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border-top: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding: 48px 20px;
  text-align: center;
}
body.dark-theme .cta-banner {
  background: linear-gradient(135deg, #064E3B 0%, #0F172A 100%);
  border-color: var(--primary-dark);
}

.cta-banner-content {
  max-width: 680px;
  margin: 0 auto;
}

.cta-banner h2 {
  color: #065F46;
  margin-bottom: 12px;
}
body.dark-theme .cta-banner h2 {
  color: white;
}

.cta-banner p {
  color: #047857;
  margin-bottom: 24px;
}
body.dark-theme .cta-banner p {
  color: #A7F3D0;
}

/* Footer Section */
.main-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 64px 0 32px;
  font-size: 0.88rem;
  border-top: 1px solid #1E293B;
}

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

.footer-brand {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .footer-brand {
    grid-column: span 1;
  }
}

.footer-brand h3 {
  color: white;
  margin-bottom: 16px;
  font-size: 1.25rem;
}
.footer-brand h3 span {
  color: var(--primary-color);
}

.footer-brand p {
  color: #64748B;
  margin-bottom: 16px;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: #94A3B8;
}
.footer-col a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748B;
}

/* Empty State result placeholder */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* Email Report Form Card widget */
.email-widget {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-top: 20px;
}
body.dark-theme .email-widget {
  background: linear-gradient(135deg, #1E293B, #0F172A);
}

.email-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 16px auto 0;
  flex-wrap: wrap;
}

.email-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}
.email-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-accent {
  background-color: #FBBF24;
  color: #0F172A;
  border: none;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-accent:hover {
  background-color: #F59E0B;
}

.email-status {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Inverter Calculator Grid styles */
.appliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.appliance-card {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}
.appliance-card:focus-within {
  border-color: var(--primary-color);
}

.appliance-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.appliance-body {
  display: flex;
  gap: 10px;
}

.appliance-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appliance-input-wrapper label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.appliance-control {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Embed Box Styles */
.embed-block {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.embed-block h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.embed-box {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  margin-top: 8px;
}
.embed-box p {
  margin: 0 0 8px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.embed-code {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-all;
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.copy-btn {
  background: #1E293B;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
body.dark-theme .copy-btn {
  background: #334155;
}
.copy-btn:hover {
  background: #475569;
}

/* Accordion FAQ target styling */
.faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-q {
  padding: 18px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: var(--text-main);
}
.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
  transition: transform 0.2s ease;
}
.faq-a {
  padding: 0 20px 20px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  display: none;
}
.faq-item.open .faq-a {
  display: block;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Sizing Guide Table */
.size-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: var(--bg-card);
}
.size-table th, .size-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}
.size-table th {
  background: var(--bg-body);
  color: var(--text-main);
  font-weight: 700;
}
.size-table tr.highlighted td {
  background: rgba(16, 185, 129, 0.08);
}
.size-table tr:hover td {
  background: rgba(15, 23, 42, 0.01);
}
body.dark-theme .size-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Key Facts */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fact-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}
.fact-card strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}
.fact-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 56px;
  height: 56px;
  bottom: 80px; /* cleared for bottom mobile nav */
  right: 20px;
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.45);
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* Bottom App-like Sticky Mobile Nav */
.mobile-app-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-app-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-card, #ffffff);
    border-top: 1px solid var(--border-color, #e2e8f0);
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.06);
    justify-content: space-around;
    align-items: center;
    padding: 4px 0;
  }
  .mobile-app-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted, #64748b);
    font-size: 0.7rem;
    font-weight: 700;
    gap: 4px;
    flex: 1;
    transition: color 0.2s ease;
  }
  .mobile-app-nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }
  .mobile-app-nav-item:hover, .mobile-app-nav-item.active {
    color: var(--primary-color, #10b981);
  }
  
  /* Clear overlap with bottom sticky navbar */
  .main-footer {
    padding-bottom: 96px !important;
  }
  .footer-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-social-links {
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
  }
  
  /* Mobile App touch targets & container optimizations */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .form-control, .btn, .btn-submit {
    min-height: 48px;
    font-size: 0.95rem !important;
  }
  .calculator-container {
    gap: 20px !important;
  }
}

/* Sizer Results Highlighting Animation */
@keyframes resultHighlight {
  0% {
    box-shadow: 0 0 0 0px rgba(16, 185, 129, 0.4);
    transform: scale(0.97);
  }
  50% {
    box-shadow: 0 0 25px 8px rgba(16, 185, 129, 0.35);
    transform: scale(1.015);
  }
  100% {
    box-shadow: var(--shadow-lg, 0 10px 25px -5px rgba(0, 0, 0, 0.1));
    transform: scale(1);
  }
}

.result-glow-active {
  animation: resultHighlight 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Mobile Specific CSS Overrides & Responsive Layout Fixes */
@media (max-width: 768px) {
  /* Prevent tables from overflowing by enabling scroll directly on data-table class */
  .data-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Force collapse inline grids/columns that are defined as 2-column or 3-column template styles */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(3,1fr)"],
  .calculator-container[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Reset maximum and minimum widths of inline panes on mobile to avoid overflows */
  .form-pane, .results-pane {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  
  /* Force sizer container to respect browser viewport limits */
  .calculator-container {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }
}
