/* ============================================================
   RalkTech — Shared styles (header, footer, componentes comunes)
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
}

p { margin: 0; }

a { color: var(--blue); }

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

.section { padding: 84px 0; }
.section--soft { background: var(--soft); }

.section-head { max-width: 780px; }
.section-head--center { margin: 0 auto; text-align: center; }

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head h2 .accent { color: var(--blue); }

.section-head p {
  margin-top: 14px;
  font-size: 19px;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
}

.eyebrow::before {
  content: "";
  width: 31px;
  height: 5px;
  background: var(--red);
}

.eyebrow--dark { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 200px;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.btn-solid { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-solid:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline { border-color: var(--red); background: var(--white); color: var(--text); }
.btn-outline:hover { background: #fff2f0; }

.btn-ghost { border-color: var(--white); background: transparent; color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--navy);
}

.logo span { color: var(--red); }

.main-nav { display: flex; align-items: center; gap: 26px; }

.main-nav a {
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--red); }

.main-nav a.btn-solid,
.main-nav a.btn-solid:hover { color: var(--white); }

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: transform var(--transition);
}

.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

/* ---------- Dropdown navigation ---------- */
.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-link:hover,
.nav-item.is-current > .nav-link,
.nav-item.is-open > .nav-link { color: var(--red); }

.submenu {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 270px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card-hover);
  display: none;
}

.nav-item.is-open > .submenu { display: block; }

@media (hover: hover) and (min-width: 701px) {
  .nav-item:hover > .submenu { display: block; }
}

.main-nav .submenu a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
}

.main-nav .submenu a:hover { background: var(--soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  --hero-overlay: linear-gradient(90deg, rgba(3, 16, 50, 0.78), rgba(3, 16, 50, 0.42) 55%, rgba(255, 60, 49, 0.2));
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 110px 0 120px;
}

.hero--webservices {
  background-image: var(--hero-overlay),
    url("../assets/img/hero-webservices.webp");
}

.hero--itmanaged {
  background-image: var(--hero-overlay),
    url("../assets/img/hero-itmanaged.webp");
}

.hero--migracion {
  background-image: var(--hero-overlay),
    url("../assets/img/hero-migracion.webp");
}

.hero--onpremise {
  background-image: var(--hero-overlay),
    url("../assets/img/hero-onpremise.jpg");
}

.hero-inner { position: relative; z-index: 1; max-width: 680px; }

.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--white);
}

.hero p {
  margin-top: 24px;
  font-size: 21px;
  line-height: 1.45;
  max-width: 565px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

/* ---------- Intro ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.intro-grid h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 700; }

.intro-grid p { margin-top: 20px; font-size: 20px; color: var(--muted); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 56px;
}

.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.card .icon {
  width: 44px;
  height: 44px;
  color: var(--blue);
  margin-bottom: 18px;
}

.card h3 { font-size: 19px; font-weight: 700; }

.card p { margin-top: 10px; font-size: 16px; color: var(--muted); }

/* ---------- Numbered list (On-Premise características) ---------- */
.num-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 64px;
  margin-top: 48px;
}

.num-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.num-item .num {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--red);
}

.num-item h3 { font-size: 18px; font-weight: 700; }

.num-item p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------- Pros & cons ---------- */
.pros-cons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.pros-cons .panel {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 32px 30px;
}

.pros-cons h3 { font-size: 24px; font-weight: 700; }
.pros-cons .panel--pro h3 { color: var(--red); }
.pros-cons .panel--con h3 { color: var(--blue); }

.pros-cons ul { list-style: none; margin: 8px 0 0; padding: 0; }

.pros-cons li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.pros-cons li:last-child { border-bottom: 0; }

.pros-cons .sign {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  margin-top: 2px;
}

.panel--pro .sign { background: #ffe9e7; color: var(--red); }
.panel--con .sign { background: #e5effb; color: var(--blue); }

.pros-cons strong { font-size: 17px; }

.pros-cons p { font-size: 15.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Tabs (Migración) ---------- */
.tabs {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

.tabs [role="tablist"] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 0;
  padding: 10px 6px;
  font: inherit;
  font-size: 17px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

.tab::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid #ced2d9;
  background: var(--white);
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.tab:hover { color: var(--blue); }

.tab[aria-selected="true"] { color: var(--navy); font-weight: 600; }
.tab[aria-selected="true"]::before { border: 2.5px solid var(--red); }

.tab-panel {
  background: var(--white);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 30px;
  min-height: 140px;
  box-shadow: var(--shadow-card);
}

.tab-panel p { font-size: 18px; line-height: 1.6; }

/* ---------- Tech logos ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
  align-items: center;
  justify-items: center;
}

.tech-grid .tech-logo {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: grid;
  place-items: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.tech-grid .tech-logo:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.tech-grid img { max-height: 74px; width: auto; }

.logo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
  justify-content: center;
}

.chip {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 9px 22px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
}

/* ---------- Why (2 columnas) ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 56px;
}

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-top: 56px;
  counter-reset: step;
}

.step { position: relative; padding-top: 8px; }

.step .step-num {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
}

.step .icon { width: 40px; height: 40px; color: var(--blue); margin: 10px 0 12px; }

.step h3 { font-size: 18px; font-weight: 700; }

.step p { margin-top: 8px; font-size: 15.5px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { text-align: center; }

.cta h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; }

.cta h2 .accent { color: var(--blue); }

.cta p { margin: 16px auto 0; font-size: 19px; color: var(--muted); max-width: 640px; }

.cta .btn { margin-top: 34px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c9d4e8;
  padding: 64px 0 28px;
  font-size: 15.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
}

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

.site-footer p { margin-top: 14px; max-width: 340px; }

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

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

.footer-col li + li { margin-top: 10px; }

.footer-col a { color: #c9d4e8; text-decoration: none; transition: color var(--transition); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #8fa0bf;
}

/* ---------- Contact form ---------- */
.hero--compact { padding: 80px 0 90px; }

.contact-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.form-group { margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.required { margin-left: 4px; color: var(--red); }

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  font: inherit;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 88, 180, 0.15);
}

.services-card {
  margin: 0 0 22px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.services-card legend { padding: 0 8px; font-size: 15px; font-weight: 600; color: var(--navy); }

.checkbox-item { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; }
.checkbox-item input { width: 18px; height: 18px; accent-color: var(--red); }

/* Honeypot: fuera de pantalla, sin display:none (algunos bots lo detectan) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-message { margin-bottom: 22px; padding: 14px 18px; border-radius: 10px; font-weight: 500; }
.form-message[hidden] { display: none; }
.form-message.success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.form-message.error { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

.form-submit { display: flex; justify-content: center; }
.form-submit .btn:disabled { opacity: 0.7; cursor: wait; transform: none; }

@media (max-width: 700px) {
  .contact-form { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

.footer-bottom a { color: #c9d4e8; text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }
.footer-bottom .legal-links { margin: 0; max-width: none; display: flex; gap: 22px; }

.partner-strip { padding: 34px 0; background: var(--white); border-bottom: 1px solid var(--line); }
.partner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 46px; }
.partner-list img { height: 46px; width: auto; max-width: 150px; object-fit: contain; }

.client-wall { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.client-wall li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; place-items: center; transition: box-shadow var(--transition), transform var(--transition); }
.client-wall li:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.client-wall img { width: 100%; max-width: 130px; aspect-ratio: 1; object-fit: contain; }

.card-list { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 16px; }
.card-list li + li { margin-top: 6px; }

/* ---------- Cases, products, policy ---------- */
.card-img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 18px; }

.tech-grid .tech-logo { width: 100%; height: 100%; }

.tech-grid--clients { display: flex; flex-wrap: wrap; justify-content: center; }
.tech-grid--clients .tech-logo { width: calc(25% - 17px); min-height: 112px; }

.case-list { display: grid; gap: 28px; margin-top: 56px; }

.case {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.case--flip .case-media { order: 2; }
.case--text { grid-template-columns: 1fr; }

.case-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.case-body h3 { font-size: 24px; font-weight: 700; margin: 10px 0 14px; }
.case-body p { color: var(--muted); font-size: 16.5px; }
.case-body p + p { margin-top: 12px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.product {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.product:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.product img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  margin-bottom: 14px;
}

.product figcaption { font-family: var(--font-heading); font-weight: 600; font-size: 16px; color: var(--navy); }

.policy { max-width: 900px; }

.policy-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 36px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
}

.policy-meta strong { display: block; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.policy h3 { font-size: 24px; font-weight: 700; margin: 40px 0 14px; }
.policy h3 span { color: var(--red); margin-right: 6px; }
.policy p, .policy li { color: var(--text); font-size: 16.5px; line-height: 1.65; }
.policy p + p { margin-top: 12px; }
.policy ul, .policy ol { margin: 12px 0 0; padding-left: 24px; }
.policy li + li { margin-top: 10px; }
.policy li ul { margin-top: 10px; list-style: circle; }

.policy-table-wrap { overflow-x: auto; }

.policy-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.policy-table th, .policy-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.policy-table th { background: var(--soft); color: var(--navy); font-weight: 600; }

.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 56px; }

.quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}

.quote blockquote { margin: 0 0 20px; font-size: 16px; color: var(--muted); }
.quote figcaption { margin-top: auto; font-size: 15px; color: var(--muted); }
.quote figcaption strong { display: block; font-family: var(--font-heading); font-size: 17px; color: var(--navy); }

.contact-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; margin-top: 28px; font-size: 18px; }
.contact-strip a { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-strip a:hover { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .card-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { gap: 30px; }
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-grid--clients .tech-logo { width: calc(50% - 11px); }
  .intro-grid, .tabs, .case { grid-template-columns: 1fr; }
  .case--flip .case-media { order: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-grid { grid-template-columns: 1fr; }
  .client-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .policy-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .section { padding: 60px 0; }
  .hero { padding: 80px 0; }
  .card-grid, .steps, .num-grid, .pros-cons, .why-grid, .product-grid { grid-template-columns: 1fr; }
  .client-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-card);
  }

  .main-nav.is-open { display: flex; }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 15px 24px;
    border-top: 1px solid var(--line);
  }

  .submenu {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--soft);
  }

  .main-nav .submenu a { padding: 13px 24px 13px 40px; }

  .main-nav a { padding: 15px 24px; border-top: 1px solid var(--line); }

  .main-nav .btn {
    margin: 14px 24px;
    border-top: 0;
    min-width: 0;
  }
}
