:root {
  --primary: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.4);
  --solar-gold: #f59e0b;
  --solar-glow: rgba(245, 158, 11, 0.45);
  --energy-green: #10b981;
  --energy-glow: rgba(16, 185, 129, 0.35);
  --bg-dark: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.glass-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -10px var(--solar-glow);
}

/* 3D Viewer Container */
#solar-canvas-container {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 1.25rem;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

#solar-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}

#solar-canvas-container canvas:active {
  cursor: grabbing;
}

/* UI Badges & Accents */
.badge-solar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.badge-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.gradient-text-solar {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Range Slider Styling */
input[type=range] {
  -webkit-appearance: none;
  background: #1e293b;
  height: 6px;
  border-radius: 4px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* 3D Overlay Controls */
.viewer-overlay {
  pointer-events: none;
}

.viewer-overlay > * {
  pointer-events: auto;
}

/* Subtle glow pulse */
@keyframes energyPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.pulse-glow {
  animation: energyPulse 3s infinite ease-in-out;
}

/* ======================================================== */
/* Responsive Product Image Modal (Guaranteed No Overflow)   */
/* ======================================================== */
#image-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
  overflow-y: auto;
}

#image-modal.hidden {
  display: none !important;
}

#image-modal.flex {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

#modal-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 86vh;
  margin: auto;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.25rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 158, 11, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

#modal-img-viewport {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050811;
  padding: 12px;
  overflow: hidden;
  box-sizing: border-box;
}

#modal-img {
  max-width: 100% !important;
  max-height: 48vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0.5rem;
  display: block;
  margin: 0 auto;
}

@media (max-width: 640px) {
  #image-modal {
    padding: 12px;
  }
  #modal-card {
    max-width: 95vw;
    max-height: 90vh;
  }
  #modal-img {
    max-height: 44vh !important;
  }
}

/* ======================================================== */
/* High-Contrast Form Inputs & Non-Blocking Icons           */
/* ======================================================== */
.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-input-wrapper .input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none !important;
  z-index: 10;
  width: 1.125rem;
  height: 1.125rem;
  color: #fbbf24 !important; /* Solar Gold */
  transition: color 0.2s ease;
}

.form-input-wrapper input,
.form-input-wrapper select,
.form-input-wrapper textarea {
  width: 100%;
  padding-left: 2.75rem !important;
  padding-right: 1rem !important;
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
  background-color: #0b1120 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 0.75rem !important;
  color: #ffffff !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: all 0.2s ease-in-out !important;
}

.form-input-wrapper input::placeholder,
.form-input-wrapper textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.form-input-wrapper input:focus,
.form-input-wrapper select:focus,
.form-input-wrapper textarea:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
  background-color: #0f172a !important;
}

.form-input-wrapper select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  padding: 8px 12px !important;
}

/* ======================================================== */
/* COMPREHENSIVE RESPONSIVE LAYOUT — MOBILE & TABLET FIX    */
/* Targets all pages: index, services, solar-equipment,     */
/* contact, service-areas, gallery, subsidy-guide           */
/* ======================================================== */

/* ---- GENERAL: Prevent horizontal overflow on all screens ---- */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
img {
  max-width: 100%;
  height: auto;
}

/* ---- NAVBAR TOP STRIP: compact on very small phones ---- */
@media (max-width: 479px) {
  header .border-b.border-white\/10 {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    font-size: 0.65rem !important;
  }
}

/* ---- NAVBAR MAIN BAR: proper padding on xs ---- */
@media (max-width: 479px) {
  nav.glass-panel {
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
  }
}

/* ======================================================== */
/* HERO SECTION RESPONSIVE                                   */
/* ======================================================== */
@media (max-width: 767px) {
  #hero-slider-section {
    min-height: unset !important;
    padding-bottom: 3rem !important;
  }
}

@media (max-width: 479px) {
  #hero-title {
    font-size: 1.875rem !important;
    line-height: 1.15 !important;
  }
  #hero-desc {
    font-size: 0.8125rem !important;
  }
}

/* Hero stats bar: compact on xs */
@media (max-width: 400px) {
  #hero-slider-section .grid.grid-cols-3 {
    gap: 0.35rem !important;
  }
  #hero-slider-section .grid.grid-cols-3 > div {
    padding: 0.5rem 0.35rem !important;
  }
}

/* Hero right glass card */
@media (max-width: 1023px) {
  #hero-slider-section .glass-panel.rounded-3xl {
    padding: 1.25rem !important;
  }
}

/* ======================================================== */
/* 3D SOLAR VISUALIZER — CANVAS RESPONSIVE                   */
/* ======================================================== */
@media (max-width: 1023px) {
  #solar-canvas-container {
    height: 340px !important;
  }
}
@media (max-width: 639px) {
  #solar-canvas-container {
    height: 260px !important;
  }
}

/* ======================================================== */
/* SAVINGS CALCULATOR — RESPONSIVE                           */
/* ======================================================== */
@media (max-width: 639px) {
  #calculator .grid.grid-cols-2.sm\:grid-cols-3 {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
  }
}

/* ======================================================== */
/* MAP iframe height on mobile                              */
/* ======================================================== */
@media (max-width: 639px) {
  iframe[src*="google.com/maps"] {
    height: 260px !important;
  }
}

/* ======================================================== */
/* SOLAR EQUIPMENT PAGE — SIDE-BY-SIDE CARDS                */
/* ======================================================== */
@media (max-width: 1023px) {
  .glass-panel.rounded-3xl .grid.grid-cols-1.lg\:grid-cols-12 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  /* On mobile always show image first */
  .glass-panel.rounded-3xl .order-2.lg\:order-1 {
    order: 2 !important;
  }
  .glass-panel.rounded-3xl .order-1.lg\:order-2 {
    order: 1 !important;
  }
}
@media (max-width: 479px) {
  .glass-panel.rounded-3xl {
    padding: 1rem !important;
  }
  .glass-panel.rounded-3xl .relative.h-64 {
    height: 14rem !important;
  }
  .glass-panel.rounded-3xl h3.font-display {
    font-size: 1.25rem !important;
  }
  .glass-panel.rounded-3xl .grid.grid-cols-1.sm\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  .glass-panel.rounded-3xl .grid.grid-cols-2.sm\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

/* ======================================================== */
/* CONTACT 4-PILLAR GRID — RESPONSIVE                        */
/* ======================================================== */
@media (max-width: 639px) {
  .grid.grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* ======================================================== */
/* FOOTER — RESPONSIVE                                       */
/* ======================================================== */
@media (max-width: 639px) {
  footer .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  footer .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
}

/* ======================================================== */
/* TOUCH TARGETS — Minimum 44px for tap accessibility       */
/* ======================================================== */
@media (max-width: 1023px) {
  #mobile-menu-drawer nav a {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }
  header .border-b a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* ======================================================== */
/* SECTION PADDING: Reduce on mobile for density            */
/* ======================================================== */
@media (max-width: 479px) {
  section.py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  section.py-16 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  section.py-14 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* ======================================================== */
/* VANILLA-TILT: Disable on touch/mobile devices            */
/* ======================================================== */
@media (max-width: 1023px) {
  [data-tilt] {
    transform: none !important;
    will-change: unset !important;
  }
}

/* ======================================================== */
/* MODAL: tighter on extra-small phones                     */
/* ======================================================== */
@media (max-width: 360px) {
  #modal-card {
    max-width: 98vw !important;
    border-radius: 0.75rem !important;
  }
  #modal-img {
    max-height: 38vh !important;
  }
}

/* ======================================================== */
/* BREADCRUMB: scrollable on overflow mobile                 */
/* ======================================================== */
nav[aria-label="Breadcrumb"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ======================================================== */
/* WHATSAPP FLOATING STICKY BUTTON                          */
/* ======================================================== */
.wa-sticky-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.55), 0 0 0 0 rgba(37,211,102,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none !important;
  animation: waPulse 2.5s infinite;
}
.wa-sticky-btn:hover,
.wa-sticky-btn:focus {
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.7);
}
.wa-sticky-btn svg {
  width: 1.625rem;
  height: 1.625rem;
  fill: #fff;
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.55), 0 0 0 0 rgba(37,211,102,0.4); }
  70%       { box-shadow: 0 4px 20px rgba(37,211,102,0.55), 0 0 0 14px rgba(37,211,102,0); }
}

/* ======================================================== */
/* HERO IMAGE BG: always cover properly                     */
/* ======================================================== */
.hero-bg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ======================================================== */
/* TEXTAREA ICON ALIGNMENT (top instead of center)          */
/* ======================================================== */
.form-input-wrapper .input-icon.top-icon {
  top: 0.9rem !important;
  transform: none !important;
}

/* ======================================================== */
/* HORIZONTAL SCROLL PREVENTION (utility)                   */
/* ======================================================== */
.overflow-x-clip {
  overflow-x: clip;
}

