/* ============================
   VARIABLES & RESET
   ============================ */
:root {
  --blue:      #004AAD;
  --blue-l:    #0057cc;
  --blue-d:    #003380;
  --red:       #D90000;
  --red-l:     #ff1a1a;
  --dark:      #ffffff;
  --dark2:     #f4f6fa;
  --dark3:     #edf0f6;
  --text:      #3a3a4a;
  --text-dim:  #6b7280;
  --border:    rgba(0,0,0,0.08);
  --heading:   #0d1b2e;
  --radius:    12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: var(--heading);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 90px 0; }
.section-alt { background: var(--dark2); }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.22s;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-l); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,74,173,0.35); }

.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover { background: #1dbb55; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.3); }

.btn-full { width: 100%; justify-content: center; }

/* ============================
   NAVBAR
   ============================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13,13,13,0.0);
  backdrop-filter: blur(0px);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
  height: 72px;
}

#navbar.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

/* Logo blanco sobre el hero oscuro (sin scroll) */
#navbar:not(.scrolled) .nav-logo img,
#navbar:not(.scrolled) .nav-container .nav-logo img {
  filter: brightness(0) invert(1) opacity(0.95);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s;
  letter-spacing: 0.3px;
}

.nav-links a:hover { color: var(--heading); }

/* Navbar sobre el hero oscuro (sin scroll) */
#navbar:not(.scrolled) .nav-links a:not(.nav-cta) { color: rgba(255,255,255,0.9); }
#navbar:not(.scrolled) .nav-links a:not(.nav-cta):hover { color: #fff; }
#navbar:not(.scrolled) .nav-links a.active { color: #fff; }

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 7px;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--blue-l) !important; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================
   HERO
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(0,74,173,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(217,0,0,0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 90%, rgba(0,74,173,0.05) 0%, transparent 50%),
    #f4f6fa;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8,20,38,0.92) 0%, rgba(8,20,38,0.72) 40%, rgba(0,74,173,0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}
.hero-badge i { color: #fff; font-size: 14px; }

.hero-content h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -2px;
  color: #fff;
}

.hero-content h1 em {
  font-style: normal;
  color: #ff3b3b;
  display: inline-block;
  position: relative;
}
.hero-content h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 3px;
  background: #ff3b3b;
  border-radius: 2px;
  opacity: 0.4;
}

.hero-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-stat { text-align: left; }
.hero-stat-num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat span { font-size: 12px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; font-family: 'Montserrat', sans-serif; }
.hero-stat-div { width: 1px; height: 40px; background: rgba(255,255,255,0.25); }

.hero-scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  animation: bounce 2s infinite;
  z-index: 2;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================
   MARQUEE
   ============================ */
.marquee-bar {
  background: var(--blue);
  overflow: hidden;
  padding: 13px 0;
}

.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  padding: 0 20px;
}

.marquee-track .dot {
  color: rgba(255,255,255,0.35);
  padding: 0 4px;
}

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

/* ============================
   SECTION HEADERS
   ============================ */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-header h2 em {
  font-style: normal;
  color: var(--blue);
}

.section-sub {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.75;
}

/* ============================
   PRODUCTOS
   ============================ */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.producto-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.producto-card:hover {
  border-color: rgba(0,74,173,0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.producto-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(0,74,173,0.08);
  border: 1px solid rgba(0,74,173,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--blue);
  flex-shrink: 0;
}

.producto-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.producto-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.producto-card ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.producto-card ul li {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}

.producto-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.producto-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  margin-top: 6px;
  transition: gap 0.2s, color 0.2s;
}
.producto-link:hover { gap: 10px; color: var(--blue-d); }

/* ============================
   SERVICIOS
   ============================ */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.servicio-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.servicio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  opacity: 0;
  transition: opacity 0.3s;
}

.servicio-card:hover { border-color: rgba(0,74,173,0.3); transform: translateY(-4px); }
.servicio-card:hover::before { opacity: 1; }

.servicio-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  position: absolute;
  top: 16px; right: 20px;
  line-height: 1;
  user-select: none;
}

.servicio-icon {
  font-size: 1.8rem;
  color: var(--red);
  margin-bottom: 16px;
}

.servicio-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.servicio-card p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ============================
   SECTORES
   ============================ */
.sectores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sector-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  cursor: default;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.sector-card:hover {
  border-color: rgba(0,74,173,0.5);
  background: rgba(0,74,173,0.06);
  transform: translateY(-3px);
}

.sector-card i {
  font-size: 2rem;
  color: var(--blue);
}

.sector-card span {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--heading);
}

/* ============================
   NOSOTROS
   ============================ */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.nosotros-text .section-tag { display: block; margin-bottom: 10px; }

.nosotros-text h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.nosotros-text h2 em { font-style: normal; color: var(--blue); }

.nosotros-lead {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 32px;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 32px;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(0,74,173,0.08);
  border: 1px solid rgba(0,74,173,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--blue);
  flex-shrink: 0;
}

.why-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.why-item p {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.nosotros-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nosotros-imagen {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.nosotros-imagen img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.nosotros-card-big {
  background: linear-gradient(135deg, rgba(0,74,173,0.08), rgba(0,74,173,0.03));
  border: 1px solid rgba(0,74,173,0.15);
  border-radius: var(--radius);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.nosotros-card-big i {
  font-size: 4rem;
  color: var(--blue);
  opacity: 0.7;
}

.nosotros-card-big span {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dim);
}

.nosotros-cards-sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.nosotros-card-sm {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nosotros-card-sm i {
  font-size: 1.2rem;
  color: var(--red);
}

.nosotros-card-sm span {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

/* ============================
   CONTACTO
   ============================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.contacto-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.contacto-icon {
  width: 44px; height: 44px;
  background: rgba(0,74,173,0.08);
  border: 1px solid rgba(0,74,173,0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--blue);
  flex-shrink: 0;
}

.contacto-item > div span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-family: 'Montserrat', sans-serif;
}

.contacto-item a, .contacto-item p {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
}
.contacto-item a:hover { color: #fff; }

.contacto-redes {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.red-social {
  width: 40px; height: 40px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-dim);
  transition: all 0.2s;
}
.red-social:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.contacto-form {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--dark3);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
}

.form-group select option { background: var(--dark3); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-ok {
  display: none;
  text-align: center;
  padding: 12px;
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  border-radius: 8px;
  color: #25D366;
  font-size: 13px;
  margin-top: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}
.form-ok.show { display: block; }

/* ============================
   FOOTER
   ============================ */
footer {
  background: #0d1b2e;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: brightness(0) invert(1) opacity(0.9);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-redes {
  display: flex;
  gap: 8px;
}

.footer-redes a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-dim);
  transition: all 0.2s;
}
.footer-redes a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col ul li a,
.footer-col ul li {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================
   WHATSAPP FLOAT
   ============================ */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37,211,102,0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  animation: wa-pulse 3s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 28px rgba(37,211,102,0.55); animation: none; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.35); }
  50% { box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 0 0 10px rgba(37,211,102,0); }
}

/* ============================
   NUBEXWEB FLOAT (marca de agua)
   ============================ */
.nubex-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  background: rgba(8,20,38,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.30);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}
.nubex-float .nubex-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff3b3b;
  flex-shrink: 0;
}
.nubex-float:hover { transform: scale(1.05); box-shadow: 0 10px 26px rgba(0,0,0,0.4); }
.nubex-float.scrolled {
  opacity: 0.05;
  background: rgba(8,20,38,0.4);
  pointer-events: auto;
}
.nubex-float.scrolled:hover { opacity: 1; background: rgba(8,20,38,0.92); }

@media (max-width: 640px) {
  .nubex-float { bottom: 24px; left: 24px; padding: 9px 13px; font-size: 0.7rem; }
}

/* ============================
   SCROLL REVEAL
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .productos-grid { grid-template-columns: repeat(2, 1fr); }
  .servicios-grid { grid-template-columns: repeat(2, 1fr); }
  .sectores-grid  { grid-template-columns: repeat(4, 1fr); }
  .nosotros-grid  { grid-template-columns: 1fr; gap: 40px; }
  .nosotros-visual { order: -1; }
  .nosotros-card-big { padding: 32px; }
  .contacto-grid  { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 15px; }
  #navbar:not(.scrolled) .nav-links.open a:not(.nav-cta) { color: var(--heading); }
  #navbar:not(.scrolled) .nav-links.open a:not(.nav-cta):hover { color: var(--blue); }
  .nav-links.open a.active { color: var(--blue); }
  .nav-cta { text-align: center; }

  .hero-content { padding-top: 100px; }
  .hero-content h1 { font-size: 2.8rem; }

  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.6rem; }

  .productos-grid { grid-template-columns: 1fr; }
  .servicios-grid { grid-template-columns: 1fr; }
  .sectores-grid  { grid-template-columns: repeat(2, 1fr); }

  .nosotros-cards-sm { grid-template-columns: 1fr 1fr; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .sectores-grid { grid-template-columns: 1fr 1fr; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
}

/* ============================
   FILOSOFÍA Y COMPROMISO
   ============================ */
.filosofia {
  background: var(--heading);
  color: var(--text-dim);
}
.filosofia .section-tag { color: var(--red); }
.filosofia .section-header h2 { color: #fff; }
.filosofia .section-header h2 em { color: var(--blue-l); }

.filosofia-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
}

.filosofia-texto .section-header {
  text-align: left;
  margin: 0 0 26px;
}

.filosofia-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 1.02rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.82);
}
.filosofia-content strong {
  color: #fff;
  font-weight: 700;
}

.filosofia-imagen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filosofia-imagen img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.filosofia-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(0,74,173,0.35), rgba(0,74,173,0.12));
  border: 1px solid rgba(0,74,173,0.4);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 14px 18px;
  border-radius: 10px;
}
.filosofia-caption i { color: var(--blue-l); font-size: 1.2rem; flex-shrink: 0; }

.filosofia-industrias {
  margin-top: 32px;
  text-align: left;
}
.filosofia-industrias h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--red);
  margin-bottom: 20px;
}
.filosofia-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.filosofia-tags span {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 18px;
  border-radius: 50px;
  transition: border-color 0.25s, background 0.25s;
}
.filosofia-tags span:hover {
  border-color: var(--blue-l);
  background: rgba(0,74,173,0.2);
}
.filosofia-tags span a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .filosofia-grid { grid-template-columns: 1fr; gap: 40px; }
  .filosofia-imagen { order: -1; }
  .filosofia-imagen img { height: 400px; }
}

/* ============================
   PÁGINAS INTERNAS (productos/servicios/sectores)
   ============================ */
.nav-links a.active {
  color: var(--blue);
}
.nav-links a.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  margin-top: 3px;
}
#navbar.scrolled + * .nav-cta,
.nav-links .nav-cta { color: #fff !important; }

/* Hero compacto para páginas internas */
.page-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.page-hero .hero-content { padding-top: 120px; }
.page-hero .hero-content h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.page-hero.vial-hero .hero-content { padding-top: 90px; }

/* Lista interna de tarjetas de servicio */
.servicio-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.servicio-list li {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}
.servicio-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

/* Detalle de sectores en página interna */
.sectores-detalle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.sector-detalle-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.sector-detalle-card:hover {
  border-color: rgba(0,74,173,0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.sector-detalle-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(0,74,173,0.08);
  border: 1px solid rgba(0,74,173,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--blue);
}
.sector-detalle-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.sector-detalle-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}

@media (max-width: 1024px) {
  .sectores-detalle { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sectores-detalle { grid-template-columns: 1fr; }
  .page-hero .hero-content { padding-top: 100px; }
  .page-hero .hero-content h1 { font-size: 2.6rem; }
}

/* ============================
   CATÁLOGO DE PRODUCTOS (galería + buscador)
   ============================ */
.prod-toolbar {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}
.prod-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.prod-search-wrap i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
}
.prod-search {
  width: 100%;
  padding: 15px 20px 15px 48px;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.prod-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,74,173,0.12);
  background: #fff;
}
.prod-count {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.prod-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.10);
  border-color: rgba(0,74,173,0.35);
}
.prod-img {
  background: var(--dark3);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.prod-index {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--blue);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  padding: 3px 9px;
  border-radius: 999px;
}
.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}
.prod-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.prod-cat {
  align-self: flex-start;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(0,74,173,0.08);
  padding: 4px 10px;
  border-radius: 999px;
}
.prod-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.prod-body p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.prod-wa:hover { background: #1ebe5d; color: #fff; }
.prod-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-dim);
}
.prod-load-more {
  text-align: center;
  padding: 32px 0;
}
.prod-load-more .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.prod-empty i { font-size: 2.2rem; color: var(--blue); display: block; margin-bottom: 12px; }

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

/* ===== Tarjetas de categoría (índice de productos) ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  position: relative;
  display: block;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition: transform 0.3s, box-shadow 0.3s;
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,14,26,0.35) 0%, rgba(8,14,26,0.85) 75%);
  transition: background 0.3s;
}
.cat-card:hover .cat-overlay { background: linear-gradient(180deg, rgba(0,74,173,0.45) 0%, rgba(8,14,26,0.9) 75%); }
.cat-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 26px;
  color: #fff;
}
.cat-body i {
  font-size: 1.9rem;
  color: var(--blue);
  margin-bottom: 12px;
  background: rgba(255,255,255,0.12);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.cat-body h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; color: #fff; text-transform: uppercase; }
.cat-body p { font-size: 0.9rem; line-height: 1.55; opacity: 0.9; margin-bottom: 14px; }
.cat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.cat-link i { font-size: 1.1rem; margin: 0; background: none; width: auto; height: auto; }
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { min-height: 260px; }
}

/* ===== Sección de descargas ===== */
.descargas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.descarga-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.descarga-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
  border-color: rgba(0,74,173,0.35);
}
.descarga-info { display: flex; align-items: center; gap: 16px; min-width: 0; }
.descarga-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  background: rgba(0,74,173,0.08);
  border: 1px solid rgba(0,74,173,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--blue);
}
.descarga-info h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.descarga-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.22s, transform 0.22s;
}
.descarga-btn:hover { background: var(--blue-l); transform: translateY(-2px); }
@media (max-width: 900px) {
  .descargas-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .descarga-card { flex-direction: column; align-items: flex-start; }
  .descarga-btn { width: 100%; justify-content: center; }
}
