/* ============================================================
   HEADER — Grúas Rosano
   ============================================================ */

:root {
  --gh-primary:       #77519A;
  --gh-primary-dark:  #5a3a78;
  --gh-primary-light: #9a6bc0;
  --gh-dark:          #0b0b1c;
  --gh-dark-2:        #14142a;
  --gh-topbar-h:      38px;
  --gh-header-h:      80px;
  --gh-total-h:       calc(var(--gh-topbar-h) + var(--gh-header-h));
}

.container-fluid {
  padding-top: var(--gh-total-h);
}


/* ================================================================
   TOP BAR
   ================================================================ */
.gr-topbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--gh-topbar-h);
  background: var(--gh-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 1100;
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.gr-topbar--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.gr-topbar-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gr-topbar-contact {
  display: flex;
  align-items: center;
  gap: 24px;
}

.gr-topbar-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  white-space: nowrap;
}
.gr-topbar-link:hover { color: rgba(255, 255, 255, 0.9); }
.gr-topbar-link i {
  color: var(--gh-primary-light);
  font-size: 10px;
  flex-shrink: 0;
}

.gr-topbar-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gr-topbar-social-link {
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.gr-topbar-social-link:hover {
  background: var(--gh-primary);
  border-color: var(--gh-primary);
  color: #fff;
  transform: translateY(-1px);
}


/* ================================================================
   MAIN HEADER
   ================================================================ */
.gr-header {
  position: fixed;
  top: var(--gh-topbar-h);
  left: 0;
  width: 100%;
  height: var(--gh-header-h);
  background: #fff;
  z-index: 1099;
  transition:
    top        0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height     0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

/* Línea de acento purple en la base del header */
.gr-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg,
    var(--gh-primary) 0%,
    rgba(119, 81, 154, 0.3) 40%,
    transparent 70%);
  opacity: 0.6;
}

.gr-header--scrolled {
  top: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.06);
}

.gr-header-inner {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}


/* ── Logo ── */
.gr-header-logo { flex-shrink: 0; width: 165px; }

.gr-header-logo-link {
  display: flex;
  align-items: center;
}

.gr-header-logo-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.25s, transform 0.25s;
}

.gr-header-logo-link:hover img {
  opacity: 0.85;
  transform: scale(0.98);
}


/* ── Navigation — desktop ── */
.gr-header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

/* Elementos mobile-only ocultos en desktop */
.gr-nav-panel-top,
.gr-nav-links-wrap,
.gr-nav-panel-bottom { display: contents; }

.gr-nav-panel-logo-card,
.gr-nav-panel-tagline,
.gr-nav-panel-contact { display: none; }

.gr-header-nav-link {
  position: relative;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.gr-header-nav-link:hover {
  color: var(--gh-primary);
  background: rgba(119, 81, 154, 0.07);
}

.gr-header-nav-link--active {
  color: var(--gh-primary);
  background: rgba(119, 81, 154, 0.09);
  font-weight: 600;
}

/* Dot indicator en el link activo */
.gr-header-nav-link--active::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--gh-primary);
  border-radius: 2px;
}

/* Quita el ::after animado (reemplazado por pill + dot) */
.gr-header-nav-link::after { display: none; }


/* ── Actions ── */
.gr-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.gr-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--gh-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 2px 16px rgba(119, 81, 154, 0.35);
  transition: background 0.22s, box-shadow 0.22s, transform 0.18s;
}
.gr-header-cta i { font-size: 1.1em; }
.gr-header-cta:hover {
  background: var(--gh-primary-dark);
  box-shadow: 0 4px 22px rgba(119, 81, 154, 0.5);
  transform: translateY(-1px);
  color: #fff;
}


/* ── Hamburger ── */
.gr-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  gap: 5px;
  transition: background 0.2s, border-color 0.2s;
}
.gr-hamburger:hover {
  background: rgba(119, 81, 154, 0.07);
  border-color: rgba(119, 81, 154, 0.2);
}

.gr-hamburger-line {
  display: block;
  width: 18px; height: 1.5px;
  background: #2a2a2a;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease, width 0.3s ease, background 0.35s ease;
}
.gr-hamburger-line:nth-child(2) { width: 14px; }

.gr-hamburger--open .gr-hamburger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 18px; }
.gr-hamburger--open .gr-hamburger-line:nth-child(2) { opacity: 0; width: 0; }
.gr-hamburger--open .gr-hamburger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ── Mobile backdrop ── */
.gr-header-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 20, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1097;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.gr-header-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}


/* ================================================================
   WHATSAPP FLOATING BUTTON
   ================================================================ */
.wsp-btn-box {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Label que desliza desde la derecha */
.wsp-btn-box a {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  position: relative;
}

.wsp-label {
  background: #fff;
  color: #111;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 8px 16px 8px 18px;
  border-radius: 50px 0 0 50px;
  box-shadow: -4px 4px 18px rgba(0,0,0,0.1);
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.38s cubic-bezier(0.4,0,0.2,1),
              opacity    0.28s ease,
              padding    0.38s ease;
  padding-left: 0;
  padding-right: 0;
}

.wsp-btn-box a:hover .wsp-label {
  max-width: 160px;
  opacity: 1;
  padding: 8px 16px 8px 18px;
}

/* Botón circular */
.wsp-circle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  flex-shrink: 0;
  color: #fff;
  font-size: 26px;
  z-index: 1;
}

.wsp-btn-box a:hover .wsp-circle {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

/* Anillo de pulso */
.wsp-circle::before,
.wsp-circle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: wsp-ring 2.4s ease-out 1s infinite;
}
.wsp-circle::after {
  animation-delay: 1.8s;
}

@keyframes wsp-ring {
  0%   { transform: scale(1);   opacity: 0.55; }
  80%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Punto verde "online" */
.wsp-online-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wsp-online-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: block;
  animation: wsp-blink 2.5s ease-in-out infinite;
}
@keyframes wsp-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.gr-header-nav-cta { display: none; }


/* ================================================================
   RESPONSIVE ≤ 1024px — MOBILE DRAWER (derecha, fondo oscuro)
   ================================================================ */
@media screen and (max-width: 1024px) {

  :root {
    --gh-topbar-h: 0px;
    --gh-header-h: 64px;
  }

  .gr-topbar { display: none; }
  .gr-header { top: 0; }
  .gr-header--scrolled { top: 0; height: 60px; }

  .gr-header-inner { padding: 0 20px; gap: 12px; }
  .gr-header-logo { width: 140px; }

  /* ── Panel drawer — derecha, dark ── */
  .gr-header-nav {
    position: fixed;
    top: 0; right: 0; left: auto;
    width: min(300px, 85vw);
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    background: var(--gh-dark);
    padding: 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1098;
    box-shadow: -8px 0 48px rgba(0, 0, 0, 0.4);
    /* Revert display:contents */
    display: flex;
  }

  .gr-header-nav--open { transform: translateX(0); }

  /* ── Panel top: logo + close button ── */
  .gr-nav-panel-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
  }

  .gr-nav-panel-logo-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
  }
  .gr-nav-panel-logo-card img {
    width: 120px;
    height: auto;
    display: block;
  }

  .gr-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
  }
  .gr-nav-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  /* ── Links wrap ── */
  .gr-nav-links-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px 0;
  }

  .gr-header-nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    border-radius: 0;
    background: transparent;
    letter-spacing: 0.02em;
    transition: color 0.2s, background 0.2s, padding-left 0.25s;
  }

  /* Flecha derecha */
  .gr-header-nav-link::after {
    display: block;
    content: '';
    width: 6px; height: 6px;
    border-right: 1.5px solid currentColor;
    border-top: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.3;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
  }

  .gr-header-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 30px;
  }
  .gr-header-nav-link:hover::after { opacity: 0.7; }

  .gr-header-nav-link--active {
    color: #c49ee0;
    background: rgba(119, 81, 154, 0.15);
    border-left: 2px solid var(--gh-primary);
    padding-left: 22px;
    font-weight: 600;
  }
  .gr-header-nav-link--active::before { display: none; }
  .gr-header-nav-link--active::after { opacity: 0.6; }

  /* ── Panel bottom: CTA + contacto ── */
  .gr-nav-panel-bottom {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 20px 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
  }

  .gr-header-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gh-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(119, 81, 154, 0.4);
    transition: background 0.2s, transform 0.18s;
    margin-bottom: 16px;
  }
  .gr-header-nav-cta:hover {
    background: var(--gh-primary-dark);
    color: #fff;
    transform: translateY(-1px);
  }
  .gr-header-nav-cta i { font-size: 1.2em; }

  .gr-nav-panel-contact {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .gr-nav-panel-contact a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
  }
  .gr-nav-panel-contact a:hover { color: rgba(255, 255, 255, 0.8); }
  .gr-nav-panel-contact a i { color: var(--gh-primary-light); font-size: 10px; }

  /* ── Hide desktop CTA, show hamburger ── */
  .gr-header-cta { display: none; }
  .gr-hamburger { display: flex; }
  .gr-hamburger-line { background: #333; }

  /* Overlay cubre toda la pantalla */
  .gr-header-overlay { display: block; top: 0; pointer-events: none; }

  /* WhatsApp: ajuste de posición en mobile */
  .wsp-btn-box { bottom: 16px; right: 16px; }
  .wsp-label { display: none; } /* sin label en mobile — solo el círculo */
}

@media screen and (max-width: 480px) {
  .gr-topbar-link--location { display: none; }
}
