/* ==========================================================================
   ENERGICA INFRA LLP - Global Styles
   ========================================================================== */

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

:root {
  /* Brand Colors */
  --primary: #2F7D32;
  --dark-green: #185C2A;
  --accent: #D99A17;
  --bg-light: #F7FAF7;
  --bg-white: #FFFFFF;
  --bg-dark: #17201A;
  
  /* Text Colors */
  --text-main: #17201A;
  --text-muted: #4a5c50;
  --text-light: #FFFFFF;
  
  /* Utilities */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px rgba(23, 32, 26, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(23, 32, 26, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(23, 32, 26, 0.15);
  --border-radius: 8px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-main);
}

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

a:hover {
  color: var(--dark-green);
}

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 3rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--dark-green);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-light);
}

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

.btn-accent:hover {
  background-color: #c48b14;
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.form-status {
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 500;
}

.form-status.success {
  background-color: rgba(47, 125, 50, 0.12);
  color: var(--dark-green);
  border: 1px solid rgba(47, 125, 50, 0.25);
}

.form-status.error {
  background-color: rgba(217, 48, 37, 0.08);
  color: #9f2c22;
  border: 1px solid rgba(217, 48, 37, 0.2);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

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

.nav-logo img {
  height: 50px;
  transition: var(--transition);
}

.navbar.scrolled .nav-logo img {
  height: 40px;
}

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

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--font-heading);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--text-main);
  left: 0;
  transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ==========================================================================
   Layout Sections
   ========================================================================== */
.section {
  padding: 6rem 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}
.bg-dark .section-title,
.bg-dark h2,
.bg-dark h3 {
  color: var(--text-light);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for navbar */
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(23,32,26,0.9) 0%, rgba(23,32,26,0.4) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: #e0e6e2;
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  fill: var(--text-light);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  padding-top: 60%; /* 16:9 aspect ratio approximation */
}

.card-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

.card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Icon Cards (Services) */
.icon-card {
  background-color: var(--bg-light);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border-top: 4px solid transparent;
}

.icon-card:hover {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-top-color: var(--primary);
  transform: translateY(-5px);
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  background-color: rgba(47, 125, 50, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.icon-wrapper svg {
  width: 28px;
  height: 28px;
}

/* Split Section */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.split-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.split-image {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-list {
  margin: 2rem 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 500;
}

.feature-list li svg {
  color: var(--primary);
  margin-right: 1rem;
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
}

.timeline-step {
  position: relative;
}

.timeline-step::after {
  content: '';
  position: absolute;
  top: 30px;
  right: -50%;
  width: 100%;
  height: 2px;
  background-color: rgba(47, 125, 50, 0.2);
  z-index: 1;
}

.timeline-step:last-child::after {
  display: none;
}

.timeline-number {
  width: 60px;
  height: 60px;
  background-color: var(--bg-white);
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.timeline-step:hover .timeline-number {
  background-color: var(--primary);
  color: var(--text-light);
}

.timeline-title {
  font-weight: 600;
  font-family: var(--font-heading);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #e0e6e2;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: var(--bg-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: var(--bg-light);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  background-color: var(--bg-white);
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

/* ==========================================================================
   Project Filter
   ========================================================================== */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  background: none;
  border: 1px solid #e0e6e2;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #c2c9c4;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: #a4b3a8;
  padding: 5rem 0 2rem;
}

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

.footer-brand img {
  height: 40px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-title {
  color: var(--text-light);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

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

.footer-links a {
  color: #a4b3a8;
}

.footer-links a:hover {
  color: var(--text-light);
}

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

.footer-legal a {
  color: #a4b3a8;
  margin-left: 1.5rem;
}

.footer-legal a:hover {
  color: var(--text-light);
}

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
  color: white;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .timeline::after {
    display: none;
  }
  
  .nav-toggle {
    display: block;
    z-index: 1001;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-toggle.active .hamburger {
    background-color: transparent;
  }
  
  .nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  .nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-legal a {
    margin: 0 0.75rem;
  }
}
