/* ============================================================
   DESBA SA – Making Solutions
   CSS Estático Optimizado · listo para IIS
   ============================================================ */

/* === VARIABLES === */
:root {
  --primary:      #14B6C5;
  --primary-dark: #0fa0ae;
  --black:        #000000;
  --dark:         #111111;
  --navy:         #2a3443;
  --dark-teal:    #1f2a2c;
  --white:        #ffffff;
  --light:        #f4f4f4;
  --gray:         #666666;
  --gray-light:   #999999;
  --text:         #333333;
  --border:       #e0e0e0;
  --font:         'Open Sans', Arial, sans-serif;
  --hdr-height:   70px;
  --ease:         0.25s ease;
  --radius:       4px;
  --shadow:       0 4px 20px rgba(0,0,0,0.08);
}

/* === RESET BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 14px; }
body  { font-family: var(--font); color: var(--text); line-height: 1.75; background: var(--white); }
img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
h1,h2,h3,h4 { line-height: 1.3; font-weight: 600; }
p     { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  height: var(--hdr-height);
  transition: box-shadow var(--ease);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 46px; width: auto; }

/* Nav */
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a {
  font-size: 13px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 8px 11px; border-radius: var(--radius);
  transition: color var(--ease);
}
.nav-list a:hover,
.nav-list a.active { color: var(--primary); }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--gray); border-radius: 2px;
  transition: var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============================================================
   HERO – HOME
   ============================================================ */
.hero {
  position: relative; min-height: calc(100vh - var(--hdr-height));
  display: flex; align-items: center; justify-content: center; text-align: center;
  background-color: var(--dark); background-size: cover; background-position: center;
  color: var(--white); overflow: hidden;
}
.hero-home { background-image: url('../img/hero-bg.webp'); }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}
.hero-content { position: relative; z-index: 1; max-width: 820px; padding: 60px 24px; }
.hero-content h1 {
  font-size: clamp(26px, 4.5vw, 54px); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px;
}
.hero-content p { font-size: 16px; color: rgba(255,255,255,.82); max-width: 640px; margin: 0 auto; }
.hero-content strong { color: var(--white); }

/* ============================================================
   SECCIONES INTERNAS
   ============================================================ */
.section        { padding: 80px 24px; }
.section-white  { background: var(--white); }
.section-black  { background: var(--black); color: var(--white); }
.section-light  { background: var(--light); }
.section-navy   { background: var(--navy); color: var(--white); }
.section-dark   { background: var(--dark-teal); color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; }

.section-title {
  font-size: clamp(19px, 2.5vw, 30px); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 48px; text-align: center;
}
.section-title.on-dark { color: var(--white); }
.section-subtitle { text-align: center; color: var(--gray-light); font-size: 15px; margin-top: -36px; margin-bottom: 48px; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  transition: all var(--ease); cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--dark); }
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }

/* ============================================================
   LAYOUT UTILITARIOS
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.two-col img { border-radius: 8px; width: 100%; object-fit: cover; }
.text-col p { font-size: 14px; color: var(--gray); margin-bottom: 16px; }
.text-col.on-dark p { color: rgba(255,255,255,.82); }

.lead-text { font-size: 20px; font-weight: 700; line-height: 1.5; margin-bottom: 16px; }
.lead-text.on-dark { color: var(--white); }

/* ============================================================
   SECCIÓN INTRO (home negro)
   ============================================================ */
.intro-section { background: var(--black); color: var(--white); padding: 80px 24px; }

/* ============================================================
   BENEFICIOS (home)
   ============================================================ */
.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.benefit-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 28px; margin-bottom: 28px; border-bottom: 2px solid var(--primary);
}
.benefit-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.benefit-icon { flex-shrink: 0; color: var(--primary); font-size: 26px; margin-top: 2px; }
.benefit-content h3 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px; color: var(--text);
}
.benefit-content p { font-size: 13px; color: var(--gray); margin: 0; }
.benefit-note { font-size: 13px; color: var(--gray); margin-top: 20px; }

/* ============================================================
   LOGOS CLIENTES (marquee infinito)
   ============================================================ */
.clients-section { background: var(--white); padding: 60px 0; overflow: hidden; }
.clients-title { text-align: center; font-size: 22px; margin-bottom: 40px; padding: 0 24px; }
.clients-marquee { overflow: hidden; }
.clients-track {
  display: flex; gap: 50px; align-items: center; width: max-content;
  animation: marquee 28s linear infinite;
}
.clients-track:hover { animation-play-state: paused; }
.clients-track img { height: 56px; width: auto; filter: grayscale(1) opacity(.6); transition: filter .3s; }
.clients-track img:hover { filter: grayscale(0) opacity(1); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ============================================================
   CASOS TABS (home)
   ============================================================ */
.cases-section { background: var(--light); padding: 80px 24px; }
.cases-counter { text-align: center; margin-bottom: 48px; }
.counter-num { font-size: 88px; font-weight: 700; color: var(--primary); line-height: 1; }
.counter-label { font-size: 16px; color: var(--gray); text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }

.tabs-wrapper { max-width: 900px; margin: 0 auto; }
.tabs-header { display: flex; gap: 4px; }
.tab-btn {
  padding: 11px 26px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: var(--font);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--white); color: var(--gray);
  transition: all .2s;
}
.tab-btn.active  { background: var(--primary); color: var(--white); }
.tab-btn:not(.active):hover { background: #ddd; }
.tab-content {
  display: none; background: var(--navy); color: var(--white);
  padding: 32px 36px; border-radius: 0 var(--radius) var(--radius) var(--radius);
  font-size: 14px; line-height: 1.85;
}
.tab-content.active { display: block; }
.cases-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  color: var(--text); font-weight: 700; border-bottom: 1px solid var(--text);
  padding-bottom: 2px; transition: color var(--ease), border-color var(--ease);
}
.cases-link:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================================
   FORMULARIO CONTACTO
   ============================================================ */
.contact-section { background: var(--navy); padding: 80px 24px; color: var(--white); }
.contact-box {
  max-width: 820px; margin: 0 auto;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 52px 48px;
}
.contact-box h2 { text-align: center; margin-bottom: 36px; font-size: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { margin-bottom: 16px; }
.form-field input,
.form-field textarea {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); color: var(--white);
  font-family: var(--font); font-size: 14px; outline: none;
  transition: border-color var(--ease);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(255,255,255,.45); }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--primary); }
.form-field textarea { height: 140px; resize: vertical; }
.form-submit { text-align: right; margin-top: 8px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--black); color: rgba(255,255,255,.65); padding: 64px 24px 0; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px;
  padding-bottom: 48px;
}
.footer-logo img { height: 48px; margin-bottom: 18px; }
.footer-desc { font-size: 13px; line-height: 1.85; }
.footer-col h4 { color: var(--white); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.footer-col a {
  display: block; font-size: 13px; padding: 5px 0;
  color: rgba(255,255,255,.65); transition: color var(--ease);
}
.footer-col a:hover { color: var(--primary); }
.footer-contact-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  font-size: 14px; transition: all var(--ease);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.35);
}

/* ============================================================
   QUIENES SOMOS
   ============================================================ */
.metas-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 30px; margin-top: 40px;
}
.meta-card { text-align: center; padding: 32px 20px; }
.meta-icon { font-size: 38px; color: var(--primary); margin-bottom: 14px; }
.meta-card h3 { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; color: var(--white); }
.meta-card p { font-size: 13px; color: rgba(255,255,255,.72); }

.values-section { background: var(--white); padding: 80px 24px; }
.values-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px;
}
.value-card {
  padding: 28px 24px; background: var(--white); border-radius: 8px;
  box-shadow: var(--shadow); border-left: 3px solid var(--primary);
}
.value-card h3 { font-size: 15px; margin-bottom: 10px; }
.value-card p { font-size: 13px; color: var(--gray); margin: 0; }

.brochure-cta { text-align: center; padding: 60px 24px; background: var(--light); }
.brochure-cta h2 { font-size: 22px; margin-bottom: 20px; }

/* ============================================================
   PRODUCTOS
   ============================================================ */
.product-intro { padding: 80px 24px; background: var(--white); }
.product-points { margin: 20px 0 0 0; padding: 0; }
.product-points li { padding: 6px 0 6px 20px; position: relative; font-size: 14px; color: var(--gray); }
.product-points li::before { content: '▸'; position: absolute; left: 0; color: var(--primary); }

.modules-section { background: var(--light); padding: 80px 24px; }
.modules-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap: 20px; margin-top: 36px;
}
.module-card {
  background: var(--white); border-radius: 8px; padding: 24px 22px;
  border-left: 3px solid var(--primary); box-shadow: var(--shadow);
}
.module-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.module-card ul li {
  font-size: 12px; color: var(--gray); padding: 3px 0 3px 14px; position: relative;
}
.module-card ul li::before { content: '•'; position: absolute; left: 0; color: var(--primary); }

.bi-section { background: var(--white); padding: 80px 24px; }
.bi-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 24px; margin-top: 36px;
}
.bi-card {
  padding: 32px; border-radius: 8px; box-shadow: var(--shadow);
  background: var(--white); border-top: 3px solid var(--primary);
}
.bi-card h3 { font-size: 16px; margin-bottom: 12px; }
.bi-card p { font-size: 13px; color: var(--gray); margin: 0; }

/* ============================================================
   SERVICIOS
   ============================================================ */
.services-section { background: var(--white); padding: 80px 24px; }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 28px; margin-top: 36px;
}
.service-card {
  background: var(--white); border-radius: 8px; padding: 32px;
  box-shadow: var(--shadow); border-top: 3px solid var(--primary);
}
.service-card h3 { font-size: 16px; margin-bottom: 14px; }
.service-card p { font-size: 13px; color: var(--gray); margin: 0; }
.sub-services { margin-top: 14px; padding-left: 0; }
.sub-services li { font-size: 13px; color: var(--gray); padding: 4px 0 4px 18px; position: relative; }
.sub-services li::before { content: '›'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ============================================================
   CASOS DE ÉXITO
   ============================================================ */
.case-study { margin-bottom: 64px; padding-bottom: 64px; border-bottom: 1px solid var(--border); }
.case-study:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.case-badge {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--primary); background: rgba(20,182,197,.1);
  padding: 4px 14px; border-radius: 20px; margin-bottom: 10px;
}
.case-study h2 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 28px; }
.case-tabs { display: flex; gap: 4px; margin-bottom: 0; }
.case-tab {
  padding: 9px 22px; border: none; cursor: pointer; font-family: var(--font);
  font-size: 13px; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0;
  background: #ddd; color: var(--gray); transition: all .2s;
}
.case-tab.active { background: var(--navy); color: var(--white); }
.case-tab:not(.active):hover { background: #ccc; }
.case-panel {
  display: none; background: var(--navy); color: var(--white);
  padding: 30px 34px; border-radius: 0 var(--radius) var(--radius) var(--radius);
  font-size: 14px; line-height: 1.85;
}
.case-panel.active { display: block; }
.case-panel ul { padding-left: 20px; margin-top: 10px; }
.case-panel ul li { margin-bottom: 8px; }
.case-panel strong { color: var(--primary); }

/* ============================================================
   RPA
   ============================================================ */
.rpa-hero {
  background: var(--dark); color: var(--white);
  padding: 80px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.rpa-hero-bg {
  position: absolute; inset: 0;
  background-image: url('../img/rpa-hero-bg.jpg');
  background-size: cover; background-position: center;
  opacity: .3;
}
.rpa-hero h1 { position: relative; z-index:1; font-size: clamp(26px,4vw,48px); text-transform: uppercase; margin-bottom: 12px; }
.rpa-hero p { position: relative; z-index:1; font-size: 18px; color: rgba(255,255,255,.8); }

.rpa-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.rpa-card {
  position: relative; border-radius: 10px; overflow: hidden; height: 220px;
}
.rpa-card img { width: 100%; height: 100%; object-fit: cover; }
.rpa-card-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.52);
  display: flex; align-items: center; justify-content: center;
}
.rpa-card-overlay h3 { color: var(--white); font-size: 22px; text-align: center; letter-spacing: .5px; }

.rpa-stats { background: var(--primary); padding: 48px 24px; }
.rpa-stats-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center;
}
.rpa-stat-num { font-size: 40px; font-weight: 700; color: var(--white); }
.rpa-stat-unit { font-size: 14px; color: rgba(255,255,255,.85); }
.rpa-stat-desc { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 6px; line-height: 1.5; }

.check-list { columns: 2; gap: 20px; margin-top: 20px; }
.check-list li { break-inside: avoid; padding: 7px 0; font-size: 14px; color: var(--gray); }
.check-list li::before { content: '✓ '; color: var(--primary); font-weight: 700; }

.arrow-list li { padding: 7px 0; font-size: 14px; color: var(--gray); }
.arrow-list li::before { content: '→ '; color: var(--primary); font-weight: 700; }

.methodology-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; justify-content: center; }
.step-pill {
  background: var(--primary); color: var(--white); padding: 9px 20px;
  border-radius: 24px; font-size: 13px; font-weight: 700;
}

.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 24px; margin-top: 40px;
}
.why-card {
  background: var(--white); border-radius: 8px; padding: 30px;
  text-align: center; box-shadow: var(--shadow);
}
.why-card h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.why-card p { font-size: 13px; color: var(--gray); margin: 0; }

/* ============================================================
   PARTNERSHIP
   ============================================================ */
.partners-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 28px; margin-top: 40px;
}
.partner-card {
  background: var(--white); border-radius: 8px; padding: 34px;
  box-shadow: var(--shadow); border-top: 3px solid var(--primary);
}
.partner-name { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.partner-card p { font-size: 13px; color: var(--gray); margin: 0; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-hero {
  background: var(--white); padding: 80px 24px;
}
.contact-info-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; font-size: 15px; }
.contact-info-icon { color: var(--primary); font-size: 20px; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; background: var(--primary);
  color: var(--white); border: none; border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
  transition: all var(--ease); z-index: 999;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .two-col, .benefits-grid { grid-template-columns: 1fr; gap: 36px; }
  .values-grid { grid-template-columns: repeat(2,1fr); }
  .rpa-stats-grid { grid-template-columns: repeat(2,1fr); }
  .check-list { columns: 1; }
}

@media (max-width: 768px) {
  .nav-list {
    position: absolute; top: var(--hdr-height); left: 0; right: 0;
    background: var(--white); flex-direction: column; gap: 4px;
    padding: 16px 20px 20px; box-shadow: 0 8px 20px rgba(0,0,0,.1);
    display: none;
  }
  .nav-list.open { display: flex; }
  .nav-toggle { display: flex; }
  .section { padding: 52px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-box { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .rpa-cards-grid { grid-template-columns: 1fr; }
  .tabs-header { flex-wrap: wrap; }
  .modules-grid, .services-grid, .why-grid, .partners-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .values-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 24px; }
  .btn { padding: 12px 24px; font-size: 13px; }
}
