/* COMPONENTES reutilizables: botones, header, FAB, formularios */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); padding: .9rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: .55rem 1rem; font-size: .9rem; }
.btn--wa { background: var(--wa); color: var(--ink); }
.btn--primary { background: var(--yellow); color: var(--ink); }
.btn--primary:hover { background: var(--yellow-h); }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.link { background: none; border: 0; padding: 0; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; justify-self: start; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--dark-2); color: #fff; border-bottom: 4px solid var(--yellow); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.header__inner { display: flex; align-items: center; gap: var(--s3); height: 100%; }
.logo { display: flex; align-items: center; gap: .8rem; font-weight: 800; font-size: 1.3rem; line-height: 1.1; text-decoration: none; margin-right: auto; color: #fff; }
.logo img { height: 64px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--s3); font-weight: 600; font-size: .95rem; }
.nav a { text-decoration: none; }
.nav a:not(.btn):hover { color: var(--yellow); }

/* Teléfono visible en el header (desktop y menú móvil) */
.header__phone { display: flex; flex-direction: column; line-height: 1.15; font-size: .75rem; color: #C9CCD1; text-decoration: none; border-left: 2px solid rgba(255,255,255,.2); padding-left: var(--s2); white-space: nowrap; flex-shrink: 0; }
.header__phone strong { color: var(--yellow); font-size: 1rem; font-weight: 800; }
.header__phone:hover strong { color: var(--yellow-h); }
.nav .btn { white-space: nowrap; flex-shrink: 0; }
@media (min-width: 901px) and (max-width: 1080px) { .header__phone { display: none; } }
@media (min-width: 1081px) and (max-width: 1200px) { .header__inner, .nav { gap: 1rem; } }

.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.menu-btn span, .menu-btn span::before { display: block; width: 24px; height: 2px; background: #fff; margin: auto; position: relative; }
.menu-btn span::before { content: ""; position: absolute; top: -7px; left: 0; box-shadow: 0 14px 0 #fff; }
@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .logo img { height: 50px; width: auto; }
  .logo { font-size: 1.1rem; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: var(--header-h); inset-inline: 0; flex-direction: column; align-items: stretch; background: var(--dark-2); padding: var(--s3) 1.25rem; gap: var(--s2); border-bottom: 4px solid var(--yellow); }
  .nav.is-open { display: flex; }
  .header__phone { border-left: 0; padding-left: 0; flex-direction: row; align-items: baseline; gap: .5rem; font-size: .9rem; }
}
@media (max-width: 420px) { .logo { font-size: .95rem; } }

/* Botón flotante WhatsApp */
.fab { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: transform .15s; }
.fab:hover { transform: scale(1.08); }

/* Formulario */
.form { display: grid; gap: var(--s2); background: #fff; color: var(--ink); padding: var(--s4); border-radius: var(--radius); border-top: 6px solid var(--yellow); }
.form label { display: grid; gap: .3rem; font-weight: 700; font-size: .9rem; }
.form input, .form select, .form textarea { width: 100%; min-width: 0; padding: .75rem; min-height: 48px; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; }
.form .is-invalid { border-color: var(--red); }
.form__status { font-weight: 600; min-height: 1.5em; }
.form__status a { color: var(--ink); }
.hp { position: absolute; left: -9999px; }

/* Formulario: filas de dos campos y adjuntos */
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.form__row > * { min-width: 0; }
.form__check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .6rem; font-weight: 600; font-size: .85rem; }
.form__check input { width: 22px; height: 22px; min-height: 0; margin-top: .1rem; padding: 0; accent-color: var(--ink); }
.form__check a { color: var(--ink); }
.form__file small { color: var(--muted); font-weight: 600; }
.form__file input[type="file"] { padding: .55rem; font-size: .85rem; }
.form__file-count { color: var(--ink); font-weight: 800; font-size: .85rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } .form { padding: var(--s3); } }

/* Barra fija móvil: llamar y WhatsApp */
.mobile-bar { display: none; }
@media (max-width: 800px) {
  .mobile-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -4px 18px rgba(0,0,0,.3); }
  .mobile-bar__btn { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 56px; font-weight: 800; font-size: 1rem; text-decoration: none; }
  .mobile-bar__btn--call { background: var(--yellow); color: var(--ink); }
  .mobile-bar__btn--wa { background: var(--wa); color: var(--ink); }
  .mobile-bar__icon { font-size: 1.15rem; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .fab { display: none; }
}
