
/**
 * Qixent Stylesheet
 * 
 * TABLE OF CONTENTS:
 * 
 * 1. Base & Typography
 *    1.1 Font Definitions
 *    1.2 Color Variables
 *    1.3 Global Base Styles
 *    1.4 Typography Classes
 * 
 * 2. Layout & Structure
 *    2.1 Container
 *    2.2 Backgrounds
 * 
 * 3. Components
 *    3.1 Buttons
 *    3.2 Announcement Bar
 *    3.3 Navigation
 *    3.4 Secondary Navigation
 *    3.5 Contact Form
 *    3.6 Cards & Panels
 * 
 * 4. Sections
 *    4.1 Hero Sections
 *    4.2 Solar Specific Sections
 *    4.3 Features
 *    4.4 Industries
 *    4.5 Services
 *    4.6 Stats & Metrics
 *    4.7 Testimonials
 *    4.8 Timeline
 *    4.9 CTA Sections
 *    4.10 Logo Marquee
 *    4.11 Integration Diagram
 * 
 * 5. Footer
 * 
 * 6. Animations
 * 
 * 7. Media Queries & Responsive Design
 */

/* --------------------------------------------------------------
1. BASE & TYPOGRAPHY
-------------------------------------------------------------- */

/* 1.1 Font Definitions */
@font-face {
  font-family: 'Panton Narrow';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/PantonNarrow-Regular.woff2') format('woff2'),
       url('/assets/fonts/PantonNarrow-Regular.woff')  format('woff');
}

@font-face {
  font-family: 'Panton Narrow Bold';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/pantonnarrow-bold.woff2') format('woff2'),
       url('/assets/fonts/pantonnarrow-bold.woff') format('woff');
}

/* 1.2 Color Variables */
:root {
  --qixent-orange: #F48F51;
  --dark-charcoal: #343A40;
  --slate-gray: #586374;
  --cloud-white: #F8F9FA;
  --pure-white: #FFFFFF;
  --light-stone: #EDEDED;
  --violet-spark: #AA7DF4;
  --mint-fresh: #4EC79E;
  --sunset-coral: #FF6B6B;
}

/* 1.3 Global Base Styles */
body {
  @apply font-sans text-dark-charcoal bg-pure-white;
}

/* 1.4 Typography Classes */
.font-head { font-family: 'Panton Narrow', sans-serif; font-weight: 400; }
.font-bold { font-family: 'Panton Narrow Bold', sans-serif; font-weight: 700; }
.text-primary { color: var(--qixent-orange); }
.text-slate { color: var(--slate-gray); }
.text-dark { color: var(--dark-charcoal); }

/* --------------------------------------------------------------
2. LAYOUT & STRUCTURE
-------------------------------------------------------------- */

/* 2.1 Container */

/* Base container styling */
.container {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 2.2 Backgrounds */
.bg-primary { background-color: var(--qixent-orange); }
.bg-cloud { background-color: var(--cloud-white); }
.bg-light { background-color: var(--light-stone); }
.bg-violet { background-color: var(--violet-spark); }
.bg-mint { background-color: var(--mint-fresh); }
.bg-coral { background-color: var(--sunset-coral); }

/* --------------------------------------------------------------
3. COMPONENTS
-------------------------------------------------------------- */

/* 3.1 Buttons */
.button {
  @apply inline-block px-6 py-3 rounded font-semibold text-base;
}
.button.primary { @apply bg-primary text-pure-white; }
.button.white { @apply bg-pure-white text-primary border border-primary; }

/* 3.2 Announcement Bar */
.announcement-bar { @apply bg-primary text-pure-white py-2 text-center; }

/* 3.3 Navigation */
.navbar { @apply bg-pure-white shadow; }
.nav-links a { @apply px-4 py-2; }

/* Dropdown Navigation Styles */
.nav-links .group {
  position: relative;
}

.nav-links .group:hover .absolute {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links .absolute {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  border: 1px solid #e5e7eb;
  margin-top: 0.5rem;
}

.nav-links .absolute a {
  transition: all 0.15s ease;
  border-radius: 0.375rem;
  margin: 0.125rem;
}

.nav-links .absolute a:hover {
  background-color: #f9fafb;
  color: var(--qixent-orange);
}

/* Mobile Navigation Adjustments */
@media (max-width: 767px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
  }
  
  .nav-links.flex {
    display: flex !important;
    flex-direction: column;
  }
  
  .nav-links.hidden {
    display: none !important;
  }
  
  .nav-links .absolute {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: none !important;
    margin-top: 0 !important;
    padding-left: 1rem;
  }
  
  .nav-links .group .absolute a {
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    font-size: 0.875rem;
    color: #64748b;
  }
  
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
  }
}

/* 3.4 Secondary Navigation */
#secondary-nav {
  transition: all 0.3s ease;
}

#secondary-nav.fixed {
  animation: slideDown 0.3s ease-in-out;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 45;
}

#secondary-nav ul {
  scrollbar-width: none; /* For Firefox */
}

#secondary-nav ul::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Opera */
}

/* Active section indicator styles */
#secondary-nav li a {
  position: relative;
  padding-bottom: 0.25rem;
}

#secondary-nav li a.active {
  color: var(--qixent-orange);
}

#secondary-nav li a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--qixent-orange);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

/* 3.5 Contact Form */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px 0 rgba(80,80,120,0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--qixent-orange);
  box-shadow: 0 2px 8px 0 rgba(244,143,81,0.09);
  outline: none;
}

.contact-form textarea {
  resize: none;
}

.contact-form button {
  width: 100%;
  background: var(--qixent-orange);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px 0 rgba(244,143,81,0.12);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  transition: transform 0.13s, background 0.2s;
  border: none;
}

.contact-form button:hover {
  background: #e97a30;
  transform: scale(1.04);
}

/* 3.6 Cards & Panels */
.contact-card {
  backdrop-filter: blur(2px);
  box-shadow: 0 8px 32px 0 rgba(60,60,100,0.10), 0 1.5px 8px 0 rgba(0,0,0,0.02);
  border: 1px solid rgba(180,180,220,0.13);
  background-color: rgba(255,255,255,0.95); /* fallback for no backdrop-filter */
}

.stat-card { 
  @apply p-4 bg-cloud rounded shadow; 
}

/* --------------------------------------------------------------
4. SECTIONS
-------------------------------------------------------------- */

/* 4.1 Hero Sections */
.hero-graphic img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-img {
  max-width: 540px;
  min-width: 350px;
  margin: auto;
}

/* 4.2 Solar Specific Sections */
.solar-hero-section {
  position: relative;
  width: 100%;
  min-height: 60vh; /* Use viewport height for better responsiveness */
  background: url('/assets/images/residential-solar-hero.gif') center center/cover no-repeat;
  display: flex;
  align-items: center; /* Center content vertically */
  padding-top: 9rem; /* to account for navbar + announcement bar */
  padding-bottom: 3rem;
}

/* Overlay for the hero section */
.solar-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5); /* 50% transparent white overlay */
  z-index: 1;
}

.solar-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
  width: 100%;
}

/* Solar Article Section */
.article-content blockquote {
  border-left: 4px solid var(--qixent-orange);
  font-style: italic;
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  background-color: rgba(244, 143, 81, 0.05);
}

.article-content blockquote p {
  font-weight: 500;
  color: var(--dark-charcoal);
}

/* 4.3 Timeline Component */
.timeline-container {
  padding: 20px 0;
  position: relative;
  z-index: 1;
}

.timeline-marker {
  z-index: 5;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

/* Mobile-specific timeline styles */
@media (max-width: 767px) {
  .timeline-container {
    padding: 10px 0;
  }
  
  .timeline-item {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  
  /* Mobile timeline card styling */
  .timeline-item .bg-white {
    border: 1px solid rgba(244, 143, 81, 0.1);
    transition: all 0.3s ease;
  }
  
  .timeline-item .bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--qixent-orange);
  }
  
  /* Ensure proper spacing between mobile cards */
  .space-y-8 > * + * {
    margin-top: 2rem;
  }
}

/* 4.4 Section Navigation & Spacing */
#sales-leaders, #marketing-leaders, #how-it-works, #extend-warranty {
  scroll-margin-top: 110px;
}

/* 4.5 Stats & Metrics */
.stat-card .font-head { @apply text-3xl; }
#stats-section { scroll-margin-top: 100px; }

/* 4.6 Features Section */
.features-section img { @apply mx-auto mb-4 h-12; }
.features-section h4 { @apply font-head mb-2; }
.features-section p { @apply text-slate; }

/* 4.7 Services Overview */
.services-overview .bg-cloud { @apply p-6 rounded shadow hover:shadow-lg transition; }

/* 4.8 Testimonials */
.testimonials p { @apply italic text-slate; }

/* 4.9 Industries */
.industries ul li { @apply list-disc ml-6 text-slate mb-2; }
.industry-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.industry-card-link:focus .p-6,
.industry-card-link:hover .p-6 {
  box-shadow: 0 8px 32px 0 rgba(244,143,81,0.18), 0 1.5px 8px 0 rgba(0,0,0,0.04);
  border-color: var(--qixent-orange);
  outline: 2px solid var(--qixent-orange);
  outline-offset: 2px;
  transition: box-shadow 0.2s, border-color 0.2s, outline 0.2s;
}

/* 4.10 Integration Diagram */
.integration-diagram div,
.integration-diagram .w-8 { @apply flex-shrink-0; }
.integration-diagram .bg-primary { @apply text-pure-white; }

/* 4.11 CTA Sections */
.bg-primary .button { @apply bg-pure-white text-primary; }


/* 4.12 Logo Marquee */
#logo-container {
  position: relative;
  overflow: hidden;
  height: 3rem;
}

.logo-banner {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  animation: scrollLogos 40s linear infinite;
}

.logo-banner img {
  height: 2.5rem;
  width: auto;
  max-width: none;
  display: inline-block;
  margin: 0 1.5rem;
  object-fit: contain;
  vertical-align: middle;
}

/* 4.13 Integration Components */
.integration-diagram-box {
  width: 10rem;
  height: 10rem;
  max-width: 100vw;
  min-width: 8rem;
  min-height: 8rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.integration-cta-mobile {
  width: 70vw !important;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.125rem;
  padding: 0.75rem 0;
  display: block;
}

/* --------------------------------------------------------------
5. FOOTER
-------------------------------------------------------------- */
footer { @apply bg-dark-charcoal text-pure-white py-8; }
footer h4 { @apply font-head mb-2; }
footer a:hover { @apply underline; }

/* --------------------------------------------------------------
6. ANIMATIONS
-------------------------------------------------------------- */
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* --------------------------------------------------------------
7. MEDIA QUERIES & RESPONSIVE DESIGN
-------------------------------------------------------------- */
@media (min-width: 768px) {
  /* Desktop adjustments */
  .container {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  /* Timeline responsive adjustments */
  .timeline-item {
    /* Timeline-specific desktop styles */
  }
}

@media (max-width: 767px) {
  /* Solar hero section responsive adjustments */
  .solar-hero-section {
    min-height: 50vh; /* Adjusted for mobile */
    padding-top: 6rem; /* Adjusted for mobile */
    padding-bottom: 2rem;
  }
  
  .solar-hero-content {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }
  
  /* Make all grids stack */
  .grid-cols-3, .md\:grid-cols-3, .grid-cols-2, .md\:grid-cols-2, .lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* Adjust spacing */
  .py-20, .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Navbar container adjustments */
  .navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Medium screens */
@media (min-width: 768px) and (max-width: 1024px) {
  .solar-hero-section {
    min-height: 55vh;
    padding-top: 8rem;
  }
  
  .solar-hero-content {
    padding: 2rem 1.5rem;
  }
}

/* Large screens */
@media (min-width: 1025px) {
  .solar-hero-section {
    min-height: 60vh;
  }
}

/* Small screens - additional adjustments */
@media (max-width: 767px) {
  /* Make all grids stack */
  .grid-cols-3, .md\:grid-cols-3, .grid-cols-2, .md\:grid-cols-2, .lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* Adjust spacing */
  .py-20, .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Navbar container adjustments */
  .navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}