/* ============================================================
   TRABAJOS REALIZADOS — Grúas Rosano
   ============================================================ */

/* ── Hero ── */
.gr-works-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: url('../../images/nuevas/01-izaje-embarcaciones/gruas-rosano-grua-movil-izaje-embarcaciones-marina.jpeg') center / cover no-repeat;
  background-attachment: fixed;
  padding-bottom: 56px;
}

.gr-works-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,20,0.82) 0%, rgba(5,5,20,0.45) 60%, rgba(5,5,20,0.3) 100%);
}

.gr-works-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 80px;
}

.gr-works-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.gr-works-breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.gr-works-breadcrumb a:hover { color: #fff; }

.gr-works-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 16px;
}

.gr-works-hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0;
}

/* ── Intro SEO text ── */
.gr-works-intro {
  background: #f8f7fc;
  border-bottom: 1px solid rgba(119,81,154,0.1);
}

.gr-works-intro-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 80px;
}

.gr-works-intro-inner p {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.58);
  line-height: 1.75;
  margin: 0;
}

.gr-works-intro-inner strong {
  color: #77519A;
  font-weight: 600;
}

/* ── Filtros ── */
.gr-works-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1300px;
  margin: 0 auto;
  padding: 36px 80px 0;
}

.gr-works-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 40px;
  border: 1.5px solid rgba(119,81,154,0.25);
  background: #fff;
  color: rgba(0,0,0,0.55);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: inherit;
}

.gr-works-filter-btn:hover {
  border-color: #77519A;
  color: #77519A;
  background: rgba(119,81,154,0.05);
}

.gr-works-filter-btn--active {
  background: #77519A;
  border-color: #77519A;
  color: #fff;
  box-shadow: 0 4px 16px rgba(119,81,154,0.3);
}

.gr-works-filter-btn--active:hover {
  background: #5a3a78;
  color: #fff;
}

.gr-works-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
}

.gr-works-filter-btn:not(.gr-works-filter-btn--active) .gr-works-filter-count {
  background: rgba(119,81,154,0.1);
  color: #77519A;
}

/* ── Grid de la galería ── */
.gr-works-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 80px 80px;
}

.gr-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Tarjeta ── */
.gr-works-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  aspect-ratio: 4/3;

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.25s ease;
}

.gr-works-card--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger */
.gr-works-card:nth-child(3n+2) { transition-delay: 0.07s; }
.gr-works-card:nth-child(3n+3) { transition-delay: 0.14s; }

.gr-works-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.28);
}

.gr-works-card-img-wrap {
  width: 100%;
  height: 100%;
}

.gr-works-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
}

.gr-works-card:hover .gr-works-card-img-wrap img {
  transform: scale(1.07);
}

/* Overlay en hover */
.gr-works-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,20,0.88) 0%, rgba(5,5,20,0.3) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gr-works-card:hover .gr-works-card-overlay,
.gr-works-card:focus .gr-works-card-overlay {
  opacity: 1;
}

.gr-works-card-cat {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a8f0;
  margin-bottom: 6px;
}

.gr-works-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 4px;
}

.gr-works-card-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
  margin: 0;
}

.gr-works-card-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(119,81,154,0.75);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  transition: background 0.22s ease, transform 0.22s ease;
}

.gr-works-card:hover .gr-works-card-zoom {
  background: #77519A;
  transform: scale(1.1);
}

/* Empty state */
.gr-works-empty {
  text-align: center;
  padding: 60px 0;
  color: rgba(0,0,0,0.4);
  font-size: 1rem;
}

/* ── Lightbox ── */
.gr-lightbox[hidden] { display: none !important; }

.gr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gr-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,20,0.94);
  backdrop-filter: blur(4px);
}

.gr-lightbox-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.gr-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.gr-lightbox-info {
  text-align: center;
  padding: 14px 0 0;
}

.gr-lightbox-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a8f0;
  display: block;
  margin-bottom: 4px;
}

.gr-lightbox-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.gr-lightbox-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin: 0;
}

/* Botones lightbox */
.gr-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gr-lightbox-close:hover { background: rgba(255,255,255,0.2); }

.gr-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.gr-lightbox-nav--prev { left: 20px; }
.gr-lightbox-nav--next { right: 20px; }
.gr-lightbox-nav:hover { background: rgba(119,81,154,0.6); }
.gr-lightbox-nav:disabled { opacity: 0.25; cursor: default; }

/* ── CTA final ── */
.gr-works-cta {
  position: relative;
  padding: 96px 0;
  background: url('../../images/nuevas/01-izaje-embarcaciones/gruas-rosano-operativo-izaje-yates-puerto-01.jpeg') center / cover no-repeat;
  background-attachment: fixed;
  text-align: center;
}

.gr-works-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(40,10,70,0.88) 0%, rgba(5,5,20,0.82) 100%);
}

.gr-works-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px;
}

.gr-works-cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.gr-works-cta-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.68);
  margin: 0 0 36px;
}

.gr-works-cta-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.gr-works-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 30px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.22s ease;
}

.gr-works-cta-btn--wa {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}

.gr-works-cta-btn--wa:hover {
  background: #1ebe5a;
  transform: translateY(-2px);
  color: #fff;
}

.gr-works-cta-btn--contact {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
}

.gr-works-cta-btn--contact:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-2px);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .gr-works-hero-inner,
  .gr-works-intro-inner,
  .gr-works-filters,
  .gr-works-section { padding-left: 48px; padding-right: 48px; }
}

@media (max-width: 900px) {
  .gr-works-grid { grid-template-columns: repeat(2, 1fr); }
  .gr-works-hero  { background-attachment: scroll; }
  .gr-works-cta   { background-attachment: scroll; }
  .gr-works-card-overlay { opacity: 1; }
}

@media (max-width: 640px) {
  .gr-works-hero-inner,
  .gr-works-intro-inner,
  .gr-works-filters,
  .gr-works-section { padding-left: 20px; padding-right: 20px; }

  .gr-works-grid { grid-template-columns: 1fr; gap: 12px; }

  .gr-works-filters { padding-top: 24px; gap: 8px; }

  .gr-lightbox-nav--prev { left: 8px; }
  .gr-lightbox-nav--next { right: 8px; }
}
