/* ============================================================
   HEADER — Grúas Rosano  |  Premium redesign
   ============================================================ */

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

/* ── Container offset ── */
.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-2);
  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;
}

/* Contact links */
.gr-topbar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gr-topbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.025em;
  transition: color 0.2s;
  white-space: nowrap;
}

.gr-topbar-link:hover {
  color: #fff;
}

.gr-topbar-link i {
  color: var(--gh-primary-light);
  font-size: 10.5px;
}

/* Social icons */
.gr-topbar-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-topbar-social-link {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.gr-topbar-social-link:hover {
  background: 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;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  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,
    border-color 0.35s ease;
}

/* Scrolled state */
.gr-header--scrolled {
  top: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.09);
}

.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: 175px;
}

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

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

.gr-header-logo-link:hover img {
  opacity: 0.82;
}


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

.gr-header-nav-link {
  position: relative;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  color: #2a2a2a;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.22s;
}

/* Animated underline */
.gr-header-nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--gh-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gr-header-nav-link:hover {
  color: var(--gh-primary);
}

.gr-header-nav-link:hover::after,
.gr-header-nav-link--active::after {
  transform: scaleX(1);
}

.gr-header-nav-link--active {
  color: var(--gh-primary);
}


/* ── Actions (right side) ── */
.gr-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* CTA button */
.gr-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--gh-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  white-space: nowrap;
  box-shadow: 0 2px 14px rgba(119, 81, 154, 0.32);
  transition:
    background   0.22s ease,
    box-shadow   0.22s ease,
    transform    0.18s ease,
    color        0.22s ease;
}

.gr-header-cta:hover {
  background: var(--gh-primary-dark);
  box-shadow: 0 4px 22px rgba(119, 81, 154, 0.46);
  transform: translateY(-2px);
  color: #fff;
}

.gr-header-cta i {
  font-size: 1.15em;
  transition: transform 0.25s ease;
}

.gr-header-cta:hover i {
  transform: scale(1.15);
}


/* ── Hamburger (mobile only) ── */
.gr-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 3px;
  gap: 5px;
  transition: background 0.2s;
}

.gr-hamburger:hover {
  background: rgba(119, 81, 154, 0.08);
}

.gr-hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  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;
}

/* Open state → X */
.gr-hamburger--open .gr-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.gr-hamburger--open .gr-hamburger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}
.gr-hamburger--open .gr-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── Mobile backdrop overlay ── */
.gr-header-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 13, 26, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1097;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gr-header-overlay--visible {
  opacity: 1;
}


/* ================================================================
   WHATSAPP FLOATING BUTTON  (updated style)
   ================================================================ */
.wsp-btn-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
}

.wsp-btn-box a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  background: #25d366;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: wsp-pulse 3s ease-in-out 2s infinite;
}

.wsp-btn-box a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
  color: #fff;
}

.wsp-btn-box a i {
  font-size: 1.35em;
}

@keyframes wsp-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45); }
  50%       { box-shadow: 0 4px 32px rgba(37, 211, 102, 0.75); }
}


/* ================================================================
   RESPONSIVE  ≤ 1024px
   ================================================================ */
@media screen and (max-width: 1024px) {

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

  /* Hide topbar on mobile */
  .gr-topbar {
    display: none;
  }

  .gr-header {
    top: 0;
  }

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

  .gr-header-inner {
    padding: 0 20px;
    gap: 16px;
  }

  .gr-header-logo {
    width: 145px;
  }

  /* Nav becomes a slide-in panel */
  .gr-header-nav {
    position: fixed;
    top: var(--gh-header-h);
    left: 0;
    width: min(320px, 85vw);
    height: calc(100dvh - var(--gh-header-h));
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    padding: 24px 28px 40px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1098;
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.12);
  }

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

  .gr-header-nav-link {
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    letter-spacing: 0.01em;
    color: #1a1a1a;
  }

  .gr-header-nav-link::after {
    display: none;
  }

  .gr-header-nav-link--active {
    color: var(--gh-primary);
  }

  /* Mobile CTA inside nav panel */
  .gr-header-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    padding: 13px 26px;
    background: var(--gh-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 3px;
    box-shadow: 0 2px 16px rgba(119, 81, 154, 0.35);
    transition: background 0.2s;
  }

  .gr-header-nav-cta:hover {
    background: var(--gh-primary-dark);
    color: #fff;
  }

  /* Hide desktop CTA, show hamburger */
  .gr-header-cta {
    display: none;
  }

  .gr-hamburger {
    display: flex;
  }

  /* Overlay shown on mobile */
  .gr-header-overlay {
    display: block;
    top: var(--gh-header-h);
  }

  /* WhatsApp button: full-width pill on mobile */
  .wsp-btn-box {
    bottom: 12px;
    right: 12px;
  }

  .wsp-btn-box a span {
    display: none;
  }

  .wsp-btn-box a {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}

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