/* ==========================================================================
   Grupo Tecnológico Data — hoja de estilos principal
   Paleta derivada del logo: rojo, negro, gris, blanco.
   ========================================================================== */

:root {
  --red: #ff0000;
  --red-dark: #c40000;
  --red-darker: #960000;
  --black: #0d0d0d;
  --gray: #96989a;
  --gray-light: #f4f4f5;
  --gray-mid: #d9d9db;
  --gray-dark: #3a3a3c;
  --white: #ffffff;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.18);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0 0 16px;
}

p { margin: 0 0 16px; }

a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--red-dark); }

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

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

section { padding: 72px 0; }

.section-light { background: var(--gray-light); }
.section-dark { background: var(--black); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--gray-dark); }
.section-dark .section-head p { color: var(--gray-mid); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.25);
}
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--black); }
.btn-dark {
  background: var(--black);
  color: var(--white);
}
.btn-dark:hover { background: var(--gray-dark); color: var(--white); }

/* ==========================================================================
   Header / Navegación
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--gray-mid);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo { width: 48px; height: 48px; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-heading);
  color: var(--black);
}
.brand-text strong { font-size: 1rem; font-weight: 700; }
.brand-text small { font-size: 0.78rem; letter-spacing: 3px; color: var(--red); font-weight: 600; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  color: var(--black);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width var(--transition);
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--red); }
.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 0, 0, 0.12), transparent 45%),
    linear-gradient(180deg, var(--white) 0%, var(--gray-light) 100%);
  padding: 100px 0 90px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}
.hero h1 span { color: var(--red); }
.hero p.lead {
  font-size: 1.1rem;
  color: var(--gray-dark);
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art .ring {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 90%;
  aspect-ratio: 1;
  border: 2px dashed var(--gray-mid);
  border-radius: 50%;
}
.hero-art img {
  width: 65%;
  filter: drop-shadow(var(--shadow-strong));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-mid);
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--red);
}
.stat span { color: var(--gray-dark); font-size: 0.9rem; }

/* ==========================================================================
   Tarjetas de servicios
   ========================================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}
.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--red);
  color: var(--white);
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; fill: currentColor; }
.service-icon.photo {
  width: calc(100% + 52px);
  height: 190px;
  margin: -32px -26px 20px -26px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: none;
  overflow: hidden;
}
.service-icon.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.service-card h3 { font-size: 1.15rem; }
.service-card p { color: var(--gray-dark); font-size: 0.95rem; margin-bottom: 0; }
.service-card .service-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

.service-detail {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--gray-mid);
  scroll-margin-top: 96px;
}
.service-detail:last-child { border-bottom: none; }
.service-detail .service-icon { width: 64px; height: 64px; margin-bottom: 0; }
.service-detail .service-icon.photo {
  width: 100%;
  height: 170px;
  margin: 0;
  border-radius: var(--radius);
}
.service-detail h3 { font-size: 1.3rem; }
.service-detail ul { margin-top: 12px; }
.service-detail ul li {
  position: relative;
  padding-left: 22px;
  color: var(--gray-dark);
  margin-bottom: 8px;
}
.service-detail ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* ==========================================================================
   Quiénes somos
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.about-art {
  background: var(--black);
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-art img { width: 70%; }
.about-art.photo { background: none; padding: 0; overflow: hidden; height: 420px; }
.about-art.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-strong); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.value-card h3 { font-size: 1.1rem; }
.value-card p { color: var(--gray-dark); margin-bottom: 0; font-size: 0.95rem; }

/* ==========================================================================
   Página de detalle de servicio (feature rows)
   ========================================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-dark);
}
.back-link:hover { color: var(--red); }

.feature-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--gray-mid);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse .feature-media { order: 2; }
.feature-row.reverse .feature-content { order: 1; }

.feature-media {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.feature-media::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px dashed var(--gray-mid);
  border-radius: 50%;
}
.feature-icon {
  position: relative;
  width: 84px;
  height: 84px;
  background: var(--red);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.feature-icon svg { width: 42px; height: 42px; fill: var(--white); }

.feature-media.photo {
  background: none;
  border: none;
  padding: 0;
  height: 320px;
}
.feature-media.photo::before { display: none; }
.feature-media.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-content h2 { font-size: 1.35rem; margin-bottom: 10px; }
.feature-content > p { color: var(--gray-dark); }
.feature-list { margin-top: 6px; }
.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--gray-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* ==========================================================================
   CTA banda
   ========================================================================== */
.cta-band {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 64px 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 12px; }
.cta-band p { color: var(--gray-mid); max-width: 520px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { color: var(--gray-dark); margin-bottom: 0; font-size: 0.95rem; }

.map-embed {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: var(--radius);
  margin-top: 10px;
}

form.contact-form {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.8rem; color: var(--gray-dark); margin-top: 10px; }

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.alert-success { background: #e6f7ec; color: #1b7a3d; border: 1px solid #b7e7c6; }
.alert-error { background: #fdeaea; color: #a30000; border: 1px solid #f4b8b8; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--black);
  color: var(--gray-mid);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-logo { width: 56px; height: 56px; margin-bottom: 14px; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-col a { color: var(--gray-mid); }
.footer-col a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 200;
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ==========================================================================
   Página interior genérica (encabezados de página)
   ========================================================================== */
.page-hero {
  background: var(--black);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 8px; }
.page-hero p { color: var(--gray-mid); margin-bottom: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .feature-row { grid-template-columns: 1fr; padding: 32px 0; }
  .feature-row.reverse .feature-media,
  .feature-row.reverse .feature-content { order: initial; }
  .feature-media { min-height: 160px; }
  .feature-media.photo { height: 220px; }
  .about-art.photo { height: 280px; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail .service-icon.photo { height: 200px; margin-bottom: 16px; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--gray-mid);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav ul a { display: block; padding: 12px 0; }
  .nav-cta { margin-top: 12px; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }
  .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
