/* ============================================================
   GRUPO FERREIRA — C206 · Sitio Web Institucional
   Desarrollado por AranduCAD · aranducad.com
   main.css — núcleo global: variables, reset, tipografía, layout
   base, botones, header/nav, footer, utilidades. Estilos de
   componentes reutilizables → components.css. Estilos específicos
   de página → pages/home.css y pages/contact.css.
   ============================================================ */

/* ── Variables de marca ────────────────────────────────────── */
:root {
  --primary:      #003D82;
  --primary-dark: #002a5c;
  --secondary:    #0066B3;
  --accent:       #E67E22;
  --accent-dark:  #c96a10;
  --gray:         #4A5568;
  --gray-light:   #E8EDF2;
  --white:        #FFFFFF;
  --text:         #2D3748;
  --text-light:   #718096;
  --border:       #CBD5E0;

  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --transition: .25s ease;
  --container:  1200px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }
[id] { scroll-margin-top: 110px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 88px;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Tipografía ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { margin-bottom: 1rem; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
}
.section--gray {
  background: var(--gray-light);
}
.section--dark {
  background: var(--primary);
  color: var(--white);
}
.section--dark h2, .section--dark h3, .section--dark p { color: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header p {
  color: var(--text-light);
  max-width: 620px;
  margin: 0.75rem auto 0;
  font-size: 1.05rem;
}
.section--dark .section-header p { color: rgba(255,255,255,.8); }

.tag {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 50px;
  margin-bottom: .75rem;
}
.tag--outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

/* ── Botones ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9375rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn--outline:hover {
  background: var(--white);
  color: var(--primary);
}
.btn--outline-dark {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn--outline-dark:hover {
  background: var(--primary);
  color: var(--white);
}
.btn--whatsapp {
  background: #25D366;
  color: var(--white);
}
.btn--whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--sm { padding: .5rem 1.25rem; font-size: .875rem; }
.btn--lg { padding: .875rem 2.25rem; font-size: 1rem; }

/* ── HEADER / NAV ──────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 0 rgba(15,32,64,.06);
  transition: box-shadow var(--transition), padding var(--transition);
}
.header.scrolled {
  box-shadow: var(--shadow-lg);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  max-width: 1360px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.nav__logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
}
.nav__coverage {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.nav__flag {
  width: 30px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), var(--shadow-sm);
}
.nav__coverage-text {
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--primary);
  white-space: nowrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav__link {
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray);
  padding: .5rem .875rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover, .nav__link.active {
  color: var(--primary);
  background: var(--gray-light);
}
.nav__cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: .5rem 1.25rem !important;
  border-radius: var(--radius-md) !important;
}
.nav__cta:hover {
  background: var(--accent-dark) !important;
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Grids de layout ───────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer__brand { max-width: 300px; }
.footer__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.footer__logo-img {
  height: 68px;
  width: auto;
  object-fit: contain;
}
.footer__logo strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}
.footer__slogan {
  font-style: italic;
  color: var(--accent);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.footer__brands {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.footer__brand-tag {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 50px;
  letter-spacing: .04em;
}
.footer__col h4 {
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer__links { display: flex; flex-direction: column; gap: .6rem; }
.footer__link {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: color var(--transition);
}
.footer__link:hover { color: var(--accent); }
.footer__contact { display: flex; flex-direction: column; gap: .75rem; }
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .875rem;
}
.footer__contact-item span:first-child { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.footer__contact-item a { color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer__contact-item a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: .5rem;
}
.footer__bottom a { color: rgba(255,255,255,.4); transition: color var(--transition); }
.footer__bottom a:hover { color: var(--accent); }

/* ── WhatsApp flotante ─────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: .65rem;
  background: #25D366;
  color: var(--white);
  padding: .75rem 1.25rem .75rem .9rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse-wa 2.5s infinite;
}
.whatsapp-float:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.55);
  animation: none;
}
.whatsapp-float svg { width: 24px; height: 24px; flex-shrink: 0; }
@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
  50%       { box-shadow: 0 4px 30px rgba(37,211,102,.7); }
}

/* ── Utilidades ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-accent  { color: var(--accent); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* ── Reveal / stagger scroll animations ───────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal--left  { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Responsive (núcleo: nav, footer, layout, whatsapp) ────── */
/* Con los 7 links visibles no hay lugar para el texto (1024–1199px) ni para
   la bandera (769–1023px); en mobile los links pasan al menú hamburguesa. */
@media (min-width: 769px) and (max-width: 1199px) {
  .nav__coverage-text { display: none; }
  .nav__coverage { padding-left: .75rem; }
}
@media (min-width: 769px) and (max-width: 1023px) {
  .nav__coverage { display: none; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  body { padding-top: 76px; }
  .nav { height: 76px; }
  .nav__logo-img { height: 46px; }
  .nav__brand { gap: .75rem; }
  .nav__coverage { padding-left: .75rem; gap: .45rem; }
  .nav__flag { width: 24px; height: 14px; }
  .nav__coverage-text { font-size: .65rem; }
  .section { padding: 3.5rem 0; }

  .nav__links { display: none; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: var(--white); padding: 1rem 1.25rem 1.5rem; gap: .25rem; box-shadow: var(--shadow-lg); border-top: 1px solid var(--gray-light); }
  .nav__links.open { display: flex; }
  .nav__burger { display: flex; }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }

  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: .875rem; border-radius: 50%; }
}

@media (max-width: 380px) {
  .nav__coverage-text { display: none; }
}
