/* ==========================================================================
   GREENRENEWSYS SOLAR - MASTER DESIGN SYSTEM & STYLESHEET
   Bright, Modern, Professional Solar Installer Template
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Core Theme Colors */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.85);

  --blue-900: #0D2E73;
  --blue-800: #123E94;
  --blue-700: #1554C4;
  --blue-600: #1D6FE0;
  --blue-500: #3B8AF0;
  --blue-400: #6BA8F5;
  --blue-100: #DCEBFD;
  --blue-50: #F0F7FF;

  --amber-600: #D97706;
  --amber-500: #F59E0B;
  --amber-400: #FBBF24;
  --amber-100: #FEF3C7;

  --slate-950: #020617;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(29, 111, 224, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.05);
  --shadow-blue: 0 12px 30px -5px rgba(59, 138, 240, 0.3);
  --shadow-amber: 0 12px 30px -5px rgba(245, 158, 11, 0.35);

  /* Borders & Radius */
  --border-light: 1px solid rgba(226, 232, 240, 0.8);
  --border-blue: 1px solid rgba(59, 138, 240, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--slate-800);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

/* Background Interactive Sunray Canvas */
#sunrayCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Main Container Wrappers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--slate-900);
  font-weight: 700;
  line-height: 1.2;
}

.text-gradient-blue {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 60%, var(--amber-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(59, 138, 240, 0.1);
  border: 1px solid rgba(59, 138, 240, 0.25);
  border-radius: var(--radius-full);
  color: var(--blue-700);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.sub-heading svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Keyboard focus visibility (buttons/links keep outline:none for mouse users,
   but must stay reachable and visible when navigating with a keyboard) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.85rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(59, 138, 240, 0.45);
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--slate-800);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--blue-500);
  color: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 75px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 58px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--blue-600);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-600);
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--slate-800);
}

.mobile-toggle svg line {
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.mobile-toggle[aria-expanded="true"] svg line:nth-child(1) {
  opacity: 0;
}

.mobile-toggle[aria-expanded="true"] svg line:nth-child(2) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] svg line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   HERO (PAGE 1)
   ========================================================================== */
.hero-wrapper {
  position: relative;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 1.5rem 0 2.5rem;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background-image: url('assets/hero-commercial.png');
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 40px;
  mask-image: linear-gradient(to right, transparent 0%, black 30%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
  z-index: 1;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.6) 50%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 3;
}

.hero-content {
  max-width: 700px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  background: #FFFFFF;
  border: 1px solid rgba(59, 138, 240, 0.3);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(29, 111, 224, 0.08);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--slate-900);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--slate-600);
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   SHARED SECTION LAYOUT
   ========================================================================== */
.section-padding {
  padding: 4.5rem 0;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--slate-600);
}

/* ==========================================================================
   ABOUT (PAGE 1)
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.about-feature {
  text-align: center;
  padding: 2rem 1.5rem;
}

.about-feature-icon {
  width: 64px;
  height: 64px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--blue-600);
}

.about-feature-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.about-feature h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.about-feature p {
  font-size: 0.95rem;
  color: var(--slate-600);
}

/* ==========================================================================
   SOLUTIONS (PAGE 2): RESIDENTIAL / COMMERCIAL / INDUSTRIAL
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: #FFFFFF;
  border: var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 138, 240, 0.4);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--amber-500));
  opacity: 0;
  transition: var(--transition-fast);
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  width: 64px;
  height: 64px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--blue-600);
  transition: var(--transition-fast);
}

.service-card:hover .service-icon {
  background: var(--blue-600);
  color: #FFFFFF;
  transform: scale(1.05);
}

.service-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.service-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--slate-900);
}

.service-desc {
  font-size: 0.95rem;
  color: var(--slate-600);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.service-list li svg {
  width: 16px;
  height: 16px;
  color: var(--blue-600);
  flex-shrink: 0;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-700);
  text-decoration: none;
  transition: var(--transition-fast);
}

.service-link:hover {
  color: var(--blue-500);
  gap: 0.75rem;
}

/* ==========================================================================
   CONTACT (PAGE 3)
   ========================================================================== */
.contact-section {
  background: var(--slate-900);
  color: #FFFFFF;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: rgba(59, 138, 240, 0.15);
  border: 1px solid rgba(59, 138, 240, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-400);
}

.contact-info-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.contact-info-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  font-size: 0.9rem;
  color: var(--slate-400);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--slate-950);
  color: var(--slate-400);
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-title {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--slate-400);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--blue-400);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-bg-image {
    width: 100%;
    opacity: 0.2;
  }
  .services-grid, .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .services-grid, .about-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile nav dropdown panel, opened via .mobile-toggle (script.js) */
  .navbar.mobile-open .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 1.5rem;
  }
  .navbar.mobile-open #primaryNav {
    order: 4;
    width: 100%;
  }
  .navbar.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--slate-200);
  }
}
