:root {
  --color-primary: #16A34A;
  --color-primary-dark: #15803D;
  --color-primary-light: #c4edd2;
  --color-secondary: #1E3A8A;
  --color-bg: #F8FAFC;
  --color-white: #FFFFFF;
  --color-text: #0F172A;
  --color-text-muted: #475569;
  --color-border: #E5E7EB;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  color: var(--color-text);
  background-color: var(--color-bg);
  padding-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-secondary);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

p {
  color: var(--color-text-muted);
  max-width: 65ch;
}

section {
  padding: 4rem 1.5rem;
}

/*  */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}

.grid > * {
  flex: 0 1 calc(33.333% - 1rem);
  max-width: 360px;
  min-width: 280px;
}

/*  */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: all .35s ease;
}

.navbar.hero-mode {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.navbar.hero-mode .nav-links a {
  color: #fff;
}

.navbar.hero-mode .logo-link h1 {
  color: #fff;
  transition:
    color 0.35s ease,
    transform 0.35s ease,
    text-shadow 0.35s ease;
}

.navbar.hero-mode .logo-link:hover h1 {
  color: #22C55E;
  transform: translateY(-2px) scale(1.03);
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}

.navbar.hero-mode .hamburger span {
  background: #fff;
}

.navbar.scrolled .nav-links a,
.navbar.scrolled .logo-link h1 {
  color: var(--color-text);
}

.navbar.scrolled .logo-link:hover h1,
.navbar.hero-mode .logo-link:hover h1,
.logo-link:hover h1 {
  color: #22C55E;
  transform: translateY(-2px) scale(1.03);
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}

.navbar.scrolled .hamburger span {
  background: var(--color-text);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-title {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.nav-logo {
  width: 60px;
  height: auto;
}

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

.logo-link h1 {
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 800;
  color: var(--color-secondary);
  transition:
    color 0.35s ease,
    transform 0.35s ease,
    text-shadow 0.35s ease;
}

.logo-link:hover h1 {
  color: #22C55E;
  transform: translateY(-2px) scale(1.03);
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}

.nav-links a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  padding: 0.45rem 0.2rem;
  transition:
    color 0.35s ease,
    transform 0.35s ease;
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  border-radius: 10px;
  background: linear-gradient(90deg, #22C55E, #16A34A);
  transition: width 0.35s ease;
}

.nav-links a:not(.btn):hover {
  color: #16A34A;
  transform: translateY(-2px);
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.navbar.hero-mode .nav-links a:not(.btn) {
  color: #fff;
}

.navbar.hero-mode .nav-links a:not(.btn):hover {
  color: #86EFAC;
}

.navbar.hero-mode .nav-links a:not(.btn)::after {
  background: linear-gradient(90deg, #86EFAC, #22C55E);
}

.navbar.scrolled .nav-links a:not(.btn) {
  color: var(--color-text);
}

.navbar .btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/*  */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.22);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;

  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-25deg);
  transition: left 0.55s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.35);
}

.btn:hover::before {
  left: 140%;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/*  */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1.2s ease,
    transform 1.4s cubic-bezier(.16, 1, .3, 1);
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(15, 23, 42, 0.58), rgba(30, 58, 138, 0.52)),
    url("../imagenes/panelsolar2.webp") center/cover no-repeat;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.hero h1,
.hero p {
  color: #ffffff;
}

.hero h1 {
  margin-bottom: 0.15rem;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 58ch;
}

.hero .btn {
  width: 300px;
  text-align: center;
}

/*  */

.card,
.project-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);

  transition:
    transform .35s ease,
    box-shadow .35s ease,
    opacity .55s ease;
}

.card:hover,
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  margin-top: 5px;
  margin-bottom: 0;
  text-align: center;
}

.card p {
  padding: 5px;
  margin-left: 10px;
}

.card img,
.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-top: auto;
}

/*  */

.problema,
#proyectos {
  background-color: var(--color-white);
}

.problema .card {
  text-align: center;
  padding: 2.2rem 2rem;
}

.problema .card p {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

/*  */

#beneficios .card {
  position: relative;
  padding: 2.2rem 2rem;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

#beneficios .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

#beneficios .card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom,
      var(--color-primary),
      var(--color-primary-dark));
}

#beneficios h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
}

#beneficios h3 span {
  font-size: 1.8rem;
}

#beneficios p {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 0.5rem;
}

#beneficios .card.card-highlight {
  background: linear-gradient(135deg,
      var(--color-primary),
      var(--color-primary-dark));
}

/*  */

.card-highlight h3,
.card-highlight p {
  color: #fff;
}

.card-highlight::before {
  display: none;
}

.section-subtitle {
  text-align: center;
  max-width: none;
}

.proyectos-grid {
  margin-top: 2rem;
}

.project-info {
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.project-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.project-info span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/*  */

#nosotros .card {
  text-align: center;
  padding: 10px;
}

#nosotros .card::before {
  content: "★";
  display: block;
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

#nosotros p {
  text-align: center;
  margin-bottom: 10px;
}

/*  */

.cta-final {
  background-color: var(--color-secondary);
  color: #fff;
  text-align: center;
}

.cta-final h2 {
  color: #fff;
}

.cta-final p {
  color: #E5E7EB;
  text-align: center;
  max-width: none;
  margin-bottom: 1.5rem;
}

.cta-final .btn.pulse {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .6);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/*  */

.footer {
  background-color: #020617;
  color: #CBD5E1;
  padding: 1rem;
  text-align: center;
}

.footer p {
  color: #CBD5E1;
  font-size: 0.9rem;
  margin-inline: auto;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin-bottom: 15px;
}

.social-icon a {
  color: #CBD5E1;
  font-size: 30px;
  transition: 0.3s;
}

.social-icon a:hover {
  color: var(--color-primary);
}

/*  */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: var(--color-text);
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/*  */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/*  */

.problema {
  background: #fff;
  position: relative;
}

.problema h2 {
  margin-bottom: 4rem;
}

.problema-item {
  display: flex;
  align-items: center;
  gap: 3.2rem;
  margin-bottom: 6rem;
}

.problema-item.reverse {
  flex-direction: row-reverse;
}

.problema-texto {
  flex: 1;
}

.problema-texto h3 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.problema-texto p {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 520px;
  color: var(--color-text-muted);
}

.tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .45rem .95rem;
  border-radius: 30px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.problema-img {
  flex: 1;
  overflow: hidden;
  border-radius: 18px;
  max-width: 520px;
  width: 100%;
  margin: auto;
}

.problema-img img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .12);


  transition:
    opacity 1.6s ease,
    transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animation="fade"] {
  opacity: 0;
  transform: translateX(90px);
  transition: 2s cubic-bezier(0.16, 1, 0.3, 1) .15s;
  will-change: transform, opacity;
}

[data-animation="up"] {
  opacity: 0;
  transform: translateY(80px);
  transition: 2s cubic-bezier(0.16, 1, 0.3, 1) .15s;
  will-change: transform, opacity;
}

[data-animation="show"] {
  opacity: 0;
  transform: scale(.82);
  transition: 2s cubic-bezier(0.16, 1, 0.3, 1) .15s;
  will-change: transform, opacity;
}

.unset {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-card {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .28s ease-out,
    transform .35s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, opacity;
}

.reveal-card.show {
  opacity: 1;
  transform: translateY(0);
}


/*  */

.carousel-dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 1.3rem;
  width: 100%;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all .35s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 28px;
  border-radius: 30px;
  background: linear-gradient(90deg, #16A34A, #22C55E);
  box-shadow: 0 0 10px rgba(34, 197, 94, .35);
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.carousel-controls button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #16A34A;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: .25s;
}

.carousel-controls button:hover {
  transform: scale(1.08);
  background: #22C55E;
}


.carousel-controls,
.carousel-dots {
  display: none;
}

