/* ============================================================
   MALFF DIGITAL — shared.css
   Estilos compartidos entre home, blog y landings por rubro.
   index.html mantiene sus propios estilos inline (no los importa).
   Uso: <link rel="stylesheet" href="/assets/shared.css">
============================================================ */

/* === RESET + BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #224A98;
  --secondary:     #2B4A9A;
  --ink:           #121329;
  --ink-2:         #1A1C3A;
  --primary-light: #3A66C4;
  --sky:           #8FB0F0;
  --bg:            #FAFAFA;
  --bg-white:      #FFFFFF;
  --bg-soft:       #F2F4F9;
  --bg-blue-soft:  #EBF1FA;
  --border:        #DEE3EE;
  --border-soft:   #EAEDF4;
  --border-strong: #C7D1E5;
  --text:          #14192E;
  --text-body:     #46506A;
  --text-muted:    #6E7891;
  --text-faint:    #98A1B6;
  --ok:            #5CB85C;
  --critical:      #D30000;
  --offline:       #6c757d;
  --warn:          #E6A100;
  --wa:            #1DAA55;
  --wa-dark:       #128C45;
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --shadow-sm:     0 2px 10px rgba(18,19,41,0.06);
  --shadow-md:     0 14px 34px rgba(18,19,41,0.10);
  --shadow-lg:     0 30px 70px rgba(18,19,41,0.14);
  --shadow-blue:   0 14px 34px rgba(34,74,152,0.22);
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: var(--primary); color: #fff; }

/* === SCROLL PROGRESS BAR === */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--primary), var(--ok)); transition: width .1s linear; }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section--sm { padding: 0 0 88px; }
.center { text-align: center; }

/* === EYEBROW === */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); margin-bottom: 22px; }
.eyebrow::before { content: ''; width: 30px; height: 2px; background: var(--primary); flex-shrink: 0; }
.center .eyebrow::after { content: ''; width: 30px; height: 2px; background: var(--primary); flex-shrink: 0; }

/* === TIPOGRAFÍA === */
.section-title { font-size: clamp(30px,4.4vw,50px); font-weight: 900; line-height: 1.06; letter-spacing: -0.035em; color: var(--text); margin-bottom: 20px; }
.section-sub { font-size: 17.5px; color: var(--text-body); max-width: 640px; line-height: 1.7; }
.center .section-sub { margin-left: auto; margin-right: auto; }
.accent { color: var(--primary); }

/* === BOTONES === */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 15px 28px; border-radius: var(--radius-sm); font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer; border: none; text-decoration: none; transition: var(--transition); white-space: nowrap; line-height: 1; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-blue); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-20deg); }
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(18,19,41,0.3); }
.btn-primary:hover::after { animation: shine .9s ease; }
@keyframes shine { from { left: -120%; } to { left: 130%; } }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-white); transform: translateY(-2px); }
.btn-lg { padding: 17px 32px; font-size: 15.5px; }

/* === FADE-IN === */
.fade-in { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* === LOGO / BRAND === */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 40px; height: 38px; flex-shrink: 0; color: var(--ink); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-size: 18px; font-weight: 900; letter-spacing: 0.02em; color: var(--text); }
.brand__tag { font-family: var(--font-mono); font-size: 8px; font-weight: 600; letter-spacing: 0.24em; color: var(--text-muted); margin-top: 4px; }

/* === TOPBAR === */
.topbar { background: var(--ink); color: rgba(255,255,255,0.78); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 0; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2s infinite; }
.topbar a { color: rgba(255,255,255,0.78); text-decoration: none; }
.topbar a:hover { color: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(92,184,92,0.45); } 50% { box-shadow: 0 0 0 7px rgba(92,184,92,0); } }

/* === NAVBAR === */
.navbar { position: sticky; top: 0; left: 0; right: 0; z-index: 1000; padding: 0; background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 13px 0; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 700; color: var(--text-body); transition: var(--transition); position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--primary); transition: width .25s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-phone { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.nav-phone svg { color: var(--primary); }
.nav-phone:hover { color: var(--primary); }
.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(--text); border-radius: 2px; transition: var(--transition); }
.mobile-menu { display: none; flex-direction: column; background: var(--bg-white); border-top: 1px solid var(--border); padding: 12px 24px 22px; box-shadow: var(--shadow-md); }
.mobile-menu.open { display: flex; }
.mobile-menu a { text-decoration: none; font-size: 15px; font-weight: 700; color: var(--text-body); padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.mobile-menu a:hover { color: var(--primary); }
.mobile-menu .btn { margin-top: 16px; justify-content: center; color: #fff; border-bottom: none; padding: 15px 28px; }
.mobile-menu .btn:hover { color: #fff; }

/* === WHATSAPP === */
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 14px 34px rgba(29,170,85,0.28); position: relative; overflow: hidden; }
.btn-wa::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-20deg); }
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(29,170,85,0.36); }
.btn-wa:hover::after { animation: shine .9s ease; }
.wa-fab { position: fixed; right: 22px; bottom: 22px; z-index: 1500; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 32px rgba(18,19,41,0.28); text-decoration: none; transition: var(--transition); }
.wa-fab:hover { background: var(--wa-dark); transform: translateY(-3px) scale(1.05); }
.wa-fab::before { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(29,170,85,0.4); animation: wa-pulse 2.6s infinite; }
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(29,170,85,0.4); } 70% { box-shadow: 0 0 0 14px rgba(29,170,85,0); } 100% { box-shadow: 0 0 0 0 rgba(29,170,85,0); } }
.wa-card { display: flex; align-items: center; gap: 16px; background: var(--bg-white); border: 1px solid var(--border-strong); border-left: 3px solid var(--wa); border-radius: var(--radius-md); padding: 20px 22px; margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.wa-card__icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: rgba(29,170,85,0.1); color: var(--wa); display: flex; align-items: center; justify-content: center; }
.wa-card__t1 { font-size: 15.5px; font-weight: 900; color: var(--text); }
.wa-card__t2 { font-size: 13px; color: var(--text-body); margin-top: 2px; }
.wa-card .btn { margin-left: auto; flex-shrink: 0; }

/* === FOOTER === */
footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 64px 0 30px; }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 44px; margin-bottom: 44px; }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__tag { color: rgba(255,255,255,0.5); }
.footer__brand .brand__mark { color: #fff; }
.footer__tagline { font-size: 14px; line-height: 1.7; max-width: 290px; margin: 18px 0 22px; }
.footer__social { display: flex; gap: 11px; }
.soc { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.75); text-decoration: none; transition: var(--transition); }
.soc:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-3px); }
.footer__col h4 { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: #fff; margin-bottom: 16px; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer__links a { text-decoration: none; font-size: 14px; color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer__links a:hover { color: #fff; padding-left: 4px; }
.footer__contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; margin-bottom: 12px; }
.footer__contact-item svg { color: var(--sky); flex-shrink: 0; margin-top: 3px; }
.footer__contact-item a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer__contact-item a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.5); }
.footer__made { display: inline-flex; align-items: center; gap: 7px; }

/* === FAQ ACORDEÓN === */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 48px auto 0; }
.faq-item { background: #fff; border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(34,74,152,.07); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-size: 16px; font-weight: 700; color: var(--text); background: none; border: none; cursor: pointer; text-align: left; line-height: 1.4; transition: color .2s; font-family: 'Lato', sans-serif; }
.faq-item.open .faq-q { color: var(--primary); }
.faq-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; line-height: 1; transition: background .2s, color .2s, transform .25s; }
.faq-item.open .faq-icon { background: var(--primary); color: #fff; transform: rotate(45deg); }
.faq-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-body { max-height: 600px; }
.faq-body-inner { padding: 16px 22px 20px; font-size: 15.5px; color: var(--text-body); line-height: 1.7; border-top: 1px solid var(--border); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .topbar__item.hide-md { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .wa-card { flex-wrap: wrap; }
  .wa-card .btn { margin-left: 0; width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
  .section { padding: 76px 0; }
  .topbar { display: none; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .wa-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
