/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Variables - Customize these */
:root {
  --primary-color: #2d5016;
  --text-color: #333;
  --bg-color: #fff;
  --spacing: 1rem;
}

/* Base Styles */
body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Add your styles here */

/* Navigation */
nav {
  background: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--spacing);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.1s ease;
}

nav a:hover {
  color: var(--primary-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Hero Section with Dynamic Background */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #4a7c59);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 1s ease;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero.forest-loaded {
  background: url('https://www.papelpintado.com/media/catalog/product/cache/765175cf1e0a4cff0292d295081d4aa3/w/1/w13383-small.jpg');
  background-size: 110% auto;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: slideInFromTop 1s ease-out;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  animation: slideInFromTop 1s ease-out 0.2s both;
}

.hero .btn {
  animation: slideInFromTop 1s ease-out 0.4s both;
}

.btn {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: transform 0.1s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Grid Section */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.1s ease-in-out;
  cursor: pointer;
  transform: translateX(0) translateY(0);
}

.card:hover {
  transform: translateX(8px) translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

/* Solar card specific styling - 0.1s hover */
.solar-card {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  padding: 3rem 2rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  transition: all 0.1s ease-in-out;
  transform: translateX(0) translateY(0);
}

.solar-card:hover {
  transform: translateX(8px) translateY(-8px);
  box-shadow: 0 12px 25px rgba(243, 156, 18, 0.3);
}

/* Energy Cards Color Schemes */
.solar-card h3 {
  color: #f39c12; /* Golden */
}

.wind-card h3 {
  color: #74b9ff; /* Light blue */
}

.geothermal-card h3 {
  color: #e17055; /* Warm orange-red */
}

.hydro-card h3 {
  color: #00b894; /* Teal green */
}

.tidal-card h3 {
  color: #0984e3; /* Ocean blue */
}

/* Card styling consistency */
.card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Section Spacing */
section {
  padding: 4rem 0;
}

section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

/* Form Styles */
form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

form div {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e1e1;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

/* Contact section background */
#contact {
  background: #f8f9fa;
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add these styles at the end */

.error-message {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.success-message {
  background: #2ecc71;
  color: white;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  text-align: center;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success Stories Section */
#success-stories {
  background: #f8f9fa;
  padding: 6rem 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.08);
  transition: all 0.1s ease-in-out;
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.testimonial-card:hover {
  transform: translateX(8px) translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.testimonial-card::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  opacity: 0.3;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: serif;
}

.testimonial-content {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.testimonial-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
  font-style: italic;
}

.customer-info h4 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.customer-info span {
  color: #666;
  font-size: 0.95rem;
}

/* Gallery Section - Card Style */
#gallery {
  padding: 6rem 0;
  background: #f0f8f0; /* Light green background */
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem; /* Increased gap between cards */
  margin-top: 3rem;
}

.gallery-card {
  padding: 0;
  overflow: hidden;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.1s ease-in-out;
  margin-bottom: 1rem;
}

.gallery-card:hover {
  transform: translateX(8px) translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.gallery-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  min-height: 180px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: #e1e1e1; /* Placeholder background */
}

.gallery-image.loaded {
  opacity: 1;
}

.gallery-image.loading {
  background: linear-gradient(90deg, #e1e1e1 25%, #f0f0f0 50%, #e1e1e1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.gallery-card .card-content {
  padding: 2rem; /* Increased padding for better spacing */
}

.gallery-card h4 {
  font-size: 1.4rem;
  margin-bottom: 1rem; /* Increased margin */
  color: var(--primary-color);
  font-weight: 600;
}

.gallery-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .testimonial-card {
    padding: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2rem; /* Adjusted gap for mobile */
  }
  
  .gallery-image {
    max-height: 200px;
    min-height: 150px;
  }
  
  .gallery-card .card-content {
    padding: 1.5rem;
  }

  .card:hover,
  .solar-card:hover,
  .testimonial-card:hover,
  .gallery-card:hover {
    transform: translateX(4px) translateY(-4px);
  }
}

@media (max-width: 480px) {
  #gallery {
    padding: 4rem 0;
  }
  
  .gallery-grid {
    gap: 1.5rem;
  }
}
