html{ scroll-behavior: smooth; }
    body.page-trabajos{
      margin: 0;
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background: #fff;
      color: var(--text);
      min-height: 100dvh;
      display: flex;
      flex-direction: column;
    }
    body.page-trabajos a{ display:inline; color: inherit; text-decoration: none; }
    body.page-trabajos img{ display:block; max-width: 100%; }

    ul, li { padding: 0; margin: 0; list-style: none; }

    .titlebar{
      height: 200px;
      display: flex;
      justify-content: center;
      align-items: center;
      background: var(--blackBar);
      color: var(--blanco);
      text-align:center;
      margin-top: 110px;
      padding: 18px 18px;
      font-weight: 800;
      letter-spacing: .10em;
      text-transform: uppercase;
      font-size: 2.4rem;
    }

    .titlebar p{
      margin: 0;
      width: 100%;
      font-size: 2.4rem;
      font-weight: 800;
      color: var(--blanco);
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .titlebar p b{
      font-weight: 400;
      margin-right: 0.35em;
    }

    .wrap{
      max-width: var(--max);
      margin: 0 auto;
      padding: 36px 18px 70px;
    }

    .grid{
      display:grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      align-items:start;
      justify-items:center;
    }

    .item{
      width: 100%;
      max-width: 260px;
      text-align:center;
    }

    .item > a{ display:block; width:100%; }

    .thumb{
      width: 260px;
      height: 195px;
      background: #f4f4f4;
      overflow:hidden;
      border: 1px solid var(--line);
      transition: border-radius .25s ease;
      position: relative;
    }

    .thumb.corner-tl{ border-top-left-radius: 38px; }
    .thumb.corner-tr{ border-top-right-radius: 38px; }
    .thumb.corner-br{ border-bottom-right-radius: 38px; }
    .thumb.corner-bl{ border-bottom-left-radius: 38px; }
    .thumb.no-radius{ border-radius: 0; }

    .thumb img{
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scale(1);
      transition: transform .25s ease;
    }
    .item:hover .thumb img{ transform: scale(1.03); }

    .captionOverlay{
      position:absolute;
      inset: 0;
      display:flex;
      flex-direction:column;
      justify-content:center;
      align-items:center;
      text-align:center;
      padding: 14px;

      background: rgba(255, 214, 0, 0.65);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);

      border: 1px solid var(--line);
      box-sizing: border-box;

      opacity: 0;
      transform: translateY(6px);
      transition: opacity .18s ease, transform .18s ease;
      pointer-events:none;
    }

    .captionOverlay .brandName{
      font-size: 0.813rem;
      font-weight: 800;
      letter-spacing: .02em;
      text-transform: uppercase;
      color:#111;
      line-height: 1.1;
    }
    .captionOverlay .sub{
      font-size: 0.688rem;
      font-weight: 600;
      color:#111;
      opacity:.9;
      margin-top: 6px;
      line-height: 1.25;
    }

    @media (hover:hover) and (pointer:fine){
      .item:hover .captionOverlay{
        opacity: 1;
        transform: translateY(0);
      }
    }
    @media (hover:none), (max-width:980px){
      .captionOverlay{ display:none !important; }
    }

    @media (max-width: 1100px){
      .grid{ grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 980px){
      .grid{ grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
      .thumb{ width: 240px; height: 180px; }
      .item{ max-width: 240px; }
    }
    @media (max-width: 560px){
      .grid{ grid-template-columns: 1fr; gap: 22px; }
      .thumb{ width: 280px; height: 205px; }
      .item{ max-width: 280px; }
    }

    .footer{
      background:#111;
      color:#fff;
      text-align:center;
      font-size: 0.688rem;
      padding: 16px 18px;
    }

    /* POPUP */
    .pmodal{
      position: fixed;
      inset: 0;
      display:none;
      align-items:center;
      justify-content:center;
      background: rgba(0,0,0,.35);
      backdrop-filter: blur(8px);
      z-index: 999999;
      padding: 24px;
    }
    .pmodal.is-open{ display:flex; }

    .pmodal-panel{
      position: relative;
      width: 70vw;
      height: 85vh;
      background: #fff;
      border-radius: 80px 0 0 0;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,.25);
    }

    @media (max-width: 900px){
      .pmodal{ padding: 14px; }
      .pmodal-panel{
        width: 94vw;
        height: 90vh;
        border-radius: 80px 0 0 0;
      }
    }

    .pmodal-frame{
      width:100%;
      height:100%;
      border:0;
      display:block;
      background:#fff;
    }

.pmodal-close{
      position:absolute;
      top:14px;
      right:14px;
      width:44px;
      height:44px;
      border-radius:50%;
      border:0;
      background:#000;
      color:#fff;
      font-size:1.75rem;
      display:flex;
      align-items:center;
      justify-content:center;
      cursor:pointer;
      z-index: 2000001;
    }

/* Neutraliza reglas legacy de css/style.css para #trabajos */
body.page-trabajos #trabajos,
body.page-trabajos main#trabajos{
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: auto;
  height: auto !important;
  min-height: 0 !important;
  padding: 36px 18px 70px;
  background: transparent;
  color: var(--text);
  display: block;
  flex: 1 1 auto;
  overflow: visible !important;
  box-sizing: border-box;
  z-index: 1;
}

body.page-trabajos .footer{
  position: static !important;
  bottom: auto !important;
  margin-top: auto;
  z-index: auto;
  clear: both;
  width: 100%;
  display: block;
  flex-shrink: 0;
  background:#111;
  color:#fff;
  text-align:center;
  font-size: 0.688rem;
  padding: 16px 18px;
}

body.page-trabajos #trabajos .grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items:start;
  justify-items:center;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
}

@media (max-width: 1100px){
  body.page-trabajos #trabajos .grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px){
  body.page-trabajos #trabajos .grid{ grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
}

@media (max-width: 560px){
  body.page-trabajos #trabajos .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.page-trabajos #trabajos .item{ max-width: 100%; }
  body.page-trabajos #trabajos .thumb{ width: 100%; height: auto; aspect-ratio: 260 / 195; }
}

@media (max-width: 690px){
  body.page-trabajos .titlebar,
  body.page-trabajos .titlebar p{ font-size: 1.7rem; }
  .titlebar {
    margin-top: 70px;
  }
}
