/* ================================================
   A&B Best Company SAC — Hoja de Estilos Principal
   ================================================ */

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

:root {
  --primary:   #0249AD;
  --secondary: #0d1f3c;
  --slate:     #334155;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --green:     #22c55e;
  --red:       #ef4444;
}

html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--secondary); background: #fff; line-height: 1.6; }

/* ── CONTAINER ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── REDES SOCIALES (top-bar + footer) ── */
.top-social-wrap { display: flex; align-items: center; gap: .6rem; margin-left: .5rem; padding-left: 1rem; border-left: 1px solid #e5e7eb; }
.top-social { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: .375rem; background: rgba(2,73,173,.08); color: var(--primary); transition: background .2s, color .2s; text-decoration: none; }
.top-social:hover { background: var(--primary); color: #fff; }
.footer-social { display: flex; align-items: center; gap: .75rem; justify-content: center; padding: 1.25rem 0 .5rem; border-top: 1px solid rgba(255,255,255,.08); margin-bottom: .25rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: .5rem; background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); transition: background .2s, color .2s; text-decoration: none; }
.footer-social a:hover { background: var(--primary); color: #fff; }

/* ── VIDEO SECCIÓN ── */
.video-section { padding: 4rem 0; background: #0d1f3c; }
.video-section .section-header h2 { color: #fff; }
.video-section .section-header p  { color: rgba(255,255,255,.65); }
.video-section .divider { background: rgba(255,255,255,.3); }
.video-wrap { position: relative; width: 100%; max-width: 900px; margin: 0 auto; border-radius: 1.25rem; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.video-wrap video { width: 100%; display: block; aspect-ratio: 16/9; background: #000; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 2rem; border-radius: .5rem; font-weight: 600; font-size: 1rem;
  cursor: pointer; text-decoration: none; transition: all .2s; border: 2px solid transparent;
  font-family: inherit;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #013f8a; }
.btn-outline  { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-outline-blue { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-blue:hover { background: var(--primary); color: #fff; }
.btn-lg   { padding: 1rem 2.5rem; font-size: 1.1rem; height: 3.5rem; }
.btn-full { width: 100%; height: 3rem; font-size: 1rem; }

/* ── SECTION HEADER ── */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h1,
.section-header h2 { font-size: 2.25rem; font-weight: 800; color: var(--secondary); margin-bottom: 1rem; }
.section-header p   { color: var(--muted); font-size: 1.1rem; }
.divider { width: 6rem; height: 4px; background: var(--primary); margin: 1.25rem auto 0; border-radius: 2px; }

/* ── HEADER ── */
header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }

/* Top bar */
.top-bar {
  background: #fff; border-bottom: 1px solid var(--gray-100);
  padding: .6rem 0; transition: max-height .3s ease, opacity .3s ease;
  max-height: 72px; overflow: hidden;
}
.top-bar .container { display: flex; align-items: center; justify-content: space-between; }
.logo-top { height: 48px; width: auto; object-fit: contain; display: block; }
.top-contact { display: flex; align-items: center; gap: 2rem; font-size: .875rem; color: #4b5563; }
.top-contact span { display: flex; align-items: center; gap: .5rem; }
.top-contact svg { color: var(--primary); flex-shrink: 0; }

/* Nav bar */
.main-nav { background: var(--secondary); transition: box-shadow .3s, padding .3s; }
.nav-inner { display: flex; align-items: center; height: 48px; gap: 1.5rem; }

.nav-logo { display: none; align-items: center; gap: .5rem; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; background: #fff; padding: 2px 4px; border-radius: 4px; object-fit: contain; }
.nav-logo span { color: #fff; font-weight: 700; font-size: .85rem; }

.nav-links { list-style: none; display: flex; align-items: center; gap: 1.5rem; flex: 1; }
.nav-links a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .875rem; font-weight: 500; transition: color .2s; white-space: nowrap; }
.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-phone { color: #fff; font-size: .875rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; white-space: nowrap; margin-left: auto; }
.nav-phone svg { color: var(--primary); }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a { display: flex; align-items: center; gap: .25rem; cursor: pointer; }
.dropdown {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; background: #fff;
  border: 1px solid var(--border); border-radius: .5rem; min-width: 18rem;
  padding: .375rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 200;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown li { list-style: none; }
.dropdown a { color: var(--secondary) !important; padding: .625rem 1rem; display: block; font-size: .875rem; }
.dropdown a:hover { background: var(--gray-50); color: var(--primary) !important; }

/* Scrolled state */
header.scrolled .top-bar { max-height: 0; opacity: 0; padding: 0; }
header.scrolled .main-nav { box-shadow: 0 4px 16px rgba(0,0,0,.25); }
header.scrolled .nav-logo { display: flex; }

/* Mobile toggle */
.mobile-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: .5rem; margin-left: auto; line-height: 0; }

/* Mobile drawer */
.mobile-menu { display: none; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.mobile-menu.open { display: block; }
.mobile-menu nav { padding: .75rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.mobile-menu a { display: block; padding: .7rem .75rem; border-radius: .5rem; text-decoration: none; font-size: .875rem; font-weight: 500; color: var(--secondary); transition: all .2s; }
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--primary); background: rgba(2,73,173,.08); }
.mobile-services-toggle {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  background: none; border: none; padding: .7rem .75rem; border-radius: .5rem;
  cursor: pointer; font-size: .875rem; font-weight: 500; color: var(--secondary); font-family: inherit;
}
.mobile-services-toggle:hover { color: var(--primary); background: rgba(2,73,173,.08); }
.mobile-sub { display: none; margin-left: .75rem; padding-left: .75rem; border-left: 2px solid rgba(2,73,173,.2); }
.mobile-sub.open { display: block; }
.mobile-sub a { font-size: .8rem; color: rgba(13,31,60,.7); }
.mobile-contact-row { display: flex; align-items: center; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); margin-top: .5rem; font-size: .875rem; color: var(--muted); }
.mobile-contact-row svg { color: var(--primary); flex-shrink: 0; }

/* ── FOOTER ── */
footer { background: var(--slate); color: rgba(255,255,255,.75); padding: 3rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-logo-wrap { background: #fff; padding: .5rem; border-radius: .375rem; display: inline-block; margin-bottom: 1.25rem; }
.footer-logo-wrap img { height: 56px; width: auto; object-fit: contain; display: block; }
.footer-brand p { font-size: .875rem; line-height: 1.7; max-width: 22rem; }
.footer-col h4 { color: #fff; font-weight: 700; margin-bottom: 1.25rem; font-size: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .875rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact-row { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.footer-contact-row svg { color: var(--primary); flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: .875rem; flex-wrap: wrap; gap: 1rem; }

/* ── WHATSAPP FLOAT ── */
.wa-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 3.5rem; height: 3.5rem; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.45); transition: all .2s; text-decoration: none;
}
.wa-float:hover { background: #1da851; transform: scale(1.1); }
.wa-float svg { width: 1.75rem; height: 1.75rem; fill: #fff; }

/* ═══════════════════════════════════════
   INICIO — HERO
   ═══════════════════════════════════════ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(13,31,60,.95) 40%, rgba(13,31,60,.5)); }
.hero-content { position: relative; z-index: 1; max-width: 50rem; padding: 8rem 0 5rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(2,73,173,.2); border: 1px solid rgba(2,73,173,.35);
  color: #fff; padding: .375rem 1rem; border-radius: 9999px;
  font-size: .875rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-badge svg { color: #60a5fa; }
.hero h1 { font-size: 3.5rem; font-weight: 900; color: #fff; line-height: 1.12; margin-bottom: 1.5rem; }
.hero h1 span { color: #60a5fa; }
.hero-sub { font-size: 1.375rem; color: rgba(255,255,255,.8); margin-bottom: 2.5rem; font-weight: 300; letter-spacing: .05em; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.hero-info { display: flex; align-items: center; gap: 1.5rem; color: rgba(255,255,255,.85); font-size: .875rem; }
.hero-info span { display: flex; align-items: center; gap: .5rem; }
.hero-info svg { color: var(--primary); }

/* ═══════════════════════════════════════
   PAGE SECTIONS
   ═══════════════════════════════════════ */
.page-section { padding: 7rem 0 5rem; }
.page-section.gray { background: var(--gray-50); }

/* ═══════════════════════════════════════
   NOSOTROS — FEATURES GRID
   ═══════════════════════════════════════ */
.features-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.75rem; }
.feature-card {
  background: var(--gray-50); border: 1px solid rgba(229,231,235,.5);
  padding: 1.5rem; border-radius: .75rem; transition: all .3s;
}
.feature-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); border-color: rgba(2,73,173,.3); }
.feature-icon {
  width: 3rem; height: 3rem; background: rgba(2,73,173,.1); border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 1rem; transition: all .3s;
}
.feature-card:hover .feature-icon { background: var(--primary); color: #fff; }
.feature-icon svg { width: 1.5rem; height: 1.5rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { font-size: 1rem; font-weight: 700; color: var(--secondary); margin-bottom: .4rem; }
.feature-card p  { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* ═══════════════════════════════════════
   SERVICIOS
   ═══════════════════════════════════════ */
.services-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 2rem; }
.service-card { background: #fff; border-radius: 1rem; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); border: 1px solid var(--border); }
.service-img { position: relative; height: 16rem; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.service-card:hover .service-img img { transform: scale(1.05); }
.service-img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,31,60,.8), transparent); }
.service-img h3 { position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.service-body { padding: 1.75rem; }
.service-list { list-style: none; display: flex; flex-direction: column; gap: .875rem; }
.service-list li { display: flex; align-items: flex-start; gap: .75rem; }
.service-list svg { width: 1.25rem; height: 1.25rem; color: var(--primary); flex-shrink: 0; margin-top: .1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service-list strong { display: block; color: var(--secondary); font-size: .9rem; }
.service-list span { font-size: .8rem; color: var(--muted); }

/* ═══════════════════════════════════════
   CLIENTES & PARTNERS
   ═══════════════════════════════════════ */
.clients-block-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
.block-icon { width: 2.5rem; height: 2.5rem; background: rgba(2,73,173,.1); border-radius: .5rem; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.block-icon svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.block-title h2 { font-size: 1.5rem; font-weight: 700; color: var(--secondary); }
.block-title p  { font-size: .875rem; color: var(--muted); }
.clients-grid  { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }
.partners-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.logo-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--gray-50); border: 1px solid rgba(229,231,235,.5);
  border-radius: .75rem; padding: 1.25rem; transition: all .3s;
}
.logo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: rgba(2,73,173,.3); }
.logo-card-img { width: 100%; height: 4rem; display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; overflow: hidden; border-radius: .375rem; }
.logo-card-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.logo-card p    { font-weight: 600; font-size: .875rem; color: var(--secondary); text-align: center; line-height: 1.3; }
.logo-card span { font-size: .75rem; color: var(--muted); margin-top: .2rem; text-align: center; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 4rem 0; }
.cta-box { background: var(--primary); border-radius: 1rem; padding: 2.5rem; text-align: center; color: #fff; }
.cta-box h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: .75rem; }
.cta-box p  { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* ═══════════════════════════════════════
   TRABAJA
   ═══════════════════════════════════════ */
.trabaja-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 3rem; max-width: 60rem; margin: 0 auto; }
.badge-inline {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(2,73,173,.1); color: var(--primary);
  padding: .375rem 1rem; border-radius: 9999px; font-size: .875rem; font-weight: 600; margin-bottom: 1.5rem;
}
.badge-inline svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: .875rem; }
.check-list li { display: flex; align-items: flex-start; gap: .75rem; }
.check-list svg { width: 1.25rem; height: 1.25rem; color: var(--primary); flex-shrink: 0; margin-top: .1rem; stroke: currentColor; fill: none; stroke-width: 2; }
.check-list span { font-size: .875rem; color: rgba(13,31,60,.8); }
.areas-box { background: rgba(2,73,173,.07); border: 1px solid rgba(2,73,173,.2); border-radius: .75rem; padding: 1.5rem; margin-top: 2rem; }
.areas-box h3 { font-weight: 700; color: var(--secondary); margin-bottom: .75rem; }
.areas-box ul { list-style: none; display: flex; flex-direction: column; gap: .3rem; font-size: .875rem; color: rgba(13,31,60,.7); }

/* ═══════════════════════════════════════
   CONTACTO
   ═══════════════════════════════════════ */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-info-list { display: flex; flex-direction: column; gap: 1.75rem; margin-top: 2rem; }
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-icon {
  width: 3rem; height: 3rem; background: rgba(2,73,173,.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary);
}
.contact-info-icon svg { width: 1.4rem; height: 1.4rem; stroke: currentColor; fill: none; stroke-width: 2; }
.contact-info-item h3 { font-weight: 700; color: var(--secondary); }
.contact-info-item p  { color: var(--muted); font-size: .9rem; }

/* ═══════════════════════════════════════
   FORMS
   ═══════════════════════════════════════ */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); padding: 2.5rem; }
.form-card-gray { background: var(--gray-50); border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); padding: 2.5rem; }
.form-card h2,
.form-card-gray h2 { font-size: 1.2rem; font-weight: 700; color: var(--secondary); margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-group label { font-size: .875rem; font-weight: 600; color: var(--secondary); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .6rem .875rem; border: 1px solid var(--border);
  border-radius: .5rem; font-size: .875rem; background: #fff; color: var(--secondary);
  transition: border .2s, box-shadow .2s; outline: none; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px rgba(2,73,173,.15);
}
.form-textarea { resize: vertical; min-height: 110px; }
.form-file-label {
  display: flex; align-items: center; gap: .75rem; width: 100%; height: 3rem;
  padding: 0 1rem; border: 2px dashed var(--border); border-radius: .5rem;
  cursor: pointer; font-size: .875rem; color: var(--muted); transition: all .2s;
}
.form-file-label:hover { border-color: rgba(2,73,173,.5); background: rgba(2,73,173,.04); }
.form-file-label svg { color: var(--primary); flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; width: 1rem; height: 1rem; }

/* CAPTCHA */
.captcha-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-size: .875rem; font-weight: 600; color: var(--secondary); }
.captcha-header svg { width: 1rem; height: 1rem; color: var(--primary); stroke: currentColor; fill: none; stroke-width: 2; }
.captcha-wrapper {
  border: 2px solid var(--border); border-radius: .75rem; padding: 1rem;
  display: flex; align-items: center; gap: .75rem; background: #fff; transition: border .2s;
}
.captcha-wrapper.error { border-color: var(--red); background: #fef2f2; }
.captcha-display {
  background: var(--secondary); color: #fff; font-family: monospace;
  font-size: 1.2rem; font-weight: 700; padding: .6rem 1.25rem; border-radius: .5rem;
  letter-spacing: .15em; user-select: none; white-space: nowrap; min-width: 9rem; text-align: center;
}
.captcha-label { font-size: .875rem; font-weight: 600; color: var(--secondary); flex: 1; }
.captcha-input {
  width: 5rem; padding: .5rem; border: 2px solid var(--border);
  border-radius: .5rem; text-align: center; font-size: 1.1rem; font-weight: 700;
  outline: none; font-family: inherit;
}
.captcha-input:focus { border-color: var(--primary); }
.captcha-refresh {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: .375rem; border-radius: .375rem; display: flex; align-items: center; transition: all .2s;
}
.captcha-refresh:hover { color: var(--primary); background: rgba(2,73,173,.08); }
.captcha-refresh svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; }
.captcha-error { font-size: .875rem; color: var(--red); margin-top: .4rem; display: none; }

/* Success */
.success-box { display: none; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 0; text-align: center; gap: 1.25rem; }
.success-icon { width: 5rem; height: 5rem; background: #dcfce7; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.success-icon svg { width: 2.5rem; height: 2.5rem; color: #16a34a; stroke: currentColor; fill: none; stroke-width: 2; }
.success-box h3 { font-size: 1.5rem; font-weight: 700; color: var(--secondary); }
.success-box p  { color: var(--muted); max-width: 22rem; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .top-contact { display: none; }
  .nav-links, .nav-phone { display: none; }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 2.25rem; }
  .hero-info { display: none; }
  .services-grid  { grid-template-columns: 1fr; }
  .clients-grid   { grid-template-columns: repeat(2,1fr); }
  .partners-grid  { grid-template-columns: repeat(2,1fr); }
  .trabaja-grid   { grid-template-columns: 1fr; }
  .contacto-grid  { grid-template-columns: 1fr; }
  .form-row       { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr; }
  .footer-bottom  { flex-direction: column; text-align: center; }
  .features-grid  { grid-template-columns: 1fr; }
  .section-header h1,
  .section-header h2 { font-size: 1.75rem; }
  .page-section { padding: 6rem 0 4rem; }
}
