/* IKARION WEB - Estilos compartidos */

/* Fuentes */
@font-face {
  font-family: 'Also Sans';
  src: url('fonts/alsosans-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rethink Sans';
  src: url('fonts/RethinkSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #0D0D0D;
  --bg-alt: #1A1A1A;
  --bg-light: #1E1E1E;
  --accent: #92C020;
  --accent-hover: #7EB018;
  --text-primary: #EFEFE7;
  --text-secondary: #CCCCCC;
  --text-muted: #999999;
  --font-primary: 'Also Sans', 'Rethink Sans', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1200px;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header (no fixed: se desplaza con el scroll) */
.header {
  position: relative;
  height: 72px;
  background: transparent;
}

.header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { padding-top: 3rem; }
.logo img { height: 96px; width: auto; display: block; }

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

.nav__link {
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: color 0.2s;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.nav__link:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

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

.btn--secondary {
  background: #2A2A2A;
  color: var(--text-primary);
  padding: 0.5rem 1rem;
}

.btn--secondary:hover { background: #3A3A3A; }

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

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

.btn__arrow {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon__arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-primary);
  border-bottom: 2px solid var(--text-primary);
  transform: rotate(-45deg);
  margin-left: -2px;
}

/* Hero Inicio */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 6rem 1.5rem 8rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #0D0D0D;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.9) 100%);
}

.hero .container {
  margin-left: 0;
  margin-right: auto;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero__headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero__headline .highlight { color: var(--accent); }

.hero__row {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__desc {
  flex: 1;
  min-width: 280px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.hero__btn {
  flex-shrink: 0;
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

.hero__social {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__social-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.hero__social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}

.social-icon:hover { background: var(--accent); color: var(--bg-primary); }

/* Soluciones section */
.section { padding: 5rem 0; }

.section__label {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__title .highlight { color: var(--accent); }

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

.service-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.service-card__image img { width: 100%; height: 100%; object-fit: cover; }

.service-card__image--placeholder {
  background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.service-card__body { padding: 1.5rem; }

.service-card__title {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.service-card__cta:hover { color: var(--accent); }

/* Paneles Solares / About */
.paneles {
  background: var(--bg-alt);
}

.paneles__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.paneles__image {
  border-radius: var(--radius);
  overflow: hidden;
}

.paneles__image img { width: 100%; height: auto; }

.paneles__content .section__title { text-align: left; }

.paneles__content .section__title .highlight { color: var(--accent); }

.paneles__text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Stats / Progress */
.stats-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.stats-section__left { max-width: 400px; }

.stats-section__text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.progress-item { margin-bottom: 1.5rem; }

.progress-item__label { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.25rem; }

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-light);
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 4px;
}

.progress-bar__fill--green { background: var(--accent); }
.progress-bar__fill--white { background: var(--text-primary); }

.stats-section__image {
  border-radius: var(--radius);
  overflow: hidden;
}

.stats-section__image img { width: 100%; height: auto; }

/* CTA Banner */
.cta-banner {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 2rem;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a2a1a 0%, #0D0D0D 100%);
}

.cta-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cta-banner__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cta-banner__text {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.cta-banner__text .highlight { color: var(--accent); }

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 4rem 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: auto repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer__logo img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.footer ul { list-style: none; }

.footer li { margin-bottom: 0.5rem; }

.footer a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer a:hover { color: var(--accent); }

.footer__contact p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.footer__social-icons,
.footer__chat-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Menu toggle móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .nav.nav--open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle { display: flex; }

  .paneles__grid,
  .stats-section__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .paneles__image { order: 0; }
  .paneles__content { order: 1; }
  .stats-section__image { order: 0; }
  .stats-section__left { order: 1; }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========== Skeleton & Loader (Design System) ========== */
@keyframes skeleton-shimmer {
  to { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes load-bar {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(150%); }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-light) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--bg-light) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

.skeleton-line {
  height: 1rem;
  width: 100%;
}

.skeleton-line--short { max-width: 60%; }
.skeleton-line--title { height: 1.75rem; }
.skeleton-line--sm { height: 0.75rem; }

.skeleton-title {
  height: 2rem;
  width: 70%;
  margin-bottom: 1rem;
}

.skeleton-image {
  aspect-ratio: 16/10;
  width: 100%;
}

.skeleton-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 320px;
}

.skeleton-card .skeleton-image { border-radius: 0; }
.skeleton-card__body { padding: 1.25rem; }
.skeleton-card__body .skeleton-line { margin-bottom: 0.75rem; }
.skeleton-card__body .skeleton-line:last-of-type { width: 40%; margin-bottom: 0; }

.skeleton-btn {
  height: 2.75rem;
  width: 10rem;
  border-radius: 6px;
}

/* Spinner (loader circular) */
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Loader bar (barra indeterminada) */
.loader-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-light);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: load-bar 1.5s ease-in-out infinite;
}

/* Contenedores de skeleton por página */
.page-skeleton { padding: 2rem 0; }
.page-skeleton .container { padding: 0 1.5rem; }

.page-skeleton--inicio .skeleton-hero { margin-bottom: 3rem; }
.page-skeleton--inicio .skeleton-hero .skeleton-title { width: 85%; height: 2.5rem; margin-bottom: 1rem; }
.page-skeleton--inicio .skeleton-hero .skeleton-line { margin-bottom: 0.5rem; }
.page-skeleton--inicio .skeleton-hero .skeleton-btn { margin-top: 1rem; }

.page-skeleton--inicio .skeleton-cards-grid,
.page-skeleton--soluciones .skeleton-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.page-skeleton--contacto .skeleton-form .skeleton-line { margin-bottom: 1rem; }
.page-skeleton--contacto .skeleton-form .skeleton-line--title { margin-bottom: 1.5rem; }
.page-skeleton--contacto .skeleton-form .skeleton-btn { margin-top: 1rem; }

.page-skeleton--servicio .skeleton-block { margin-bottom: 2rem; }
.page-skeleton--servicio .skeleton-block .skeleton-image { aspect-ratio: 4/3; max-width: 600px; margin-bottom: 1rem; }
.page-skeleton--servicio .skeleton-block .skeleton-line { margin-bottom: 0.5rem; }

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