/* =========================================================
   SERVODRIVE ROBOTICS - ESTILO PRINCIPAL
   Web industrial, moderna, profesional e intuitiva
   ========================================================= */

/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #161616;
  line-height: 1.6;
}

/* VARIABLES DE COLOR */
:root {
  --black: #090909;
  --dark: #121212;
  --dark-soft: #1b1b1d;
  --red: #d71920;
  --red-dark: #a80f15;
  --white: #ffffff;
  --light: #f4f5f7;
  --gray: #707070;
  --gray-soft: #e6e8ec;
  --border: #d8dce2;
  --text: #161616;
  --muted: #5f6368;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  --radius: 18px;
}

/* CONTENEDOR GENERAL */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ENLACES */
a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================================
   CABECERA
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 9, 9, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

/* LOGO + MARCA */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  letter-spacing: 1px;
}

.brand-text span {
  font-size: 18px;
  font-weight: 800;
}

.brand-text small {
  margin-top: 4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

/* MENÚ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  color: #f2f2f2;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.2s ease;
}

.main-nav a:hover {
  background: var(--red);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: var(--red);
  color: var(--white);
  border: none;
  font-size: 24px;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  cursor: pointer;
}

/* =========================================================
   PORTADA
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(215, 25, 32, 0.28), transparent 35%),
    linear-gradient(135deg, #050505 0%, #141414 45%, #202020 100%);
  padding: 100px 0 85px;
}

/* líneas industriales decorativas */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: 40px;
  background: radial-gradient(circle, rgba(215, 25, 32, 0.32), transparent 65%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 45px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-description {
  max-width: 700px;
  color: #d8d8d8;
  font-size: 18px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points span {
  color: #eeeeee;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 9px 13px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(14px);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
  margin-bottom: 22px;
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(215, 25, 32, 0.18);
}

.hero-card ul {
  list-style: none;
}

.hero-card li {
  position: relative;
  padding: 14px 0 14px 30px;
  color: #eeeeee;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-card li:last-child {
  border-bottom: none;
}

.hero-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 900;
}

/* =========================================================
   BOTONES
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
  text-align: center;
}

.btn-primary {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}

.btn-secondary:hover {
  border-color: var(--red);
  background: rgba(215,25,32,0.16);
  transform: translateY(-2px);
}

.btn-outline {
  color: var(--text);
  border-color: var(--border);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-outline-light {
  color: var(--white);
  border-color: rgba(255,255,255,0.28);
  background: transparent;
}

.btn-outline-light:hover {
  border-color: var(--red);
  background: rgba(215,25,32,0.16);
}

.btn-small {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 12px;
  border-radius: 10px;
}

/* =========================================================
   SECCIONES
   ========================================================= */

.section {
  padding: 82px 0;
  background: var(--white);
}

.section-light {
  background: var(--light);
}

.section-dark {
  background:
    radial-gradient(circle at top right, rgba(215,25,32,0.24), transparent 35%),
    linear-gradient(135deg, #080808, #1b1b1d);
  color: var(--white);
}

.section-title {
  max-width: 820px;
  margin-bottom: 38px;
}

.section-title h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.12;
  margin-bottom: 14px;
  letter-spacing: -0.8px;
}

.section-title p {
  color: var(--muted);
  font-size: 17px;
}

.light-title p {
  color: #d8d8d8;
}

.light-title h2 {
  color: var(--white);
}

/* =========================================================
   BUSCADOR
   ========================================================= */

.search-section {
  padding: 58px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--gray-soft);
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.search-box input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  padding: 12px;
  font-size: 16px;
  color: var(--text);
}

.search-results {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.search-result-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--red);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
}

.search-result-item strong {
  display: block;
  margin-bottom: 6px;
}

.search-result-item a {
  color: var(--red);
  font-weight: 800;
}

.no-results {
  padding: 16px;
  border-radius: 14px;
  background: #fff4f4;
  color: #8a1217;
  border: 1px solid #ffd2d2;
}

/* =========================================================
   TARJETAS DE INFORMACIÓN
   ========================================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.07);
  transition: 0.22s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: rgba(215,25,32,0.4);
  box-shadow: 0 22px 42px rgba(0,0,0,0.12);
}

.info-card h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.info-card p {
  color: var(--muted);
  margin-bottom: 18px;
}

.info-card a {
  color: var(--red);
  font-weight: 900;
}

/* =========================================================
   CATEGORÍAS Y PRODUCTOS
   ========================================================= */

.category-block {
  margin-top: 44px;
}

.category-block > h3 {
  font-size: 26px;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 5px solid var(--red);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.08);
  transition: 0.22s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(215,25,32,0.45);
  box-shadow: 0 22px 48px rgba(0,0,0,0.14);
}

.product-card img {
  width: 100%;
  height: 205px;
  object-fit: cover;
  background:
    linear-gradient(135deg, #222, #111);
  border-bottom: 4px solid var(--red);
}

.product-content {
  padding: 22px;
}

.tag {
  display: inline-flex;
  width: fit-content;
  color: var(--white);
  background: var(--red);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.product-content h4 {
  font-size: 20px;
  margin-bottom: 10px;
}

.product-content p {
  color: var(--muted);
  margin-bottom: 18px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.dark-card {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

.dark-card .product-content h4 {
  color: var(--white);
}

.dark-card .product-content p {
  color: #d8d8d8;
}

/* =========================================================
   SOFTWARE / FEATURE
   ========================================================= */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 34px;
  align-items: center;
}

.feature-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.feature-content h3 {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-content p {
  color: var(--muted);
  margin-bottom: 20px;
}

.check-list {
  list-style: none;
  margin-bottom: 26px;
}

.check-list li {
  position: relative;
  padding: 9px 0 9px 30px;
  color: var(--text);
  border-bottom: 1px solid var(--gray-soft);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 900;
}

.feature-panel {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.feature-panel img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: #1b1b1d;
  border-bottom: 4px solid var(--red);
}

.feature-panel > div {
  padding: 24px;
}

.feature-panel h4 {
  font-size: 22px;
  margin-bottom: 10px;
}

.feature-panel p {
  color: var(--muted);
  margin-bottom: 18px;
}

/* =========================================================
   COMPONENTES / CHIPS
   ========================================================= */

.chips,
.sector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chips span,
.sector-grid span {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.section-dark .sector-grid span {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

/* =========================================================
   ASISTENTE RÁPIDO
   ========================================================= */

.assistant-box {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.assistant-options {
  display: grid;
  gap: 12px;
}

.assistant-option {
  min-height: 54px;
  text-align: left;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--red);
  border-radius: 14px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.assistant-option:hover,
.assistant-option.active {
  background: var(--dark);
  color: var(--white);
  transform: translateX(4px);
}

.assistant-response {
  background:
    radial-gradient(circle at top right, rgba(215,25,32,0.18), transparent 34%),
    linear-gradient(135deg, #101010, #202020);
  color: var(--white);
  border-radius: 22px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
}

.assistant-response h3 {
  font-size: 26px;
  margin-bottom: 12px;
}

.assistant-response p {
  color: #e0e0e0;
  margin-bottom: 18px;
}

.assistant-response ul {
  margin: 16px 0 22px 20px;
  color: #e6e6e6;
}

.assistant-response li {
  margin-bottom: 8px;
}

/* =========================================================
   CONTACTO
   ========================================================= */

.contact-section {
  background:
    linear-gradient(135deg, #ffffff 0%, #f1f2f4 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 34px;
  align-items: center;
}

.contact-grid h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.contact-grid p {
  color: var(--muted);
  font-size: 17px;
}

.contact-card {
  background: var(--dark);
  color: var(--white);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--red);
}

.contact-card h3 {
  font-size: 25px;
  margin-bottom: 18px;
}

.contact-card p {
  color: #dddddd;
  margin: 8px 0;
}

.email-link {
  display: inline-block;
  color: var(--white);
  font-weight: 900;
  margin-bottom: 18px;
  word-break: break-word;
}

.email-link:hover {
  color: var(--red);
}

/* =========================================================
   BOTONES FLOTANTES
   ========================================================= */

.floating-help {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 999;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(215,25,32,0.35);
  transition: 0.2s ease;
}

.floating-help:hover {
  background: var(--red-dark);
  transform: translateY(-3px);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--dark);
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0,0,0,0.25);
  display: none;
}

.back-to-top.show {
  display: block;
}

.back-to-top:hover {
  background: var(--red);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: #050505;
  color: #cfcfcf;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

.footer-inner a {
  color: var(--white);
  font-weight: 800;
}

.footer-inner a:hover {
  color: var(--red);
}

/* =========================================================
   ELEMENTOS PARA BUSCADOR / JS
   ========================================================= */

.hidden-by-search {
  display: none !important;
}

/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 980px) {
  .header-inner {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 14px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 14px;
    background: rgba(255,255,255,0.06);
  }

  .hero-grid,
  .feature-grid,
  .assistant-box,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 78px 0 66px;
  }
}

/* =========================================================
   RESPONSIVE - MÓVIL
   ========================================================= */

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-text span {
    font-size: 15px;
  }

  .brand-text small {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-description {
    font-size: 16px;
  }

  .section {
    padding: 62px 0;
  }

  .cards-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card img {
    height: 190px;
  }

  .hero-actions,
  .product-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .floating-help {
    left: 12px;
    right: 12px;
    bottom: 78px;
    text-align: center;
  }

  .back-to-top {
    right: 16px;
    bottom: 20px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}