:root {
  --bg: #ffffff;
  --bg-soft: #f3f7fa;
  --ink: #10202c;
  --muted: #657582;
  --line: #dfe8ee;
  --brand: #00a8df;
  --brand-dark: #006aa2;
  --dark: #061827;
  --shadow: 0 24px 70px rgba(8, 31, 48, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 168, 223, 0.18), transparent 42%), #fff;
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);
}

body.is-leaving .page-transition {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 28, 42, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-wrap {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand img {
  height: 38px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.25s ease;
}

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

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  min-height: 720px;
  display: flex;
  align-items: center;
  margin-top: 0;
  padding-top: 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3, 18, 32, 0.9), rgba(3, 32, 54, 0.62), rgba(3, 18, 32, 0.58)),
    var(--hero-img, url("../img/hero-artic.jpg")) center / cover no-repeat;
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

h3 {
  font-size: 23px;
  letter-spacing: -0.03em;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.hero p,
.page-hero p,
.cta p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 168, 223, 0.28);
}

.btn.ghost {
  border-color: rgba(16, 32, 44, 0.18);
  background: #fff;
  color: var(--ink);
}

.hero .btn.ghost,
.cta .btn.ghost {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.page-hero {
  padding: 110px 0 80px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.92), rgba(0, 120, 170, 0.76)),
    url("../img/hero-solar.jpg") center / cover no-repeat;
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 7vw, 82px);
}

.section {
  padding: 100px 0;
}

.section.alt {
  background: var(--bg-soft);
}

.section-head {
  max-width: 820px;
  margin-bottom: 44px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.solution-grid,
.product-grid,
.contact-grid,
.admin-panel {
  display: grid;
  gap: 24px;
}

.solution-grid {
  grid-template-columns: repeat(5, 1fr);
}

.solution-card,
.product-card,
.admin-card,
.info-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 40px rgba(10, 34, 54, 0.05);
}

.solution-card {
  min-height: 210px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.solution-card:hover,
.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 168, 223, 0.35);
  box-shadow: var(--shadow);
}

.solution-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.solution-card span {
  color: var(--muted);
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 70px;
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}

.media-card {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.media-card img {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px;
  background: #fff;
}

.product-media img {
  min-height: auto;
  max-height: 440px;
  object-fit: contain;
}

.product-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.product-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.product-card .thumb {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbfd, #fff);
}

.product-card .thumb img {
  max-height: 220px;
  width: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.product-card:hover .thumb img {
  transform: scale(1.04);
}

.product-card h3 {
  min-height: 58px;
  margin-bottom: 10px;
  font-size: 18px;
  text-transform: uppercase;
}

.product-card .code {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.product-card .power-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.group-block + .group-block {
  margin-top: 70px;
}

.group-title {
  margin-bottom: 24px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 72px;
}

.product-detail-image {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 36px;
  background: linear-gradient(180deg, #f7fbfd, #fff);
  box-shadow: var(--shadow);
}

.product-detail-image img {
  max-height: 440px;
  width: 100%;
  object-fit: contain;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.meta-box {
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-soft);
}

.meta-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-box strong {
  font-size: 15px;
}

.cta {
  padding: 100px 0;
  color: #fff;
  background: radial-gradient(circle at top right, rgba(0, 168, 223, 0.35), transparent 32%), var(--dark);
}

.cta-inner {
  text-align: center;
}

.cta-inner p,
.cta-inner .actions {
  margin-inline: auto;
  justify-content: center;
}

.empty-state {
  text-align: center;
  padding: 70px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.contact-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.contact-form,
.info-panel,
.admin-card {
  padding: 30px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 168, 223, 0.12);
}

.admin-panel {
  grid-template-columns: repeat(3, 1fr);
}

.admin-card.wide {
  grid-column: 1 / -1;
}

.admin-status {
  margin-bottom: 18px;
  color: var(--muted);
}

.admin-table {
  overflow-x: auto;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.site-footer {
  background: #071a28;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 42px;
  padding: 64px 0;
}
.footer-grid p,
.footer-grid a {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
}

.footer-grid h4 {
  margin: 0 0 14px;
}

.footer-bottom {
  padding: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .site-nav {
    position: fixed;
    inset: 86px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 18px 20px 28px;
    background: rgba(7, 26, 40, 0.98);
    transform: translateY(-120%);
    transition: transform 0.35s ease;
  }

  body.nav-open .site-nav {
    transform: translateY(0);
  }

  .site-nav a {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-toggle {
    display: block;
  }

  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid.cols-4,
  .product-grid.cols-3,
  .admin-panel,
  .contact-grid,
  .split,
  .product-detail,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .nav-wrap {
    min-height: 76px;
  }

  .brand img {
    height: 32px;
  }

  .site-nav {
    inset: 76px 0 auto 0;
  }

  .hero {
    min-height: 680px;
    margin-top: 0;
  }

  .section,
  .cta {
    padding: 72px 0;
  }

  .page-hero {
    padding: 82px 0 64px;
  }

  .solution-grid,
  .product-grid.cols-4,
  .product-grid.cols-3,
  .admin-panel,
  .contact-grid,
  .split,
  .product-detail,
  .footer-grid,
  .product-meta {
    grid-template-columns: 1fr;
  }

  .product-detail-image {
    min-height: 360px;
  }

  .product-card .thumb {
    height: 230px;
  }

  .empty-state {
    padding: 42px 20px;
  }
}

/* =========================================================
   PAGE CONTENT MAP
   - Home: index.html / edit hero, solution-grid and featuredProducts.
   - Solar Panels: solar-panels.html / edit #solarPanels content from assets/js/products.js.
   - Inverters: inverters.html / edit inverter groups from assets/js/products.js.
   - Tracking: tracking.html / edit page hero and tracking products.
   - Solutions: solutions.html / edit the three full-width .solution-panel blocks.
   - Contact: contact.html / edit form and company information.
   - Admin: catalog-admin.html / import CSV, edit images and upload PDF sheets.
   ========================================================= */

/* Softer page transition */
.page-transition {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(100%);
  transition: transform 0.34s ease, opacity 0.34s ease;
}

body.is-leaving .page-transition {
  transform: translateY(0);
  opacity: 1;
}

/* Product cards - smaller product names */
.product-card h3 {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Home solution icons */
.solution-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto;
  border-radius: 16px;
  background: rgba(0, 168, 223, 0.1);
  color: var(--brand-dark);
  font-size: 24px;
}

.solution-card {
  gap: 18px;
}

/* Page banners - change each image independently here */
.page-hero--solar-panels {
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.92), rgba(0, 120, 170, 0.74)),
    url("../img/panels.png") center / cover no-repeat;
}

.page-hero--inverters {
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.94), rgba(0, 105, 145, 0.7)),
    url("../img/inverters.png") center / cover no-repeat;
}

.page-hero--tracking {
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.94), rgba(0, 120, 170, 0.66)),
    url("../img/tracking.png") center / cover no-repeat;
}

.page-hero--solutions {
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.92), rgba(0, 70, 110, 0.68)),
    url("../img/solutions-img.png") center / cover no-repeat;
}

.page-hero--contact,
.page-hero--admin,
.page-hero--cloud,
.page-hero--storage {
  background:
    linear-gradient(120deg, rgba(3, 22, 38, 0.92), rgba(0, 120, 170, 0.72)),
    url("../img/contact.webp") center / cover no-repeat;
}

/* Solutions page */
.solution-panels {
  display: grid;
}

.solution-panel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #fff;
}

.solution-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.solution-panel--eolic::before {
  background: linear-gradient(90deg, rgba(3, 18, 32, 0.88), rgba(3, 18, 32, 0.42));
}

.solution-panel--solar::before {
  background: linear-gradient(90deg, rgba(3, 18, 32, 0.88), rgba(3, 18, 32, 0.36));
}

.solution-panel--oil::before {
  background: linear-gradient(90deg, rgba(3, 18, 32, 0.88), rgba(3, 18, 32, 0.44));
}

.panel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.solution-panel-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.solution-panel h2 {
  color: #fff;
}

.solution-panel p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

/* Admin editable product table */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.editable-products table {
  min-width: 980px;
}

.admin-input {
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.asset-editor {
  display: grid;
  gap: 8px;
  min-width: 240px;
}

.asset-editor img {
  width: 86px;
  height: 70px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.asset-editor a,
.asset-editor span,
.admin-table small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .solution-panel {
    min-height: 480px;
  }
}

/* =========================================================
   GLOBAL FINAL TUNING
   Ajustes generales compartidos: tipografía, header,
   contenedores y transición entre páginas.
   Los estilos por página están en: home.css, catalog.css,
   product.css, admin.css, solutions.css y contact.css.
   ========================================================= */

.page-transition {
  background: rgba(255, 255, 255, 0.82) !important;
  opacity: 0 !important;
  transform: none !important;
  transition: opacity .22s ease !important;
}

body.is-leaving .page-transition {
  opacity: 1 !important;
  transform: none !important;
}

.site-nav,
.site-nav a {
  font-weight: 300 !important;
  letter-spacing: .08em;
}

h1 {
  font-size: clamp(38px, 6.2vw, 78px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.035em !important;
}

h2 {
  font-size: clamp(28px, 3.4vw, 46px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
}

h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
}

.page-hero h1 {
  font-size: clamp(34px, 5.4vw, 64px) !important;
}

.hero-content {
  width: 100%;
  max-width: none !important;
}

.hero-content h1,
.hero-content p {
  max-width: 880px;
}

.reveal {
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s ease;
}

.footergap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}



