/* ═══════════════════════════════════════════════════════
   MINDS — Modern Redesign
   ═══════════════════════════════════════════════════════ */

:root {
  --red:        #C41E3A;
  --red-dark:   #9B1528;
  --red-light:  #E8304A;
  --dark:       #111318;
  --dark-2:     #1C2028;
  --dark-3:     #252B35;
  --gray:       #6B7280;
  --gray-light: #9CA3AF;
  --border:     #E5E7EB;
  --bg:         #F9FAFB;
  --white:      #FFFFFF;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-h: 72px;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-md: 0 8px 40px rgba(0,0,0,.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.16);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--dark); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px; font-weight: 600;
  font-size: .95rem; letter-spacing: .01em; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red); color: var(--white);
  box-shadow: 0 4px 20px rgba(196,30,58,.35);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(196,30,58,.45); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.btn-full { width: 100%; justify-content: center; }

/* ─── Section commons ─── */
.section-tag {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 12px;
}
.section-tag.light { color: rgba(255,255,255,.7); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; color: var(--dark); }
.section-title.light { color: var(--white); }
.section-sub { margin-top: 16px; font-size: 1.05rem; color: var(--gray); line-height: 1.7; max-width: 560px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .section-sub { margin-left: auto; margin-right: auto; }

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0);
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.brand-logo {
  height: 52px;
  width: auto;
  transition: transform var(--transition);
}
.brand-logo:hover {
  transform: scale(1.02);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 16px; border-radius: 8px;
  font-size: .9rem; font-weight: 500;
  color: rgba(255,255,255,.85); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,.12); }
.navbar.scrolled .nav-link { color: var(--gray); }
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active { color: var(--dark); background: var(--bg); }

.nav-cta {
  background: var(--red) !important; color: var(--white) !important;
  padding: 8px 20px; border-radius: 50px;
  box-shadow: 0 2px 12px rgba(196,30,58,.3);
}
.nav-cta:hover { background: var(--red-dark) !important; transform: translateY(-1px); }

.lang-item {
  display: flex; align-items: center; gap: 8px;
  margin-left: 12px; padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.2);
}
.navbar.scrolled .lang-item { border-left-color: var(--border); }
.lang-flag {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 16px; border-radius: 3px; overflow: hidden;
  opacity: .5; transition: var(--transition);
  border: 1px solid rgba(255,255,255,.2);
}
.navbar.scrolled .lang-flag { border-color: var(--border); }
.lang-flag img { width: 100%; height: 100%; object-fit: cover; }
.lang-flag:hover, .lang-flag.active {
  opacity: 1; transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.navbar.scrolled .nav-toggle span { background: var(--dark); }


/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(17,19,24,.85) 0%, rgba(17,19,24,.5) 60%, rgba(196,30,58,.2) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 24px; padding-top: var(--nav-h);
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 50px;
  background: rgba(196,30,58,.2); border: 1px solid rgba(196,30,58,.4);
  color: rgba(255,255,255,.9); font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0; animation: fadeInUp .6s .2s ease forwards;
}
.hero-title {
  display: flex; flex-direction: column;
  font-size: clamp(2.8rem, 7vw, 6rem); font-weight: 900;
  line-height: 1.05; color: var(--white);
  margin-bottom: 24px;
}
.hero-line { opacity: 0; animation: fadeInUp .6s ease forwards; }
.hero-line:nth-child(1) { animation-delay: .3s; }
.hero-line:nth-child(2) { animation-delay: .45s; }
.hero-line:nth-child(3) { animation-delay: .6s; }
.hero-accent { color: var(--red-light); }

.hero-desc {
  font-size: 1.1rem; color: rgba(255,255,255,.75); line-height: 1.7;
  max-width: 540px; margin-bottom: 36px;
  opacity: 0; animation: fadeInUp .6s .75s ease forwards;
}
.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0; animation: fadeInUp .6s .9s ease forwards;
}

.hero-dots {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; gap: 8px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: var(--transition);
}
.dot.active { background: var(--white); width: 24px; border-radius: 4px; }

.hero-scroll {
  position: absolute; right: 36px; bottom: 36px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,.5); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }


/* ═══════════════════════════════════════
   STATS
═══════════════════════════════════════ */
.stats { background: var(--dark); padding: 64px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 2px;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px; text-align: center;
  border-right: 1px solid rgba(255,255,255,.06);
  transition-delay: calc(var(--i, 0) * .1s);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900;
  color: var(--white); line-height: 1;
}
.stat-suffix { font-size: 2rem; font-weight: 900; color: var(--red); margin-top: -8px; }
.stat-label { font-size: .85rem; color: var(--gray-light); margin-top: 8px; font-weight: 500; letter-spacing: .02em; }


/* ═══════════════════════════════════════
   SERVICIOS
═══════════════════════════════════════ */
.servicios { padding: 120px 0; background: var(--bg); }
.servicios-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 32px;
}
.servicio-card {
  background: var(--white); border-radius: var(--radius);
  padding: 0; border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: var(--transition);
  display: flex; flex-direction: column; overflow: hidden;
  transition-delay: calc(var(--i, 0) * .15s);
}
.servicio-card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.servicio-card:hover .servicio-image {
  transform: scale(1.05);
}

.servicio-image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.servicio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.servicio-content {
  padding: 40px 36px;
  display: flex; flex-direction: column; gap: 16px; flex: 1;
}

.servicio-content h3 {
  font-size: 1.4rem; font-weight: 800; color: var(--dark);
  margin-bottom: 4px; line-height: 1.3;
}
.servicio-subtitle {
  font-size: .95rem; font-weight: 600; color: var(--red);
  margin-bottom: 8px;
}
.servicio-content p { font-size: .95rem; color: var(--gray); line-height: 1.7; }

.servicio-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.servicio-tags li {
  padding: 4px 12px; border-radius: 50px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--gray);
}

.servicio-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  font-size: .9rem; font-weight: 600; color: var(--red);
  transition: var(--transition);
}
.servicio-link svg { width: 16px; height: 16px; transition: transform var(--transition); }
.servicio-link:hover { color: var(--red-dark); }
.servicio-link:hover svg { transform: translateX(4px); }


/* ═══════════════════════════════════════
   CLIENTES
═══════════════════════════════════════ */
.clientes { padding: 100px 0; background: var(--white); overflow: hidden; }
.logos-track-wrapper {
  width: 100%; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.logos-track {
  display: flex; gap: 0; width: max-content;
  animation: marquee 30s linear infinite;
}
.logos-track:hover { animation-play-state: paused; }
.logo-item {
  display: flex; align-items: center; justify-content: center;
  width: 180px; height: 80px; padding: 16px 28px;
  transition: var(--transition);
  flex-shrink: 0;
}
.logo-item:hover { transform: scale(1.05); }
.logo-item img { max-height: 48px; width: auto; object-fit: contain; }

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


/* ═══════════════════════════════════════
   QUIENES SOMOS
═══════════════════════════════════════ */
.quienes { padding: 120px 0; background: var(--bg); }
.quienes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.quienes-img-wrapper {
  position: relative; border-radius: var(--radius);
  overflow: visible;
}
.quienes-img-wrapper img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 4/5;
}
.quienes-badge {
  position: absolute; bottom: -24px; right: -24px;
  background: var(--red); color: var(--white);
  border-radius: var(--radius); padding: 20px 24px;
  text-align: center; box-shadow: 0 8px 30px rgba(196,30,58,.4);
}
.badge-number { display: block; font-size: 2.2rem; font-weight: 900; line-height: 1; }
.badge-text { display: block; font-size: .75rem; font-weight: 500; opacity: .85; margin-top: 4px; line-height: 1.4; }

.quienes-text { display: flex; flex-direction: column; gap: 20px; }
.quienes-lead { font-size: 1.2rem; font-weight: 600; color: var(--dark); line-height: 1.6; }
.quienes-lead em { font-style: italic; color: var(--red); }
.quienes-body { font-size: 1rem; color: var(--gray); line-height: 1.8; }

.quienes-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 500; color: var(--dark); }
.feature-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }


/* ═══════════════════════════════════════
   CONTACTO
═══════════════════════════════════════ */
.contacto { padding: 120px 0; background: var(--dark); }
.contacto-grid {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start;
}
.contacto-sub { font-size: 1.05rem; color: rgba(255,255,255,.6); line-height: 1.7; margin-top: 16px; }

.contacto-items { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }
.contacto-item { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center;
  color: var(--white); flex-shrink: 0;
}
.ci-icon svg { width: 20px; height: 20px; }
.ci-text { display: flex; flex-direction: column; gap: 2px; }
.ci-label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.ci-value { font-size: .95rem; color: rgba(255,255,255,.8); }
.ci-link:hover { color: var(--white); text-decoration: underline; }

/* Form */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.7); }
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-family: var(--font); font-size: .95rem; color: var(--white);
  transition: var(--transition); outline: none; resize: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,.3); }
.form-group select option { background: var(--dark-2); color: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red); background: rgba(255,255,255,.09);
  box-shadow: 0 0 0 3px rgba(196,30,58,.2);
}


/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer { background: var(--dark-2); padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-tagline { font-size: .9rem; color: rgba(255,255,255,.4); margin-top: 16px; line-height: 1.6; }
.footer-links h4,
.footer-contact h4 {
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 20px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .9rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-contact p,
.footer-contact a { display: block; font-size: .9rem; color: rgba(255,255,255,.6); margin-bottom: 8px; }
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: 24px 0; text-align: center;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.25); }




/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .servicios-grid { grid-template-columns: 1fr 1fr; }
  .quienes-grid { gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .brand-logo {
    height: 40px;
    max-width: 65vw;
    object-fit: contain;
  }

  .nav-links {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(17,19,24,.98); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: calc(var(--nav-h) + 12px) 24px 24px;
    gap: 8px;
    transform: translateY(-100%); transition: transform var(--transition);
    z-index: 998;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { width: 100%; justify-content: flex-start; color: rgba(255,255,255,.8); }
  .navbar.scrolled .nav-link { color: rgba(255,255,255,.8); }
  .navbar.scrolled .nav-link:hover { color: var(--white); background: rgba(255,255,255,.08); }
  .lang-item {
    margin-left: 0; padding-left: 0; border-left: none;
    margin-top: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1);
    width: 100%; justify-content: flex-start;
  }
  .nav-toggle { display: flex; }

  .hero-title { font-size: clamp(2.2rem, 8vw, 3.5rem); }
  .hero-scroll { display: none; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.06); }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }

  .servicios-grid { grid-template-columns: 1fr; }

  .quienes-grid { grid-template-columns: 1fr; gap: 60px; }
  .quienes-badge { right: 16px; }

  .contacto-grid { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .quienes-features { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   PORTAL ALTERNATIVE MENU DARK OVERRIDES
   ═══════════════════════════════════════ */
.alt-menu, #menu, .navbar-default {
  background-color: #1c2028 !important;
  background: #1c2028 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
  margin-bottom: 0 !important;
}

#menu .navbar-nav > li > a,
.navbar-default .navbar-nav > li > a {
  color: rgba(255, 255, 255, 0.7) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

#menu .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:hover,
#menu .navbar-nav > li.active > a,
.navbar-default .navbar-nav > li.active > a,
.navbar-default .navbar-nav > .active > a, 
.navbar-default .navbar-nav > .active > a:hover, 
.navbar-default .navbar-nav > .active > a:focus {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#menu .navbar-nav > li.active > a:before,
#menu .navbar-nav > li.active > a:after {
  background: #C41E3A !important;
}

.navbar-default .navbar-brand, #menu .navbar-brand {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 10px 15px !important;
}
.navbar-default .navbar-brand img, #menu .navbar-brand img {
  filter: brightness(0) invert(1) !important;
  max-height: 40px !important;
  width: auto !important;
}

