/* =========================================================
   Ideo Maker — estilos del sitio estático
   ========================================================= */

:root {
  --coral: #ff5151;
  --coral-dark: #ff3f26;
  --magenta: #dd00ff;
  --purple: #5c0f8b;
  --purple-btn: #5d257c;
  --text: #415161;
  --muted: #6b7a89;
  --soft: #f4f5f6;
  --line: #eaeaea;
  --white: #ffffff;
  --shadow: 0 0 15px rgba(0, 0, 0, 0.07);
  --radius: 25px;
  --container: 1200px;
  --font-body: "Karla", system-ui, sans-serif;
  --font-head: "Rubik", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--coral);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover,
a:focus-visible {
  color: var(--coral-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2rem); }
h3 { font-size: clamp(1.35rem, 2.6vw, 1.6rem); }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

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

.section {
  padding-block: 70px;
}

.center {
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}

.skip-link:focus {
  left: 10px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  background: var(--purple-btn);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 26px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-2px);
}

.divider {
  width: 80px;
  height: 3px;
  background: var(--coral);
  border: 0;
  margin: 10px auto 30px;
}

/* =========================================================
   Header
   ========================================================= */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 50px;
}

.social {
  display: flex;
  gap: 12px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social a {
  display: inline-flex;
  color: var(--text);
}

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

.social svg {
  width: 23px;
  height: 23px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.logo img {
  width: 140px;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav > ul {
  display: flex;
  align-items: center;
}

.nav li {
  position: relative;
}

.nav a {
  display: block;
  font-size: 14px;
  color: var(--text);
  padding: 0 20px;
  line-height: 70px;
}

.nav a:hover,
.nav li:hover > a {
  color: var(--magenta);
}

.nav a[aria-current="page"],
.nav li.is-current > a {
  color: var(--coral);
}

.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-top: 2px solid var(--coral);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.has-sub:hover > .sub-menu,
.has-sub:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu a {
  line-height: 1.4;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.sub-menu li:last-child a {
  border-bottom: 0;
}

.sub-toggle {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 921px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .menu-open .nav {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .nav a {
    line-height: 1.4;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
  }

  .has-sub > a::after {
    display: none;
  }

  .sub-toggle {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 50px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--text);
  }

  .sub-toggle::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .has-sub.is-open > .sub-toggle::before {
    transform: rotate(-135deg);
  }

  .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: 0;
    display: none;
    background: var(--soft);
  }

  .has-sub:hover > .sub-menu {
    transform: none;
  }

  .has-sub.is-open > .sub-menu {
    display: block;
  }

  .sub-menu a {
    padding-left: 36px;
    border-bottom: 0;
  }
}

/* =========================================================
   Inicio
   ========================================================= */

.hero-banner {
  padding-block: 40px 30px;
}

.hero-banner img {
  width: 100%;
  border-radius: 12px;
}

.kits-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kits-row a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s;
}

.kits-row a:hover {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .kits-row {
    grid-template-columns: repeat(4, 70%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
  }

  .kits-row a {
    scroll-snap-align: start;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-top: 80px;
}

.feature {
  text-align: center;
}

.feature .img-wrap {
  display: block;
  margin-bottom: 20px;
}

.feature img {
  width: 100%;
  height: 238px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s;
}

.feature .img-wrap:hover img {
  transform: translateY(-6px);
}

.feature .kicker {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.feature h4 a {
  color: var(--text);
}

.feature h4 a:hover {
  color: var(--coral);
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    padding-top: 50px;
  }
}

.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  padding: 60px 0 50px;
}

.counter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  margin-bottom: 14px;
}

.counter-icon svg {
  width: 34px;
  height: 34px;
}

.counter-number {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.2;
  color: var(--purple);
}

.counter-title {
  font-size: 17px;
}

@media (max-width: 767px) {
  .counters {
    grid-template-columns: repeat(2, 1fr);
  }
}

.testimonials-section {
  background: linear-gradient(180deg, var(--purple-btn) 0%, var(--white) 84%);
  padding: 60px 0 40px;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial {
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 6px;
  padding: 40px 30px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.testimonial blockquote {
  margin: 0 0 24px;
  font-size: 15px;
  font-style: italic;
  flex: 1;
}

.testimonial cite {
  font-style: normal;
  display: block;
}

.testimonial cite strong {
  display: block;
  font-family: var(--font-head);
  color: var(--text);
}

.testimonial cite span {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .testimonials {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
}

/* Carrusel infinito de logos */

.logos-section {
  padding: 50px 0 30px;
}

.marquee {
  overflow: hidden;
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 50px;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee.reverse .marquee-track {
  animation-direction: reverse;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}

.wave {
  width: 100%;
  margin-top: 30px;
}

/* =========================================================
   Somos
   ========================================================= */

.about-hero {
  position: relative;
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0) 0%, var(--white) 100%);
  overflow: hidden;
  isolation: isolate;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../uploads/2019/06/hero11-free-img.png") center / cover no-repeat;
  opacity: 0.68;
  mix-blend-mode: luminosity;
  z-index: -1;
}

.about-hero .container {
  max-width: 640px;
}

.what-we-do {
  text-align: center;
  padding: 80px 0;
}

.what-we-do img {
  margin: 40px auto 0;
  border-radius: 12px;
}

.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px 24px;
  text-align: center;
  padding-bottom: 40px;
}

.member img {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.member h4 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.member h4 a {
  color: var(--text);
}

.member h4 a:hover {
  color: var(--coral);
}

.member p {
  font-size: 15px;
  margin: 0;
}

@media (max-width: 900px) {
  .team {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.how .eyebrow {
  color: var(--coral);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 900px) {
  .how {
    grid-template-columns: 1fr;
  }
}

.accordion {
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.accordion details {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 30px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--coral-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  font-size: 1.6rem;
  line-height: 1;
  color: var(--coral);
}

.accordion details[open] summary::after {
  content: "−";
}

.accordion details p {
  padding: 0 30px 28px;
  margin: 0;
}

/* =========================================================
   Tarjetas de recursos (bibliografía, tutoriales, arduino)
   ========================================================= */

.page-title {
  text-align: center;
  padding-block: 50px 10px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.card img {
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.card a:hover img {
  transform: translateY(-4px);
}

.banner img {
  width: 100%;
  border-radius: 12px;
}

/* Slider simple */

.slider {
  position: relative;
  margin-top: 40px;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 20px;
  scrollbar-width: none;
}

.slides::-webkit-scrollbar {
  display: none;
}

.slides img {
  flex: 0 0 calc(50% - 10px);
  scroll-snap-align: start;
  border-radius: 10px;
  object-fit: cover;
}

@media (max-width: 767px) {
  .slides img {
    flex-basis: 100%;
  }
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* =========================================================
   Tienda: catálogo y producto
   ========================================================= */

.shop {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
  padding-block: 50px 70px;
}

.shop-sidebar h2 {
  font-size: 1.2rem;
}

.shop-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-sidebar li {
  border-bottom: 1px solid var(--line);
}

.shop-sidebar a {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: var(--text);
}

.shop-sidebar a:hover,
.shop-sidebar a[aria-current="page"] {
  color: var(--coral);
}

.breadcrumb {
  font-size: 14px;
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--muted);
}

.result-count {
  font-size: 15px;
  color: var(--muted);
}

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.product-card a {
  color: var(--text);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}

.product-card a:hover img {
  opacity: 0.85;
}

.product-card .cat {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.product-card h2 {
  font-size: 1.05rem;
  margin: 2px 0 0;
}

.product-card a:hover h2 {
  color: var(--coral);
}

.shop > *,
.product > *,
.how > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .shop {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    order: 2;
  }
}

@media (max-width: 600px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding-block: 50px;
}

.gallery-main {
  border-radius: 6px;
  overflow: hidden;
  background: var(--soft);
}

.gallery-main img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.gallery-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumbs button.is-active,
.gallery-thumbs button:hover {
  opacity: 1;
  border-color: var(--coral);
}

.gallery-thumbs img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.contact-form {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.contact-form label {
  font-size: 14px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fafafa;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--coral);
  outline-offset: 1px;
  background: var(--white);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-form .btn {
  justify-self: start;
}

.product-meta {
  font-size: 15px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.related {
  padding-bottom: 70px;
}

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

@media (max-width: 900px) {
  .product {
    grid-template-columns: 1fr;
  }

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

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--purple);
  color: var(--white);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 45px 20px;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1.1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
}

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

.site-footer .social svg {
  width: 28px;
  height: 28px;
}

.copyright {
  background: var(--text);
  text-align: center;
  font-size: 14px;
  padding: 16px 20px;
}

@media (max-width: 767px) {
  .footer-cols {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer .social {
    justify-content: center;
  }
}

/* Animación de entrada */

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
